mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
frontend/nine: Fix num_textures count
util_last_bit already included the +1
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865?commit_id=9205a45da50ebc6159169ba42b02d8475b09bfd7
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8894
cc: mesa-stable
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22645>
(cherry picked from commit ad1e64551d)
This commit is contained in:
parent
2236dd6d55
commit
9ebda0a63c
2 changed files with 3 additions and 3 deletions
|
|
@ -1687,7 +1687,7 @@
|
|||
"description": "frontend/nine: Fix num_textures count",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -999,7 +999,7 @@ update_textures_and_samplers(struct NineDevice9 *device)
|
|||
commit_samplers = FALSE;
|
||||
const uint16_t ps_mask = sampler_mask | context->enabled_samplers_mask_ps;
|
||||
context->bound_samplers_mask_ps = ps_mask;
|
||||
num_textures = util_last_bit(ps_mask) + 1;
|
||||
num_textures = util_last_bit(ps_mask);
|
||||
/* iterate over the enabled samplers */
|
||||
u_foreach_bit(i, context->enabled_samplers_mask_ps) {
|
||||
const unsigned s = NINE_SAMPLER_PS(i);
|
||||
|
|
@ -1046,7 +1046,7 @@ update_textures_and_samplers(struct NineDevice9 *device)
|
|||
sampler_mask = context->programmable_vs ? context->vs->sampler_mask : 0;
|
||||
const uint16_t vs_mask = sampler_mask | context->enabled_samplers_mask_vs;
|
||||
context->bound_samplers_mask_vs = vs_mask;
|
||||
num_textures = util_last_bit(vs_mask) + 1;
|
||||
num_textures = util_last_bit(vs_mask);
|
||||
u_foreach_bit(i, context->enabled_samplers_mask_vs) {
|
||||
const unsigned s = NINE_SAMPLER_VS(i);
|
||||
int sRGB = context->samp[s][D3DSAMP_SRGBTEXTURE] ? 1 : 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue