[Mesa-dev] report ARB_cull_distance v3

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Sun May 8 21:29:36 UTC 2016



On 08.05.2016 22:50, Ilia Mirkin wrote:
> What exactly gets fed into the CLIPDIST and CULLDIST semantics? e.g.
> is CULLDIST[0].x the first cull distance, or is it the first entity in
> the combined cull/clip distance array? If the former, then this won't
> work as implemented on nouveau. If the latter, then why bother with
> the separate semantics in the first place?

Its the latter case, as you mostly already suspected. Everything is 
lowered to gl_ClipDistanceMESA and comes in with CLIPDIST. Right now 
only the properties [1], [2] are used to configure clip/cull within the 
nvc0 part. For now i kept them because somebody "could" face hardware 
configured differently, compared to the nvidia one with its combined 
clip/cull

[1] 
https://cgit.freedesktop.org/mesa/mesa/commit/?id=e70c66197ea10cf052010c7352420a2ae0b0a50a
[2] 
https://cgit.freedesktop.org/mesa/mesa/commit/?id=5227e915803079e5e72a0b2fde3a11d62af8df99

Greetings,
Tobias

>
> On Sun, May 8, 2016 at 4:44 PM, Tobias Klausmann
> <tobias.johannes.klausmann at mni.thm.de> wrote:
>> After the cleanup of my patches in v2, this is another take on finishing this
>> extension.
>>
>> v2: cleanup, reordering of patches, split lowering pass adapation (Dave Airlie)
>> v3:
>>   - drop wrong codesection for array size check (suggested by Timothy Arceri) and
>>     with it the now useless helper to see if an array was unsized
>>   - fix GL3.txt, add releasenote
>>
>> Dave Airlie (1):
>>    glsl: rename lower_clip_distance to lower_distance.
>>
>> Tobias Klausmann (10):
>>    glapi: Add GL_ARB_cull_distance
>>    mesa/main: Add support for GL_ARB_cull_distance (v2)
>>    mesa/prog: Add varyings for arb_cull_distance
>>    glsl: Extend lowering pass for gl_ClipDistance to support other arrays
>>      (v2)
>>    glsl: Add arb_cull_distance support
>>    gallium: Add a pipe cap for arb_cull_distance
>>    mesa/st: Add support for GL_ARB_cull_distance
>>    nv50/ir: Check for TGSI_SEMANTIC_CULLDIST in tgsi declarations
>>    llvmpipe: Enable already implemented cull_distance
>>    nvc0: Implement cull_distance as a special form of clip distance
>>
>>   docs/GL3.txt                                       |   2 +-
>>   docs/relnotes/11.3.0.html                          |   1 +
>>   src/compiler/Makefile.sources                      |   2 +-
>>   src/compiler/glsl/ast_to_hir.cpp                   |  14 +
>>   src/compiler/glsl/builtin_variables.cpp            |  11 +-
>>   src/compiler/glsl/glcpp/glcpp-parse.y              |   3 +
>>   src/compiler/glsl/glsl_parser_extras.cpp           |   1 +
>>   src/compiler/glsl/glsl_parser_extras.h             |   2 +
>>   src/compiler/glsl/ir_optimization.h                |   3 +-
>>   src/compiler/glsl/link_varyings.cpp                |  12 +-
>>   src/compiler/glsl/link_varyings.h                  |   1 +
>>   src/compiler/glsl/linker.cpp                       | 113 +++-
>>   src/compiler/glsl/lower_clip_distance.cpp          | 574 --------------------
>>   src/compiler/glsl/lower_distance.cpp               | 601 +++++++++++++++++++++
>>   src/compiler/glsl/standalone_scaffolding.cpp       |   1 +
>>   src/compiler/glsl/tests/varyings_test.cpp          |  27 +
>>   src/compiler/shader_enums.h                        |   4 +
>>   src/gallium/docs/source/screen.rst                 |   2 +
>>   src/gallium/drivers/freedreno/freedreno_screen.c   |   1 +
>>   src/gallium/drivers/i915/i915_screen.c             |   1 +
>>   src/gallium/drivers/ilo/ilo_screen.c               |   1 +
>>   src/gallium/drivers/llvmpipe/lp_screen.c           |   2 +
>>   .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp  |   3 +
>>   src/gallium/drivers/nouveau/nv30/nv30_screen.c     |   1 +
>>   src/gallium/drivers/nouveau/nv50/nv50_screen.c     |   1 +
>>   src/gallium/drivers/nouveau/nvc0/nvc0_program.c    |   2 +
>>   src/gallium/drivers/nouveau/nvc0/nvc0_program.h    |   1 +
>>   src/gallium/drivers/nouveau/nvc0/nvc0_screen.c     |   1 +
>>   src/gallium/drivers/r300/r300_screen.c             |   1 +
>>   src/gallium/drivers/r600/r600_pipe.c               |   1 +
>>   src/gallium/drivers/radeonsi/si_pipe.c             |   1 +
>>   src/gallium/drivers/softpipe/sp_screen.c           |   1 +
>>   src/gallium/drivers/svga/svga_screen.c             |   1 +
>>   src/gallium/drivers/vc4/vc4_screen.c               |   1 +
>>   src/gallium/include/pipe/p_defines.h               |   1 +
>>   src/mapi/glapi/gen/gl_API.xml                      |   7 +-
>>   src/mesa/drivers/dri/i965/brw_compiler.c           |   2 +-
>>   src/mesa/main/extensions_table.h                   |   1 +
>>   src/mesa/main/get.c                                |   1 +
>>   src/mesa/main/get_hash_params.py                   |   4 +
>>   src/mesa/main/mtypes.h                             |  14 +-
>>   src/mesa/main/shaderapi.c                          |   3 +
>>   src/mesa/program/prog_print.c                      |   4 +
>>   src/mesa/state_tracker/st_extensions.c             |   3 +-
>>   src/mesa/state_tracker/st_program.c                |  40 ++
>>   45 files changed, 865 insertions(+), 609 deletions(-)
>>   delete mode 100644 src/compiler/glsl/lower_clip_distance.cpp
>>   create mode 100644 src/compiler/glsl/lower_distance.cpp
>>
>> --
>> 2.8.2
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list