summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-11-18 10:44:39 +0100
committerChristian Gmeiner <[email protected]>2017-11-30 07:33:16 +0100
commit075f8cd7de2506c6085cf898f827edf4551e05f2 (patch)
tree5dba1bc04fe8f12ce4e4640ff20ce14ba6e5ef14 /src/gallium/drivers
parent260a5e2a1a2490a7f147ed3e04021924cd0fe7cf (diff)
etnaviv: GC7000: Move active_samplers_bits to texture
This needs to be shared between texture_plain and texture_desc. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_emit.c12
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_texture.c6
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_texture.h11
3 files changed, 17 insertions, 12 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c
index dcad467f58a..f43c954f1fd 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_emit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c
@@ -91,18 +91,6 @@ etna_stall(struct etna_cmd_stream *stream, uint32_t from, uint32_t to)
#define EMIT_STATE_RELOC(state_name, src_value) \
etna_coalsence_emit_reloc(stream, &coalesce, VIVS_##state_name, src_value)
-/* Create bit field that specifies which samplers are active and thus need to be
- * programmed
- * 32 bits is enough for 32 samplers. As far as I know this is the upper bound
- * supported on any Vivante hw
- * up to GC4000.
- */
-static uint32_t
-active_samplers_bits(struct etna_context *ctx)
-{
- return ctx->active_sampler_views & ctx->active_samplers;
-}
-
#define ETNA_3D_CONTEXT_SIZE (400) /* keep this number above "Total state updates (fixed)" from gen_weave_state tool */
static unsigned
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c
index ad0ea162054..55b92f65e1e 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c
@@ -432,6 +432,12 @@ etna_texture_barrier(struct pipe_context *pctx, unsigned flags)
etna_set_state(ctx->stream, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_TEXTURE);
}
+uint32_t
+active_samplers_bits(struct etna_context *ctx)
+{
+ return ctx->active_sampler_views & ctx->active_samplers;
+}
+
void
etna_texture_init(struct pipe_context *pctx)
{
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.h b/src/gallium/drivers/etnaviv/etnaviv_texture.h
index ec50bca3210..373e10c9ff0 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture.h
@@ -34,6 +34,8 @@
#include "hw/state_3d.xml.h"
+struct etna_context;
+
struct etna_sampler_state {
struct pipe_sampler_state base;
@@ -83,4 +85,13 @@ etna_texture_init(struct pipe_context *pctx);
struct etna_resource *
etna_texture_handle_incompatible(struct pipe_context *pctx, struct pipe_resource *prsc);
+/* Create bit field that specifies which samplers are active and thus need to be
+ * programmed
+ * 32 bits is enough for 32 samplers. As far as I know this is the upper bound
+ * supported on any Vivante hw
+ * up to GC4000.
+ */
+uint32_t
+active_samplers_bits(struct etna_context *ctx);
+
#endif