summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-11-08 17:26:36 +0000
committerLionel Landwerlin <[email protected]>2018-11-12 13:22:54 +0000
commit89785e2d56e7fa88efa79d1981f7283ee65a458e (patch)
tree5ebacdf18a7265e92ddb72fa3e9288c0ce74f156 /src/mesa/drivers
parent252ca7b43fa0516548dbba86823e03c153dc3da6 (diff)
i965: add support for sampling from AYUV
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c6
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 139ca910f9f..fc64f38c156 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -263,6 +263,9 @@ brw_debug_recompile_sampler_key(struct brw_context *brw,
found |= key_debug(brw, "xy_uxvx image bound",
old_key->xy_uxvx_image_mask,
key->xy_uxvx_image_mask);
+ found |= key_debug(brw, "ayuv image bound",
+ old_key->ayuv_image_mask,
+ key->ayuv_image_mask);
for (unsigned int i = 0; i < MAX_SAMPLERS; i++) {
@@ -412,6 +415,9 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
case __DRI_IMAGE_COMPONENTS_Y_UXVX:
key->xy_uxvx_image_mask |= 1 << s;
break;
+ case __DRI_IMAGE_COMPONENTS_AYUV:
+ key->ayuv_image_mask |= 1 << s;
+ break;
default:
break;
}
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index a205a49a1bd..8838f977bb6 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -286,6 +286,9 @@ static const struct intel_image_format intel_image_formats[] = {
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
{ 1, 1, 0, __DRI_IMAGE_FORMAT_GR88, 2 } } },
+ { __DRI_IMAGE_FOURCC_AYUV, __DRI_IMAGE_COMPONENTS_AYUV, 1,
+ { { 0, 0, 0, __DRI_IMAGE_FORMAT_ABGR8888, 4 } } },
+
/* For YUYV and UYVY buffers, we set up two overlapping DRI images
* and treat them as planar buffers in the compositors.
* Plane 0 is GR88 and samples YU or YV pairs and places Y into