Hello! In R700-family_instruction_set_architecture.pdf pages 3-18 and 9-34 read that pop instructions never jump. The table on page 3-16 however reads that it does jump if the condition test fails for all pixels.
On RV710 the attached piglit test indicates that the pop instruction does indeed jump sometimes. In the attached image pop instructions are executed in the lower right half including the diagonal. If the pop instruction jumps the pixel should be black. I can think of no grouping of four pixels at a time to make sense of that pattern. So it would seem pop doesn't always jump even if all pixels fail the condition test. Anyway the patch sets the address of pop instructions to the next instruction which fixes the test. Fabian
From 4f9526298e96a6639116aa179dfe0f669943975f Mon Sep 17 00:00:00 2001 From: Fabian Bieler <der.f...@gmx.net> Date: Fri, 3 Dec 2010 03:39:48 +0100 Subject: [PATCH] r600g: set address of pop instructions to next instruction --- src/gallium/drivers/r600/r600_shader.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 77b1809..823e942 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -2804,6 +2804,7 @@ static int pops(struct r600_shader_ctx *ctx, int pops) { r600_bc_add_cfinst(ctx->bc, CTX_INST(V_SQ_CF_WORD1_SQ_CF_INST_POP)); ctx->bc->cf_last->pop_count = pops; + ctx->bc->cf_last->cf_addr = ctx->bc->cf_last->id + 2; return 0; } -- 1.7.1
[require] GL >= 2.0 GLSL >= 1.10 [vertex shader] void main() { gl_Position = gl_Vertex; gl_TexCoord[0] = gl_Vertex; } [fragment shader] void main() { vec2 c = gl_TexCoord[0].xy; for (int i = 0; i < 1; ++i) { if (c.x + c.y >= 0.0) break; } gl_FragColor = vec4(1,1,1,1); } [test] clear color 0.0 0.0 0.0 0.0 clear draw rect -1 -1 2 2 probe all rgb 1.0 1.0 1.0 1.0
<<inline: fb.png>>
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev