diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 855cacad..67f30ee2 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -2350,7 +2350,7 @@ namespace dxvk { uint32_t index, uint32_t value) { auto& specConst = pipeline == VK_PIPELINE_BIND_POINT_GRAPHICS - ? m_state.gp.state.scSpecConstants[index] + ? m_state.gp.state.sc.specConstants[index] : m_state.cp.state.scSpecConstants[index]; if (specConst != value) { diff --git a/src/dxvk/dxvk_graphics.cpp b/src/dxvk/dxvk_graphics.cpp index dc51c926..ec612b16 100644 --- a/src/dxvk/dxvk_graphics.cpp +++ b/src/dxvk/dxvk_graphics.cpp @@ -181,7 +181,7 @@ namespace dxvk { } for (uint32_t i = 0; i < MaxNumSpecConstants; i++) - specData.set(getSpecId(i), state.scSpecConstants[i], 0u); + specData.set(getSpecId(i), state.sc.specConstants[i], 0u); VkSpecializationInfo specInfo = specData.getSpecInfo(); diff --git a/src/dxvk/dxvk_graphics_state.h b/src/dxvk/dxvk_graphics_state.h index 1b8b080d..c5925976 100644 --- a/src/dxvk/dxvk_graphics_state.h +++ b/src/dxvk/dxvk_graphics_state.h @@ -609,6 +609,16 @@ namespace dxvk { }; + /** + * \brief Specialization constant state + * + * Stores the raw 32-bit spec constant values. + */ + struct DxvkScInfo { + uint32_t specConstants[DxvkLimits::MaxNumSpecConstants]; + }; + + /** * \brief Packed graphics pipeline state * @@ -671,9 +681,7 @@ namespace dxvk { DxvkMsInfo ms; DxvkDsInfo ds; DxvkOmInfo om; - - uint32_t scSpecConstants[MaxNumSpecConstants]; - + DxvkScInfo sc; DxvkDsStencilOp dsFront; DxvkDsStencilOp dsBack; DxvkOmAttachmentSwizzle omSwizzle [DxvkLimits::MaxNumRenderTargets];