[Mesa-dev] [RFH PATCH] r600g: broken attempt to fix glsl-fs-shader-stencil-export

Alex Deucher alexdeucher at gmail.com
Sat Jul 23 09:42:02 PDT 2011

On Thu, Jul 21, 2011 at 12:15 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
> I've been hacking around trying to make this test work and discovered
> writing some bits up at bit 16 of the exported word seems to act like
> some sort of mask. However I've no idea what this is or why this fixes
> this test. However it breaks the stencilreaddraw test in mesa-demos, which
> means its not entirely correct. My current trend is to blame some float vs
> int mixup somewhere, otherwise I'm pretty lost.
> Maybe AMD guys could take a look when they resurface.

shader export ARRAY_BASE for EXPORT_POS:
60 is position
61 is misc vector
62, 63 are clip distance vectors

The use of the values exported in 61-63 are controlled by PA_CL_VS_OUT_CNTL:
VS_OUT_MISC_VEC_ENA - enables the use of all fields in export 61
USE_VTX_POINT_SIZE - point size in the X channel of export 61
USE_VTX_EDGE_FLAG - edge flag in the Y channel of export 61
USE_VTX_RENDER_TARGET_INDX - render target index in the Z channel of export 61
USE_VTX_VIEWPORT_INDX - viewport index in the W channel of export 61
USE_VTX_KILL_FLAG - kill flag in the Z channel of export 61 (mutually
exclusive from render target index)
VS_OUT_CCDIST0_VEC_ENA/VS_OUT_CCDIST1_VEC_ENA - enable clip distance vectors

shader export ARRAY_BASE for EXPORT_PIXEL:
0-7 CB targets
61 computed Z

The use of the values exported in the computed Z vector are controlled
Z_EXPORT_ENABLE - Z as a float in RED
STENCIL_REF_EXPORT_ENABLE - stencil ref as int in GREEN
MASK_EXPORT_ENABLE - pixel sample mask in BLUE
DB_SOURCE_FORMAT - export control restrictions


More information about the mesa-dev mailing list