[Mesa-dev] [PATCH v2 01/27] i965/miptree: Support depth in get_isl_clear_color

Pohjolainen, Topi topi.pohjolainen at intel.com
Sun Jul 31 07:33:13 UTC 2016


On Tue, Jul 26, 2016 at 03:11:05PM -0700, Jason Ekstrand wrote:
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index ba06ac9..8c63aa6 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -3302,7 +3302,12 @@ intel_miptree_get_isl_clear_color(struct brw_context *brw,
>  {
>     union isl_color_value clear_color;
>  
> -   if (brw->gen >= 9) {
> +   if (_mesa_get_format_base_format(mt->format) == GL_DEPTH_COMPONENT) {
> +      clear_color.i32[0] = mt->depth_clear_value;
> +      clear_color.i32[1] = 0;
> +      clear_color.i32[2] = 0;
> +      clear_color.i32[3] = 0;
> +   } else if (brw->gen >= 9) {
>        clear_color.i32[0] = mt->gen9_fast_clear_color.i[0];
>        clear_color.i32[1] = mt->gen9_fast_clear_color.i[1];
>        clear_color.i32[2] = mt->gen9_fast_clear_color.i[2];
> -- 
> 2.5.0.400.gff86faf
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list