aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* gallium/docs: add more info about TXF and MSAA texturesBrian Paul2017-08-031-1/+3
| | | | | | | If the texture is multisampled, the coord.w component indicates which sample to fetch. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/docs: document automatic per-sample FS executionBrian Paul2017-08-031-0/+6
| | | | | | | | | Both the GLSL 4.00 specs and DX10.1 specs specify that if a fragment shader uses the sample ID or sample position inputs, the shader is automatically run at per sample frequency. Document that expectation for gallium fragment shaders. Reviewed-by: Roland Scheidegger <[email protected]>
* st/osmesa: add osmesa framebuffer iface hash table per st managerBruce Cherniak2017-08-031-0/+11
| | | | | | | | | | | | | Commit bbc29393d3 didn't include osmesa state_tracker. This patch adds necessary initialization. Fixes crash in OSMesa initialization. Created-by: Charmaine Lee <[email protected]> Tested-by: Bruce Cherniak <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Cc: 17.2 <[email protected]>
* pipe-loader: fix build of dynamic pipe-driversNicolai Hähnle2017-08-035-4/+7
| | | | | | | | | | | | | v2: add libxmlconfig.la to the dynamic pipe_radeonsi driver v3: add libxmlconfig.la to targets/opencl build v4: add EXPAT_LIBS to opencl build (note: for only-opencl builds, Emil's configure.ac changes are also needed) Fixes: bc7f41e11d3 ("gallium: add pipe_screen_config to screen_create functions") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102014 Tested-by: Andy Furniss <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (v1)
* android: radeonsi: prepare for driver-specific driconf optionsMauro Rossi2017-08-032-1/+18
| | | | | | | | | | | | | Android build changes to avoid the following building error: In file included from external/mesa/src/gallium/targets/dri/target.c:1: external/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h:185:10: fatal error: 'radeonsi/si_driinfo.h' file not found ^ 1 error generated. Fixes: 0f8c5de869 "radeonsi: prepare for driver-specific driconf options" Reviewed-by: Emil Velikov <[email protected]>
* st/dri2 Plumb the flush_swapbuffer functionality through to dri3Thomas Hellstrom2017-08-033-0/+36
| | | | | | | | | | Implement the state tracker manager drawable interface flush_swapbuffer method by plumbing it through to dri3 if available. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* gallium/st: Add a method to flush outstanding swapbuffersThomas Hellstrom2017-08-031-0/+2
| | | | | | | | | | | | | Add a state tracker interface method to flush outstanding swapbuffers, and add a call to it from the mesa state tracker during glFinish(). This doesn't strictly mean the outstanding swapbuffers have actually finished executing but is sufficient for glFinish() to be able to be used as a replacement for glXWaitGL(). Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* gallium: introduce PIPE_CAP_MEMOBJTimothy Arceri2017-08-0317-0/+17
| | | | | | | | | | | | | | This can be used to guard support for EXT_memory_object and related extensions. v2: update gallium docs v3 (Timothy Arceri): - add cap to nv50 Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* r300: drop u_mm.h include.Dave Airlie2017-08-034-4/+0
| | | | | | | This is not used in any of these files. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/dri: NULL check before deref DRI loader .getCapabilityEmil Velikov2017-08-021-2/+4
| | | | | | | | | | | | | One could have vX+1 which introduces another entrypoint without implementing older ones. v2: Rebase, while keeping loaderPrivate Fixes: 1bf703e4ea5 ("dri_interface,egl,gallium: only expose RGBA visuals on Android") Cc: 17.2 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* swr/rast: fix core / knights split of AVX512 intrinsicsTim Rowley2017-08-024-55/+69
| | | | | | | | Move AVX512BW specific intrinics to be Core-only. Move some AVX512F intrinsics back to common implementation file. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: simplify knob default value setupTim Rowley2017-08-022-14/+11
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: split gen_knobs templates into .h/.cppTim Rowley2017-08-025-118/+166
| | | | | | | Switch to a 1:1 mapping template:generated for future maintenance. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: gen_knobs template code styleTim Rowley2017-08-021-2/+2
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: switch gen_knobs.cpp licenseTim Rowley2017-08-021-12/+17
| | | | | | | Unintentionally added with an apache2 license; relicense to match the rest of the tree. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: fix scons gen_knobs.h dependencyTim Rowley2017-08-021-1/+1
| | | | | | | | Copy/paste error was duplicating a gen_knobs.cpp rule. Fixes: 5079c277b57 ("swr: [scons] Fix windows build") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: constify swr rasterizerTim Rowley2017-08-0218-323/+339
| | | | | | Add "const" as appropriate in method/function signatures. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: SIMD16 shaders - widen fetch and vertex shadersTim Rowley2017-08-026-5/+238
| | | | | | Work in progress, disabled by default. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: vmask() implementations for KNLTim Rowley2017-08-021-0/+14
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: rename frontend pVertexStoreTim Rowley2017-08-021-6/+9
| | | | | | Rename to reflect global nature. Reviewed-by: Bruce Cherniak <[email protected]>