[Mesa-dev] [PATCH 3/8] gallium: add caps for POSITION and FACE system values

Marek Olšák maraeo at gmail.com
Fri Jan 8 08:29:08 PST 2016


On Fri, Jan 8, 2016 at 3:15 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Thu, Jan 7, 2016 at 8:29 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> ---
>>  src/gallium/docs/source/screen.rst               | 5 +++++
>>  src/gallium/docs/source/tgsi.rst                 | 6 ++++--
>>  src/gallium/drivers/freedreno/freedreno_screen.c | 2 ++
>>  src/gallium/drivers/i915/i915_screen.c           | 2 ++
>>  src/gallium/drivers/ilo/ilo_screen.c             | 2 ++
>>  src/gallium/drivers/llvmpipe/lp_screen.c         | 2 ++
>>  src/gallium/drivers/nouveau/nv30/nv30_screen.c   | 2 ++
>>  src/gallium/drivers/nouveau/nv50/nv50_screen.c   | 2 ++
>>  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   | 2 ++
>>  src/gallium/drivers/r300/r300_screen.c           | 2 ++
>>  src/gallium/drivers/r600/r600_pipe.c             | 2 ++
>>  src/gallium/drivers/radeonsi/si_pipe.c           | 2 ++
>>  src/gallium/drivers/softpipe/sp_screen.c         | 2 ++
>>  src/gallium/drivers/svga/svga_screen.c           | 2 ++
>>  src/gallium/drivers/vc4/vc4_screen.c             | 2 ++
>>  src/gallium/drivers/virgl/virgl_screen.c         | 2 ++
>>  src/gallium/include/pipe/p_defines.h             | 2 ++
>>  17 files changed, 39 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
>> index 30d497f..ca67bda 100644
>> --- a/src/gallium/docs/source/screen.rst
>> +++ b/src/gallium/docs/source/screen.rst
>> @@ -287,6 +287,11 @@ The integer capabilities:
>>    supported in vertex shaders.
>>  * ``PIPE_CAP_TGSI_PACK_HALF_FLOAT``: Whether the ``UP2H`` and ``PK2H``
>>    TGSI opcodes are supported.
>> +* ``PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL``: If state trackers should use
>> +  a system value for the POSITION fragment shader input.
>> +* ``PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL``: If state trackers should use
>> +  a system value for the FACE fragment shader input.
>> +  Also, the FACE system value is integer, not float.
>
> Do you mean boolean (i.e. -1/0), or -1/1, or 0/1, or something else?
> As is, FACE is supposed to be -1.0 or 1.0. NVIDIA hardware outputs -1
> and 0 (i.e. boolean).

The values should be:
front face = 0xffffffff
back face = 0x0

It will be documented in tgsi.rst.

Marek


More information about the mesa-dev mailing list