mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
gallium: fix bug in cso_single_sampler_done() in computation of nr_samplers
Need to find highest used sampler so search from end toward beginning.
This commit is contained in:
parent
df5ba799fa
commit
b45669283f
1 changed files with 4 additions and 2 deletions
|
|
@ -217,9 +217,11 @@ void cso_single_sampler_done( struct cso_context *ctx )
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
if (ctx->samplers[i] == NULL)
|
||||
/* find highest non-null sampler */
|
||||
for (i = PIPE_MAX_SAMPLERS; i > 0; i--) {
|
||||
if (ctx->samplers[i - 1] != NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
ctx->nr_samplers = i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue