On 12/13/2011 02:11 PM, Jose Fonseca wrote:
> ----- Original Message -----
>> This is an updated version of the patch set I sent to the list a few
>> hours
>> ago.  
>> There is now a TGSI property called
>> TGSI_PROPERTY_NUM_CLIP_DISTANCES
>> that drivers can use to determine how many of the 8 available clip
>> distances
>> are actually used by a shader.
> Can't the info in TGSI_PROPERTY_NUM_CLIP_DISTANCES be easily derived from the 
> shader, and queried through src/gallium/auxiliary/tgsi/tgsi_scan.h ?

No.  The clip distances can be indirectly addressed (there are up to 2
of them in vec4 form for a total of 8 floats), which makes it impossible
to determine which ones are used by analyzing the shader.

> Could you also elaborate on why TGSI_SEMANTIC_CLIPDIST is useful for the 
> drivers? I personally don't have nothing against it, but just like to 
> understand why it makes a difference.
>
> Jose

Unless my understanding of clip distances is wrong, the GPU uses clip
distances to decide whether a vertex should be clipped, and thus needs
to know which of the vertex shader outputs are clip distances.

Bryan


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

Reply via email to