mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Zero-Initialize SpecConstantData
Ensure that specialization constant data passed into the driver is zero-initialized. Having the pData field in VkSpecializationInfo be zero-initialized helps to create more deterministic input to the driver, which is particularly useful when debugging shader issues.
This commit is contained in:
parent
cd93ba570e
commit
9d26031dcb
@ -101,7 +101,7 @@ namespace dxvk {
|
||||
|
||||
auto csm = m_cs->createShaderModule(m_vkd, m_slotMapping, moduleInfo);
|
||||
|
||||
DxvkSpecConstantData specData;
|
||||
DxvkSpecConstantData specData = { };
|
||||
|
||||
for (uint32_t i = 0; i < MaxNumActiveBindings; i++)
|
||||
specData.activeBindings[i] = state.bsBindingMask.isBound(i) ? VK_TRUE : VK_FALSE;
|
||||
@ -159,4 +159,4 @@ namespace dxvk {
|
||||
m_pipeMgr->m_stateCache->addComputePipeline(key, state);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ namespace dxvk {
|
||||
sampleCount = VkSampleCountFlagBits(state.rsSampleCount);
|
||||
|
||||
// Set up some specialization constants
|
||||
DxvkSpecConstantData specData;
|
||||
DxvkSpecConstantData specData = { };
|
||||
specData.rasterizerSampleCount = uint32_t(sampleCount);
|
||||
specData.alphaTestEnable = state.xsAlphaCompareOp != VK_COMPARE_OP_ALWAYS;
|
||||
specData.alphaCompareOp = state.xsAlphaCompareOp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user