Skip to content

Commit

Permalink
Add missing Dred_1_2 union member to D3D12_VERSIONED_DEVICE_REMOVED_E… (
Browse files Browse the repository at this point in the history
#1551)

* Add missing Dred_1_2 union member to D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA

* Regenerate DX12 files

* Fix SDK numbers
  • Loading branch information
beau-lunarg authored May 20, 2024
1 parent 7a924af commit b31b95d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 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 @@ -582,6 +582,11 @@ DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_VERSIONED_
wrapper->Dred_1_2->decoded_value = &(value->Dred_1_2);
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Dred_1_2);
break;
case D3D12_DRED_VERSION_1_3:
wrapper->Dred_1_3 = DecodeAllocator::Allocate<Decoded_D3D12_DEVICE_REMOVED_EXTENDED_DATA3>();
wrapper->Dred_1_3->decoded_value = &(value->Dred_1_3);
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Dred_1_3);
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 @@ -182,6 +182,7 @@ struct Decoded_D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA
Decoded_D3D12_DEVICE_REMOVED_EXTENDED_DATA* Dred_1_0{ nullptr };
Decoded_D3D12_DEVICE_REMOVED_EXTENDED_DATA1* Dred_1_1{ nullptr };
Decoded_D3D12_DEVICE_REMOVED_EXTENDED_DATA2* Dred_1_2{ nullptr };
Decoded_D3D12_DEVICE_REMOVED_EXTENDED_DATA3* Dred_1_3{ nullptr };
};

struct Decoded_D3D12_RENDER_PASS_BEGINNING_ACCESS
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 @@ -385,6 +385,9 @@ void EncodeStruct(ParameterEncoder* encoder, const D3D12_VERSIONED_DEVICE_REMOVE
case D3D12_DRED_VERSION_1_2:
EncodeStruct(encoder, value.Dred_1_2);
break;
case D3D12_DRED_VERSION_1_3:
EncodeStruct(encoder, value.Dred_1_3);
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,7 @@ def makeUnionFieldToJson(self, properties, struct_name, union_index):
}
case D3D12_DRED_VERSION_1_3:
{
// This field was missing in the custom struct at time of writing.
// See issue and revise this codegen by uncommenting line below when the issue
// is fixed <https://github.com/LunarG/gfxreconstruct/issues/1351>
// FieldToJson(jdata["Dred_1_3"], meta_struct.Dred_1_3, options);
FieldToJson(jdata["Dred_1_3"], meta_struct.Dred_1_3, options);
FieldToJson(jdata[format::kNameWarning], "Dred_1_3 is not supported by GFXR at this time. Please file an issue quoting this text if this is a blocker for you.", options);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3972,10 +3972,7 @@ void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_VERSIONED_DE
}
case D3D12_DRED_VERSION_1_3:
{
// This field was missing in the custom struct at time of writing.
// See issue and revise this codegen by uncommenting line below when the issue
// is fixed <https://github.com/LunarG/gfxreconstruct/issues/1351>
// FieldToJson(jdata["Dred_1_3"], meta_struct.Dred_1_3, options);
FieldToJson(jdata["Dred_1_3"], meta_struct.Dred_1_3, options);
FieldToJson(jdata[format::kNameWarning], "Dred_1_3 is not supported by GFXR at this time. Please file an issue quoting this text if this is a blocker for you.", options);
break;
}
Expand Down

0 comments on commit b31b95d

Please sign in to comment.