Improve display of root buffers in D3D12 pipeline state view

* When they're 'structured' but with no structure, still prefer the basic type
  declared in the shader reflection over the descriptor (which can't do better).
This commit is contained in:
baldurk
2025-02-19 13:35:51 +00:00
parent acf6307f81
commit 26e575f4e0
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2511,7 +2511,7 @@ QString BufferFormatter::GetBufferFormatString(Packing::Rules pack, ResourceId s
{
const ShaderConstantType &desc = res.variableType;
if(viewFormat.type == ResourceFormatType::Undefined)
if(viewFormat.type == ResourceFormatType::Undefined || viewFormat.compType == CompType::Typeless)
{
if(desc.baseType == VarType::Unknown)
{
+2 -2
View File
@@ -1157,7 +1157,7 @@ void D3D12Replay::FillRootDescriptor(Descriptor &dst, const D3D12RenderState::Si
// parameters from resource/view
dst.resource = rm->GetOriginalID(src.id);
dst.textureType = TextureType::Buffer;
dst.format = MakeResourceFormat(DXGI_FORMAT_R32_UINT);
dst.format = MakeResourceFormat(DXGI_FORMAT_R32_TYPELESS);
dst.elementByteSize = sizeof(uint32_t);
dst.byteOffset = src.offset;
@@ -1175,7 +1175,7 @@ void D3D12Replay::FillRootDescriptor(Descriptor &dst, const D3D12RenderState::Si
// parameters from resource/view
dst.resource = rm->GetOriginalID(src.id);
dst.textureType = TextureType::Buffer;
dst.format = MakeResourceFormat(DXGI_FORMAT_R32_UINT);
dst.format = MakeResourceFormat(DXGI_FORMAT_R32_TYPELESS);
dst.elementByteSize = sizeof(uint32_t);
dst.byteOffset = src.offset;