summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5/vc5_rcl.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-10-27 14:13:46 -0700
committerEric Anholt <[email protected]>2017-10-30 13:31:32 -0700
commit2e3c7beb1e60a47e1f5dd12d28ac3f328555a543 (patch)
treecdf3d64c4ba84290fa72ae8034b27770bbb3684f /src/gallium/drivers/vc5/vc5_rcl.c
parent828299d1bd3f98179cd82939d25d919f2022541e (diff)
broadcom/vc5: Pack clear colors according to the TLB internal format/type.
The previous packing I did got us all the R*16F and R*32F formats, where the pipe format basically matched the TLB's format, but since the clear color will just be memcpyed to the TLB, we should be looking at its format for deciding how to pack. Fixes RGB565, RGB5_A1 and RGBA10 fbo-clear-formats tests and improves 4444.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_rcl.c')
-rw-r--r--src/gallium/drivers/vc5/vc5_rcl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c
index 01a76e77767..5202889e598 100644
--- a/src/gallium/drivers/vc5/vc5_rcl.c
+++ b/src/gallium/drivers/vc5/vc5_rcl.c
@@ -275,9 +275,9 @@ vc5_emit_rcl(struct vc5_job *job)
struct pipe_surface *psurf = job->cbufs[i];
if (!psurf)
continue;
+ struct vc5_surface *surf = vc5_surface(psurf);
cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_RENDER_TARGET_CONFIG, rt) {
- struct vc5_surface *surf = vc5_surface(psurf);
struct vc5_resource *rsc = vc5_resource(psurf->texture);
rt.address = cl_address(rsc->bo, surf->offset);
rt.internal_type = surf->internal_type;
@@ -297,7 +297,7 @@ vc5_emit_rcl(struct vc5_job *job)
clear.render_target_number = i;
};
- if (util_format_get_blocksize(psurf->format) > 7) {
+ if (surf->internal_bpp >= INTERNAL_BPP_64) {
cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART2,
clear) {
clear.clear_color_mid_low_32_bits =
@@ -310,7 +310,7 @@ vc5_emit_rcl(struct vc5_job *job)
};
}
- if (util_format_get_blocksize(psurf->format) > 14) {
+ if (surf->internal_bpp >= INTERNAL_BPP_128) {
cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART3,
clear) {
clear.clear_color_high_16_bits = job->clear_color[i][3] >> 16;