nir: add has_txs flag

Some nir lowerings might need to know if txs is supported by
the backend.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>
This commit is contained in:
Christian Gmeiner
2021-02-01 11:05:48 +01:00
committed by Marge Bot
parent b0e23c92b3
commit 3fbde2fd93
3 changed files with 7 additions and 1 deletions

View File

@@ -3387,6 +3387,10 @@ typedef struct nir_shader_compiler_options {
* iadd(x, ineg(y)). If true, driver should call nir_opt_algebraic_late(). */ * iadd(x, ineg(y)). If true, driver should call nir_opt_algebraic_late(). */
bool has_isub; bool has_isub;
/** Backend supports txs, if not nir_lower_tex(..) uses txs-free variants
* for rect texture lowering. */
bool has_txs;
/* Whether to generate only scoped_barrier intrinsics instead of the set of /* Whether to generate only scoped_barrier intrinsics instead of the set of
* memory and control barrier intrinsics based on GLSL. * memory and control barrier intrinsics based on GLSL.
*/ */

View File

@@ -49,7 +49,8 @@
.lower_base_vertex = true, \ .lower_base_vertex = true, \
.use_scoped_barrier = true, \ .use_scoped_barrier = true, \
.support_16bit_alu = true, \ .support_16bit_alu = true, \
.lower_uniforms_to_ubo = true .lower_uniforms_to_ubo = true, \
.has_txs = true
#define COMMON_SCALAR_OPTIONS \ #define COMMON_SCALAR_OPTIONS \
.lower_to_scalar = true, \ .lower_to_scalar = true, \

View File

@@ -104,6 +104,7 @@ nir_options = {
.vertex_id_zero_based = true, .vertex_id_zero_based = true,
.lower_base_vertex = true, .lower_base_vertex = true,
.has_cs_global_id = true, .has_cs_global_id = true,
.has_txs = true,
}; };
const nir_shader_compiler_options* const nir_shader_compiler_options*