Commit 2a2e69f9 authored by Tapani Pälli's avatar Tapani Pälli

i965: add P0x formats and propagate required scaling factors

Signed-off-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Signed-off-by: default avatarLin Johnson <johnson.lin@intel.com>
Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
parent 3da858a6
Pipeline #18691 passed with stage
in 121 minutes and 37 seconds
......@@ -407,6 +407,10 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
}
if (t->Target == GL_TEXTURE_EXTERNAL_OES && intel_tex->planar_format) {
/* Setup possible scaling factor. */
key->scale_factors[s] = intel_tex->planar_format->scaling_factor;
switch (intel_tex->planar_format->components) {
case __DRI_IMAGE_COMPONENTS_Y_UV:
key->y_uv_image_mask |= 1 << s;
......
......@@ -62,6 +62,7 @@ struct intel_image_format {
uint32_t dri_format;
int cpp;
} planes[3];
float scaling_factor;
};
struct __DRIimageRec {
......
......@@ -282,6 +282,18 @@ static const struct intel_image_format intel_image_formats[] = {
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
{ 1, 1, 1, __DRI_IMAGE_FORMAT_GR88, 2 } } },
{ __DRI_IMAGE_FOURCC_P010, __DRI_IMAGE_COMPONENTS_Y_UV, 2,
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_R16, 2 },
{ 1, 1, 1, __DRI_IMAGE_FORMAT_GR1616, 4 } } , 65535.0f/1023.0f },
{ __DRI_IMAGE_FOURCC_P012, __DRI_IMAGE_COMPONENTS_Y_UV, 2,
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_R16, 2 },
{ 1, 1, 1, __DRI_IMAGE_FORMAT_GR1616, 4 } } , 65535.0f/4095.0f },
{ __DRI_IMAGE_FOURCC_P016, __DRI_IMAGE_COMPONENTS_Y_UV, 2,
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_R16, 2 },
{ 1, 1, 1, __DRI_IMAGE_FORMAT_GR1616, 4 } } },
{ __DRI_IMAGE_FOURCC_NV16, __DRI_IMAGE_COMPONENTS_Y_UV, 2,
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
{ 1, 1, 0, __DRI_IMAGE_FORMAT_GR88, 2 } } },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment