mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Use new specialization constant code for compute pipelines
This commit is contained in:
parent
433c707888
commit
c3f7dfd197
@ -95,23 +95,17 @@ namespace dxvk {
|
||||
Logger::debug(str::format(" cs : ", m_cs->debugName()));
|
||||
}
|
||||
|
||||
DxvkSpecConstants specData;
|
||||
for (uint32_t i = 0; i < m_layout->bindingCount(); i++)
|
||||
specData.set(i, state.bsBindingMask.isBound(i), true);
|
||||
|
||||
VkSpecializationInfo specInfo = specData.getSpecInfo();
|
||||
|
||||
DxvkShaderModuleCreateInfo moduleInfo;
|
||||
moduleInfo.fsDualSrcBlend = false;
|
||||
|
||||
auto csm = m_cs->createShaderModule(m_vkd, m_slotMapping, moduleInfo);
|
||||
|
||||
DxvkSpecConstantData specData = { };
|
||||
|
||||
for (uint32_t i = 0; i < MaxNumActiveBindings; i++)
|
||||
specData.activeBindings[i] = state.bsBindingMask.isBound(i) ? VK_TRUE : VK_FALSE;
|
||||
|
||||
VkSpecializationInfo specInfo;
|
||||
specInfo.mapEntryCount = g_specConstantMap.mapEntryCount();
|
||||
specInfo.pMapEntries = g_specConstantMap.mapEntryData();
|
||||
specInfo.dataSize = sizeof(specData);
|
||||
specInfo.pData = &specData;
|
||||
|
||||
VkComputePipelineCreateInfo info;
|
||||
info.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
|
||||
info.pNext = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user