nv40->constbuf[PIPE_SHADER_FRAGMENT];
struct pipe_winsys *ws = nv40->pipe.winsys;
struct nouveau_stateobj *so;
+ boolean new_consts = FALSE;
int i;
if (fp->translated)
update_constants:
if (fp->nr_consts) {
- boolean new_consts = FALSE;
float *map;
map = ws->buffer_map(ws, constbuf, PIPE_BUFFER_USAGE_CPU_READ);
nv40_fragprog_upload(nv40, fp);
}
- if (fp->so != nv40->state.hw[NV40_STATE_FRAGPROG]) {
+ if (new_consts || fp->so != nv40->state.hw[NV40_STATE_FRAGPROG]) {
so_ref(fp->so, &nv40->state.hw[NV40_STATE_FRAGPROG]);
return TRUE;
}