summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* gallium/dri2: Refactor image property queriesJordan Justen2019-08-131-69/+79
| | | | | | | | | | This refactor will let us more easily use pipe_screen::resource_get_param as an alternative to pipe_screen::resource_get_handle. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* gallium/dri2: Support creating multi-planar modifier imagesJordan Justen2019-08-131-10/+19
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* gallium/dri2: Implement dri2ImageExtension.queryDmaBufFormatModifierAttribsJordan Justen2019-08-131-0/+50
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* clover: Fix build after clang r367864Jan Vesely2019-08-061-2/+8
| | | | | | | | v2: Drop special case of llvm-9 Signed-off-by: Jan Vesely <[email protected]> Acked-by: Dieter Nützel <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Aaron Watry <[email protected]>
* mesa/gallium: add dric option to allow overriding GL vendor stringTimothy Arceri2019-08-071-0/+7
| | | | | | | Will be used in the following patch. Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551
* st/dri: Move dri2_format_mapping table and it's accessors from dri2.c to ↵Jon Turney2019-08-063-213/+223
| | | | | | | | | dri_helpers.c 8af1990a exposed dri2_get_mapping_by_fourcc() in dri_helpers.h, so it could be used by dri_get_egl_image(), but didn't move it. This breaks the build in the with_dri=false case (e.g. when building for a target which doesn't have libdrm, so swrast is only dri driver built)
* st/dri: simplify dri_get_egl_image by reusing dri2_format_tableMike Blumenkrantz2019-07-313-42/+24
| | | | | | | | | | this makes dri2_get_mapping_by_fourcc accessible from dri_helpers.h and does a direct lookup on the fourcc id to match the pipe format v2 (Ken): Allow map to be NULL, use img->texture->format. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Revert "st/dri: simplify dri_get_egl_image by reusing dri2_format_table"Kenneth Graunke2019-07-313-25/+42
| | | | | | This reverts commit c47af8b95f26bd83efe322ff0baa52263fb8625e. It causes dEQP-EGL regressions. (I think there is an easy fix, but we'll have it go through review again.)
* st/dri: simplify dri_get_egl_image by reusing dri2_format_tableMike Blumenkrantz2019-07-313-42/+25
| | | | | | | this makes dri2_get_mapping_by_fourcc accessible from dri_helpers.h and does a direct lookup on the fourcc id to match the pipe format Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: add handling for YUV planar surfacesMike Blumenkrantz2019-07-312-77/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | st/dri: this adds a table (similar to the one in i965) which provides mappings for turning various planar formats into multiple sampler views. whereas only NV12 and IYUV were supported, now many more formats are supported here: * P0XX * YUV4XX * YVU4XX * AYUV * XYUV * YUYV * UYVY the table is used directly to handle image creation, simplifying a lot of code and resolving related TODO/FIXME items where workarounds were previously in place to manage NV12 and IYUV formats exclusively st/mesa: the changes here relate to setting up samplers for the planar formats. this requires: * checking for driver support for all the sampler formats * creating the samplers with the corresponding formats and swizzling * running nir_lower_tex with the appropriate options to trigger the lowering for each plane->sampler fixes kwg/mesa#36 Reviewed-by: Kenneth Graunke <[email protected]>
* tree-wide: replace MAYBE_UNUSED with ASSERTEDEric Engestrom2019-07-311-2/+2
| | | | | | Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/nine: Drop preprocessor guards for glibc-2.12Matt Turner2019-07-301-3/+0
| | | | | | | | Same rationale as the previous patch, but additionally these checks just seem entirely unnecessary. pthread_self() has been used in Mesa since at least 1999. Acked-by: Eric Engestrom <[email protected]>
* gallium: create multimedia contexts as compute-only if graphics is unsupportedMarek Olšák2019-07-296-9/+8
| | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* gallium: remove boolean from state tracker APIsIlia Mirkin2019-07-229-56/+56
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallium: get rid of PIPE_CAP_SM3Erik Faye-Lund2019-07-101-1/+9
| | | | | | | | | | | | | | | | | | | | | 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]>
* st/dri: fix typo in format table for GR1616 formatMike Blumenkrantz2019-07-011-1/+1
| | | | | | | the dri image format here should match the fourcc format Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/dri: pass dri2_format_mapping directly to dri2_create_image_from_winsysMike Blumenkrantz2019-07-011-4/+5
| | | | | | | this makes the entire struct available for use here Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[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]>
* gallium/st: Add Gallium hud to swrast driversGert Wollny2019-06-211-0/+3
| | | | | Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/nine: Use tgsi_to_nir when preferred IR is NIR.Timur Kristóf2019-06-054-6/+135
| | | | | | | | | This patch allows nine to read the preferred IR from pipe caps and use NIR when that is preferred by the driver, by calling tgsi_to_nir. Also adds some debug options that allow overriding it. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/dri: enable EGL_ANDROID_blob_cache on gallium driversTapani Pälli2019-05-241-0/+29
| | | | | | | | | | | Verified to work properly with Iris driver on Android Celadon. Cache files get generated as 'com.android.opengl.shaders_cache' for each application. v2: check that cache was returned (Eric Engestrom) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* st/dri: Minor style fixesKenneth Graunke2019-05-151-4/+6
| | | | Trivial.
* gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.Eric Anholt2019-05-136-25/+21
| | | | | | | | 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]>
* st/va: set the visible image dimensions in vlVaDeriveImageJulien Isorce2019-05-101-2/+4
| | | | | | | | | | | | | | | This fixes video being rendered incorrectly. User wants height of 360 but internally pipe_video_buffer 's height is 368 in the test below. Test: GST_GL_PLATFORM=egl gst-launch-1.0 videotestsrc ! video/x-raw, width=868, height=360, format=NV12 ! vaapipostproc ! glimagesink Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443 Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/va: check resource_get_info nullity in vlVaDeriveImageJulien Isorce2019-05-031-5/+8
| | | | | | | | This pipe_screen function is not implemented by all backends. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443 Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* meson: Fix missing glproto dependency for gallium-glxChuck Atkins2019-05-031-1/+1
| | | | | | Signed-off-by: Chuck Atkins <[email protected]> Cc: mesa-stable <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* st/dri: decrease input lag by syncing sooner in SwapBuffersMarek Olšák2019-05-021-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's done by: - decrease the number of frames in flight by 1 - flush before throttling in SwapBuffers (instead of wait-then-flush, do flush-then-wait) The improvement is apparent with Unigine Heaven. Previously: draw frame 2 wait frame 0 flush frame 2 present frame 2 The input lag is 2 frames. Now: draw frame 2 flush frame 2 wait frame 1 present frame 2 The input lag is 1 frame. Flushing is done before waiting, because otherwise the device would be idle after waiting. Nine is affected because it also uses the pipe cap.
* st/va: properly set stride and offset in vlVaDeriveImageJulien Isorce2019-04-301-10/+25
| | | | | | | | Using the new resource_get_info function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443 Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/nine: Check discard_delayed_release is set before allocating moreAxel Davy2019-04-301-0/+2
| | | | | | | | | | When discard_delayed_release is set (default), we allocate more buffers and use a different buffer wait path. Check if it is set, and use the old paths if not (the alternative buffer wait path could still be used, but there is no advantage to using it in this case). Signed-off-by: Axel Davy <[email protected]>