nvfx: add NVFX_NEW_{FRAG,VERT}CONST

This commit is contained in:
Luca Barbieri 2010-02-23 16:31:33 +01:00
parent 5eb6b1a981
commit 26e40448be
4 changed files with 6 additions and 4 deletions

View file

@ -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;

View file

@ -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
}
};

View file

@ -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;
}
}

View file

@ -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,
}
};