summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-01-29 11:52:33 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-01-29 11:52:33 +0000
commit37bbf6a1792773f11c15a4da1588a7520ee2fb4e (patch)
tree64944d4aa665a1e479cfc004e446593062254550 /lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h
parent6b139c2063623e9310025247cd966490b9aa57ea (diff)
Merge Mesa 18.3.2
Diffstat (limited to 'lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h')
-rw-r--r--lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h58
1 files changed, 23 insertions, 35 deletions
diff --git a/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h b/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h
index a7a67fc24..b3e099bec 100644
--- a/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h
+++ b/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_texture.h
@@ -32,44 +32,32 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
-#include "hw/state_3d.xml.h"
-
-struct etna_sampler_state {
- struct pipe_sampler_state base;
-
- /* sampler offset +4*sampler, interleave when committing state */
- uint32_t TE_SAMPLER_CONFIG0;
- uint32_t TE_SAMPLER_CONFIG1;
- uint32_t TE_SAMPLER_LOD_CONFIG;
- unsigned min_lod, max_lod;
-};
-
-static inline struct etna_sampler_state *
-etna_sampler_state(struct pipe_sampler_state *samp)
-{
- return (struct etna_sampler_state *)samp;
-}
-
-struct etna_sampler_view {
- struct pipe_sampler_view base;
-
- /* sampler offset +4*sampler, interleave when committing state */
- uint32_t TE_SAMPLER_CONFIG0;
- uint32_t TE_SAMPLER_CONFIG0_MASK;
- uint32_t TE_SAMPLER_CONFIG1;
- uint32_t TE_SAMPLER_SIZE;
- uint32_t TE_SAMPLER_LOG_SIZE;
- struct etna_reloc TE_SAMPLER_LOD_ADDR[VIVS_TE_SAMPLER_LOD_ADDR__LEN];
- unsigned min_lod, max_lod; /* 5.5 fixp */
+struct etna_context;
+
+struct etna_sampler_ts {
+ unsigned enable:1;
+ uint32_t TS_SAMPLER_CONFIG;
+ struct etna_reloc TS_SAMPLER_STATUS_BASE;
+ uint32_t TS_SAMPLER_CLEAR_VALUE;
+ uint32_t TS_SAMPLER_CLEAR_VALUE2;
};
-static inline struct etna_sampler_view *
-etna_sampler_view(struct pipe_sampler_view *view)
-{
- return (struct etna_sampler_view *)view;
-}
-
+/* Initialize texture methods for context. */
void
etna_texture_init(struct pipe_context *pctx);
+/* If the original resource is not compatible with the sampler. Allocate
+ * an appropriately tiled texture. */
+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