mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
zink: delete all the no-op checks when rewriting clears
there's no harm in calling this on a no-op, and generally if
this function is called then it won't be a no-op. plus most of
these checks are broken in some way
cc: mesa-stable
(cherry picked from commit 193b7cb29d)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39462>
This commit is contained in:
parent
58a09138d3
commit
067cbd9d82
2 changed files with 1 additions and 18 deletions
|
|
@ -784,7 +784,7 @@
|
|||
"description": "zink: delete all the no-op checks when rewriting clears",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -840,23 +840,6 @@ zink_fb_clears_apply_region(struct zink_context *ctx, struct pipe_resource *pres
|
|||
void
|
||||
zink_fb_clear_rewrite(struct zink_context *ctx, unsigned idx, enum pipe_format before, enum pipe_format after)
|
||||
{
|
||||
/* if the values for the clear color are incompatible, they must be rewritten;
|
||||
* this occurs if:
|
||||
* - the formats' srgb-ness does not match
|
||||
* - the formats' signedness does not match
|
||||
*/
|
||||
const struct util_format_description *bdesc = util_format_description(before);
|
||||
const struct util_format_description *adesc = util_format_description(after);
|
||||
int bfirst_non_void_chan = util_format_get_first_non_void_channel(before);
|
||||
int afirst_non_void_chan = util_format_get_first_non_void_channel(after);
|
||||
bool bsigned = false, asigned = false;
|
||||
if (bfirst_non_void_chan > 0)
|
||||
bsigned = bdesc->channel[bfirst_non_void_chan].type == UTIL_FORMAT_TYPE_SIGNED;
|
||||
if (afirst_non_void_chan > 0)
|
||||
asigned = adesc->channel[afirst_non_void_chan].type == UTIL_FORMAT_TYPE_SIGNED;
|
||||
if (util_format_is_srgb(before) == util_format_is_srgb(after) &&
|
||||
bsigned == asigned)
|
||||
return;
|
||||
struct zink_framebuffer_clear *fb_clear = &ctx->fb_clears[idx];
|
||||
for (int j = 0; j < zink_fb_clear_count(fb_clear); j++) {
|
||||
struct zink_framebuffer_clear_data *clear = zink_fb_clear_element(fb_clear, j);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue