mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 15:20:26 +01:00
nv40: force reupload of all consts on vtxprog change
This commit is contained in:
parent
0d0349faff
commit
0655cdcf48
1 changed files with 6 additions and 2 deletions
|
|
@ -42,11 +42,14 @@ nv40_state_update_vertprog(struct nv40_context *nv40)
|
|||
struct pipe_context *pipe = (struct pipe_context *)nv40;
|
||||
struct nv40_vertex_program *vp = nv40->vertprog.vp;
|
||||
float *map;
|
||||
int i;
|
||||
int i, force_consts = 0;
|
||||
|
||||
if (!nv40->vertprog.vp->translated)
|
||||
nv40_vertprog_translate(nv40, nv40->vertprog.vp);
|
||||
|
||||
if (nv40->vertprog.vp != nv40->vertprog.active_vp)
|
||||
force_consts = 1;
|
||||
|
||||
if (vp->num_consts) {
|
||||
map = pipe->winsys->buffer_map(pipe->winsys,
|
||||
nv40->vertprog.constant_buf,
|
||||
|
|
@ -55,7 +58,8 @@ nv40_state_update_vertprog(struct nv40_context *nv40)
|
|||
uint pid = vp->consts[i].pipe_id;
|
||||
|
||||
if (pid >= 0) {
|
||||
if (!memcmp(vp->consts[i].value, &map[pid*4],
|
||||
if (!force_consts &&
|
||||
!memcmp(vp->consts[i].value, &map[pid*4],
|
||||
4 * sizeof(float)))
|
||||
continue;
|
||||
memcpy(vp->consts[i].value, &map[pid*4],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue