1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[dxvk] Use new struct for specialization constant info

Stylistic reasons.
This commit is contained in:
Philip Rebohle 2019-10-07 13:13:08 +02:00
parent b2087b2e7e
commit e086db5ce5
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 13 additions and 5 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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];