mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 01:16:31 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user