From: Alyssa Rosenzweig Date: Thu, 14 May 2020 23:53:33 +0000 (-0400) Subject: panfrost: Check for large tilebuffer requirements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6aa7f6792d30f91eccc68fcec65b81105afc347a;p=mesa.git panfrost: Check for large tilebuffer requirements Fixes the rest of dEQP-GLES3.functional.fragment_out.array.uint.*, this situation occurs with MRT and large pixels. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/.gitlab-ci/deqp-panfrost-t860-fails.txt b/.gitlab-ci/deqp-panfrost-t860-fails.txt index 96b0a1f08dd..89dc6bcae3f 100644 --- a/.gitlab-ci/deqp-panfrost-t860-fails.txt +++ b/.gitlab-ci/deqp-panfrost-t860-fails.txt @@ -317,255 +317,6 @@ dEQP-GLES3.functional.fbo.render.shared_depth_stencil.tex2d_rgba8_depth_tex2d_de dEQP-GLES3.functional.fbo.render.shared_depth_stencil.tex2d_rgba8_depth_tex2d_depth_component24 dEQP-GLES3.functional.fbo.render.shared_depth_stencil.tex2d_rgba8_depth_tex2d_depth_component32f dEQP-GLES3.functional.fence_sync.client_wait_sync_finish -dEQP-GLES3.functional.fragment_ops.scissor.clear_int_buffer -dEQP-GLES3.functional.fragment_ops.scissor.clear_uint_buffer -dEQP-GLES3.functional.fragment_out.array.float.r16f_highp_float -dEQP-GLES3.functional.fragment_out.array.float.r16f_highp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.r16f_highp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.r16f_highp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.r16f_lowp_float -dEQP-GLES3.functional.fragment_out.array.float.r16f_lowp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.r16f_lowp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.r16f_lowp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.r16f_mediump_float -dEQP-GLES3.functional.fragment_out.array.float.r16f_mediump_vec2 -dEQP-GLES3.functional.fragment_out.array.float.r16f_mediump_vec3 -dEQP-GLES3.functional.fragment_out.array.float.r16f_mediump_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_highp_float -dEQP-GLES3.functional.fragment_out.array.float.rg16f_highp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_highp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_highp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_lowp_float -dEQP-GLES3.functional.fragment_out.array.float.rg16f_lowp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_lowp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_lowp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_mediump_float -dEQP-GLES3.functional.fragment_out.array.float.rg16f_mediump_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_mediump_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rg16f_mediump_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_highp_float -dEQP-GLES3.functional.fragment_out.array.float.rg32f_highp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_highp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_highp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_lowp_float -dEQP-GLES3.functional.fragment_out.array.float.rg32f_lowp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_lowp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_lowp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_mediump_float -dEQP-GLES3.functional.fragment_out.array.float.rg32f_mediump_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_mediump_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rg32f_mediump_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_highp_float -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_highp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_highp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_highp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_lowp_float -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_lowp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_lowp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_lowp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_mediump_float -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_mediump_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_mediump_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rgba16f_mediump_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_highp_float -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_highp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_highp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_highp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_lowp_float -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_lowp_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_lowp_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_lowp_vec4 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_mediump_float -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_mediump_vec2 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_mediump_vec3 -dEQP-GLES3.functional.fragment_out.array.float.rgba32f_mediump_vec4 -dEQP-GLES3.functional.fragment_out.array.int.r16i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.r16i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.r16i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.r16i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.r16i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.r16i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.r16i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.r16i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.r16i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.r16i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.r8i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.r8i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.r8i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.r8i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.r8i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.r8i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.r8i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.r8i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.r8i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.r8i_mediump_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.r8i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg16i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.rg16i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg16i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rg16i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg16i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.rg16i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg16i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg16i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.rg16i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg16i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.rg32i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.rg32i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_lowp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.rg32i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_mediump_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rg32i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.rg8i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.rg8i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.rg8i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_mediump_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rg8i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_lowp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_mediump_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba16i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_lowp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_mediump_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba32i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_highp_int -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_highp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_highp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_highp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_lowp_int -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_lowp_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_lowp_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_lowp_ivec4 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_mediump_int -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_mediump_ivec2 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_mediump_ivec3 -dEQP-GLES3.functional.fragment_out.array.int.rgba8i_mediump_ivec4 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.r16ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.r8ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg16ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg32ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rg8ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba16ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba32ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_highp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_highp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_highp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_highp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_lowp_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_lowp_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_lowp_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_lowp_uvec4 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_mediump_uint -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_mediump_uvec2 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_mediump_uvec3 -dEQP-GLES3.functional.fragment_out.array.uint.rgba8ui_mediump_uvec4 -dEQP-GLES3.functional.fragment_out.random.30 dEQP-GLES3.functional.multisample.fbo_4_samples.common_edge_big_quad dEQP-GLES3.functional.multisample.fbo_4_samples.common_edge_small_quads dEQP-GLES3.functional.multisample.fbo_4_samples.common_edge_viewport_quad diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index f477ad6dd35..5cbc53b45a3 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -390,6 +390,25 @@ panfrost_mfbd_upload(struct panfrost_batch *batch, #undef UPLOAD +/* Determines whether a framebuffer uses too much tilebuffer space (requiring + * us to scale up the tile at a performance penalty). This is conservative but + * afaict you get 128-bits per pixel normally */ + +static bool +pan_is_large_tib(struct panfrost_batch *batch) +{ + unsigned size = 0; + + for (int cb = 0; cb < batch->key.nr_cbufs; ++cb) { + struct pipe_surface *surf = batch->key.cbufs[cb]; + assert(surf); + unsigned bpp = util_format_get_blocksize(surf->format); + size += ALIGN_POT(bpp, 4); + } + + return (size > 16); +} + static struct mali_framebuffer panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count) { @@ -406,7 +425,8 @@ panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count) .width2 = MALI_POSITIVE(width), .height2 = MALI_POSITIVE(height), - .unk1 = 0x1080, + /* Seems to configure tib size */ + .unk1 = pan_is_large_tib(batch) ? 0xc80 : 0x1080, .rt_count_1 = MALI_POSITIVE(batch->key.nr_cbufs), .rt_count_2 = 4,