* during resolves because the resolve operations only know about the
* resource and not the renderbuffer.
*/
- if (render_format != format)
+ if (isl_format_srgb_to_linear(render_format) !=
+ isl_format_srgb_to_linear(format)) {
return false;
+ }
/* XXX: if (irb->mt->supports_fast_clear)
* see intel_miptree_create_for_dri_image()
static union isl_color_value
convert_fast_clear_color(struct iris_context *ice,
struct iris_resource *res,
+ enum isl_format render_format,
const union isl_color_value color)
{
union isl_color_value override_color = color;
}
/* Handle linear to SRGB conversion */
- if (util_format_is_srgb(format)) {
+ if (isl_format_is_srgb(render_format)) {
for (int i = 0; i < 3; i++) {
override_color.f32[i] =
util_format_linear_to_srgb_float(override_color.f32[i]);
const enum isl_aux_state aux_state =
iris_resource_get_aux_state(res, level, box->z);
- color = convert_fast_clear_color(ice, res, color);
+ color = convert_fast_clear_color(ice, res, format, color);
bool color_changed = !!memcmp(&res->aux.clear_color, &color,
sizeof(color));
struct blorp_batch blorp_batch;
blorp_batch_init(&ice->blorp, &blorp_batch, batch, 0);
- blorp_mcs_partial_resolve(&blorp_batch, &surf, res->surf.format,
+ blorp_mcs_partial_resolve(&blorp_batch, &surf,
+ isl_format_srgb_to_linear(res->surf.format),
start_layer, num_layers);
blorp_batch_finish(&blorp_batch);
}