nvfx: support flatshade_first
authorLuca Barbieri <luca@luca-barbieri.com>
Sun, 15 Aug 2010 08:15:40 +0000 (10:15 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Sat, 21 Aug 2010 18:42:14 +0000 (20:42 +0200)
src/gallium/drivers/nouveau/nouveau_class.h
src/gallium/drivers/nvfx/nvfx_context.h
src/gallium/drivers/nvfx/nvfx_state.c

index 14c11b278ad5539418c6ccdc9af1fa9728bd7d22..20941f379c770de2a0a9130e2606cb59873b522b 100644 (file)
@@ -6149,6 +6149,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV34TCL_FP_REG_CONTROL_UNK1_MASK                                             0xffff0000
 #define   NV34TCL_FP_REG_CONTROL_UNK0_SHIFT                                            0
 #define   NV34TCL_FP_REG_CONTROL_UNK0_MASK                                             0x0000ffff
+#define  NV34TCL_FLATSHADE_FIRST                                                       0x00001454
 #define  NV34TCL_EDGEFLAG_ENABLE                                                       0x0000145c
 #define  NV34TCL_VP_CLIP_PLANES_ENABLE                                                 0x00001478
 #define   NV34TCL_VP_CLIP_PLANES_ENABLE_PLANE0                                         (1 <<  1)
index 7ec6a4f41241005c369c18a75a16e67da6eb3ff8..2eec5a11a6dbc25e5306c1d6327ac3b700a1d44e 100644 (file)
@@ -50,7 +50,7 @@
 struct nvfx_rasterizer_state {
        struct pipe_rasterizer_state pipe;
        unsigned sb_len;
-       uint32_t sb[32];
+       uint32_t sb[34];
 };
 
 struct nvfx_zsa_state {
index c3addf1114fb41241bb2871a7c8ab2fc0d683415..f529fb2a2766e59ce072bc26728457e87b7ab2c3 100644 (file)
@@ -151,6 +151,9 @@ nvfx_rasterizer_state_create(struct pipe_context *pipe,
                sb_data(sb, fui(cso->offset_units * 2));
        }
 
+       sb_method(sb, NV34TCL_FLATSHADE_FIRST, 1);
+       sb_data(sb, cso->flatshade_first);
+
        rsso->pipe = *cso;
        rsso->sb_len = sb_len(sb, rsso->sb);
        return (void *)rsso;