gl_state_tracker: Implement depth dirty flags

This commit is contained in:
ReinUsesLisp
2019-12-29 22:56:21 -03:00
parent b910a83a47
commit 40a2c57df5
4 changed files with 31 additions and 6 deletions

View File

@ -129,6 +129,13 @@ void SetupDirtyShaders(Tables& tables) {
Shaders);
}
void SetupDirtyDepthTest(Tables& tables) {
auto& table = tables[0];
table[OFF(depth_test_enable)] = DepthTest;
table[OFF(depth_write_enabled)] = DepthMask;
table[OFF(depth_test_func)] = DepthTest;
}
void SetupDirtyBlend(Tables& tables) {
FillBlock(tables[0], OFF(blend_color), NUM(blend_color), BlendColor);
@ -169,6 +176,7 @@ void StateTracker::Initialize() {
SetupDirtyVertexArrays(tables);
SetupDirtyVertexFormat(tables);
SetupDirtyShaders(tables);
SetupDirtyDepthTest(tables);
SetupDirtyBlend(tables);
SetupDirtyMisc(tables);