uint32_t yx_xuxv_image_mask;
uint32_t xy_uxvx_image_mask;
uint32_t ayuv_image_mask;
+
+ /* Scale factor for each texture. */
+ float scale_factors[32];
};
/**
tex_options.lower_xy_uxvx_external = key_tex->xy_uxvx_image_mask;
tex_options.lower_ayuv_external = key_tex->ayuv_image_mask;
+ /* Setup array of scaling factors for each texture. */
+ memcpy(&tex_options.scale_factors, &key_tex->scale_factors,
+ sizeof(tex_options.scale_factors));
+
if (nir_lower_tex(nir, &tex_options)) {
nir_validate_shader(nir, "after nir_lower_tex");
nir = brw_nir_optimize(nir, compiler, is_scalar, false);
const int s = u_bit_scan(&mask);
key->swizzles[s] = SWIZZLE_NOOP;
+ key->scale_factors[s] = 0.0f;
int unit_id = prog->SamplerUnits[s];
const struct gl_texture_unit *unit = &ctx->Texture.Unit[unit_id];