summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2016-08-31 17:44:01 -0400
committerRob Clark <robdclark@gmail.com>2016-09-26 15:29:17 -0400
commitecd6fce2611e88ff8468a354cff8eda39f260a31 (patch)
treef4c281475a9dfb836cf9c9ff1853de0edc850bc6 /src/gallium/include
parente0ec1c31345aa8f47b5dea16d26be4420bd908ad (diff)
downloadexternal_mesa3d-ecd6fce2611e88ff8468a354cff8eda39f260a31.zip
external_mesa3d-ecd6fce2611e88ff8468a354cff8eda39f260a31.tar.gz
external_mesa3d-ecd6fce2611e88ff8468a354cff8eda39f260a31.tar.bz2
mesa/st: support lowering multi-planar YUV
Support multi-planar YUV for external EGLImage's (currently just in the dma-buf import path) by lowering to multiple texture fetch's for each plane and CSC in shader. There was some discussion of alternative approaches for tracking the additional UV or U/V planes: https://lists.freedesktop.org/archives/mesa-dev/2016-September/127832.html They all seemed worse than pipe_resource::next Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_state.h6
-rw-r--r--src/gallium/include/state_tracker/st_api.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index ebd0337..415ea85 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -498,6 +498,12 @@ struct pipe_resource
unsigned bind; /**< bitmask of PIPE_BIND_x */
unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */
+
+ /**
+ * For planar images, ie. YUV EGLImage external, etc, pointer to the
+ * next plane.
+ */
+ struct pipe_resource *next;
};
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 21d5177..06abfc5 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -200,6 +200,9 @@ struct st_egl_image
/* this is owned by the caller */
struct pipe_resource *texture;
+ /* format only differs from texture->format for multi-planar (YUV): */
+ enum pipe_format format;
+
unsigned level;
unsigned layer;
};