Skip to content

Commit

Permalink
Add missing Desc2 union member to decoded D3D12_VERSIONED_ROOT_SIGNAT… (
Browse files Browse the repository at this point in the history
#1552)

* Add missing Desc2 union member to decoded D3D12_VERSIONED_ROOT_SIGNATURE_DESC

* Regenerate DX12 files

* Fix SDK numbers
  • Loading branch information
beau-lunarg authored May 20, 2024
1 parent b31b95d commit cc72833
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions framework/decode/custom_dx12_struct_decoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_VER
wrapper->Desc_1_1->decoded_value = &(value->Desc_1_1);
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Desc_1_1);
break;
case D3D_ROOT_SIGNATURE_VERSION_1_2:
wrapper->Desc_1_2 = DecodeAllocator::Allocate<Decoded_D3D12_ROOT_SIGNATURE_DESC2>();
wrapper->Desc_1_2->decoded_value = &(value->Desc_1_2);
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Desc_1_2);
break;
}

return bytes_read;
Expand Down
1 change: 1 addition & 0 deletions framework/decode/custom_dx12_struct_decoders.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ struct Decoded_D3D12_VERSIONED_ROOT_SIGNATURE_DESC
D3D12_VERSIONED_ROOT_SIGNATURE_DESC* decoded_value{ nullptr };
Decoded_D3D12_ROOT_SIGNATURE_DESC* Desc_1_0{ nullptr };
Decoded_D3D12_ROOT_SIGNATURE_DESC1* Desc_1_1{ nullptr };
Decoded_D3D12_ROOT_SIGNATURE_DESC2* Desc_1_2{ nullptr };
};

struct Decoded_D3D12_INDIRECT_ARGUMENT_DESC
Expand Down
4 changes: 4 additions & 0 deletions framework/decode/dx12_resource_value_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,10 @@ void Dx12ResourceValueMapper::PostProcessCreateRootSignature(PointerDecoder<uint
GetRootSignatureResourceValueInfos(&versioned_root_sig->Desc_1_1,
root_sig_extra_info->resource_value_infos);
break;
case D3D_ROOT_SIGNATURE_VERSION_1_2:
GetRootSignatureResourceValueInfos(&versioned_root_sig->Desc_1_2,
root_sig_extra_info->resource_value_infos);
break;
default:
GFXRECON_LOG_ERROR("Ignoring unrecognized root signature version (%d) for root signature (id=%" PRIu64
").",
Expand Down
3 changes: 3 additions & 0 deletions framework/encode/custom_dx12_struct_encoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ void EncodeStruct(ParameterEncoder* encoder, const D3D12_VERSIONED_ROOT_SIGNATUR
case D3D_ROOT_SIGNATURE_VERSION_1_1:
EncodeStruct(encoder, value.Desc_1_1);
break;
case D3D_ROOT_SIGNATURE_VERSION_1_2:
EncodeStruct(encoder, value.Desc_1_2);
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def makeUnionFieldToJson(self, properties, struct_name, union_index):
}
case D3D_ROOT_SIGNATURE_VERSION_1_2:
{
/// @todo Uncomment this once the union member is added to the decoded struct: FieldToJson(jdata["Desc_1_2"], meta_struct.Desc_1_2, options);
FieldToJson(jdata["Desc_1_2"], meta_struct.Desc_1_2, options);
GFXRECON_LOG_ERROR("Unknown D3D_ROOT_SIGNATURE_VERSION_1_2 in D3D12_VERSIONED_ROOT_SIGNATURE_DESC.");
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,7 @@ void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_VERSIONED_RO
}
case D3D_ROOT_SIGNATURE_VERSION_1_2:
{
/// @todo Uncomment this once the union member is added to the decoded struct: FieldToJson(jdata["Desc_1_2"], meta_struct.Desc_1_2, options);
FieldToJson(jdata["Desc_1_2"], meta_struct.Desc_1_2, options);
GFXRECON_LOG_ERROR("Unknown D3D_ROOT_SIGNATURE_VERSION_1_2 in D3D12_VERSIONED_ROOT_SIGNATURE_DESC.");
break;
}
Expand Down

0 comments on commit cc72833

Please sign in to comment.