This extends the commit
17cea74b8cd3b1a56d923edeb40772b3e8b18ab2
also for rectangular textures. They are otherwise lowered to MOV
dst temp[0].0000 and deadcode elimitation goes crazy.
Fixes shader-db with tesseract shaders from https://gitlab.freedesktop.org/mesa/mesa/-/issues/6771
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18168>
tgsi_scan_shader(fs->state.tokens, &info);
for (int i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) {
if (info.sampler_targets[i] == TGSI_TEXTURE_SHADOW1D ||
- info.sampler_targets[i] == TGSI_TEXTURE_SHADOW2D) {
+ info.sampler_targets[i] == TGSI_TEXTURE_SHADOW2D ||
+ info.sampler_targets[i] == TGSI_TEXTURE_SHADOWRECT) {
precompile_state.unit[i].compare_mode_enabled = true;
precompile_state.unit[i].texture_compare_func = PIPE_FUNC_LESS;
}