mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
llvmpipe: bind sampler views/images properly.
There is some code that relies on TGSI here, and it has limits. For now always just bind resources > 31. Fixes dEQP-VK.pipeline.pipeline_library.descriptor_limits* Cc: mesa-stable Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
This commit is contained in:
parent
b144d3e6a7
commit
16fd0c11c6
2 changed files with 7 additions and 7 deletions
|
|
@ -630,7 +630,7 @@ make_variant_key(struct llvmpipe_context *lp,
|
|||
* This will still work, the only downside is that not actually
|
||||
* used views may be included in the shader key.
|
||||
*/
|
||||
if(shader->info.base.file_mask[TGSI_FILE_SAMPLER_VIEW] & (1u << (i & 31))) {
|
||||
if((shader->info.base.file_mask[TGSI_FILE_SAMPLER_VIEW] & (1u << (i & 31))) || i > 31) {
|
||||
lp_sampler_static_texture_state(&cs_sampler[i].texture_state,
|
||||
lp->sampler_views[PIPE_SHADER_COMPUTE][i]);
|
||||
}
|
||||
|
|
@ -639,7 +639,7 @@ make_variant_key(struct llvmpipe_context *lp,
|
|||
else {
|
||||
key->nr_sampler_views = key->nr_samplers;
|
||||
for(i = 0; i < key->nr_sampler_views; ++i) {
|
||||
if(shader->info.base.file_mask[TGSI_FILE_SAMPLER] & (1 << i)) {
|
||||
if((shader->info.base.file_mask[TGSI_FILE_SAMPLER] & (1 << i)) || i > 31) {
|
||||
lp_sampler_static_texture_state(&cs_sampler[i].texture_state,
|
||||
lp->sampler_views[PIPE_SHADER_COMPUTE][i]);
|
||||
}
|
||||
|
|
@ -653,7 +653,7 @@ make_variant_key(struct llvmpipe_context *lp,
|
|||
memset(lp_image, 0,
|
||||
key->nr_images * sizeof *lp_image);
|
||||
for (i = 0; i < key->nr_images; ++i) {
|
||||
if (shader->info.base.file_mask[TGSI_FILE_IMAGE] & (1 << i)) {
|
||||
if ((shader->info.base.file_mask[TGSI_FILE_IMAGE] & (1 << i)) || i > 31) {
|
||||
lp_sampler_static_texture_state_image(&lp_image[i].image_state,
|
||||
&lp->images[PIPE_SHADER_COMPUTE][i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4492,8 +4492,8 @@ make_variant_key(struct llvmpipe_context *lp,
|
|||
* This will still work, the only downside is that not actually
|
||||
* used views may be included in the shader key.
|
||||
*/
|
||||
if (shader->info.base.file_mask[TGSI_FILE_SAMPLER_VIEW]
|
||||
& (1u << (i & 31))) {
|
||||
if ((shader->info.base.file_mask[TGSI_FILE_SAMPLER_VIEW]
|
||||
& (1u << (i & 31))) || i > 31) {
|
||||
lp_sampler_static_texture_state(&fs_sampler[i].texture_state,
|
||||
lp->sampler_views[PIPE_SHADER_FRAGMENT][i]);
|
||||
}
|
||||
|
|
@ -4501,7 +4501,7 @@ make_variant_key(struct llvmpipe_context *lp,
|
|||
} else {
|
||||
key->nr_sampler_views = key->nr_samplers;
|
||||
for (unsigned i = 0; i < key->nr_sampler_views; ++i) {
|
||||
if (shader->info.base.file_mask[TGSI_FILE_SAMPLER] & (1 << i)) {
|
||||
if ((shader->info.base.file_mask[TGSI_FILE_SAMPLER] & (1 << i)) || i > 31) {
|
||||
lp_sampler_static_texture_state(&fs_sampler[i].texture_state,
|
||||
lp->sampler_views[PIPE_SHADER_FRAGMENT][i]);
|
||||
}
|
||||
|
|
@ -4515,7 +4515,7 @@ make_variant_key(struct llvmpipe_context *lp,
|
|||
memset(lp_image, 0,
|
||||
key->nr_images * sizeof *lp_image);
|
||||
for (unsigned i = 0; i < key->nr_images; ++i) {
|
||||
if (shader->info.base.file_mask[TGSI_FILE_IMAGE] & (1 << i)) {
|
||||
if ((shader->info.base.file_mask[TGSI_FILE_IMAGE] & (1 << i)) || i > 31) {
|
||||
lp_sampler_static_texture_state_image(&lp_image[i].image_state,
|
||||
&lp->images[PIPE_SHADER_FRAGMENT][i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue