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

[d3d9] Add shared indices for the FF shared data

parent 507145dc
......@@ -362,7 +362,7 @@ namespace dxvk {
uint32_t float_t = spvModule.defFloatType(32);
uint32_t vec2_t = spvModule.defVectorType(float_t, 2);
std::array<uint32_t, 4> stageMembers = {
std::array<uint32_t, D3D9SharedPSStages_Count> stageMembers = {
vec2_t,
vec2_t,
......
......@@ -130,6 +130,14 @@ namespace dxvk {
Vector4 textureFactor;
};
enum D3D9SharedPSStages {
D3D9SharedPSStages_BumpEnvMat0,
D3D9SharedPSStages_BumpEnvMat1,
D3D9SharedPSStages_BumpEnvLScale,
D3D9SharedPSStages_BumpEnvLOffset,
D3D9SharedPSStages_Count,
};
struct D3D9SharedPS {
struct Stage {
float BumpEnvMat[2][2];
......
......@@ -2552,7 +2552,7 @@ void DxsoCompiler::emitControlFlowGenericLoop(
uint32_t tc_m_n = m_module.opCompositeExtract(fl_t, m.id, 1, &i);
uint32_t offset = m_module.constu32(4 * ctx.dst.id.num + i);
uint32_t offset = m_module.constu32(D3D9SharedPSStages_Count * ctx.dst.id.num + D3D9SharedPSStages_BumpEnvMat0 + i);
uint32_t bm = m_module.opAccessChain(m_module.defPointerType(vec2_t, spv::StorageClassUniform),
m_ps.sharedState, 1, &offset);
bm = m_module.opLoad(vec2_t, bm);
......
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