aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_scene.h
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-10-26 04:22:55 +0200
committerRoland Scheidegger <[email protected]>2013-10-29 17:54:03 +0100
commite4195acab57a6ab7a604073c46e72b7a49da9e21 (patch)
treec59c0a9d81315c04986d1bbac990217be57cfaf1 /src/gallium/drivers/llvmpipe/lp_scene.h
parentbe0b67a1436eb2b899f9874725b2a68eb26f9f3f (diff)
llvmpipe: fix bogus layer clamping in setup
The layer coming from GS needs to be clamped (not sure if that's actually the correct error behavior but we need something) as the number can be higher than the amount of layers in the fb. However, this code was using the layer calculation from the scene, and this was actually calculated in lp_scene_begin_rasterization() hence too late (so setup was using the value from the _previous_ scene or just zero if it was the first scene). Since the value is used in both rasterization and setup, move calculation up to lp_scene_begin_binning() though it's a bit more inconvenient to calculate there. (Theoretically could move _all_ code which was in lp_scene_begin_rasterization() to there, because ever since we got rid of swizzled render/depth buffers our "map" functions preparing the fb data for render don't actually change the data in there at all, but it feels like it would be a hack.) v2: improve comments Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h
index 5501d4079be..94b1779f04c 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.h
+++ b/src/gallium/drivers/llvmpipe/lp_scene.h
@@ -144,7 +144,7 @@ struct lp_scene {
unsigned layer_stride;
} zsbuf, cbufs[PIPE_MAX_COLOR_BUFS];
- /* OpenGL permits different amount of layers per rt, but rendering limited to minimum */
+ /* The amount of layers in the fb (minimum of all attachments) */
unsigned fb_max_layer;
/** the framebuffer to render the scene into */