diff options
author | Mark Thompson <[email protected]> | 2017-10-01 18:39:05 +0100 |
---|---|---|
committer | Leo Liu <[email protected]> | 2017-10-13 08:11:47 -0400 |
commit | e7f24859ca7e3f14fedaa59c18f4e6452ee423b8 (patch) | |
tree | b96caf684a3cb1e35a483f28f3cd6e668a071f04 /src | |
parent | 556037f131d0873456d2291c575643572ad28e01 (diff) |
st/dri: Add definitions to allow importing 16-bit surfaces
Necessary to support P010/P016 surfaces for video.
Signed-off-by: Mark Thompson <[email protected]>
Acked-by: Leo Liu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/dri/dri2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 38e68069f44..e0cd0e0bc7c 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -113,6 +113,14 @@ static int convert_fourcc(int format, int *dri_components_p) format = __DRI_IMAGE_FORMAT_GR88; dri_components = __DRI_IMAGE_COMPONENTS_RG; break; + case __DRI_IMAGE_FOURCC_R16: + format = __DRI_IMAGE_FORMAT_R16; + dri_components = __DRI_IMAGE_COMPONENTS_R; + break; + case __DRI_IMAGE_FOURCC_GR1616: + format = __DRI_IMAGE_FORMAT_GR1616; + dri_components = __DRI_IMAGE_COMPONENTS_RG; + break; /* * For multi-planar YUV formats, we return the format of the first * plane only. Since there is only one caller which supports multi- @@ -196,6 +204,12 @@ static enum pipe_format dri2_format_to_pipe_format (int format) case __DRI_IMAGE_FORMAT_GR88: pf = PIPE_FORMAT_RG88_UNORM; break; + case __DRI_IMAGE_FORMAT_R16: + pf = PIPE_FORMAT_R16_UNORM; + break; + case __DRI_IMAGE_FORMAT_GR1616: + pf = PIPE_FORMAT_R16G16_UNORM; + break; default: pf = PIPE_FORMAT_NONE; break; |