Module: Mesa Branch: nvfx-next-7c Commit: e0a9af6191713161f8dbd4e0f8a0faa992c8ff85 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0a9af6191713161f8dbd4e0f8a0faa992c8ff85
Author: Luca Barbieri <[email protected]> Date: Sun Aug 15 10:15:40 2010 +0200 nvfx: support flatshade_first --- src/gallium/drivers/nouveau/nouveau_class.h | 1 + src/gallium/drivers/nvfx/nvfx_context.h | 2 +- src/gallium/drivers/nvfx/nvfx_state.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_class.h b/src/gallium/drivers/nouveau/nouveau_class.h index 14c11b2..20941f3 100644 --- a/src/gallium/drivers/nouveau/nouveau_class.h +++ b/src/gallium/drivers/nouveau/nouveau_class.h @@ -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) diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h index 045f362..e28a588 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.h +++ b/src/gallium/drivers/nvfx/nvfx_context.h @@ -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 { diff --git a/src/gallium/drivers/nvfx/nvfx_state.c b/src/gallium/drivers/nvfx/nvfx_state.c index c3addf1..f529fb2 100644 --- a/src/gallium/drivers/nvfx/nvfx_state.c +++ b/src/gallium/drivers/nvfx/nvfx_state.c @@ -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; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
