gfxreconstruct
gfxreconstruct copied to clipboard
Custom Encode and Decode of D3D12_SAMPLER_DESC2 Always Uses The Same Anon Union Member
void EncodeStruct(ParameterEncoder* encoder, const D3D12_SAMPLER_DESC2& value)
hard-codes encoder->EncodeFloatArray(value.FloatBorderColor, 4);
but it should switch on value.Flags
and encode value.UintBorderColor
if value.Flags
is equal to D3D12_SAMPLER_FLAG_UINT_BORDER_COLOR
.
Decode has the same issue in size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_SAMPLER_DESC2* wrapper)
See https://devblogs.microsoft.com/directx/shader-model-6-7/
Code paths:
-
framework\encode\custom_dx12_struct_encoders.cpp
-
framework\decode\custom_dx12_struct_decoders.cpp