diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2020-09-24 12:35:25 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2020-10-15 09:29:54 -0700 |
commit | 3220ff70f3889d9a1523706e4e83de86e20b19e9 (patch) | |
tree | 32dda83286838b41e180f9d203dfb5e6066c2513 /src/mesa/drivers/dri/i965/intel_mipmap_tree.c | |
parent | 262ca98b3a45075800d88abb9a069d8c21578330 (diff) |
i965: Remove Gen10-specific state setup and workarounds
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index f5f8eb61dce..0a65c9f9b14 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -3280,34 +3280,15 @@ intel_miptree_set_clear_color(struct brw_context *brw, } union isl_color_value -intel_miptree_get_clear_color(const struct gen_device_info *devinfo, - const struct intel_mipmap_tree *mt, - enum isl_format view_format, bool sampling, +intel_miptree_get_clear_color(const struct intel_mipmap_tree *mt, struct brw_bo **clear_color_bo, uint64_t *clear_color_offset) { assert(mt->aux_buf); - if (devinfo->gen == 10 && isl_format_is_srgb(view_format) && sampling) { - /* The gen10 sampler doesn't gamma-correct the clear color. In this case, - * we switch to using the inline clear color and do the sRGB color - * conversion process defined in the OpenGL spec. The red, green, and - * blue channels take part in gamma correction, while the alpha channel - * is unchanged. - */ - union isl_color_value srgb_decoded_value = mt->fast_clear_color; - for (unsigned i = 0; i < 3; i++) { - srgb_decoded_value.f32[i] = - util_format_srgb_to_linear_float(mt->fast_clear_color.f32[i]); - } - *clear_color_bo = 0; - *clear_color_offset = 0; - return srgb_decoded_value; - } else { - *clear_color_bo = mt->aux_buf->clear_color_bo; - *clear_color_offset = mt->aux_buf->clear_color_offset; - return mt->fast_clear_color; - } + *clear_color_bo = mt->aux_buf->clear_color_bo; + *clear_color_offset = mt->aux_buf->clear_color_offset; + return mt->fast_clear_color; } static void |