X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Ftgsi%2Ftgsi_scan.c;fp=src%2Fgallium%2Fauxiliary%2Ftgsi%2Ftgsi_scan.c;h=4ca84902dd4df69cd38a6ff52c553823fa909e48;hb=2a936f8afaba6ce4fdd44bb24cb016413a611b4e;hp=e13500a7f7beae155d452c0685b0d1025b0ec255;hpb=fba91b51735982d04549c060864618216c7d1196;p=mesa.git diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index e13500a7f7b..4ca84902dd4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -368,7 +368,19 @@ scan_instruction(struct tgsi_shader_info *info, info->uses_bindless_samplers = true; break; case TGSI_OPCODE_RESQ: + if (tgsi_is_bindless_image_file(fullinst->Src[0].Register.File)) + info->uses_bindless_images = true; + break; case TGSI_OPCODE_LOAD: + if (tgsi_is_bindless_image_file(fullinst->Src[0].Register.File)) { + info->uses_bindless_images = true; + + if (fullinst->Memory.Texture == TGSI_TEXTURE_BUFFER) + info->uses_bindless_buffer_load = true; + else + info->uses_bindless_image_load = true; + } + break; case TGSI_OPCODE_ATOMUADD: case TGSI_OPCODE_ATOMXCHG: case TGSI_OPCODE_ATOMCAS: @@ -379,12 +391,24 @@ scan_instruction(struct tgsi_shader_info *info, case TGSI_OPCODE_ATOMUMAX: case TGSI_OPCODE_ATOMIMIN: case TGSI_OPCODE_ATOMIMAX: - if (tgsi_is_bindless_image_file(fullinst->Src[0].Register.File)) + if (tgsi_is_bindless_image_file(fullinst->Src[0].Register.File)) { info->uses_bindless_images = true; + + if (fullinst->Memory.Texture == TGSI_TEXTURE_BUFFER) + info->uses_bindless_buffer_atomic = true; + else + info->uses_bindless_image_atomic = true; + } break; case TGSI_OPCODE_STORE: - if (tgsi_is_bindless_image_file(fullinst->Dst[0].Register.File)) + if (tgsi_is_bindless_image_file(fullinst->Dst[0].Register.File)) { info->uses_bindless_images = true; + + if (fullinst->Memory.Texture == TGSI_TEXTURE_BUFFER) + info->uses_bindless_buffer_store = true; + else + info->uses_bindless_image_store = true; + } break; default: break;