summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* ac/nir, radv, radeonsi: Switch to using ac_shader_argsConnor Abbott2019-11-257-770/+714
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Acked-by: Marek Olšák <[email protected]>
* llvmpipe: initial query buffer object support. (v2)Dave Airlie2019-11-252-1/+153
| | | | | | | This fails a couple of piglits due to other bugs in llvmpipe, but it adds support for the feature properly. v2: don't reset pipestats, just recalc, fix CI expectation
* Revert "draw: revert using correct order for prim decomposition."Zebediah Figura2019-11-221-3/+1
| | | | | | | | This reverts commit f97b731c82afb06cfd6ffebc90a3e098a9a1b308. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/250 Reviewed-by: Roland Scheidegger <[email protected]>
* iris: Change keybox parentingKenneth Graunke2019-11-221-3/+2
| | | | | | | | | For temporary lookups, just allocate out of the NULL ralloc context, so we don't have to edit the linked list of ralloc children to add it and then immediately remove it again. When uploading a new shader, allocate the keybox off the shader, so if we delete the shader the keybox also goes away. Less manual cleanup.
* etnaviv: use a more self-explanatory param nameChristian Gmeiner2019-11-221-10/+10
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: drop not used config_out function paramChristian Gmeiner2019-11-225-21/+8
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* pan/midgard: Implement load_sampler_lod_paramaters_panAlyssa Rosenzweig2019-11-221-1/+27
| | | | | | | | We can stuff this information in as parametrized system values, like we currently do texture size and SSBO addresses. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* freedreno/regs: update UBWC related bitsJonathan Marek2019-11-212-2/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swr: Fix build with llvm-10.0.Vinson Lee2019-11-211-1/+4
| | | | | | | | | | | | | Fix build error after llvm-10.0 commit 1dfede3122ee ("Move CodeGenFileType enum to Support/CodeGen.h"). ../src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp: In member function ‘void JitManager::DumpAsm(llvm::Function*, const char*)’: ../src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp:428:45: error: ‘CGFT_AssemblyFile’ is not a member of ‘llvm::TargetMachine’ *pMPasses, filestream, nullptr, TargetMachine::CGFT_AssemblyFile); ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Jan Zielinski <[email protected]>
* freedreno/perfcntrs: add accessor to get per-gen tablesRob Clark2019-11-214-24/+5
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfcntrs: move to shared locationRob Clark2019-11-218-2446/+3
| | | | | | | | | | This should eventually be useful for VK_KHR_performance_query as well. And in the more near term, for fdperf. Attempt to not break android build is best-effort and untested. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfcntrs: remove gallium dependenciesRob Clark2019-11-215-9/+75
| | | | | | | Prep work to move to a shared location. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfcntrs: small cleanupRob Clark2019-11-214-82/+31
| | | | | | | | | When we had one gen supporting performance counters, it made sense to have these builder macros in the .c file with the table. But time has come to de-duplicate. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* nouveau: request ufind_msb64 lowering in the frontend.Dave Airlie2019-11-221-1/+1
| | | | | | | | This passes the piglit CL builtin-ulong-clz-1.0.generated.cl test. Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* pipe-loader: check that the pointer to driconf_xml isn't NULLSamuel Pitoiset2019-11-211-1/+1
| | | | | | | | | | | | This happens when mesa is built with only swrast. The default driver being kmsro and the default driconf file being v3d, it's NULL and then strdup crashes. This fixes a crash with piglit spec/egl_mesa_query_driver/conformance. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* panfrost: Add the lod_bias fieldAlyssa Rosenzweig2019-11-211-0/+1
| | | | | | | Enough trial and error ... just think even *more* Midgard about where this field might be! Signed-off-by: Alyssa Rosenzweig <[email protected]>
* lima/ppir: add lod-bias supportArno Messiaen2019-11-205-5/+33
| | | | | Signed-off-by: Arno Messiaen <[email protected]> Reviewed-by: Erico Nunes <[email protected]>
* lima/streamparser: Add findings introduced with gl_PointSizeAndreas Baierl2019-11-201-2/+22
| | | | | Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Andreas Baierl <[email protected]>
* lima/streamparser: Fix typo in vs semaphore parserAndreas Baierl2019-11-201-1/+1
| | | | | Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Andreas Baierl <[email protected]>
* meson: Fix linkage of libgallium_nine with libgalliumvlYevhenii Kolesnikov2019-11-201-5/+13
| | | | | | | | | | | | | Do not link libgallium_nine with libgalliumvl_stub if it's already linked with libgalliumvl. Linking with stub leads to "duplicate symbol" errors. Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3 ("meson: build gallium nine state_tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2040 Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* panfrost: Rework buffers in SFBDTomeu Vizoso2019-11-201-40/+39
| | | | | | | | Support cases such as depth-only renders and only set stencil buffers when needed, to match the blob's behaviour. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* winsys/amdgpu: detect noop dependencies on the same ring correctlyMarek Olšák2019-11-191-6/+9
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: fill num_rings for remaining IPsMarek Olšák2019-11-191-2/+7
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: add radeon_info::num_rings and move ring_type to amd_family.hMarek Olšák2019-11-194-19/+6
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* nir: move data.image.access to data.accessMarek Olšák2019-11-192-3/+3
| | | | | | The size of the data structure doesn't change. Reviewed-by: Connor Abbott <[email protected]>
* intel: Add workaround for stencil state.Rafael Antognolli2019-11-191-0/+12
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Sagar Ghuge <[email protected]>
* panfrost: Set PIPE_COMPUTE_CAP_ADDRESS_BITS to 64Alyssa Rosenzweig2019-11-191-2/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Disable tiling for GLOBAL resourcesAlyssa Rosenzweig2019-11-191-1/+2
| | | | | | | | It doesn't make sense to have nonlinear layouts for a buffer that can be accessed as direct memory for a compute kernel. Turn that off so things work as expected. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Pass kernel inputs as uniformsAlyssa Rosenzweig2019-11-191-0/+13
| | | | | | | We can take the OpenCL kernel inputs and interpret them as uniforms by simply reusing the Gallium callback. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Stub out clover callbacksAlyssa Rosenzweig2019-11-191-1/+27
| | | | | | We don't implement these yet but let's not crash. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* iris: Re-enable param compactionJason Ekstrand2019-11-181-1/+1
| | | | | | | | | | In d1c4e64a69e, we added a parameter to tell the back-end compiler to ignore the param array and just push however many constants you ask it to push. I enabled it for iris because this is really what iris wants but it seems to have caused a number of regressions. Revert to the old behavior for now. Fixes: d1c4e64a69e "intel/compiler: Add a flag to avoid compacting..."
* etnaviv: blt: set TS dirty after clearJonathan Marek2019-11-181-0/+2
| | | | | | | | RS engine does this already, it is missing for BLT engine. This fixes cases where a clear isn't immediately at the start of the frame. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: separate PE and RS formats, use only RS only for tilingJonathan Marek2019-11-188-56/+54
| | | | | | | | | | | There are PE formats not supported by RS, so we can't have a single to translate both. Use RS only for same formats until we have a translate_rs_format and test the possible different format blits. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: blt: use only for tiling, and add missing formatsJonathan Marek2019-11-181-22/+30
| | | | | | | | | | | | | | | | | | * Removes the incorrect usage of translate_rs_format * Disables use of BLT engine for different src/dst format We only really need the BLT engine for tiling/detiling right now, but it would be nice to support as many blit cases as possible to avoid using PE for that. To deal with different formats we need to: * Have a translate_blt_format which has all supported formats * Fix the swizzle translation from gallium (current version was wrong) * Set the src/dst sRGB bits as needed * Find which type conversions the BLT engine can actually do Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* Call shmget() with permission 0600 instead of 0777Brian Paul2019-11-182-2/+4
| | | | | | | | | | | | | | A security advisory (TALOS-2019-0857/CVE-2019-5068) found that creating shared memory regions with permission mode 0777 could allow any user to access that memory. Several Mesa drivers use shared- memory XImages to implement back buffers for improved performance. This path changes the shmget() calls to use 0600 (user r/w). Tested with legacy Xlib driver and llvmpipe. Cc: [email protected] Reviewed-by: Kristian H. Kristensen <[email protected]>
* intel/compiler: Add a flag to avoid compacting push constantsJason Ekstrand2019-11-181-0/+1
| | | | | | | In vec4, we can just not run the pass. In fs, things are a bit more deeply intertwined. Reviewed-by: Lionel Landwerlin <[email protected]>
* etnaviv: rs: upsampling is not supportedChristian Gmeiner2019-11-171-1/+32
| | | | | | | | This change makes it possible to support different downsample cases like 4 -> 2 or 4 -> 1. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Gert Wollny <[email protected]>
* lima: Parse VS and PLBU command stream while making a dumpAndreas Baierl2019-11-177-0/+461
| | | | | | | | This makes the streams more readable and comparable with the blob's parser as it parses the VS and PLBU stream and shows the currently known values. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Andreas Baierl <[email protected]>
* lima: Beautify stream dumpsAndreas Baierl2019-11-171-7/+11
| | | | | | | | | | | Change the dump, that the output looks more like the output of mali-syscall-tracker [1]. This is a preparation for a more detailed stream analysis. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Andreas Baierl <[email protected]> [1]: https://gitlab.freedesktop.org/lima/mali-syscall-tracker
* clover/llvm: fix build after llvm 10 commit 1dfede3122eeAaron Watry2019-11-152-4/+20
| | | | | | | | | CodeGenFileType moved from ::llvm::TargetMachine in llvm/Target/TargetMachine.h to ::llvm:: in llvm/Support/CodeGen.h Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* android: radeonsi: fix build error due to wrong u_format.csv file pathMauro Rossi2019-11-151-1/+1
| | | | | | | | | | | | GEN10_FORMAT_TABLE_INPUTS requires correction of u_format.csv file path in order to avoid following build error: ninja: error: 'external/mesa/util/format/u_format.csv', needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_pipe_radeonsi_intermediates/radeonsi/gfx10_format_table.h', missing and no known rule to make it Fixes: 882ca6d ("util: Move gallium's PIPE_FORMAT utils to /util/format/") Signed-off-by: Mauro Rossi <[email protected]>
* radeonsi/nir: don't lower fma, instead, fuse fmaMarek Olšák2019-11-151-1/+1
| | | | | | | | | | | | | | | | | | We want fma. This decreases compile times by 4% for Borderlands 2. 48505 shaders in 30515 tests Totals: SGPRS: 2206584 -> 2204784 (-0.08 %) VGPRS: 1647892 -> 1648964 (0.07 %) Spilled SGPRs: 6256 -> 6078 (-2.85 %) Spilled VGPRs: 72 -> 72 (0.00 %) Private memory VGPRs: 2176 -> 2176 (0.00 %) Scratch size: 2240 -> 2240 (0.00 %) dwords per thread Code Size: 49680804 -> 49837988 (0.32 %) bytes LDS: 74 -> 74 (0.00 %) blocks Max Waves: 371387 -> 371352 (-0.01 %) Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi/nir: call nir_lower_flrp only once per shaderMarek Olšák2019-11-151-6/+7
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi/nir: remove dead function tempsMarek Olšák2019-11-151-0/+1
| | | | | | glxgears has dead temps after lowering color inputs to load intrinsics. Reviewed-by: Timothy Arceri <[email protected]>
* gallium/noop: call finalize_nirMarek Olšák2019-11-151-0/+3
| | | | | | For measuring st/mesa compile time. Reviewed-by: Timothy Arceri <[email protected]>
* panfrost: Make sure the shader descriptor is in sync with the GL stateTomeu Vizoso2019-11-151-19/+8
| | | | | | | | State was leaking from previous frames as we weren't updating the descriptor in all cases. Signed-off-by: Tomeu Vizoso <[email protected]> Tested-by: Andre Heider <[email protected]>
* panfrost: Multiply offset_units by 2Tomeu Vizoso2019-11-151-1/+1
| | | | | | | | | | Per the spec, the units passed to glPolygonOffset are to be multiplied by an implementation-defined constant. On Midgard, this constant seems to be 2. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* llvmpipe: Check thread creation errorsNathan Kidd2019-11-151-0/+4
| | | | | | | | | | | | | | | | | | In the case of glibc, pthread_t is internally a pointer. If lp_rast_destroy() passes a 0-value pthread_t to pthread_join(), the latter will SEGV dereferencing it. pthread_create() can fail if either the user's ulimit -u or Linux kernel's /proc/sys/kernel/threads-max is reached. Choosing to continue, rather than fail, on theory that it is better to run with the one main thread, than not run at all. Keeping as many threads as we got, since lack of threads severely degrades llvmpipe performance. Signed-off-by: Nathan Kidd <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: use ppc64le/ppc64 Large code model for JIT-compiled shadersBen Crocker2019-11-141-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Large programs, e.g. gnome-shell and firefox, may tax the addressability of the Medium code model once a (potentially unbounded) number of dynamically generated JIT-compiled shader programs are linked in and relocated. Yet the default code model as of LLVM 8 is Medium or even Small. The cost of changing from Medium to Large is negligible: - an additional 8-byte pointer stored immediately before the shader entrypoint; - change an add-immediate (addis) instruction to a load (ld). Testing with WebGL Conformance (https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html) yields clean runs with this change (and crashes without it). Testing with glxgears shows no detectable performance difference. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1753327, 1753789, 1543572, 1747110, and 1582226 Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/223 Co-authored by: Nemanja Ivanovic <[email protected]>, Tom Stellard <[email protected]> CC: [email protected] Signed-off-by: Ben Crocker <[email protected]>
* iris: Wrap iris_fix_edge_flags in NIR_PASSKenneth Graunke2019-11-141-1/+10
| | | | | | | | So nir_validate happens properly. Unfortunately this means we have to play the metadata song and dance, so walk over all impls and say that we didn't hurt anything. Reviewed-by: Jason Ekstrand <[email protected]>