summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2011-11-02 09:38:46 -0400
committerAlex Deucher <[email protected]>2011-11-02 09:47:40 -0400
commit0a2c4889cb78825035317ba6bf33440c81eabdfe (patch)
treea95eeffc957e3860b382ca79dd393080caa8ece9 /src/gallium/drivers/r600/r600_shader.c
parent16c0a3a9720c03c3d5cbfd66e2db63014dfc4f19 (diff)
r600g: add comment about special shader exports
Certain exports (position, point size, etc.) are treated specially by the shader and not counted as generic exports. Note the exports and any relevant related state bits. Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 350ba3cb332..bb0a9a99e7d 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -329,6 +329,38 @@ static int evergreen_interp_flat(struct r600_shader_ctx *ctx, int input)
return 0;
}
+/*
+ * Special export handling in shaders
+ *
+ * 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 vector
+ *
+ * The use of the values exported in the computed Z vector are controlled
+ * by DB_SHADER_CONTROL:
+ * Z_EXPORT_ENABLE - Z as a float in RED
+ * STENCIL_REF_EXPORT_ENABLE - stencil ref as int in GREEN
+ * COVERAGE_TO_MASK_ENABLE - alpha to mask in ALPHA
+ * MASK_EXPORT_ENABLE - pixel sample mask in BLUE
+ * DB_SOURCE_FORMAT - export control restrictions
+ *
+ */
static int tgsi_declaration(struct r600_shader_ctx *ctx)
{
struct tgsi_full_declaration *d = &ctx->parse.FullToken.FullDeclaration;