mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 16:20:39 +02:00
util/blitter: allow NULL clear color
This commit is contained in:
parent
a650d7068a
commit
fa552261ea
1 changed files with 14 additions and 5 deletions
|
|
@ -371,11 +371,20 @@ static void blitter_set_clear_color(struct blitter_context_priv *ctx,
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
ctx->vertices[i][1][0] = rgba[0];
|
||||
ctx->vertices[i][1][1] = rgba[1];
|
||||
ctx->vertices[i][1][2] = rgba[2];
|
||||
ctx->vertices[i][1][3] = rgba[3];
|
||||
if (rgba) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
ctx->vertices[i][1][0] = rgba[0];
|
||||
ctx->vertices[i][1][1] = rgba[1];
|
||||
ctx->vertices[i][1][2] = rgba[2];
|
||||
ctx->vertices[i][1][3] = rgba[3];
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 4; i++) {
|
||||
ctx->vertices[i][1][0] = 0;
|
||||
ctx->vertices[i][1][1] = 0;
|
||||
ctx->vertices[i][1][2] = 0;
|
||||
ctx->vertices[i][1][3] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue