panfrost: Use blendable check for tib read check

These are the same! Either you're blendable and can use f32/f16
conversion, or you're raw and you can only get raw. It's that simple!

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383>
(cherry picked from commit 2cf581b195)
This commit is contained in:
Alyssa Rosenzweig 2021-06-11 18:02:11 -04:00 committed by Dylan Baker
parent 0f5b53c848
commit 7c7479e357
5 changed files with 6 additions and 18 deletions

View file

@ -364,7 +364,7 @@
"description": "panfrost: Use blendable check for tib read check",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},
@ -373,7 +373,7 @@
"description": "panfrost: Fix UNORM 10 sizes",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "56047fb64d713512edfb89067ef2be2fb68916b1"
},

View file

@ -81,7 +81,6 @@ dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_lowp_comp
dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_lowp_compute,Fail
dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec3_highp_fragment,Fail
dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec3_highp_fragment,Fail
dEQP-GLES31.functional.shaders.framebuffer_fetch.framebuffer_format.rgb10_a2,Fail
dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_expression_vertex,Fail
dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_vertex,Fail
dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_expression_fragment,Fail

View file

@ -364,8 +364,6 @@ panfrost_variant_matches(
struct panfrost_shader_state *variant,
enum pipe_shader_type type)
{
struct panfrost_device *dev = pan_device(ctx->base.screen);
if (variant->info.stage == MESA_SHADER_FRAGMENT &&
variant->info.fs.outputs_read) {
struct pipe_framebuffer_state *fb = &ctx->pipe_framebuffer;
@ -377,10 +375,7 @@ panfrost_variant_matches(
if ((fb->nr_cbufs > i) && fb->cbufs[i])
fmt = fb->cbufs[i]->format;
const struct util_format_description *desc =
util_format_description(fmt);
if (pan_format_class_load(desc, dev->quirks) == PAN_FORMAT_NATIVE)
if (panfrost_blendable_formats_v6[fmt].internal)
fmt = PIPE_FORMAT_NONE;
if (variant->rt_formats[i] != fmt)
@ -442,7 +437,6 @@ panfrost_bind_shader_state(
enum pipe_shader_type type)
{
struct panfrost_context *ctx = pan_context(pctx);
struct panfrost_device *dev = pan_device(ctx->base.screen);
ctx->shader[type] = hwcso;
ctx->dirty |= PAN_DIRTY_TLS_SIZE;
@ -498,10 +492,7 @@ panfrost_bind_shader_state(
if ((fb->nr_cbufs > i) && fb->cbufs[i])
fmt = fb->cbufs[i]->format;
const struct util_format_description *desc =
util_format_description(fmt);
if (pan_format_class_load(desc, dev->quirks) == PAN_FORMAT_NATIVE)
if (panfrost_blendable_formats_v6[fmt].internal)
fmt = PIPE_FORMAT_NONE;
v->rt_formats[i] = fmt;

View file

@ -87,7 +87,7 @@ pan_unpacked_type_for_format(const struct util_format_description *desc)
}
}
enum pan_format_class
static enum pan_format_class
pan_format_class_load(const struct util_format_description *desc, unsigned quirks)
{
/* Pure integers can be loaded via EXT_framebuffer_fetch and should be
@ -124,7 +124,7 @@ pan_format_class_load(const struct util_format_description *desc, unsigned quirk
return PAN_FORMAT_NATIVE;
}
enum pan_format_class
static enum pan_format_class
pan_format_class_store(const struct util_format_description *desc, unsigned quirks)
{
/* Check if we can do anything better than software architecturally */

View file

@ -40,8 +40,6 @@ enum pan_format_class {
};
nir_alu_type pan_unpacked_type_for_format(const struct util_format_description *desc);
enum pan_format_class pan_format_class_load(const struct util_format_description *desc, unsigned quirks);
enum pan_format_class pan_format_class_store(const struct util_format_description *desc, unsigned quirks);
bool pan_lower_framebuffer(nir_shader *shader, const enum pipe_format *rt_fmts,
bool is_blend, unsigned quirks);