i965: add P0x formats and propagate required scaling factors
Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Lin Johnson <johnson.lin@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
3da858a6b9
commit
2a2e69f975
|
@ -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 } } },
|
||||
|
|
Loading…
Reference in New Issue