Skip to content

Commit

Permalink
Vulkan: skip color/tex gen only if previous stage was not optimized a…
Browse files Browse the repository at this point in the history
…nd really calculated color/tex data
  • Loading branch information
ec- committed Aug 27, 2023
1 parent 6614cdd commit dde0c69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/renderervk/tr_shader.c
Original file line number Diff line number Diff line change
Expand Up @@ -3434,10 +3434,10 @@ static shader_t *FinishShader( void ) {
if ( stages[ i ].bundle[ n ].image[ 0 ] != NULL ) {
lastStage[ n ] = &stages[ i ];
}
if ( EqualTCgen( n, lastStage[ n ], &stages[ i+1 ] ) ) {
if ( EqualTCgen( n, lastStage[ n ], &stages[ i+1 ] ) && (lastStage[n]->tessFlags & (TESS_ST0 << n) ) ) {
stages[ i+1 ].tessFlags &= ~(TESS_ST0 << n);
}
if ( EqualRGBgen( lastStage[n], &stages[ i+1 ] ) && EqualACgen( lastStage[n], &stages[ i+1 ] ) ) {
if ( EqualRGBgen( lastStage[n], &stages[ i+1 ] ) && EqualACgen( lastStage[n], &stages[ i+1 ] ) && (lastStage[n]->tessFlags & (TESS_RGBA0 << n) ) ) {
stages[ i+1 ].tessFlags &= ~(TESS_RGBA0 << n);
}
}
Expand Down

0 comments on commit dde0c69

Please sign in to comment.