On 27/02/2019 06:55, Kenneth Graunke wrote:
On Tuesday, February 26, 2019 9:41:07 AM PST Christian Gmeiner wrote:
Push this format to the pipe driver unchanged.

Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com>
---
  include/GL/internal/dri_interface.h   | 1 +
  src/gallium/state_trackers/dri/dri2.c | 2 ++
  2 files changed, 3 insertions(+)

diff --git a/include/GL/internal/dri_interface.h 
b/include/GL/internal/dri_interface.h
index 6d134e3a40f..83aad4100a4 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -1290,6 +1290,7 @@ struct __DRIdri2ExtensionRec {
  #define __DRI_IMAGE_FORMAT_XBGR2101010  0x1010
  #define __DRI_IMAGE_FORMAT_ABGR2101010  0x1011
  #define __DRI_IMAGE_FORMAT_SABGR8       0x1012
+#define __DRI_IMAGE_FORMAT_UYVY         0x1013
#define __DRI_IMAGE_USE_SHARE 0x0001
  #define __DRI_IMAGE_USE_SCANOUT               0x0002
diff --git a/src/gallium/state_trackers/dri/dri2.c 
b/src/gallium/state_trackers/dri/dri2.c
index 668d177c371..acdf19e1f5d 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -110,6 +110,8 @@ static const struct dri2_format_mapping dri2_format_table[] 
= {
          __DRI_IMAGE_COMPONENTS_Y_UV,      PIPE_FORMAT_NV12 },
        { __DRI_IMAGE_FOURCC_YUYV,          __DRI_IMAGE_FORMAT_YUYV,
          __DRI_IMAGE_COMPONENTS_Y_XUXV,    PIPE_FORMAT_YUYV },
+      { __DRI_IMAGE_FOURCC_UYVY,          __DRI_IMAGE_FORMAT_UYVY,
+        __DRI_IMAGE_COMPONENTS_Y_UXVX,    PIPE_FORMAT_UYVY },
  };
static const struct dri2_format_mapping *

Looks good to me, though I'm no expert on planar formats.

Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>


I'm pretty sure our HW can't do that until ICL.

2 different views on the same buffer will have the sampler pollute its cache with invalid data from the other view.

The fact that we support this in i965 and that is passes the tests might be pure luck (2x2 images might not be enough for the issue to manifest itself).


I should probably try to update the tests to generate bigger images.


-Lionel

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to