aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_resource.h
diff options
context:
space:
mode:
authorChristian Gmeiner <[email protected]>2019-02-28 07:26:39 +0100
committerChristian Gmeiner <[email protected]>2019-03-01 08:02:17 +0100
commit5d09325c1c9b1f0c22713c78472040428f7e588b (patch)
tree0397dfd0418f56b24261e56619ea61c42bc289ad /src/gallium/drivers/etnaviv/etnaviv_resource.h
parentd8177f623314a025911cc125783c9d63a0cc803e (diff)
etnaviv: hook-up etc2 patching
Changes v1 -> v2: - Avoid the GPU sampling from the resource that gets mutated by the the transfer map by setting DRM_ETNA_PREP_WRITE. Changes v2 -> v3: - make use of likely(..) - drop minor optimization regarding rsc->layout == ETNA_LAYOUT_LINEAR - better documentation why DRM_ETNA_PREP_WRITE is needed 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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.h b/src/gallium/drivers/etnaviv/etnaviv_resource.h
index 75aa80b3d7a..c45ff7586d1 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.h
@@ -33,6 +33,7 @@
#include "util/list.h"
struct pipe_screen;
+struct util_dynarray;
struct etna_resource_level {
unsigned width, padded_width; /* in pixels */
@@ -47,6 +48,10 @@ struct etna_resource_level {
uint32_t ts_size;
uint32_t clear_value; /* clear value of resource level (mainly for TS) */
bool ts_valid;
+
+ /* keep track if we have done some per block patching */
+ bool patched;
+ struct util_dynarray *patch_offsets;
};
enum etna_resource_addressing_mode {