summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <cgmeiner@igalia.com>2024-08-21 10:44:42 +0200
committerMarge Bot <emma+marge@anholt.net>2024-08-30 12:45:58 +0000
commit2978d102037e4711bf555bbcbdeadbca541334c0 (patch)
tree548b62ea906455b2e9f447c8298e342aafb939df
parent61d0ec5aec9ea9394e6da7741a0bf041541e2cec (diff)
etnaviv: Switch to etna_core_has_feature(..) for npot_tex_any_wrap
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30806>
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_internal.h2
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_screen.c2
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_texture_state.c2
3 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_internal.h b/src/gallium/drivers/etnaviv/etnaviv_internal.h
index 4a110b3fedf..057b7dd912a 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_internal.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_internal.h
@@ -87,8 +87,6 @@ struct etna_specs {
unsigned tex_astc : 1;
/* has BLT engine instead of RS */
unsigned use_blt : 1;
- /* can use any kind of wrapping mode on npot textures */
- unsigned npot_tex_any_wrap : 1;
/* supports seamless cube map */
unsigned seamless_cube_map : 1;
/* number of bits per TS tile */
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index c586ca9479d..3d1bc33a26a 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -888,8 +888,6 @@ etna_get_specs(struct etna_screen *screen)
screen->info->model < 0x1000 && screen->info->model != 0x880;
screen->specs.has_shader_range_registers =
screen->info->model >= 0x1000 || screen->info->model == 0x880;
- screen->specs.npot_tex_any_wrap =
- VIV_FEATURE(screen, ETNA_FEATURE_NON_POWER_OF_TWO);
screen->specs.has_new_transcendentals =
VIV_FEATURE(screen, ETNA_FEATURE_HAS_FAST_TRANSCENDENTALS);
screen->specs.has_halti2_instructions =
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture_state.c b/src/gallium/drivers/etnaviv/etnaviv_texture_state.c
index e8eae5923b4..2d4d2189e37 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture_state.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture_state.c
@@ -261,7 +261,7 @@ etna_create_sampler_view_state(struct pipe_context *pctx, struct pipe_resource *
/* Workaround for npot textures -- it appears that only CLAMP_TO_EDGE is
* supported when the appropriate capability is not set. */
- if (!screen->specs.npot_tex_any_wrap &&
+ if (!etna_core_has_feature(screen->info, ETNA_FEATURE_NON_POWER_OF_TWO) &&
(!util_is_power_of_two_or_zero(res->base.width0) ||
!util_is_power_of_two_or_zero(res->base.height0))) {
sv->config0_mask = ~(VIVS_TE_SAMPLER_CONFIG0_UWRAP__MASK |