summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium/radeon: only pass shader-specific debug flags to the disk shader cacheMarek Olšák2017-08-111-1/+8
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi/gfx9: fix the scissor bug workaroundMarek Olšák2017-08-111-3/+7
| | | | | | | | otherwise there is corruption in most apps. Fixes: 0fe0320 radeonsi: use optimal packet order when doing a pipeline sync Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: use the VI codepath for clamping ZMarek Olšák2017-08-112-12/+2
| | | | | | | | | This fixes corrupted shadows in Unigine Valley. The corruption disappeared when I stopped setting IMG_DATA_FORMAT_24_8 for depth. Cc: 17.2 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac: fail shader compilation if libelf is replaced by an incompatible versionMarek Olšák2017-08-101-1/+4
| | | | | | | | | | | | UE4Editor has this issue. This commit prevents hangs (release build) or assertion failures (debug build). It doesn't fix the editor, but catastrophic scenarios are prevented. Cc: 17.1 17.2 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* dri: Introduce SWAP_METHOD tokensThomas Hellstrom2017-08-101-1/+2
| | | | | | | | | | | | We shouldn't be using GLX tokens in the dri subsystem, so define dri SWAP_METHOD tokens and translate when necessary. Unfortunately the X server uses the dri swap method value untranslated as the GLX fbconfig swapMethod, so we can't enumerate these tokens arbitrarily, but rather need to make them have the same values as the corresponding GLX tokens. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* nv50/ir: fix ConstantFolding with saturationKarol Herbst2017-08-092-0/+9
| | | | | | | | | | | | | | | | | For mul(a, +-1) codegen can generate OP_MOV with a saturation flag set which is ignored at emission. The same can happen with add(a, 0), and others. Adding an assert for detecting more of such issues. Fixes wrongly rendered water in Hitman Absolution running under wine. Also a few shaders in Mad Max and Alien Isolation produce such MOVs. CC: <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> [imirkin: generalize the fix for other cases] Reviewed-by: Ilia Mirkin <[email protected]>
* st/dri2: fix kms_swrast driconf option handlingRob Herring2017-08-091-3/+3
| | | | | | | | | | | | | Commit e794f8bf8bdb ("gallium: move loading of drirc to pipe-loader") moved the option cache to the pipe_loader_device. However, the screen->dev pointer is not set when dri_init_options() is called. Move the call to after the pipe_loader_sw_probe_kms() call so screen->dev is set. This mirrors the code flow for dri2_init_screen(). Fixes: e794f8bf8bdb ("gallium: move loading of drirc to pipe-loader") Reviewed-by: Nicolai Hähnle <[email protected]> Cc: Marek Olšák <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* radeonsi: drop two unused variables in create_function()Samuel Pitoiset2017-08-091-2/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix a compile failure due to disabled assertsMarek Olšák2017-08-071-1/+1
|
* radeonsi: use optimal packet order when doing a pipeline syncMarek Olšák2017-08-071-34/+83
| | | | | | | | | | | | Process most new SET packets in parallel with previous draw calls, then flush caches and wait, start the draw, and do L2 prefetches last. This decreases the [CP busy / SPI busy] ratio (verified with GRBM perf counters). In other words, the time window when shaders are idle (between (the wait and the draw) is much shorter now. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: expose the number of decompress calls to the HUDMarek Olšák2017-08-074-7/+20
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: rename GPU-dma-busy -> GPU-cp-dma-busyMarek Olšák2017-08-074-8/+8
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: rename shader_userdata -> shader_pointers where appropriateMarek Olšák2017-08-075-20/+20
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: prefetch VBO descriptors after the first VGT shaderMarek Olšák2017-08-071-17/+63
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add a separate dirty mask for prefetchesMarek Olšák2017-08-076-16/+64
| | | | | | | | | | so that we don't rely on si_pm4_state_enabled_and_changed, allowing us to move prefetches after draw calls. v2: ckear the dirty mask after unbinding shaders Tested-by: Dieter Nützel <[email protected]> (v1) Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* radeonsi: add and use si_pm4_state_enabled_and_changedMarek Olšák2017-08-073-17/+18
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: de-atomize L2 prefetchMarek Olšák2017-08-077-9/+11
| | | | | | | I'd like to be able to move the prefetch call site around. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: align all CE dumps to L2 cache line sizeMarek Olšák2017-08-071-8/+17
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove a tautology sctx->framebuffer.nr_samples >= 1Marek Olšák2017-08-071-2/+1
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: print all members of radeon_info with R600_DEBUG=infoMarek Olšák2017-08-072-3/+15
| | | | | | | also set max_alignment on amdgpu. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri: add drisw image extensionGurchetan Singh2017-08-071-0/+11
| | | | | | | | | Since the revelant functions have been moved to dri_helpers, drisw.c can make use of the extension. Note we have version 6 of the extension, since we want to support createImageFromTexture. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: move some image functions to dri_helpers.cGurchetan Singh2017-08-073-106/+124
| | | | | | | | | These functions will be used both by drisw.c and dri2.c. This patch also moves some headers that can be shared. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: organize order of includers in dri_helpersGurchetan Singh2017-08-071-2/+3
| | | | | | | | Although it doesn't seem like a strict requirement of the code base, we do it when possible and it looks nice. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: change dri_extensions to dri_helpersGurchetan Singh2017-08-075-6/+6
| | | | | | | | These files provide helper structs and functions for dri2.c and drisw.c, and name change better conveys that. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* etnaviv: Add support for R8_UNORM texturesWladimir J. van der Laan2017-08-061-1/+1
| | | | | | | | R8_UNORM textures can be emulated by means of L8 and a swizzle. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Implement ICACHEWladimir J. van der Laan2017-08-066-18/+95
| | | | | | | | | | | | | | | This patch adds support for large shaders on GC3000. For example the "terrain" glmark benchmark with a large fragment shader will work after this. If the GPU supports ICACHE, shaders larger than the available state area will be uploaded to a bo of their own and instructed to be loaded from memory on demand. Small shaders will be uploaded in the usual way. This mimics the behavior of the blob. On GPUs that don't support ICACHE, this patch should make no difference. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Unified uniforms supportWladimir J. van der Laan2017-08-063-4/+36
| | | | | | | | | | | | | | GC3000 has changed from a separate store for VS and PS uniforms to a single, unified one. There is backwards compatibilty functionalty, however this does not work correctly together with ICACHE. This patch adds explicit support, although in the simplest way possible: the PS/VS uniforms split is still fixed and hardcoded. It should make no difference on hardware that does not have unified uniform memory. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Update headers from rnndbWladimir J. van der Laan2017-08-061-5/+9
| | | | | Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* radeonsi: enable support for EXT_memory_objectAndres Rodriguez2017-08-061-1/+1
| | | | | | | | | v2: fix an indentation error v3: don't enable for r600 Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi: hook up device/driver UUID queriesAndres Rodriguez2017-08-061-0/+14
| | | | | | | v2: move from r600_common to radeonsi Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: introduce device/driver UUID queriesAndres Rodriguez2017-08-064-0/+63
| | | | | | | | | | v2: remove unnecessary returns v3 (Timothy Arceri): updated trace v4 (Timothy Arceri): actually dump the params in trace Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v2) Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: add basic memory object supportDave Airlie2017-08-062-0/+122
| | | | | | | | | v2: also consider gfx9 metadata v3: ref/unref memobj->buf v4: add refcount comment Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: factor out metadata importAndres Rodriguez2017-08-061-27/+36
| | | | | | | Plumbing for importing memobj backed textures. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: introduce memory objectDave Airlie2017-08-064-0/+153
| | | | | | | | | | v2: fix comment regarding fd ownership, define pipe_memory_object v3: remove stray return v4 (Timothy Arceri): update trace v5 (Timothy Arceri): actually dump the params in trace Reviewed-by: Marek Olšák <[email protected]> (v3) Reviewed-by: Samuel Pitoiset <[email protected]>
* clover/device: Move device_version into core and add device_clc_versionAaron Watry2017-08-053-2/+14
| | | | | | | | | | | | | | The device version is the maximum CL version that the device supports. device_version and device_clc_version are not necessarily the same for devices that support CL 1.0, but have a 1.1 compiler and the necessary extensions. Eventually, this will be based on the features/extensions of the actual device, but for now move it a bit closer to its eventual destination. Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Jan Vesey <[email protected]>
* loader: rework xmlconfig dependencyEmil Velikov2017-08-042-3/+4
| | | | | | | | | | | | | | | | | | | | | | Currently xmlconfig is conditionally used, only when --enable-dri is available. As the library has moved to src/util and has wider wisebase, this guard is no longer correct. Strictly speaking - it wasn't since the introduction of xmlconfig into st/nine a while ago. Unconditionally enable xmlconfig and drop the linking. As said before there's other users of the library, so depending on the configure options we will get multiple definitions of said symbols. NOTE: To avoid breaking other combinations, this commit adds the xmlconfig link to the required places - throughout gallium and the DRI loaders. Cc: Aaron Watry <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* android: radeonsi: add nir include pathsMauro Rossi2017-08-041-1/+2
| | | | | | | | | | | | | | Android build changes to avoid the following building error: target C: libmesa_pipe_radeonsi <= external/mesa/src/gallium/drivers/radeonsi/si_pipe.c ... In file included from external/mesa/src/gallium/drivers/radeonsi/si_pipe.c:38: external/mesa/src/compiler/nir/nir.h:48:10: fatal error: 'nir_opcodes.h' file not found ^ 1 error generated. Fixes: da62a31c5b "radeonsi: add nir include paths" Reviewed-by: Emil Velikov <[email protected]>
* pipe-loader: fix swrast probingNicolai Hähnle2017-08-041-1/+1
| | | | | | | | Missed updating this caller of pipe_loader_find_module. Fixes: 0d7d60b7ea ("pipe-loader: pass only the driver_name to pipe_loader_find_module") Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* pipe-loader: remove config from pipe_loader_create_screenNicolai Hähnle2017-08-0413-26/+19
| | | | | | | | | | | | The config passed into the screen should be independent from the state tracker, because at least in the case of radeonsi, the screen structure can be shared between different state trackers. Incidentally, this also fixes crashes that were recently introduced. Fixes: a35a9e7c ("gallium: add driconf options to pipe_screen_config") Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: get rid of pipe_screen_config::flagsNicolai Hähnle2017-08-046-23/+7
| | | | | | | | | | | They were set only by the DRI state tracker, which is problematic when radeonsi is used with different state trackers in the same process. Also, we don't need them anymore. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: set drirc compiler options before calling common screen initNicolai Hähnle2017-08-044-13/+14
| | | | | | | | Also, access the options directly, allowing us to get rid of the PIPE_SCREEN_xxx flags. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Makefile.sources: include driinfo_radeonsi.hJuan A. Suarez Romero2017-08-041-0/+1
| | | | Reviewed-by: Emil Velikov <[email protected]>
* pipe-loader: Add driver build directory for si_driinfo.h include pathMichel Dänzer2017-08-041-0/+1
| | | | | | | | | | | | | | | | | Fixes out-of-tree build failure: .../src/gallium/targets/pipe-loader/pipe_radeonsi.c: In function ‘drm_configuration’: .../src/gallium/targets/pipe-loader/pipe_radeonsi.c:38:33: fatal error: radeonsi/si_driinfo.h: No such file or directory #include "radeonsi/si_driinfo.h" ^ compilation terminated. Makefile:994: recipe for target 'pipe_radeonsi.lo' failed make[4]: *** [pipe_radeonsi.lo] Error 1 Trivial. Fixes: 0f8c5de8690e7c ("radeonsi: prepare for driver-specific driconf options")
* clover: Fix build after llvm r309911Jan Vesely2017-08-032-1/+7
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* radeonsi: program tile swizzle for color and FMASK surfaces for GFX & SDMAMarek Olšák2017-08-045-4/+33
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: if FMASK is disabled, set CB_COLORi_FMASK = CB_COLORi_BASE properlyMarek Olšák2017-08-041-1/+5
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: reallocate textures with non-zero tile_swizzle on exportMarek Olšák2017-08-041-1/+3
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: enable computation of tile swizzleMarek Olšák2017-08-042-1/+13
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: increment surf_index only when tile swizzle is allowedMarek Olšák2017-08-041-0/+1
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: add RADEON_SURF_SHAREABLEMarek Olšák2017-08-041-1/+3
| | | | | | | Shareable textures won't use tile swizzle. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>