mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
r600: fix rv770 clamp to max_texel_buffer_elements
This change fixes the clamp to max_texel_buffer_elements issue related to rv770 and older gpus. Here are the tests fixed on rv770: spec/arb_texture_buffer_object/texture-buffer-size-clamp/r8ui_texture_buffer_size_via_sampler: fail pass spec/arb_texture_buffer_object/texture-buffer-size-clamp/rg8ui_texture_buffer_size_via_sampler: fail pass spec/arb_texture_buffer_object/texture-buffer-size-clamp/rgba8ui_texture_buffer_size_via_sampler: fail pass Fixes:1a441ad5cb("r600: clamp to max_texel_buffer_elements") Signed-off-by: Patrick Lerda <patrick9876@free.fr> (cherry picked from commitafcead9158) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39745>
This commit is contained in:
parent
99501a214a
commit
b24628f4b7
2 changed files with 6 additions and 3 deletions
|
|
@ -1554,7 +1554,7 @@
|
|||
"description": "r600: fix rv770 clamp to max_texel_buffer_elements",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "1a441ad5cb58e8169a0d83dd63a7c38462cdb18b",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1466,8 +1466,11 @@ static void r600_setup_buffer_constants(struct r600_context *rctx, int shader_ty
|
|||
} else
|
||||
constants[offset + 4] = 0;
|
||||
|
||||
constants[offset + 5] = samplers->views.views[i]->base.u.buf.size /
|
||||
util_format_get_blocksize(samplers->views.views[i]->base.format);
|
||||
constants[offset + 5] = MIN2(util_format_get_blocksize(samplers->views.views[i]->base.format) *
|
||||
rctx->screen->b.b.caps.max_texel_buffer_elements,
|
||||
samplers->views.views[i]->base.u.buf.size) /
|
||||
util_format_get_blocksize(samplers->views.views[i]->base.format);
|
||||
|
||||
constants[offset + 6] = samplers->views.views[i]->base.texture->array_size / 6;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue