aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* meson: use idep_nir instead of libnir in libclnirEric Engestrom2019-10-071-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* Revert "Revert "st/dri2: Implement DRI2bufferDamageExtension""Boris Brezillon2019-10-071-0/+35
| | | | | | | This reverts commit 19546108d3dd5541a189e36df4ea83b3f519e48f. This commit breaks the build because lima implements ->set_damage_region(). I guess we'll need more discussion before removing the ->set_damage_region() hook.
* Revert "st/dri2: Implement DRI2bufferDamageExtension"Boris Brezillon2019-10-071-35/+0
| | | | | | | | | | | | | | This reverts commit 492ffbed63a2a62759224b1c7d45aa7923d8f542. BACK_LEFT attachment can be outdated when the user calls KHR_partial_update(), leading to a damage region update on the wrong pipe_resource object. Let's not expose the ->set_damage_region() method until the core is fixed to handle that properly. Cc: [email protected] Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Daniel Stone <[email protected]>
* st/dri: Perform MSAA downsampling for __DRI2_THROTTLE_COPYSUBBUFFERKenneth Graunke2019-10-051-2/+4
| | | | | | | | | | | | | | glXCopySubBufferMESA copies data from the back buffer to the front, so it needs to perform a MSAA downsampling operation just like glXSwapBuffers would. Currently, the CopySubBuffer implementations supply a throttle reason of __DRI2_THROTTLE_SWAPBUFFERS, so they hit this path and work today. But we'd like to avoid swapbuffer throttling in this case, so the next patch will change that reason. Tested-by: Michel Dänzer <[email protected]> # DRI3 only Reviewed-by: Michel Dänzer <[email protected]>
* meson: remove -DGALLIUM_SOFTPIPE from st/osmesaDylan Baker2019-10-011-1/+0
| | | | | | | | It's unused here, and undefined in scons. It is used in targets/osmesa, but it's properly defined there already. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* haiku: fix Mesa buildKen Mays2019-10-012-3/+11
| | | | | | | | | | | | | | | | | | | | 1. The hgl.c file is a read-only file versus read-write. Ref: src/gallium/state_trackers/hgl/hgl.c 2. I've included the Haiku-specific patches I used to get a successful build of Mesa 19.1.7 on Haiku using the meson/ninja build procedure. Shows "[764/764] linking target ... libswpipe.so" at build completion. v2: Remove autotools files (Eric) v3: Update the patch Reported-by: Ken Mays <[email protected]> Tested-by: Ken Mays <[email protected]> CC: [email protected] Reviewed-by: Alexander von Gluck IV <[email protected]>
* meson: gallium media state trackers require libdrm with x11Dylan Baker2019-09-304-8/+14
| | | | | | | | v2: - update copyright year in all changed files - rebase on master Cc: 19.1 19.2 <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Link xvmc with libxvDylan Baker2019-09-271-3/+7
| | | | | | | | | | | Prior to xvmc 1.0.12 libxvmc incorrectly required libxv, but that was fixed. This results in compilation failures for the gallium xvmc tracker and tools. This patch fixes that by explicitly linking to libxv. Fixes: 22a817af8a89eb3c762fc3e07b443a3ce37d7416 ("meson: build gallium xvmc state tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1844 Reviewed-by: Adam Jackson <[email protected]>
* meson: Try finding libxvmcw via pkg-config before using find_libraryDylan Baker2019-09-271-2/+7
| | | | | | | | | | | | This fixes cross compiling issues, because pkg-config is less likely to get the wrong libs. v2: - Fix typo in comment Fixes: 22a817af8a89eb3c762fc3e07b443a3ce37d7416 ("meson: build gallium xvmc state tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/939 Reviewed-by: Adam Jackson <[email protected]>
* st/nine: Ignore D3DSIO_RET if it is the last instruction in a shaderDanylo Piliaiev2019-09-251-1/+7
| | | | | | | | | | | | | | RET as a last instruction could be safely ignored. Remove it to prevent crashes/warnings in case underlying driver doesn't implement arbitrary returns. A better way would be to remove the RET after the whole shader is parsed which will handle a possible case when the last RET is followed by a comment. CC: <[email protected]> Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* clover: eliminate "ignoring attributes on template argument" warningKarol Herbst2019-09-251-1/+10
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* clover/codegen: remove unused get_symbol_offsets functionKarol Herbst2019-09-251-12/+0
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* clover/llvm: remove harmful std::move callKarol Herbst2019-09-251-1/+1
| | | | | | | | both clang and gcc warn with: "moving a local object in a return statement prevents copy elision" Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* clover/nir: fix compilation with g++-5.5 and maybe earlierKarol Herbst2019-09-231-10/+7
| | | | | | | | fixes "sorry, unimplemented: non-trivial designated initializers not supported" Fixes: deb04adf2ae ("clover: add support for passing kernels as nir to the driver") Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* clover: add support for passing kernels as nir to the driverKarol Herbst2019-09-216-7/+245
| | | | | | | | | | | | | v2: minor formatting fixes v3: call glsl_type_singleton_init_or_ref and glsl_type_singleton_decref v4: capitalize and punctuate comments fix text_executable -> text_intermediate in TODO make glsl_type_singleton wrapper static v5: rewrite how we run the nir passes v6: fix unhandled case switch warning in st/mesa Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> (v4)
* clover: prepare supporting multiple IRsKarol Herbst2019-09-213-6/+64
| | | | | | | | | | | v2: rework arguments to compiler::compile_program add assert to device::ir_format v3: remove PIPE_SHADER_IR_SPIRV change title Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> (v2) Reviewed-by: Pierre Moreau <[email protected]>
* clover: add support for drivers having no proper binary formatKarol Herbst2019-09-211-2/+3
| | | | | | | | | | | | | Most drivers have actually no binary format and just store the IR directly as a single entry point blob. v2: add a cap to switch between single or multi entry point binaries v3: remove the entry_point field v4: remove PIPE_CAP_MULTI_ENTRY_POINT_BINARIES v5: remove supports_multiple_entry_points Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* clover/functional: add id_equals helperKarol Herbst2019-09-211-0/+15
| | | | | | | | v2: pass argument by value Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* rename pipe_llvm_program_header to pipe_binary_program_headerKarol Herbst2019-09-212-3/+3
| | | | | | | | We want to use it for other formats as well, so give it a more generic name Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* gallium: add blob field to pipe_llvm_program_headerKarol Herbst2019-09-211-2/+1
| | | | | | | | makes it easier to consume a IR_NATIVE binary Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* clover/llvm: Add functions for compiling from source to SPIR-VPierre Moreau2019-09-213-17/+92
| | | | | Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover/llvm: Add options for dumping SPIR-V binariesPierre Moreau2019-09-213-1/+37
| | | | | Reviewed-by: Karol Herbst <[email protected]> Acked-by: Francisco Jerez <[email protected]>
* clover/spirv: Add functions for parsing arguments, linking programs, etc.Pierre Moreau2019-09-212-5/+608
| | | | | | | | | v2 (Karol Herbst): silence warnings about unhandled enum values v3 (Karol Herbst): added back array size parsing (needed for structs passed by value) Acked-by: Francisco Jerez <[email protected]> (v2)
* clover/spirv: Add functions for validating SPIR-V binariesPierre Moreau2019-09-214-1/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | Changes since: * v12: - remove autotools (Karol Herbst) - Remove the callback in format_validation_msg. (Francisco Jerez) - Removed is_binary_spirv. (Francisco Jerez) - Pass a string reference to is_valid_spirv instead of the notification callback. (Francisco Jerez) * v11: Fix compilation error introduced in v11. * v10: - Reuse format_validation_msg in is_valid_spirv. - Remove LVL2STR macro in format_validation_msg. * v9: Add `clover_cpp_std` to the overrides of the `libclspirv` target in Meson. * v7: Add DEFINES to libclspirv and libclover, in autotools, as they would otherwise never know whether CLOVER_ALLOW_SPIRV has been defined (Dave Airlie) * v6: Update the dependency name (meson) and the libs variable (Makefile) due to the replacement of llvm-spirv to the new official SPIRV-LLVM-Translator. * v5: Changed to match the updated “clover/llvm: Allow translating from SPIR-V to LLVM IR” in the v6. Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* meson: Check for SPIRV-Tools and llvm-spirvPierre Moreau2019-09-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes since: * v12 (Karol Herbst): - rename CLOVER_ALLOW_SPIRV to HAVE_CLOVER_SPIRV * v11 (Karol Herbst): - only set new defines for clover to speed up recompilation - remove autotools * v10: - Add a new flag (`--enable-opencl-spirv` for autotools, and `-Dopencl-spirv=true` for meson) for enabling SPIR-V support in clover, and never automagically enable it without that flag. (Dylan Baker) - When enabling the SPIR-V support, the SPIRV-Tools and SPIRV-LLVM-Translator libraries are now required dependencies. * v7: - Properly align LLVMSPIRVLib comment (Dylan Baker) - Only define CLOVER_ALLOW_SPIRV when **both** dependencies are found: autotools was only requiring one or the other. * v6: Replace the llvm-spirv repository by the new official SPIRV-LLVM-Translator. * v4: Add a comment saying where to find llvm-spirv (Karol Herbst). * v3: - make SPIRV-Tools and llvm-spirv optional (Francisco Jerez); - bump requirement for llvm-spirv to version 0.2 * v2: - Bump the required version of SPIRV-Tools to the latest release; - Add a dependency on llvm-spirv. Reviewed-by: Dylan Baker <[email protected]> (v10) Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* gallium/osmesa: Fix the inability to set no context as current.Hal Gentz2019-09-201-0/+5
| | | | | | | | | | | Currently there is no way to make no context current w/gallium + osmesa. The non-gallium version of osmesa does this if the context and buffer passed to `OSMesaMakeCurrent` are both null. This small change makes it so that this is also the case with the gallium version. Cc: [email protected] Signed-off-by: Hal Gentz <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: extend resource_get_param to be as capable as resource_get_handleMarek Olšák2019-09-181-6/+13
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/xlib: Fix glXMakeCurrent(dpy, None, None, ctx)Adam Jackson2019-09-172-27/+40
| | | | | This is entirely legal in GL 3.0+. I wonder how many more times I'll need to fix this specific bug.
* gallium/xlib: Remove MakeCurrent_PrevContextAdam Jackson2019-09-171-12/+5
| | | | | As the comment notes, this is not thread-safe. You can just as easily use GetCurrentContext instead, so, do that.
* gallium/xlib: Remove drawable caching from the MakeCurrent pathAdam Jackson2019-09-171-32/+3
| | | | | AFAICT this only exists to avoid hitting XMesaFindBuffer, which is a linear search. But you don't have that many GLX drawables, so whatever.
* dri: Use DRM_FORMAT_* instead of defining our own copy.Eric Anholt2019-09-112-37/+38
| | | | | | | | | | | | We have only two defines that aren't from DRM_FORMAT_*: SARGB and SABGR. Keep only those as __DRI_IMAGE_FOURCC and garbage collect the rest. While this header is also used from the X server, the X server doesn't use any __DRI_IMAGE enums. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* gallium: Require LLVM >= 3.9Adam Jackson2019-09-111-30/+0
| | | | | | | | To go any further than this would be to break the current version of Android. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Eliminate gl_config::rgbModeAdam Jackson2019-09-092-47/+28
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Eliminate gl_config::have{Accum,Depth,Stencil}BufferAdam Jackson2019-09-092-6/+2
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Remove unused gl_config::indexBitsAdam Jackson2019-09-091-2/+0
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/xlib: Fix an obvious thinkoAdam Jackson2019-09-091-1/+1
| | | | | x == !GLX_DIRECT_COLOR is a fancy way of writing x == 0, which is clearly not what was meant.
* clover: replace more complex 3.x version check with LLVM_VERSION_MAJOR/MINOREric Engestrom2019-09-061-2/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* clover: replace major llvm version checks with LLVM_VERSION_MAJOREric Engestrom2019-09-062-17/+19
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* clover: Fix build after clang r370122.Hal Gentz2019-09-042-2/+16
| | | | | | | | | | | | | | | | | ../mesa/src/gallium/state_trackers/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’: ../mesa/src/gallium/state_trackers/clover/llvm/invocation.cpp:203:81: error: no matching function for call to ‘clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, const char* const*, const char* const*, clang::DiagnosticsEngine&)’ 203 | c->getInvocation(), copts.data(), copts.data() + copts.size(), diag)) | ^ In file included from /opt/llvm64/include/clang/Frontend/CompilerInstance.h:15, from ../mesa/src/gallium/state_trackers/clover/llvm/codegen.hpp:37, from ../mesa/src/gallium/state_trackers/clover/llvm/invocation.cpp:49: /opt/llvm64/include/clang/Frontend/CompilerInvocation.h:157:15: note: candidate: ‘static bool clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, llvm::ArrayRef<const char*>, clang::DiagnosticsEngine&)’ 157 | static bool CreateFromArgs(CompilerInvocation &Res, | ^~~~~~~~~~~~~~ /opt/llvm64/include/clang/Frontend/CompilerInvocation.h:157:15: note: candidate expects 3 arguments, 4 provided Signed-off-by: Hal Gentz <[email protected]> Reviewed-by: Aaron Watry <[email protected]>
* gallium/osmesa: Move 565 format selection checks where the rest are.Eric Anholt2019-09-041-4/+2
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/osmesa: Fix a race in creating the stmgr.Eric Anholt2019-09-041-9/+17
| | | | | | Noticed while looking at other OSMesa bugs. Reviewed-by: Timothy Arceri <[email protected]>
* st/nine: Properly initialize GLSL types for NIR shaders.Timur Kristóf2019-08-281-0/+5
| | | | | | | | NIR shaders use GLSL types (note: these live outside libglsl), and nine needs to properly initialize these just like the other state trackers. This fixes an assertion failure when TTN is used. Signed-off-by: Timur Kristóf <[email protected]>
* glx: Sync <GL/glxext.h> with KhronosAdam Jackson2019-08-221-4/+3
| | | | | | | | Minor fixups required to keep the prototypes matching and to remove mention of retired enums. Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: Add buffer and configs handling or fp16 formatsKevin Strasser2019-08-214-0/+50
| | | | | | | | | | | | | | | Expose configs when allow_fp16_configs has been enabled and DRI_LOADER_CAP_FP16 is set in the loader. Also, make kms_swrast_dri respect format bpp, to allow for allocating buffers wider than 32 bpp. Make fp16 opt-in for gallium. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: Use consistent approach for config format filteringKevin Strasser2019-08-211-8/+9
| | | | | | | rgb10 uses an 'if(allowed) continue' approach, do the same for rgba_ordering. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/vl: use compute preference for all multimedia, not just blitIlia Mirkin2019-08-201-1/+1
| | | | | | | | | | | | The compute paths in vl are a bit AMD-specific. For example, they (on nouveau), try to use a BGRX8 image format, which is not supported. Fixing all this is probably possible, but since the compute paths aren't in any way better, it's difficult to care. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111213 Fixes: 9364d66cb7 (gallium/auxiliary/vl: Add video compositor compute shader render) Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add back YVU supportXiong, James2019-08-161-5/+5
| | | | | | | | PIPE_FORMAT_YV12 is not handled so switching to PIPE_FORMAT_IYUV and adding back YVU support. Signed-off-by: James Xiong <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/dri2: Implement DRI2bufferDamageExtensionDaniel Stone2019-08-131-0/+35
| | | | | | | | | | | | | | | Add a pipe_screen->set_damage_region() hook to propagate set-damage-region requests to the driver, it's then up to the driver to decide what to do with this piece of information. If the hook is left unassigned, the buffer-damage extension is considered unsupported. Signed-off-by: Daniel Stone <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Qiang Yu <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/dri2: Use pipe_screen::resource_get_param in image queriesJordan Justen2019-08-131-0/+71
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* gallium/dri2: Support images with multiple planes for modifiersJordan Justen2019-08-132-3/+33
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>