summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/nv50/nv50_shader_state.c11
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
index 46835c672d6..aef3f129c81 100644
--- a/src/gallium/drivers/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nv50/nv50_shader_state.c
@@ -344,6 +344,17 @@ nv50_fp_linkage_validate(struct nv50_context *nv50)
uint32_t lin[4];
uint8_t map[64];
+ if (!(nv50->dirty & (NV50_NEW_VERTPROG |
+ NV50_NEW_FRAGPROG |
+ NV50_NEW_GMTYPROG))) {
+ uint8_t bfc, ffc;
+ ffc = (nv50->state.semantic_color & NV50_3D_SEMANTIC_COLOR_FFC0_ID__MASK);
+ bfc = (nv50->state.semantic_color & NV50_3D_SEMANTIC_COLOR_BFC0_ID__MASK)
+ >> 8;
+ if (nv50->rast->pipe.light_twoside == ((ffc == bfc) ? 0 : 1))
+ return;
+ }
+
memset(lin, 0x00, sizeof(lin));
/* XXX: in buggy-endian mode, is the first element of map (u32)0x000000xx
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index d89556447ab..c19acf6c426 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -351,7 +351,7 @@ static struct state_validate {
{ nv50_gmtyprog_validate, NV50_NEW_GMTYPROG },
{ nv50_fragprog_validate, NV50_NEW_FRAGPROG },
{ nv50_fp_linkage_validate, NV50_NEW_FRAGPROG | NV50_NEW_VERTPROG |
- NV50_NEW_GMTYPROG },
+ NV50_NEW_GMTYPROG | NV50_NEW_RASTERIZER },
{ nv50_gp_linkage_validate, NV50_NEW_GMTYPROG | NV50_NEW_VERTPROG },
{ nv50_validate_derived_rs, NV50_NEW_FRAGPROG | NV50_NEW_RASTERIZER |
NV50_NEW_VERTPROG | NV50_NEW_GMTYPROG },