summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_texture.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-11-18 10:44:40 +0100
committerChristian Gmeiner <[email protected]>2017-11-30 07:33:20 +0100
commitf1a9a724f9ad09e4e40049bc2a379107a86cfb0b (patch)
treeca6f75623cf195e8440d62aceec94384f1769835 /src/gallium/drivers/etnaviv/etnaviv_texture.h
parent075f8cd7de2506c6085cf898f827edf4551e05f2 (diff)
etnaviv: GC7000: Factor out state based texture functionality
Prepare for two texture handling paths, the descriptor-based path will be added in a future commit. These are structured so that the texture implementation handles its own state emission. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_texture.h')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_texture.h40
1 files changed, 3 insertions, 37 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.h b/src/gallium/drivers/etnaviv/etnaviv_texture.h
index 373e10c9ff0..b3e099bec1b 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture.h
@@ -32,51 +32,17 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
-#include "hw/state_3d.xml.h"
-
struct etna_context;
-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;
- uint32_t TE_SAMPLER_ASTC0;
- struct etna_reloc TE_SAMPLER_LOD_ADDR[VIVS_TE_SAMPLER_LOD_ADDR__LEN];
- unsigned min_lod, max_lod; /* 5.5 fixp */
-
+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);