mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-02 22:29:16 +01:00
[dxbc] Actually set "icb" as the debug name of the ICB
This commit is contained in:
parent
f8392b4f83
commit
91407098d5
@ -685,13 +685,15 @@ namespace dxvk {
|
|||||||
const uint32_t bufferId = ins.dst[0].idx[0].offset;
|
const uint32_t bufferId = ins.dst[0].idx[0].offset;
|
||||||
const uint32_t elementCount = ins.dst[0].idx[1].offset;
|
const uint32_t elementCount = ins.dst[0].idx[1].offset;
|
||||||
|
|
||||||
this->emitDclConstantBufferVar(bufferId, elementCount);
|
this->emitDclConstantBufferVar(bufferId, elementCount,
|
||||||
|
str::format("cb", bufferId).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DxbcCompiler::emitDclConstantBufferVar(
|
void DxbcCompiler::emitDclConstantBufferVar(
|
||||||
uint32_t regIdx,
|
uint32_t regIdx,
|
||||||
uint32_t numConstants) {
|
uint32_t numConstants,
|
||||||
|
const char* name) {
|
||||||
// Uniform buffer data is stored as a fixed-size array
|
// Uniform buffer data is stored as a fixed-size array
|
||||||
// of 4x32-bit vectors. SPIR-V requires explicit strides.
|
// of 4x32-bit vectors. SPIR-V requires explicit strides.
|
||||||
const uint32_t arrayType = m_module.defArrayTypeUnique(
|
const uint32_t arrayType = m_module.defArrayTypeUnique(
|
||||||
@ -706,7 +708,7 @@ namespace dxvk {
|
|||||||
m_module.decorateBlock (structType);
|
m_module.decorateBlock (structType);
|
||||||
m_module.memberDecorateOffset(structType, 0, 0);
|
m_module.memberDecorateOffset(structType, 0, 0);
|
||||||
|
|
||||||
m_module.setDebugName (structType, str::format("struct_cb", regIdx).c_str());
|
m_module.setDebugName (structType, str::format("struct_", name).c_str());
|
||||||
m_module.setDebugMemberName (structType, 0, "m");
|
m_module.setDebugMemberName (structType, 0, "m");
|
||||||
|
|
||||||
// Variable that we'll use to access the buffer
|
// Variable that we'll use to access the buffer
|
||||||
@ -714,8 +716,7 @@ namespace dxvk {
|
|||||||
m_module.defPointerType(structType, spv::StorageClassUniform),
|
m_module.defPointerType(structType, spv::StorageClassUniform),
|
||||||
spv::StorageClassUniform);
|
spv::StorageClassUniform);
|
||||||
|
|
||||||
m_module.setDebugName(varId,
|
m_module.setDebugName(varId, name);
|
||||||
str::format("cb", regIdx).c_str());
|
|
||||||
|
|
||||||
// Compute the DXVK binding slot index for the buffer.
|
// Compute the DXVK binding slot index for the buffer.
|
||||||
// D3D11 needs to bind the actual buffers to this slot.
|
// D3D11 needs to bind the actual buffers to this slot.
|
||||||
@ -731,7 +732,7 @@ namespace dxvk {
|
|||||||
const uint32_t specConstId = m_module.specConstBool(true);
|
const uint32_t specConstId = m_module.specConstBool(true);
|
||||||
m_module.decorateSpecId(specConstId, bindingId);
|
m_module.decorateSpecId(specConstId, bindingId);
|
||||||
m_module.setDebugName(specConstId,
|
m_module.setDebugName(specConstId,
|
||||||
str::format("cb", regIdx, "_bound").c_str());
|
str::format(name, "_bound").c_str());
|
||||||
|
|
||||||
DxbcConstantBuffer buf;
|
DxbcConstantBuffer buf;
|
||||||
buf.varId = varId;
|
buf.varId = varId;
|
||||||
@ -1370,7 +1371,7 @@ namespace dxvk {
|
|||||||
void DxbcCompiler::emitDclImmediateConstantBufferUbo(
|
void DxbcCompiler::emitDclImmediateConstantBufferUbo(
|
||||||
uint32_t dwordCount,
|
uint32_t dwordCount,
|
||||||
const uint32_t* dwordArray) {
|
const uint32_t* dwordArray) {
|
||||||
this->emitDclConstantBufferVar(Icb_BindingSlotId, dwordCount / 4);
|
this->emitDclConstantBufferVar(Icb_BindingSlotId, dwordCount / 4, "icb");
|
||||||
m_immConstData = DxvkShaderConstData(dwordCount, dwordArray);
|
m_immConstData = DxvkShaderConstData(dwordCount, dwordArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,7 +531,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
void emitDclConstantBufferVar(
|
void emitDclConstantBufferVar(
|
||||||
uint32_t regIdx,
|
uint32_t regIdx,
|
||||||
uint32_t numConstants);
|
uint32_t numConstants,
|
||||||
|
const char* name);
|
||||||
|
|
||||||
void emitDclSampler(
|
void emitDclSampler(
|
||||||
const DxbcShaderInstruction& ins);
|
const DxbcShaderInstruction& ins);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user