On 21 August 2017 at 10:58, Marek Olšák <mar...@gmail.com> wrote:
> On Mon, Aug 21, 2017 at 2:41 AM, Dave Airlie <airl...@gmail.com> wrote:
>> On 21 August 2017 at 10:22, Dave Airlie <airl...@gmail.com> wrote:
>>> Hi Gert,
>>>
>>> Can you test this along with the fetch shader patch Marek sent?
>>>
>>> I'm giving it a piglit run now.
>>
>> Actually that patch is probably not necessary,
>>
>> I think you need to fill in 0 for the 4th 2D coordinate for LD to be used.
>>
>> TGSI spec for LD says it takes level in the last channel of the coord, and 
>> you
>> never set it, whereas the old blitter path set it correctly.
>
> radeonsi always uses TXF_LZ with u_blitter. That way level=0 is
> implied by the instruction. The CAP demands that both TXF_LZ and
> TEX_LZ are supported.

Do we add support for the cap in r600 and make the TXF_LZ CAP
mandatory for u_blitter,
or since before this series TXF_LZ is optional we continue to support
it, and set the
values to 0?

This does the latter, I think it should be fine everywhere.

Dave.
From fa9055be8721c93c971c261fc1e095dbb97f26df Mon Sep 17 00:00:00 2001
From: Dave Airlie <airl...@redhat.com>
Date: Mon, 21 Aug 2017 11:05:31 +1000
Subject: [PATCH] r600: handle the non-TXF_LZ support path.

it appears that texcoord.z/w will be 0 in all cases already,
so just put them into the vbo always.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 src/gallium/drivers/radeon/r600_pipe_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 4d1b31d..80ef291 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -257,10 +257,10 @@ void r600_draw_rectangle(struct blitter_context *blitter,
 			memcpy(vb+8, attrib->color, sizeof(float)*4);
 			break;
 		case UTIL_BLITTER_ATTRIB_TEXCOORD_XYZW:
+		case UTIL_BLITTER_ATTRIB_TEXCOORD_XY:
 			vb[2] = vb[6] = vb[10] = attrib->texcoord.z;
 			vb[3] = vb[7] = vb[11] = attrib->texcoord.w;
 			/* fall through */
-		case UTIL_BLITTER_ATTRIB_TEXCOORD_XY:
 			vb[0] = attrib->texcoord.x1;
 			vb[1] = attrib->texcoord.y1;
 			vb[4] = attrib->texcoord.x2;
-- 
2.9.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to