summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-09-23 15:27:55 -0700
committerEric Anholt <[email protected]>2014-09-23 17:23:29 -0700
commit45b104e0a228595142ed4bc62bbc8948100b9325 (patch)
tree6c23588560123540d5d42fb532ba92f4b13a50bb /src/gallium/drivers/vc4/vc4_context.h
parent0e7bc3088be693284fba80519be825e6e8218e40 (diff)
vc4: Add support for flat shading.
This is just the GL 1.1 flat shading of colors -- we don't need to support TGSI constant interpolation bits, because we don't do GLSL 1.30. Fixes 7 piglit tests.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index 1dc0f97a775..7839a5a8868 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -56,6 +56,7 @@
#define VC4_DIRTY_VTXBUF (1 << 15)
#define VC4_DIRTY_INDEXBUF (1 << 16)
#define VC4_DIRTY_SCISSOR (1 << 17)
+#define VC4_DIRTY_FLAT_SHADE_FLAGS (1 << 18)
#define VC4_SHADER_DIRTY_VP (1 << 0)
#define VC4_SHADER_DIRTY_FP (1 << 1)
@@ -81,6 +82,10 @@ struct vc4_compiled_shader {
struct vc4_shader_uniform_info uniforms[2];
uint32_t coord_shader_offset;
+
+ /** bitmask of which inputs are color inputs, for flat shade handling. */
+ uint32_t color_inputs;
+
uint8_t num_inputs;
};