[Mesa-dev] [PATCH] r600g/sb: Update last_cf for loops

Marc Dietrich marvin24 at gmx.de
Thu Mar 26 03:24:24 PDT 2015


Am Donnerstag, 26. März 2015, 02:56:50 schrieb Glenn Kennard:
> CF_END could end up emitted in the middle of a shader on cayman
> when there was a loop at the very end.
> 
> Fixes glsl-1.50-geometry-end-primitive and
> ext_transform_feedback-geometry-shaders-basic piglit tests.

yes, I just found out that this test also crashes the rs880 gpu. Turning it 
off, make piglit run fine for geometry tests. Is this also supposed to fix it 
on my gpu (I don't like to risk another gpu lockup...)?

Marc

> 
> Signed-off-by: Glenn Kennard <glenn.kennard at gmail.com>
> ---
> Bug exposed by [PATCH] r600g/sb: Enable SB for geometry shaders
> 
>  src/gallium/drivers/r600/sb/sb_bc_finalize.cpp | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp
> b/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp index 8d0be06..08b7d77
> 100644
> --- a/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp
> +++ b/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp
> @@ -127,6 +127,14 @@ void bc_finalizer::finalize_loop(region_node* r) {
>  	cf_node *loop_start = sh.create_cf(CF_OP_LOOP_START_DX10);
>  	cf_node *loop_end = sh.create_cf(CF_OP_LOOP_END);
> 
> +	// Update last_cf, but don't overwrite it if it's outside the current 
loop
> nest since +	// it may point to a cf that is later in program order.
> +	// The single parent level check is sufficient since finalize_loop() is
> processed in +	// reverse order from innermost to outermost loop nest
> level.
> +	if (!last_cf || last_cf->get_parent_region() == r) {
> +		last_cf = loop_end;
> +	}
> +
>  	loop_start->jump_after(loop_end);
>  	loop_end->jump_after(loop_start);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150326/3ceed1ab/attachment.sig>


More information about the mesa-dev mailing list