mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
Remove fragment constants
This commit is contained in:
parent
beabc88f79
commit
67f1f0fea3
@ -331,16 +331,16 @@ void D3D12GSRender::FillPixelShaderConstantsBuffer()
|
||||
// Is it assigned by color register in command buffer ?
|
||||
// TODO : we loop every iteration, we might do better...
|
||||
bool isCommandBufferSetConstant = false;
|
||||
for (const RSXTransformConstant& c : m_fragment_constants)
|
||||
for (const auto& entry : fragment_constants)
|
||||
{
|
||||
size_t fragmentId = c.id - m_cur_fragment_prog->offset;
|
||||
size_t fragmentId = entry.first - m_cur_fragment_prog->offset;
|
||||
if (fragmentId == offsetInFP)
|
||||
{
|
||||
isCommandBufferSetConstant = true;
|
||||
vector[0] = (u32&)c.x;
|
||||
vector[1] = (u32&)c.y;
|
||||
vector[2] = (u32&)c.z;
|
||||
vector[3] = (u32&)c.w;
|
||||
vector[0] = (u32&)entry.second.x;
|
||||
vector[1] = (u32&)entry.second.y;
|
||||
vector[2] = (u32&)entry.second.z;
|
||||
vector[3] = (u32&)entry.second.w;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1090,7 +1090,7 @@ void GLGSRender::InitFragmentData()
|
||||
checkForGlError("glUniform4f " + name + fmt::format(" %u [%f %f %f %f]", l, f0, f1, f2, f3));
|
||||
}
|
||||
|
||||
for (const RSXTransformConstant& c : m_fragment_constants)
|
||||
/* for (const RSXTransformConstant& c : m_fragment_constants)
|
||||
{
|
||||
u32 id = c.id - m_cur_fragment_prog->offset;
|
||||
|
||||
@ -1102,7 +1102,7 @@ void GLGSRender::InitFragmentData()
|
||||
|
||||
glUniform4f(l, c.x, c.y, c.z, c.w);
|
||||
checkForGlError("glUniform4f " + name + fmt::format(" %u [%f %f %f %f]", l, c.x, c.y, c.z, c.w));
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
//if (m_fragment_constants.GetCount())
|
||||
|
@ -1783,8 +1783,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
case NV308A_COLOR:
|
||||
{
|
||||
RSXTransformConstant c;
|
||||
c.id = m_dst_offset | ((u32)m_point_x << 2);
|
||||
color4f c;
|
||||
u32 id = m_dst_offset | ((u32)m_point_x << 2);
|
||||
|
||||
if (count >= 1)
|
||||
{
|
||||
@ -1819,9 +1819,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
LOG_ERROR(RSX, "NV308A_COLOR: unknown arg count (%d)", count);
|
||||
}
|
||||
|
||||
m_fragment_constants.push_back(c);
|
||||
|
||||
//LOG_WARNING(RSX, "NV308A_COLOR: [%d]: %f, %f, %f, %f", c.id, c.x, c.y, c.z, c.w);
|
||||
fragment_constants[id] = c;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2147,7 +2145,7 @@ void RSXThread::End()
|
||||
}
|
||||
|
||||
m_indexed_array.Reset();
|
||||
m_fragment_constants.clear();
|
||||
fragment_constants.clear();
|
||||
m_cur_fragment_prog_num = 0;
|
||||
|
||||
m_clear_surface_mask = 0;
|
||||
|
@ -154,9 +154,7 @@ public:
|
||||
RSXIndexArrayData m_indexed_array;
|
||||
|
||||
std::unordered_map<u32, color4_base<f32>> transform_constants;
|
||||
|
||||
std::vector<RSXTransformConstant> m_fragment_constants;
|
||||
|
||||
std::unordered_map<u32, color4_base<f32>> fragment_constants;
|
||||
|
||||
u32 m_shader_ctrl, m_cur_fragment_prog_num;
|
||||
RSXFragmentProgram m_fragment_progs[rsx::limits::fragment_count];
|
||||
|
Loading…
Reference in New Issue
Block a user