diff options
author | Rob Clark <[email protected]> | 2019-03-06 10:34:53 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-03-07 15:33:42 -0500 |
commit | 40d8ed5ef356866eb6cb4592df789bd2a3b29061 (patch) | |
tree | 6c9929ea94508c7a74f5a61da274186a5189e0dd /src | |
parent | f5d80ff2db36736636aede2040c716d7fb437286 (diff) |
freedreno/a6xx: fix border-color swizzles
Fixes nearly all of the remaining
dEQP-GLES31.functional.texture.border_clamp.formats.* fails
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index 6115fda3b1a..95ac616a76c 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -196,7 +196,8 @@ setup_border_colors(struct fd_texture_stateobj *tex, struct bcolor_entry *entrie if ((i >= tex->num_textures) || !tex->textures[i]) continue; - enum pipe_format format = tex->textures[i]->format; + struct pipe_sampler_view *view = tex->textures[i]; + enum pipe_format format = view->format; const struct util_format_description *desc = util_format_description(format); @@ -206,8 +207,14 @@ setup_border_colors(struct fd_texture_stateobj *tex, struct bcolor_entry *entrie e->rgb10a2 = 0; e->z24 = 0; + unsigned char swiz[4]; + + fd6_tex_swiz(format, swiz, + view->swizzle_r, view->swizzle_g, + view->swizzle_b, view->swizzle_a); + for (j = 0; j < 4; j++) { - int c = desc->swizzle[j]; + int c = swiz[j]; int cd = c; /* |