shader: Implement SR_Y_DIRECTION

This commit is contained in:
FernandoS27 2021-04-16 23:52:58 +02:00 committed by ameerj
parent 50f8007172
commit f18a6dd1bd
10 changed files with 22 additions and 0 deletions

View file

@ -82,6 +82,8 @@ void FixedPipelineState::Refresh(Tegra::Engines::Maxwell3D& maxwell3d,
alpha_test_ref = Common::BitCast<u32>(regs.alpha_test_ref);
point_size = Common::BitCast<u32>(regs.point_size);
y_negate.Assign(regs.screen_y_control.y_negate != 0 ? 1 : 0);
if (maxwell3d.dirty.flags[Dirty::InstanceDivisors]) {
maxwell3d.dirty.flags[Dirty::InstanceDivisors] = false;
for (size_t index = 0; index < Maxwell::NumVertexArrays; ++index) {

View file

@ -202,6 +202,7 @@ struct FixedPipelineState {
BitField<3, 1, u32> early_z;
BitField<4, 1, u32> depth_enabled;
BitField<5, 5, u32> depth_format;
BitField<10, 1, u32> y_negate;
};
std::array<u8, Maxwell::NumRenderTargets> color_formats;

View file

@ -1116,6 +1116,7 @@ Shader::Profile PipelineCache::MakeProfile(const GraphicsPipelineCacheKey& key,
break;
}
profile.force_early_z = key.state.early_z != 0;
profile.y_negate = key.state.y_negate != 0;
return profile;
}