[Mesa-dev] [PATCH 17/45] swr/rast: Fix name mangling for LLVM pow intrinsic

2018-04-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py b/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py index 0245584..324f24a

[Mesa-dev] [PATCH 13/45] swr/rast: Add MEM_ADD helper function to Builder.

2018-04-13 Thread George Kyriazis
mem[offset] += value This function will be heavily used by all stats intrinsics. --- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 7 +++ src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h | 2 ++ 2 files changed, 9 insertions(+) diff --git

[Mesa-dev] [PATCH 27/45] swr/rast: Fix codegen for typedef types

2018-04-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_types.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_types.py b/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_types.py index a127976..d8863c0 100644 ---

[Mesa-dev] [PATCH 21/45] swr/rast: Lower PERMD and PERMPS to x86.

2018-04-13 Thread George Kyriazis
Add support for providing an emulation callback function for arch/width combinations that don't map cleanly to an x86 intrinsic. --- .../drivers/swr/rasterizer/jitter/builder_mem.cpp | 8 +-- .../drivers/swr/rasterizer/jitter/builder_misc.cpp | 70 --

[Mesa-dev] [PATCH 35/45] swr/rast: Add vgather to x86 lowering pass.

2018-04-13 Thread George Kyriazis
Add support for generic VGATHERPD intrinsic in x86 lowering pass. --- .../rasterizer/jitter/functionpasses/lower_x86.cpp | 85 +++--- 1 file changed, 76 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp

[Mesa-dev] [PATCH 26/45] swr: add x86 lowering pass to fragment shader

2018-04-13 Thread George Kyriazis
Needed because soem FP paths (namely stipple) use gather intrinsics that now need to be lowered to x86. --- src/gallium/drivers/swr/swr_shader.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp index

[Mesa-dev] [PATCH 45/45] swr/rast: Fix VGATHERPD lowering

2018-04-13 Thread George Kyriazis
Also Implement VHSUBPS in x86 lowering pass. --- .../rasterizer/jitter/functionpasses/lower_x86.cpp | 82 ++ 1 file changed, 69 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp

[Mesa-dev] [PATCH 11/45] swr/rast: WIP builder rewrite (2)

2018-04-13 Thread George Kyriazis
Finish up the remaining explicit intrinsic uses. At this point all explicit Intrinsic::getDeclaration() usage has been replaced with auto generated macros generated with gen_llvm_ir_macros.py. Going forward, make sure to only use the intrinsics here, adding new ones as needed. Next step is to

[Mesa-dev] [PATCH 37/45] swr/rast: Add shader stats infrastructure (WIP)

2018-04-13 Thread George Kyriazis
--- .../drivers/swr/rasterizer/archrast/archrast.cpp | 64 +++-- .../drivers/swr/rasterizer/archrast/events.proto | 65 -- .../swr/rasterizer/archrast/events_private.proto | 30 ++ .../drivers/swr/rasterizer/jitter/builder.h| 23

[Mesa-dev] [PATCH 28/45] swr/rast: Adding translate call to builder_gfx_mem.

2018-04-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp | 5 + src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp

[Mesa-dev] [PATCH 41/45] swr/rast: Refactor to improve code sharing.

2018-04-13 Thread George Kyriazis
--- .../drivers/swr/rasterizer/jitter/fetch_jit.cpp| 79 ++ 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp index 767866f..af97b83 100644 ---

[Mesa-dev] [PATCH 12/45] swr/rast: Permute work for simd16

2018-04-13 Thread George Kyriazis
Fix slow permutes in PA tri lists under SIMD16 emulation on AVX Added missing permute (interlane, immediate) to SIMDLIB --- .../drivers/swr/rasterizer/common/simd16intrin.h | 1 + .../drivers/swr/rasterizer/common/simdintrin.h | 1 + .../swr/rasterizer/common/simdlib_256_avx.inl |

[Mesa-dev] [PATCH 10/45] swr/rast: Add autogen of helper llvm intrinsics.

2018-04-13 Thread George Kyriazis
Replace sqrt, maskload, fp min/max, cttz, ctlz with llvm equivalent. Replace AVX maskedstore intrinsic with LLVM intrinsic. Add helper llvm macros for stacksave, stackrestore, popcnt. --- src/gallium/drivers/swr/Makefile.am| 8 ++ src/gallium/drivers/swr/SConscript

[Mesa-dev] [PATCH 29/45] swr/rast: Add support for setting optimization level

2018-04-13 Thread George Kyriazis
for JIT compilation --- .../drivers/swr/rasterizer/codegen/knob_defs.py| 35 ++ .../swr/rasterizer/common/simdlib_512_emu.inl | 2 +- src/gallium/drivers/swr/rasterizer/core/state.h| 13 .../drivers/swr/rasterizer/jitter/JitManager.cpp | 10 +--

[Mesa-dev] [PATCH 06/45] swr/rast: Add some archrast stats

2018-04-13 Thread George Kyriazis
Add stats for degenerate and backfacing primitive counts Wire archrast stats for alpha blend and alpha test. pass value to jitter, upon return have archrast event increment a value --- .../drivers/swr/rasterizer/archrast/archrast.cpp | 35 +-

[Mesa-dev] [PATCH 19/45] swr/rast: Simplify #define usage in gen source file

2018-04-13 Thread George Kyriazis
Removed preprocessor defines from structures passed to LLVM jitted code. The python scripts do not understand the preprocessor defines and ignores them. So for fields that are compiled out due to a preprocessor define the LLVM script accounts for them anyway because it doesn't know what the

[Mesa-dev] [PATCH 00/45] OpenSWR driver misc changes

2018-04-13 Thread George Kyriazis
Lots of SWR-specifc changes, including: - work for 16-wide simd operation across all avx flavors - separate avx instrinsics into a separate x86 lowering pass - stats work - misc other cleanup George Kyriazis (45): swr/rast: Add some instructions to jitter swr/rast: Introduce JIT_MEM_CLIENT

[Mesa-dev] [PATCH 01/45] swr/rast: Add some instructions to jitter

2018-04-13 Thread George Kyriazis
VPHADDD, PMAXUD, PMINUD --- .../drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py | 1 + src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | 12 src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h | 2 ++ 3 files changed, 15 insertions(+) diff --git

[Mesa-dev] [PATCH 05/45] swr/rast: Silence some unused variable warnings

2018-04-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp index 5feb5fa..1ee6691 100644 ---

[Mesa-dev] [PATCH 03/45] swr/rast: Use blend context struct to pass params

2018-04-13 Thread George Kyriazis
Stuff parameters into a blend context struct before passing down through the PFN_BLEND_JIT_FUNC function pointer. Needed for stat changes. --- .../drivers/swr/rasterizer/core/backend_impl.h | 44 ++- src/gallium/drivers/swr/rasterizer/core/state.h| 17 ++--

[Mesa-dev] [PATCH 02/45] swr/rast: Introduce JIT_MEM_CLIENT

2018-04-13 Thread George Kyriazis
Help assist with usage tracking of memory accesses --- .../drivers/swr/rasterizer/jitter/builder_mem.cpp | 58 ++ .../drivers/swr/rasterizer/jitter/builder_mem.h| 47 -- .../drivers/swr/rasterizer/jitter/fetch_jit.cpp| 6 +-- 3 files changed, 71

[Mesa-dev] [PATCH 04/45] swr/rast: Add debug type info for i128

2018-04-13 Thread George Kyriazis
Help support debug info in 16 wide shaders. --- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 0cefa43..bfb1d2e

[Mesa-dev] [PATCH 9/9] swr/rast: Refactor memory gather operations

2018-03-07 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h | 3 ++- src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 7 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h

[Mesa-dev] [PATCH 6/9] swr/rast: Add tracking for stream out topology

2018-03-07 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp | 6 +++--- src/gallium/drivers/swr/rasterizer/archrast/events.proto | 1 + src/gallium/drivers/swr/rasterizer/archrast/events_private.proto | 2 ++ src/gallium/drivers/swr/rasterizer/core/api.cpp | 4

[Mesa-dev] [PATCH 5/9] swr/rast: Add split draw and other state information to DrawInfoEvent.

2018-03-07 Thread George Kyriazis
Removed specific split draw events. --- .../drivers/swr/rasterizer/archrast/archrast.cpp | 22 ++ .../drivers/swr/rasterizer/archrast/events.proto | 4 .../swr/rasterizer/archrast/events_private.proto | 20

[Mesa-dev] [PATCH 7/9] swr/rast: Add VPOPCNT

2018-03-07 Thread George Kyriazis
Supports popcnt on vector masks (e.g. <8 x i1>) --- src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | 8 src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp

[Mesa-dev] [PATCH 1/9] swr/rast: Added comment

2018-03-07 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp index 67e415c..6fa60a1 100644 ---

[Mesa-dev] [PATCH 2/9] swr/rast: Rasterized Subspans stats support

2018-03-07 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp | 15 +++ src/gallium/drivers/swr/rasterizer/archrast/events.proto | 6 ++ .../drivers/swr/rasterizer/archrast/events_private.proto | 6 ++ src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h | 3 +++ 4

[Mesa-dev] [PATCH 4/9] swr/rast: Refactor api and worker event handlers.

2018-03-07 Thread George Kyriazis
In the API event handler we want to share information between the core layer and the API. Specifically, around associating various ids with different kinds of events. For example, associate render pass id with draw ids, or command buffer ids with draw ids. ---

[Mesa-dev] [PATCH 3/9] swr/rast: Add support for generalized late and early z/stencil stats

2018-03-07 Thread George Kyriazis
--- .../drivers/swr/rasterizer/archrast/archrast.cpp | 45 ++ .../drivers/swr/rasterizer/archrast/events.proto | 28 ++ 2 files changed, 73 insertions(+) diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp

[Mesa-dev] [PATCH 8/9] swr/rast: Add KNOB_DISABLE_SPLIT_DRAW

2018-03-07 Thread George Kyriazis
This is useful for archrast data collection. This greatly speeds up the post processing script since there is significantly less events generated. Finally, this is a simpler option to communicate to users than having them directly adjust MAX_PRIMS_PER_DRAW and MAX_TESS_PRIMS_PER_DRAW. ---

[Mesa-dev] [PATCH 18.0] swr/rast: Fix index buffer overfetch issue for non-indexed draws

2018-02-28 Thread George Kyriazis
Populate pLastIndex, even for the non-indexed case. An zero pLastIndex can cause the index offsets inside the fetcher to have non-sensical values that can be either very large positive or very large negative numbers. Cherry-pick of 539de78633 for 18.0. Surrounding context is different for 18.0

[Mesa-dev] [PATCH v2 6/7] swr/rast: Faster frustum prim culling

2018-02-27 Thread George Kyriazis
Fix clipper validMask setting. We don't need to run frustum rejected primitives through the clipper. Perform frustum culling with only frustum clip codes. Guardband clip codes cannot be used because they overlap frustum codes. --- src/gallium/drivers/swr/rasterizer/core/clip.h | 10 +++--- 1

[Mesa-dev] [PATCH v2 5/7] swr/rast: Consolidate TRANSLATE_ADDRESS

2018-02-27 Thread George Kyriazis
Translate is now part of an overloaded LOAD call which required a change to the code gen to skip the load functions in order to handle them manually to make them virtual. --- .../swr/rasterizer/codegen/gen_llvm_ir_macros.py | 3 ++- .../drivers/swr/rasterizer/jitter/builder_mem.cpp| 20

[Mesa-dev] [PATCH v2 3/7] swr/rast: Remove draw type from event definitions

2018-02-27 Thread George Kyriazis
- Have the draw type sent to DrawInfoEvent in handlers created in archrast.cpp. The draw type no longer needs to be sent during during AR_API_EVENT() call in api.cpp. - Remove draw type from event defintions in events_private.proto, no longer needed ---

[Mesa-dev] [PATCH v2 7/7] swr/rast: revert clip distance precision

2018-02-27 Thread George Kyriazis
Breaks a whole bunch of piglit tests --- src/gallium/drivers/swr/rasterizer/core/backend_impl.h | 4 +--- src/gallium/drivers/swr/rasterizer/core/binner.cpp | 17 - 2 files changed, 17 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH v2 4/7] swr/rast: Code generation cleanup

2018-02-27 Thread George Kyriazis
Generate more compact code from gen_llvm.hpp. --- .../swr/rasterizer/codegen/templates/gen_llvm.hpp | 36 +- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp

[Mesa-dev] [PATCH v2 0/7] Merged 2 patchsets

2018-02-27 Thread George Kyriazis
is different, and the same patch won't work on both branches. George Kyriazis (7): swr/rast: Fix index buffer overfetch issue for non-indexed draws swr/rast: whitespace change swr/rast: Remove draw type from event definitions swr/rast: Code generation cleanup swr/rast: Consolidate TRANSLATE_A

[Mesa-dev] [PATCH v2 1/7] swr/rast: Fix index buffer overfetch issue for non-indexed draws

2018-02-27 Thread George Kyriazis
Populate pLastIndex, even for the non-indexed case. An zero pLastIndex can cause the index offsets inside the fetcher to have non-sensical values that can be either very large positive or very large negative numbers. v2: split whitespace change into new commit ---

[Mesa-dev] [PATCH v2 2/7] swr/rast: whitespace change

2018-02-27 Thread George Kyriazis
v2: this commit contains whitespace change split from another commit --- src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp

[Mesa-dev] [PATCH v2] swr/rast: Fix index buffer overfetch issue for non-indexed draws

2018-02-26 Thread George Kyriazis
Populate pLastIndex, even for the non-indexed case. A zero pLastIndex can cause the index offsets inside the fetcher to have non-sensical values that can be either very large positive or very large negative numbers. v2 remove cc mesa-stable, since the stable patch needs to be different from this

[Mesa-dev] [PATCH 2/5] swr/rast: Code generation cleanup

2018-02-22 Thread George Kyriazis
Generate more compact code from gen_llvm.hpp. --- .../swr/rasterizer/codegen/templates/gen_llvm.hpp | 36 +- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp

[Mesa-dev] [PATCH 1/5] swr/rast: Remove draw type from event definitions

2018-02-22 Thread George Kyriazis
- Have the draw type sent to DrawInfoEvent in handlers created in archrast.cpp. The draw type no longer needs to be sent during during AR_API_EVENT() call in api.cpp. - Remove draw type from event defintions in events_private.proto, no longer needed ---

[Mesa-dev] [PATCH 5/5] swr/rast: revert clip distance precision

2018-02-22 Thread George Kyriazis
Breaks a whole bunch of piglit tests --- src/gallium/drivers/swr/rasterizer/core/backend_impl.h | 4 +--- src/gallium/drivers/swr/rasterizer/core/binner.cpp | 17 - 2 files changed, 17 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 4/5] swr/rast: Faster frustum prim culling

2018-02-22 Thread George Kyriazis
Fix clipper validMask setting. We don't need to run frustum rejected primitives through the clipper. Perform frustum culling with only frustum clip codes. Guardband clip codes cannot be used because they overlap frustum codes. --- src/gallium/drivers/swr/rasterizer/core/clip.h | 10 +++--- 1

[Mesa-dev] [PATCH 3/5] swr/rast: Consolidate TRANSLATE_ADDRESS

2018-02-22 Thread George Kyriazis
Translate is now part of an overloaded LOAD call which required a change to the code gen to skip the load functions in order to handle them manually to make them virtual. --- .../swr/rasterizer/codegen/gen_llvm_ir_macros.py | 3 ++- .../drivers/swr/rasterizer/jitter/builder_mem.cpp| 20

[Mesa-dev] [PATCH] swr/rast: Fix index buffer overfetch issue for non-indexed draws

2018-02-22 Thread George Kyriazis
Populate pLastIndex, even for the non-indexed case. A zero pLastIndex can cause the index offsets inside the fetcher to have non-sensical values that can be either very large positive or very large negative numbers. cc: mesa-sta...@lists.freedesktop.org ---

[Mesa-dev] [PATCH 13/31] swr/rast: Cull prims when all verts have negative clip distances

2018-02-13 Thread George Kyriazis
Performance optimization, and fixes some clipping issues. --- src/gallium/drivers/swr/rasterizer/core/clip.h | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.h b/src/gallium/drivers/swr/rasterizer/core/clip.h index 1d336b6..5193672 100644 ---

[Mesa-dev] [PATCH 26/31] swr/rast: Convert C Sampler intrinsics

2018-02-13 Thread George Kyriazis
Convert portions of the C sampler to the rasty SIMD lib. --- src/gallium/drivers/swr/rasterizer/common/intrin.h | 3 +++ .../drivers/swr/rasterizer/common/simdlib_128_avx.inl| 16 2 files changed, 19 insertions(+) diff --git

[Mesa-dev] [PATCH 31/31] swr/rast: blend_epi32() should return Integer, not Float

2018-02-13 Thread George Kyriazis
fix gcc8 compiler error for KNL. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105029 --- src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl

[Mesa-dev] [PATCH 19/31] swr/rast: Make GATHER4PS virtual

2018-02-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h index 14dc22d..f31cb4a 100644 ---

[Mesa-dev] [PATCH 28/31] swr/rast: Add semantics for translating address

2018-02-13 Thread George Kyriazis
Added support for another full translation path in fetch jitter. --- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h | 1 + src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 4 2 files changed, 5 insertions(+) diff --git

[Mesa-dev] [PATCH 24/31] swr/rast: Make SIMDLib templated types easier to use

2018-02-13 Thread George Kyriazis
"typename SIMD_T::TypeName" --> "TypeName" --- .../drivers/swr/rasterizer/common/simdlib.hpp | 9 + src/gallium/drivers/swr/rasterizer/core/binner.cpp | 338 ++--- src/gallium/drivers/swr/rasterizer/core/binner.h | 18 +- src/gallium/drivers/swr/rasterizer/core/clip.h

[Mesa-dev] [PATCH 15/31] swr/rast: Fix avx version of GATHERPS

2018-02-13 Thread George Kyriazis
GEP was given the wrong type, and asserting. --- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp

[Mesa-dev] [PATCH 29/31] swr/rast: Consolidate archrast Draw events

2018-02-13 Thread George Kyriazis
Consolidate archrst draw events into single draw event with an attribute that represents the type of draw - Add handlers for new private proto versions of DrawInstancedEvent, DrawIndexedInstancedEvent, DrawInstancedSplitEvent, and DrawIndexedInstancedSplitEvent - Convert the draw events to

[Mesa-dev] [PATCH 30/31] swr/rast: Normalize path for debug metadata

2018-02-13 Thread George Kyriazis
in template gen_llvm.hpp --- src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp

[Mesa-dev] [PATCH 23/31] swr/rast: Use right type for offset to next component

2018-02-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp index 491fb98..617cf33 100644 ---

[Mesa-dev] [PATCH 12/31] swr/rast: whitespace cleanup

2018-02-13 Thread George Kyriazis
--- .../drivers/swr/rasterizer/jitter/JitManager.h | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h index ddd6864..3660249 100644 ---

[Mesa-dev] [PATCH 17/31] swr/rast: Misc cleanup

2018-02-13 Thread George Kyriazis
Together with correct detection of clipDistance NaNs when no cullDistance is set --- src/gallium/drivers/swr/rasterizer/core/clip.h| 2 +- src/gallium/drivers/swr/rasterizer/core/context.h | 26 src/gallium/drivers/swr/rasterizer/core/state.h | 81 +-- 3 files

[Mesa-dev] [PATCH 27/31] swr/rast: Fix SRL call with a non-immediate

2018-02-13 Thread George Kyriazis
Don't count on the compiler automagically converting an srli call to srl if the shift count isn't an immediate. --- src/gallium/drivers/swr/rasterizer/common/simdlib_128_avx.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 11/31] swr/rast: Fix invalid number of attributes

2018-02-13 Thread George Kyriazis
Fix invalid number of attributes passed into tesselation PA. Needs to take into account any offsets from the shader. nnocuous issue, but removes an assert firing in debug. --- src/gallium/drivers/swr/rasterizer/core/frontend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 25/31] swr/rast: Update/add comments

2018-02-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/core/api.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index f45da96..99d3cd5 100644 ---

[Mesa-dev] [PATCH 07/31] swr/rast: Removed unused variable

2018-02-13 Thread George Kyriazis
Gets rid of zillions of unused variable warnings, made worse by templates. --- src/gallium/drivers/swr/rasterizer/core/backend.cpp | 2 -- src/gallium/drivers/swr/rasterizer/core/backend_impl.h | 3 --- src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp | 2 --

[Mesa-dev] [PATCH 18/31] swr/rast: Use llvm intrinsic masked gather

2018-02-13 Thread George Kyriazis
Use llvm intrinsic masked.gather instead of manual unroll for the cases where we have vector of pointers. Improves llvm IR debug experience by reducing a ton of IR to a single intrinsic call. Also seems to reduce overall stack use considerably. ---

[Mesa-dev] [PATCH 21/31] swr/rast: Fix bug related to passing AR handle

2018-02-13 Thread George Kyriazis
We were passing a garbage handle. Let's not do that. --- src/gallium/drivers/swr/rasterizer/core/api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index 5e27e4d..f45da96

[Mesa-dev] [PATCH 22/31] swr/rast: Be more explicit when fetching next component

2018-02-13 Thread George Kyriazis
Use a new function to denote that we want to get offset to next component and hide the fact that GEP is used underneath. --- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 13 + src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h | 2 ++ 2 files changed, 11

[Mesa-dev] [PATCH 06/31] swr/rast: Separate RDTSC code from archrast

2018-02-13 Thread George Kyriazis
Renamed rdstc defines more appropriately --- src/gallium/drivers/swr/rasterizer/core/api.cpp| 40 .../drivers/swr/rasterizer/core/backend.cpp| 24 +- .../drivers/swr/rasterizer/core/backend_clear.cpp | 8 ++-- .../drivers/swr/rasterizer/core/backend_impl.h

[Mesa-dev] [PATCH 16/31] swr/rast: Renamed variable in vertexbufferstate

2018-02-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/core/state.h | 2 +- src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 10 ++ src/gallium/drivers/swr/swr_state.cpp | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git

[Mesa-dev] [PATCH 02/31] swr/rast: Cleanup knob definitions

2018-02-13 Thread George Kyriazis
Rename some of the categories and move some options around. --- .../drivers/swr/rasterizer/codegen/knob_defs.py| 90 ++ 1 file changed, 40 insertions(+), 50 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/knob_defs.py

[Mesa-dev] [PATCH 10/31] swr/rast: Add clipper stats.

2018-02-13 Thread George Kyriazis
Clipper event is now: event ClipperEvent { uint32_t drawId; uint32_t trivialRejectCount; uint32_t trivialAcceptCount; uint32_t mustClipCount; }; --- .../drivers/swr/rasterizer/archrast/archrast.cpp | 18 +++--- .../drivers/swr/rasterizer/archrast/events.proto

[Mesa-dev] [PATCH 20/31] swr/rast: Fix primitive replication issue in tesselation PA.

2018-02-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/core/frontend.cpp | 4 ++-- src/gallium/drivers/swr/rasterizer/core/pa.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp

[Mesa-dev] [PATCH 04/31] swr/rast: Remove some JIT debug code

2018-02-13 Thread George Kyriazis
--- .../drivers/swr/rasterizer/jitter/JitManager.cpp | 45 -- 1 file changed, 45 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 7105766..8092c14 100644 ---

[Mesa-dev] [PATCH 14/31] swr/rast: More precise user clip distance interpolation

2018-02-13 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/core/backend_impl.h | 4 +++- src/gallium/drivers/swr/rasterizer/core/binner.cpp | 17 + 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_impl.h

[Mesa-dev] [PATCH 00/31] SWR-related rasterizer changes

2018-02-13 Thread George Kyriazis
Batch patchset of SWR rasterizer-related changes George Kyriazis (31): swr/rast: Add missing parameter to a few gather functions swr/rast: Cleanup knob definitions swr/rast: Don't include private context in gathers swr/rast: Remove some JIT debug code swr/rast: Cleanup

[Mesa-dev] [PATCH 09/31] swr/rast: Separate event types to public and private

2018-02-13 Thread George Kyriazis
Split into two proto files and modify appropriate build rules for configure / scons / meson builds. There are private internal events (proxy) that communicate information from rasterizer to ArchRast. ArchRast can use these events to calculate a final answer and then emit other public events which

[Mesa-dev] [PATCH 05/31] swr/rast: Cleanup of mpPrivateContext in Builder

2018-02-13 Thread George Kyriazis
Provide access functions for mpPrivateContext in Builder. --- src/gallium/drivers/swr/rasterizer/jitter/builder.cpp | 3 ++- src/gallium/drivers/swr/rasterizer/jitter/builder.h | 10 ++ src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 5 +++-- 3 files changed, 15

[Mesa-dev] [PATCH 08/31] swr/rast: Clean up event types and remove BE events

2018-02-13 Thread George Kyriazis
Begin/End events not needed anymore. --- .../drivers/swr/rasterizer/archrast/archrast.cpp | 4 -- .../drivers/swr/rasterizer/archrast/events.proto | 76 -- 2 files changed, 80 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp

[Mesa-dev] [PATCH 03/31] swr/rast: Don't include private context in gathers

2018-02-13 Thread George Kyriazis
Move mpPrivateContext to compensate --- src/gallium/drivers/swr/rasterizer/jitter/builder.h | 4 src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 14 +++--- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h | 10 +-

[Mesa-dev] [PATCH 01/31] swr/rast: Add missing parameter to a few gather functions

2018-02-13 Thread George Kyriazis
We now pass pDawContext as a default parameter --- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 12 ++-- src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h | 10 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git

[Mesa-dev] [PATCH 2/2] meson/swr: Updated copyright dates

2018-02-01 Thread George Kyriazis
cc: mesa-sta...@lists.freedesktop.org cc: dy...@pnwbakers.com --- src/gallium/drivers/swr/meson.build | 2 +- src/gallium/drivers/swr/rasterizer/codegen/meson.build | 2 +- src/gallium/drivers/swr/rasterizer/core/backends/meson.build | 2 +-

[Mesa-dev] [PATCH 1/2] meson/swr: re-shuffle generated files

2018-02-01 Thread George Kyriazis
Move generated files from codegen/meson.build to other directories, in order to satisfy generated include file dependencies Add correct file lists for architecture-specific libraries. cc: mesa-sta...@lists.freedesktop.org cc: dy...@pnwbakers.com --- src/gallium/drivers/swr/meson.build

[Mesa-dev] [PATCH] swr/rast: Optimize DumpToFile output size

2018-01-24 Thread George Kyriazis
Modify DumpToFile to only dump the function, not the entire module. Reduces file sizes and speeds up the dumping. --- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH v2] swr/rast: support llvm 3.9 type declarations

2018-01-24 Thread George Kyriazis
LLVM 3.9 was not taken into account in initial check-in. Fixes: 01ab218bbc ("swr/rast: Initial work for debugging support.") cc: mesa-sta...@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104749 Acked-by: Emil Velikov ---

[Mesa-dev] [PATCH 4/5] swr/rast: Move memory-related JIT functions

2018-01-24 Thread George Kyriazis
Move them to their own file (builder_mem.{h|cpp}). Add builder_mem.cpp to the build system. --- src/gallium/drivers/swr/Makefile.sources | 2 + src/gallium/drivers/swr/meson.build| 2 + .../drivers/swr/rasterizer/jitter/builder.h| 1 +

[Mesa-dev] [PATCH 5/5] swr/rast: Updated copyright dates

2018-01-24 Thread George Kyriazis
on knob-related files. --- src/gallium/drivers/swr/rasterizer/codegen/knob_defs.py| 2 +- src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.cpp | 2 +- src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.h | 2 +- 3 files changed, 3 insertions(+), 3

[Mesa-dev] [PATCH 2/5] swr/rast: Better ExecCmd (i.e. system()) implmentation

2018-01-24 Thread George Kyriazis
Hides console window creation during JIT linker execution in apps that don't have a console. Remove hooking of CreateProcessInternalA - the MSFT implementation just turns around and calls CreateProcessInternalW which, we do hook. --- src/gallium/drivers/swr/rasterizer/common/os.cpp | 158

[Mesa-dev] [PATCH 3/5] swr/rast: Add extra (optional) parameter in GATHERPS

2018-01-24 Thread George Kyriazis
Now also takes in an additional parameter (draw context) for future expansion. --- src/gallium/drivers/swr/rasterizer/jitter/builder.h| 2 ++ src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | 2 +- src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h | 2 +-

[Mesa-dev] [PATCH 1/5] swr/rast: Support USE_SIMD16_FRONTEND=0 for EarlyRast

2018-01-24 Thread George Kyriazis
Early Rasterization did not initially work with USE_SIMD16_FRONTEND=0. Fix it so it works there, too. Please note that the default setting is USE_SIMD16_FRONTEND=1. --- .../drivers/swr/rasterizer/core/frontend.cpp | 66 +++--- 1 file changed, 33 insertions(+), 33

[Mesa-dev] [PATCH] swr/rast: support llvm 3.9 type declarations

2018-01-24 Thread George Kyriazis
LLVM 3.9 was not taken into in initial check-in. Fixes: 01ab218bbc ("swr/rast: Initial work for debugging support.") cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 14 ++ 1 file changed, 14 insertions(+) diff --git

[Mesa-dev] [PATCH] swr/rast: Fix llvm5 behavior

2018-01-19 Thread George Kyriazis
For some reason llvm5 is picky about accepting a void * type in the case of building an argument list. Since we don't care about the type (we ignore the argument for now), pick another pointer type --- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 3 ++- 1 file changed, 2

[Mesa-dev] [PATCH 13/20] swr/rast: silence generated file warnings

2018-01-19 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp index 61c3132..9db6c61 100644 ---

[Mesa-dev] [PATCH 11/20] swr/rast: AVX-512 changes to enable 16-wide VS

2018-01-19 Thread George Kyriazis
Add a new define (USE_SIMD16_VS), to denote calling a 16-wide vertex shader. This is needed because the mesa driver can do 16-wide shaders, but rasty cannot yet, so we need to distinguish. Create a new VertexID entry (VertexID16) for the USE_SIMD16_VS case, since we need to format the vertex id

[Mesa-dev] [PATCH 15/20] swr/rast: Added ICLAMP builder function

2018-01-19 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | 4 ++-- src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp

[Mesa-dev] [PATCH 17/20] swr: Support simd16 vertex shaders

2018-01-19 Thread George Kyriazis
Supporting simd16 vertex shaders involves packing the output of the fetch shader appropriately, especially the vertexID buffers that have to be formatted in one simd16 register, needed by the VS. As part of this support, we needed to remove the 2nd JitManager, since it was not accounting for

[Mesa-dev] [PATCH 20/20] swr/rast: Enable early rasterization

2018-01-19 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/core/knobs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/knobs.h b/src/gallium/drivers/swr/rasterizer/core/knobs.h index 23a2876..d88a3aa 100644 ---

[Mesa-dev] [PATCH 19/20] swr/rast: Implement Early Rasterization optimization

2018-01-19 Thread George Kyriazis
Early Rasterization is an optimization for small triangles. Scientific workloads often contain very small triangles that has non-zero area and cannot be trivially rejected as falling between pixel centers, but does not cover any pixel center. Those triangles can be initially rasterized as early

[Mesa-dev] [PATCH 10/20] swr/rast: x86 autogenerated macro work

2018-01-19 Thread George Kyriazis
Add name argument to x86 autogenerated macros. Add useful variable names for DCL_inputVec implementation. --- .../swr/rasterizer/codegen/gen_llvm_ir_macros.py| 2 +- .../swr/rasterizer/codegen/templates/gen_builder.hpp| 2 +- .../drivers/swr/rasterizer/jitter/builder_misc.cpp |

[Mesa-dev] [PATCH 12/20] swr/rast: jit shader lib debug work

2018-01-19 Thread George Kyriazis
Create shader_lib during build, link with shaders at DLL generation time --- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 5 + src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 6 ++ 2 files changed, 11 insertions(+) diff --git

[Mesa-dev] [PATCH 16/20] swr/rast: changed jit debug magic number

2018-01-19 Thread George Kyriazis
--- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index ed4193e..a9a416a 100644 ---

[Mesa-dev] [PATCH 18/20] swr/rast: Enable simd16 vertex shaders

2018-01-19 Thread George Kyriazis
Flip the switch(es) to enable simd16 vertex shaders: USE_SIMD16_SHADERS and USE_SIMD16_VS Both have to be enabled at the same time. Currently, just setting USE_SIMD16_SHADERS does not work correctly. --- src/gallium/drivers/swr/rasterizer/core/knobs.h | 4 ++-- 1 file changed, 2 insertions(+),

<    1   2   3   4   >