Pārlūkot izejas kodu

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>
tags/19.1-branchpoint
Tapani Pälli pirms 6 gadiem
vecāks
revīzija
2a2e69f975

+ 4
- 0
src/mesa/drivers/dri/i965/brw_wm.c Parādīt failu

@@ -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;

+ 1
- 0
src/mesa/drivers/dri/i965/intel_image.h Parādīt failu

@@ -62,6 +62,7 @@ struct intel_image_format {
uint32_t dri_format;
int cpp;
} planes[3];
float scaling_factor;
};

struct __DRIimageRec {

+ 12
- 0
src/mesa/drivers/dri/i965/intel_screen.c Parādīt failu

@@ -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 } } },

Notiek ielāde…
Atcelt
Saglabāt