summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_resource.h
diff options
context:
space:
mode:
authorChristian Gmeiner <[email protected]>2019-01-18 10:54:07 +0100
committerChristian Gmeiner <[email protected]>2019-01-28 07:36:05 +0100
commit5b4a155d2ba1a2bf070b8c539a6f3bf9b1086e2f (patch)
tree02e63a99f4c0488d3b1f799d068f4c19f5802d7a /src/gallium/drivers/etnaviv/etnaviv_resource.h
parentd1d2bb8c07d1e20d654f558ea4750aeb09d34ff9 (diff)
etnaviv: extend etna_resource with an addressing mode
Defines how sampler (and pixel pipes) needs to access the data represented with a resource. The used default is mode is ETNA_ADDRESSING_MODE_TILED. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_resource.h')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_resource.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.h b/src/gallium/drivers/etnaviv/etnaviv_resource.h
index 11ccf8f7bcb..75aa80b3d7a 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.h
@@ -49,6 +49,11 @@ struct etna_resource_level {
bool ts_valid;
};
+enum etna_resource_addressing_mode {
+ ETNA_ADDRESSING_MODE_TILED = 0,
+ ETNA_ADDRESSING_MODE_LINEAR,
+};
+
/* status of queued up but not flushed reads and write operations.
* In _transfer_map() we need to know if queued up rendering needs
* to be flushed to preserve the order of cpu and gpu access. */
@@ -66,6 +71,7 @@ struct etna_resource {
/* only lod 0 used for non-texture buffers */
/* Layout for surface (tiled, multitiled, split tiled, ...) */
enum etna_surface_layout layout;
+ enum etna_resource_addressing_mode addressing_mode;
/* Horizontal alignment for texture unit (TEXTURE_HALIGN_*) */
unsigned halign;
struct etna_bo *bo; /* Surface video memory */
@@ -155,7 +161,8 @@ etna_screen_resource_alloc_ts(struct pipe_screen *pscreen,
struct pipe_resource *
etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
- uint64_t modifier, const struct pipe_resource *templat);
+ enum etna_resource_addressing_mode mode, uint64_t modifier,
+ const struct pipe_resource *templat);
void
etna_resource_screen_init(struct pipe_screen *pscreen);