From 26e40448becb07e292d269dc4d8fbc56caebba3c Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Tue, 23 Feb 2010 16:31:33 +0100 Subject: nvfx: add NVFX_NEW_{FRAG,VERT}CONST --- src/gallium/drivers/nvfx/nvfx_context.h | 2 ++ src/gallium/drivers/nvfx/nvfx_fragprog.c | 2 +- src/gallium/drivers/nvfx/nvfx_state.c | 4 ++-- src/gallium/drivers/nvfx/nvfx_vertprog.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h index 8721eaa741a..cb9049a448e 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.h +++ b/src/gallium/drivers/nvfx/nvfx_context.h @@ -80,6 +80,8 @@ enum nvfx_state_index { #define NVFX_NEW_ARRAYS (1 << 11) #define NVFX_NEW_UCP (1 << 12) #define NVFX_NEW_SR (1 << 13) +#define NVFX_NEW_VERTCONST (1 << 14) +#define NVFX_NEW_FRAGCONST (1 << 15) struct nvfx_rasterizer_state { struct pipe_rasterizer_state pipe; diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c index 1b831379807..eb815302485 100644 --- a/src/gallium/drivers/nvfx/nvfx_fragprog.c +++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c @@ -980,7 +980,7 @@ nvfx_fragprog_destroy(struct nvfx_context *nvfx, struct nvfx_state_entry nvfx_state_fragprog = { .validate = nvfx_fragprog_validate, .dirty = { - .pipe = NVFX_NEW_FRAGPROG, + .pipe = NVFX_NEW_FRAGPROG | NVFX_NEW_FRAGCONST, .hw = 0 } }; diff --git a/src/gallium/drivers/nvfx/nvfx_state.c b/src/gallium/drivers/nvfx/nvfx_state.c index b91211584f7..4053f28a651 100644 --- a/src/gallium/drivers/nvfx/nvfx_state.c +++ b/src/gallium/drivers/nvfx/nvfx_state.c @@ -496,10 +496,10 @@ nvfx_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, nvfx->constbuf_nr[shader] = buf->width0 / (4 * sizeof(float)); if (shader == PIPE_SHADER_VERTEX) { - nvfx->dirty |= NVFX_NEW_VERTPROG; + nvfx->dirty |= NVFX_NEW_VERTCONST; } else if (shader == PIPE_SHADER_FRAGMENT) { - nvfx->dirty |= NVFX_NEW_FRAGPROG; + nvfx->dirty |= NVFX_NEW_FRAGCONST; } } diff --git a/src/gallium/drivers/nvfx/nvfx_vertprog.c b/src/gallium/drivers/nvfx/nvfx_vertprog.c index 3d25ab761a3..4637212b18e 100644 --- a/src/gallium/drivers/nvfx/nvfx_vertprog.c +++ b/src/gallium/drivers/nvfx/nvfx_vertprog.c @@ -1039,6 +1039,6 @@ nvfx_vertprog_destroy(struct nvfx_context *nvfx, struct nvfx_vertex_program *vp) struct nvfx_state_entry nvfx_state_vertprog = { .validate = nvfx_vertprog_validate, .dirty = { - .pipe = NVFX_NEW_VERTPROG | NVFX_NEW_UCP, + .pipe = NVFX_NEW_VERTPROG | NVFX_NEW_VERTCONST | NVFX_NEW_UCP, } }; -- cgit v1.2.3