From 10b79bf901cf8f6df208adf15bc997ed0f73c09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Mon, 29 Jun 2020 11:17:32 +0200 Subject: [PATCH] nir: include texture query lod as one of the ops that requires a sampler In practice we found that we need this for v3d (specifically for cube map arrays, as they don't support the default value for wrap_i, so a sampler object is needed to override that value). It is worth to note that the main reason behind this auxiliar method was to identify those cases that we didn't have a sampler object available for Vulkan. So far, we found that we have a sampler object coming from nir always for that operation. Fixes cube map array tests like the following: dEQP-VK.glsl.texture_functions.query.texturequerylod.usamplercubearray_fragment Reviewed-by: Eric Anholt Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 15a85c4cd64..5e630d19a2e 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2152,7 +2152,6 @@ typedef struct { * - nir_texop_txf * - nir_texop_txf_ms * - nir_texop_txs - * - nir_texop_lod * - nir_texop_query_levels * - nir_texop_texture_samples * - nir_texop_samples_identical @@ -2177,7 +2176,6 @@ nir_tex_instr_need_sampler(const nir_tex_instr *instr) case nir_texop_txf: case nir_texop_txf_ms: case nir_texop_txs: - case nir_texop_lod: case nir_texop_query_levels: case nir_texop_texture_samples: case nir_texop_samples_identical: