summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr
Commit message (Collapse)AuthorAgeFilesLines
* swr: use LLVM version string instead of re-computing itEric Engestrom2019-08-221-2/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* build: Bump C++ standard requirement to C++14 to fix FTBFS with LLVM 10Kai Wasserbäch2019-08-201-1/+1
| | | | | | | | | | | When building Mesa against a recent LLVM 10 with C++11, the build fails if the AMD common code is built as well due to "std::index_sequence" being undeclared. LLVM requires a minimum of C++14. Signed-off-by: Kai Wasserbäch <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* gallium/swr: Fix glClear when it's used with glEnable/glDisable GL_SCISSOR_TESTKrzysztof Raszkowski2019-08-091-64/+5
| | | | | | | When GL_SCISSOR_TEST is enabled glClear is handled by state tracker and there is no need to do this in gallium driver. Reviewed-by: Alok Hota [email protected]
* swr/rasterizer: modernize thread TLBJan Zielinski2019-08-0814-30/+135
| | | | Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Refactor events collection mechanismJan Zielinski2019-08-0810-439/+382
| | | | | | Several improvements and cleanups in events and statstics mechanisms Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: improvements in simdlibJan Zielinski2019-08-0817-492/+49
| | | | | | | | | | | | | 1. fix build issues with MSVC 2019 compiler The MSVC 2019 compiler seems to have an issue with optimized code-gen when using the _mm256_and_si256() intrinsic. Only disable use of integer vpand on buggy versions MSVC 2019. Otherwise allow use of integer vpand intrinsic. 2. Remove unused vec/matrix functionality Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Events are now grouped and enabled by knobsJan Zielinski2019-08-0815-202/+372
| | | | | | | | | | | | | All events are now grouped as follows: -Framework (i.e. ThreadStart) [always ON] -Api (i.e. SwrSync) [always ON] -Pipeline [default ON] -Shader [default ON] -SWTag [default OFF] -Memory [default OFF] Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: do not mark tiles dirty until actually renderedJan Zielinski2019-08-0813-8/+72
| | | | Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: enable size accumulation in mem statsJan Zielinski2019-08-0811-104/+128
| | | | | | Small refactoring is also performed Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: enable using AOS vertex data formatJan Zielinski2019-08-083-21/+81
| | | | Reviewed-by: Alok Hota <[email protected]>
* gallium: add PIPE_CAP_TGSI_ATOMINC_WRAP to indicate supportPierre-Eric Pelloux-Prayer2019-08-061-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* swr/rasterizer: Add memory tracking supportJan Zielinski2019-07-3012-26/+252
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rasterizer: Better implementation of scatterJan Zielinski2019-07-307-79/+225
| | | | | | | | | | Added support for avx512 scatter instruction. Non-avx512 will now call into a C function to do the scatter emulation. This has better jit compile performance than the previous approach of jitting scalar loops. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rasterizer: cleanups for tessellationJan Zielinski2019-07-302-28/+56
| | | | | | | This commit introduces small fixes in preparation for tessellation support. Reviewed-by: Bruce Cherniak <[email protected]>
* rasterizer/swr: move BucketMgr to SwrContextJan Zielinski2019-07-3021-261/+290
| | | | | | | This move gets us back to parity with global manager in that we can dump render context buckets now. Reviewed-by: Bruce Cherniak <[email protected]>
* gallium: fix windows build from params change.Dave Airlie2019-07-251-3/+6
| | | | | | | | This is why we can't have nice things. I'm sure there's someway to do this with {0} but I really don't have time for that. Fixes: 2631fd3b0bf ("gallivm: rework lp_build_tgsi_soa to take a struct") Reviewed-by: Timothy Arceri <[email protected]>
* gallivm: rework lp_build_tgsi_soa to take a structDave Airlie2019-07-241-39/+39
| | | | | | | The parameters were getting messy and I have to add a few more for compute shaders, so clean it up before proceeding. Reviewed-by: Roland Scheidegger <[email protected]>
* swr/rasterizer: Fix 3D resource copies.Jan Zielinski2019-07-231-0/+14
| | | | | | Ensure constant attributes stay constant with barycentric interpolation. Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Fix return type on SIMD8 version of Clamp and Normalize ↵Jan Zielinski2019-07-231-2/+2
| | | | | | utility functions Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: small formatting changesJan Zielinski2019-07-233-22/+48
| | | | Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Adding support for unhandled clipEnable stateJan Zielinski2019-07-233-4/+8
| | | | | | Clipping is not correctly handled by the rasterizer - fixing this. Reviewed-by: Alok Hota <[email protected]>
* gallium: switch boolean -> bool at the interface definitionsIlia Mirkin2019-07-2210-45/+45
| | | | | | | | | | | | | | | | | | This is a relatively minimal change to adjust all the gallium interfaces to use bool instead of boolean. I tried to avoid making unrelated changes inside of drivers to flip boolean -> bool to reduce the risk of regressions (the compiler will much more easily allow "dirty" values inside a char-based boolean than a C99 _Bool). This has been build-tested on amd64 with: Gallium drivers: nouveau r300 r600 radeonsi freedreno swrast etnaviv v3d vc4 i915 svga virgl swr panfrost iris lima kmsro Gallium st: mesa xa xvmc xvmc vdpau va Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
* util: use standard name for snprintf()Eric Engestrom2019-07-191-3/+3
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swr/rast: Refactor memory API between rasterizer core and swrJan Zielinski2019-07-1830-185/+370
| | | | | | | This commit cleans up API between the core of the rasterizer and swr. Some formatting changes are also done. Reviewed-by: Alok Hota <[email protected]>
* gallium: get rid of PIPE_CAP_SM3Erik Faye-Lund2019-07-101-2/+3
| | | | | | | | | | | | | | | | | | | | | PIPE_CAP_SM3 has always been an odd one out of all our caps. While most other caps are fine-grained and single-purpose, this cap encode several features in one. And since OpenGL cares more about single features, it'd be nice to get rid of this one. As it turns, this is now relatively simple. We only really care about three features using this cap, and those already got their own caps. So we can remove it, and make sure all current drivers just give the same response to all of them. The only place we *really* care about SM3 is in nine, and there we can instead just re-construct the information based on the finer-grained caps. This avoids DX9 semantics from needlessly leaking into all of the drivers, most of who doesn't care a whole lot about DX9 specifically. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
* gallivm: add ssbo pointers to the soa build api.Dave Airlie2019-07-071-3/+6
| | | | | | Need to pass ssbo + ssbo size pointers just like constants. Reviewed-by: Roland Scheidegger <[email protected]>
* swr/swr: Enable ARB_viewport_arrayJan Zielinski2019-07-037-48/+60
| | | | | | | | | | The rasterizer core supported ARB_viewport_array, but the swr layer connecting core to Gallium state tracker only allowed one viewport. We add support for multiple viewports to swr layer. Reviewed-by: Alok Hota <[email protected]>
* Revert "meson: Add support for using cmake for finding LLVM"Dylan Baker2019-06-281-8/+5
| | | | | | | | This reverts commit 5157a4276500c77e2210e853b262be1d1b30aedf. There is a meson bug that causes llvm to always be statically linked, which is obviously not what we want. I haven't had time to look into it yet, but for now let's just revert it.
* meson: Add support for using cmake for finding LLVMDylan Baker2019-06-271-5/+8
| | | | | | | | | | | | | | | | Meson has support for using cmake as a finder for some dependencies, including LLVM. Using cmake has a lot of advantages: it needs less meson maintenance to keep working (even for llvm updates); it works more sanely for cross compiles (as llvm-config is a compiled binary not a shell script). Meson 0.51.0 also has a new generic variable getter that can be used to get information from either cmake, pkg-config, or config-tools dependencies, which is needed for cmake. We continue to support using llvm-config if you don't have cmake installed, or if cmake cannot find a suitable version. Fixes: 0d59459432cf077d768164091318af8fb1612500 ("meson: Force the use of config-tool for llvm") Reviewed-by: Eric Engestrom <[email protected]>
* swr: fix support for GL_ARB_copy_image extensionKrzysztof Raszkowski2019-06-051-1/+16
| | | | | | | | This commit fix support and adjusts the capabilities returned by the SWR driver and the documentation to correctly report the GL_ARB_copy_image extension. Reviewed-by: Alok Hota <[email protected]>
* swr/rast: Enable ARB_GL_texture_buffer_rangeJan Zielinski2019-05-301-1/+1
| | | | | | | | No significant changes in the code needed to enable the extension. Just updating SWR capabilities and the documentation Reviewed-by: Alok Hota <[email protected]>
* swr/rast: fix 32-bit compilation on LinuxJan Zielinski2019-05-301-65/+0
| | | | | | | Removing unused but problematic code from simdlib header to fix compilation problem on 32-bit Linux. Reviewed-by: Alok Hota <[email protected]>
* gallium: Change PIPE_CAP_TGSI_FS_FBFETCH bool to PIPE_CAP_FBFETCH countKenneth Graunke2019-05-231-1/+1
| | | | | | | | | | | | | | TGSI's FBFETCH instruction currently only supports reading from a single render target, but NIR intrinsics can support multiple render targets. radeonsi can only support fetching from RT 0, but other drivers may be able to support fetching from any render target. To express this, this patch renames PIPE_CAP_TGSI_FS_FBFETCH to simply PIPE_CAP_FBFETCH, and converts it from a boolean "is FBFETCH supported?" to an integer number of render targets which can be fetched. Reviewed-by: Marek Olšák <[email protected]>
* swr: clean up supported OGL4.0/4.1 extensions listJan Zielinski2019-05-161-4/+5
| | | | | | | | | | | | This commit adjusts the capabilities returned by the SWR driver and the documentation to correctly report the following extensions: GL_ARB_texture_query_lod, GL_ARB_texture_cube_map_array, GL_ARB_gpu_shader_fp64, GL_ARB_texture_gather, GL_ARB_vertex_attrib_64bit. Reviewed-by: Alok Hota <[email protected]>
* gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.Eric Anholt2019-05-131-3/+3
| | | | | | | | The _LEVELS assumes that the max is always power of two. For V3D 4.2, we can support up to 7680 non-power-of-two MSAA textures, which will let X11 support dual 4k displays on newer hardware. Reviewed-by: Marek Olšák <[email protected]>
* swr/rast: Add general SWTag statisticsAlok Hota2019-05-013-161/+191
| | | | | | Update Archrast parser to use stats, used with an internal tool Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add string handling to AR event frameworkAlok Hota2019-05-015-31/+54
| | | | | | For use by an internal tool Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add initial SWTag proto definitionsAlok Hota2019-05-012-39/+71
| | | | | | Update gen_archrast.py to properly generate event IDs Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Cleanup and generalize gen_archrastAlok Hota2019-05-013-123/+57
| | | | | | | | | | | | | | | | - Update meson.build - Includes current_build_dir() fix meson/swr: replace hard-coded path with current_build_dir() Fixes: 93cd9905c8fbb98985ae "swr/rast: Cleanup and generalize gen_archrast" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Alok Hota <[email protected]> Reviewed-by: Dylan Baker <[email protected]> - Clean up meson.build (remove foreach loop, replace with single call) - Update SConscript - use `$SOURCES` to call `CodeGenerate` with multiple source files Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: early exit on empty triangle maskAlok Hota2019-04-301-0/+6
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: add guards for cpuid on LinuxAlok Hota2019-04-301-0/+2
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: add flat shadingAlok Hota2019-04-301-0/+13
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: add SWR_STATIC_ASSERT() macroAlok Hota2019-04-301-1/+8
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: update guardband rects at draw setupAlok Hota2019-04-301-2/+3
| | | | | | It's dependent on other state fields Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: add more llvm intrinsicsAlok Hota2019-04-301-0/+3
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* delete autotools .gitignore filesEric Engestrom2019-04-291-11/+0
| | | | | | | | One special case, `src/util/xmlpool/.gitignore` is not entirely deleted, as `xmlpool.pot` still gets generated (eg. by `ninja xmlpool-pot`). Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* swr: support NULL-resourcesErik Faye-Lund2019-04-291-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's legal for a buffer-object to have a NULL-resource, but let's just skip over it, as there's nothing to do. This patch switches the order of the conditionals in swr_update_derived, so the logic becomes a bit more straight forward: if (is_user_buffer) ... else if (resource) ... else ... ...instead of this: if (!is_user_buffer) if (resource) ... else ... else ... Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Alok Hota <[email protected]>
* swr/rast: enforce use of tile offsetsAlok Hota2019-04-264-0/+5
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: AVX512 support compiled in by defaultAlok Hota2019-04-2612-560/+333
| | | | | | | | | - Emulation of AVX512 built into SIMDLIB - Remove associated macros - Remove knobs controlling AVX512 and let emulation handle it - Refactor variable names for SIMD16 Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Remove deprecated 4x2 backend codeAlok Hota2019-04-268-834/+19
| | | | | | | | | - Use 8x2 tiling by default - Remove associated macros - Use SIMDLIB emulation for SIMD16 on SIMD8 hardware - Remove code rot in Load/StoreTile Reviewed-by: Bruce Cherniak <[email protected]>