mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 08:38:08 +02:00
nv50: fix constbuf validation
We only uploaded up to the highest offset a program would use, and if the constant buffer isn't changed when a new program is used, the new program is missing the rest of them. Might want to introduce a "fill state" for user mem constbufs.
This commit is contained in:
parent
2c695d38e6
commit
720e0c430d
1 changed files with 6 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ nv50_transfer_constbuf(struct nv50_context *nv50,
|
|||
if (!map)
|
||||
return;
|
||||
|
||||
count = MIN2(buf->width0, size);
|
||||
count = buf->width0; /* MIN2(buf->width0, size); */
|
||||
start = 0;
|
||||
|
||||
while (count) {
|
||||
|
|
@ -92,8 +92,13 @@ nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
|
|||
}
|
||||
}
|
||||
|
||||
/* If the state tracker doesn't change the constbuf, and it is first
|
||||
* validated with a program that doesn't use it, this check prevents
|
||||
* it from even being uploaded. */
|
||||
/*
|
||||
if (p->parm_size == 0)
|
||||
return;
|
||||
*/
|
||||
|
||||
switch (p->type) {
|
||||
case PIPE_SHADER_VERTEX:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue