diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_draw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c index bb4b9a42217..3a6d6254a1b 100644 --- a/src/gallium/drivers/vc4/vc4_draw.c +++ b/src/gallium/drivers/vc4/vc4_draw.c @@ -288,7 +288,10 @@ pack_rgba(enum pipe_format format, const float *rgba) { union util_color uc; util_pack_color(rgba, format, &uc); - return uc.ui[0]; + if (util_format_get_blocksize(format) == 2) + return uc.us; + else + return uc.ui[0]; } static void |