Commit aa8d4979 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Fix order of setting constant type and offset for shared stage info

parent 3be8016f
Pipeline #921 passed with stage
in 10 minutes and 6 seconds
......@@ -364,13 +364,13 @@ namespace dxvk {
uint32_t vec4_t = spvModule.defVectorType(float_t, 4);
std::array<uint32_t, D3D9SharedPSStages_Count> stageMembers = {
vec4_t,
vec2_t,
vec2_t,
float_t,
float_t,
vec4_t
};
std::array<decltype(stageMembers), caps::TextureStageCount> members;
......@@ -385,6 +385,9 @@ namespace dxvk {
uint32_t offset = 0;
for (uint32_t stage = 0; stage < caps::TextureStageCount; stage++) {
spvModule.memberDecorateOffset(structType, stage * D3D9SharedPSStages_Count + D3D9SharedPSStages_Constant, offset);
offset += sizeof(float) * 4;
spvModule.memberDecorateOffset(structType, stage * D3D9SharedPSStages_Count + D3D9SharedPSStages_BumpEnvMat0, offset);
offset += sizeof(float) * 2;
......@@ -397,9 +400,6 @@ namespace dxvk {
spvModule.memberDecorateOffset(structType, stage * D3D9SharedPSStages_Count + D3D9SharedPSStages_BumpEnvLOffset, offset);
offset += sizeof(float);
spvModule.memberDecorateOffset(structType, stage * D3D9SharedPSStages_Count + D3D9SharedPSStages_Constant, offset);
offset += sizeof(float) * 4;
// Padding...
offset += sizeof(float) * 2;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment