mesa/st: Allow geometry shaders without gl_Position export.
authorFabian Bieler <fabianbieler@fastmail.fm>
Wed, 29 May 2013 22:54:55 +0000 (00:54 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 17 Oct 2013 07:35:42 +0000 (08:35 +0100)
From the ARB_geometry_shader4 spec (section Geometry Shader outputs):
"The built-in special variable gl_Position is intended to hold the
homogeneous vertex position. Writing gl_Position is optional."

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_program.c

index 925ea80403f459ceb954badf015d6ef37915ae08..5efd6141d0c69ca6e689f6e1cfc03f96a06706da 100644 (file)
@@ -1031,8 +1031,6 @@ st_translate_geometry_program(struct st_context *st,
       }
    }
 
-   assert(gs_output_semantic_name[0] == TGSI_SEMANTIC_POSITION);
-
    /* find max output slot referenced to compute gs_num_outputs */
    for (attr = 0; attr < VARYING_SLOT_MAX; attr++) {
       if (outputMapping[attr] != ~0 && outputMapping[attr] > maxSlot)