summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
AgeCommit message (Collapse)Author
2018-04-13gallium: move ddebug, noop, rbug, trace to auxiliary to improve build timesMarek Olšák
which also simplifies the build scripts.
2018-04-12Fix scons buildMarek Olšák
2018-04-12mesa: include mtypes.h lessMarek Olšák
- remove mtypes.h from most header files - add main/menums.h for often used definitions - remove main/core.h v2: fix radv build Reviewed-by: Brian Paul <brianp@vmware.com>
2018-04-12st/va: add VP9 config to enable profile2Leo Liu
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-04-12st/va: add VP9 config to enable profile0Leo Liu
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-04-12st/va: parse VP9 uncompressed frame headerLeo Liu
To get some of UVD required parameters. Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-04-12st/va: add slice parameter handling for VP9Leo Liu
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-04-12st/va: add picture parameter handling for VP9Leo Liu
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-04-12st/va: add handles for VP9 buffersLeo Liu
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-04-12st/va: add VP9 picture to contextLeo Liu
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-04-08st/nine: Do not use scratch for face registerAxel Davy
Scratch registers are reused every instructions. Since vFace is reused, a new temporary register should be used. Fixes: https://github.com/iXit/Mesa-3D/issues/311 Signed-off-by: Axel Davy <davyaxel0@gmail.com> CC: "17.3 18.0" <mesa-stable@lists.freedesktop.org>
2018-04-06st/nine: Declare lighting consts for ff shadersAxel Davy
The lighting constants were not declared previously, but were accessed with indirect addressing, which is illegal. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105442 Signed-off-by: Axel Davy <davyaxel0@gmail.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> CC: "17.3 18.0" <mesa-stable@lists.freedesktop.org>
2018-04-02st/dri: Initialise modifier to INVALID for DRI2Daniel Stone
When allocating a buffer for DRI2, set the modifier to INVALID to inform the backend that we have no supplied modifiers and it should do its own thing. The missed initialisation forced linear, even if the implementation had made other decisions. This resulted in VC4 DRI2 clients failing with: Modifier 0x0 vs. tiling (0x700000000000001) mismatch Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Andreas Müller <schnitzeltony@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Fixes: 3f8513172ff6 ("gallium/winsys/drm: introduce modifier field to winsys_handle")
2018-03-30st/wgl: check if WGL_SWAP_INTERVAL is defined in wglSwapIntervalEXT()Brian Paul
This allows the WGL_SWAP_INTERVAL env var to override any application calls to wglSwapIntervalEXT(). Useful for debugging, or to set the interval to zero to effectively disable the swap interval. Note: we also rename the previous instance of SVGA_SWAP_INTERVAL to WGL_SWAP_INTERVAL since this is a WGL feature and not related to the svga driver. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2018-03-21clover/llvm: Fix build against LLVM/Clang 4.0Aaron Watry
The opencl 1.0 langstandard was renamed in 5.0+ v2: Move preprocessor check into compat.hpp Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2018-03-21clover: Dynamically calculate __OPENCL_VERSION__ and CLC language versionAaron Watry
Use get_language_version to calculate default cl standard based on device capabilities and -cl-std specified in build options. v5; move dev_clc_version declaration from an earlier patch v4: Squash the __OPENCL_VERSION__ and CLC language version patches v3: (Jan) Allow device_version up to 2.2 while device_clc_version only goes to 2.0 Use get_cl_version to calculate version instead v2: Split out from the previous patch (Pierre) Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> CC: Jan Vesely <jan.vesely@rutgers.edu>
2018-03-21clover/llvm: Add get_[cl|language]_version, validation and some helpersAaron Watry
Used to calculate the default CLC language version based on the --cl-std in build args and the device capabilities. According to section 5.8.4.5 of the 2.0 spec, the CL C version is chosen by: 1) If you have -cl-std=CL1.1+ use the version specified 2) If not, use the highest 1.x version that the device supports Curiously, there is no valid value for -cl-std=CL1.0 Validates requested cl-std against device_clc_version Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> v7: (Pierre) Split cl/clc versions into separate lists and make more references const. v6: (Pierre) Add more const and fix some whitespace v5: (Aaron) Use a collection of cl versions instead of switch cases Consolidates the string, numeric version, and clc langstandard::kind v4: (Pierre) Split get_language_version addition and use into separate patches Squash patches that add the helpers and validate the language standard v3: Change device_version to device_clc_version v2: (Pierre) Move create_compiler_instance changes to correct patch to prevent temporary build breakage. Convert version_str into unsigned and use it to find language version Add build_error for unknown language version string Whitespace fixes
2018-03-18st/nine: Fix non inversible matrix checkAxel Davy
There was a missing absolute value when checking if the determinant was big enough. Fixes: https://github.com/iXit/Mesa-3D/issues/292 Signed-off-by: Axel Davy <davyaxel0@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> CC: "17.3 18.0" <mesa-stable@lists.freedesktop.org>
2018-03-18st/nine: Fixes warning about implicit conversionAxel Davy
Makes the conversion explicit. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102542 Signed-off-by: Axel Davy <davyaxel0@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> CC: "17.3 18.0" <mesa-stable@lists.freedesktop.org>
2018-03-18st/nine: Fix bad tracking of vs textures for NINESBT_ALLAxel Davy
Stateblocks with NINESBT_ALL should track all textures. For better performance they have a faster path which copies all the required. This path was only tracking ps textures. Fixes: https://github.com/iXit/Mesa-3D/issues/303 Signed-off-by: Axel Davy <davyaxel0@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> CC: "17.3 18.0" <mesa-stable@lists.freedesktop.org>
2018-03-18st/nine: Fix bad tracking of bound vs texturesAxel Davy
An incorrect formula was used to compute bound_samplers_mask_vs. Since s is above always 8 for vs and the variable is encoded on 8 bits, it was always 0. This resulted in commiting the samplers every call when there was at least one texture read in the vs shader. Signed-off-by: Axel Davy <davyaxel0@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-03-14autotools: add -I/src/egl to tizoniaDylan Baker
This fixes the following build breakage: make[5]: Entering directory '/mnt/sdc1/Gits/mesa/src/gallium/state_trackers/omx/tizonia' CC h264dprc.lo In file included from h264dprc.c:45:0: ../../../../../src/egl/drivers/dri2/egl_dri2.h:47:10: fatal error: wayland/wayland-egl/wayland-egl-backend.h: No such file or directory #include "wayland/wayland-egl/wayland-egl-backend.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. meson got the same fix in 7598dedfde49391564cdb3d355e7bd98e1880782. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-12gallium/x11: remove empty GLX_SGIX_swap_group stubsEmil Velikov
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-12gallium/x11: remove empty GLX_SGIX_swap_barrier stubsEmil Velikov
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-09st/dri: fix OpenGL-OpenCL interop for GL_TEXTURE_BUFFERMarek Olšák
Tested by our OpenCL team. Fixes: 9c499e6759b26c5e "st/mesa: don't invoke st_finalize_texture & st_convert_sampler for TBOs" Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-03-07meson: Fix indent in omx meson.buildDylan Baker
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Tested-by: Julien Isorce <julien.isorce@gmail.com> Tested-by: Karol Herbst <kherbst@redhat.com>
2018-03-07meson: Use include directory variables instead of traversingDylan Baker
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Tested-by: Julien Isorce <julien.isorce@gmail.com> Tested-by: Karol Herbst <kherbst@redhat.com>
2018-03-07meson: Re-add auto option for omxDylan Baker
This re-adds the auto option for omx, without it we default to tizonia and the build fails almost immediately, this is especially obnoxious those building a driver that doesn't support the OMX state tracker to begin with. v2: - Only define OMX_FOO for auto cases if the dependencies are found. This fixes building tizonia with auto (Julien, Eric) CC: Gurkirpal Singh <gurkirpal204@gmail.com> Fixes: bb5e27fab6087a5c1528a5faf507acce700e883c ("st/omx/bellagio: Rename st and target directories") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> (v1) Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Tested-by: Julien Isorce <julien.isorce@gmail.com> Tested-by: Karol Herbst <kherbst@redhat.com> (v1)
2018-03-07meson: fix tizonia compilationDylan Baker
It needs to have src/egl in it's includes as well. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Tested-by: Julien Isorce <julien.isorce@gmail.com> Tested-by: Karol Herbst <kherbst@redhat.com>
2018-03-06st/omx/tizonia/h264d: Add EGLImage supportGurkirpal Singh
Example Gstreamer pipeline : MESA_ENABLE_OMX_EGLIMAGE=1 GST_GL_API=gles2 GST_GL_PLATFORM=egl gst-launch-1.0 filesrc location=movie.mp4 ! qtdemux ! h264parse ! omxh264dec ! glimagesink Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-03-06st/omx/tizonia: Add H.264 encoderGurkirpal Singh
v2: Refactor out screen functions to st/omx Example Gstreamer pipeline : gst-launch-1.0 filesrc location=movie.mp4 ! qtdemux ! h264parse ! avdec_h264 ! videoconvert ! omxh264enc ! h264parse ! avdec_h264 ! videoconvert ! ximagesink Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-03-06st/omx/tizonia: Add H.264 decoderGurkirpal Singh
v2: Refactor out screen functions to st/omx Example Gstreamer pipeline : gst-launch-1.0 filesrc location=movie.mp4 ! qtdemux ! h264parse ! omxh264dec ! videoconvert ! ximagesink Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-03-06st/omx/tizonia: Add entrypointGurkirpal Singh
Adds base files for adding components Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-03-06st/omx/tizonia: Add --enable-omx-tizonia flag and build filesGurkirpal Singh
Allow only bellagio or tizonia to be used at the same time. Detect tizonia package config file Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir Only compile empty source (target.c) for now. GSoC Project link: https://summerofcode.withgoogle.com/projects/#4737166321123328 Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-03-06st/omx/bellagio: Rename st and target directoriesGurkirpal Singh
v2: Refactor out screen functions to st/omx Allows to keep all the code under st/omx (st/omx/tizonia and st/omx/bellagio). Reverts targets/omx_bellagio to omx as additions to existing files is enough to compile for both bellagio and tizonia. * autotools changes: --enable-omx -> --enable-omx-bellagio * meson changes: -Dgallium-omx=false -> -Dgallium-omx=disabled -Dgallium-omx=true -> -Dgallium-omx=bellagio Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Julien Isorce <julien.isorce@gmail.com>
2018-03-05clover: Allow overriding platform/device version numbersAaron Watry
Useful for testing API, builtin library, and device completeness of not-yet-supported versions. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Francisco Jerez <currojerez@riseup.net> (v3) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Cc: Jan Vesely <jan.vesely@rutgers.edu> v4: Remove redundant std::string wrapper around debug_get_option calls v3: mark CL version overrides as static and const v2: Make version_string in platform const in case
2018-03-05clover/llvm: Pass device down to compileAaron Watry
We'll need to be able to detect device version to define the appropriate __OPENCL_VERSION__ header. v2: Rebase after removing the previous patch (Pierre) - Removed "clover: Add device_clc_version to llvm::create_compiler_instance" Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2018-03-05clover: Pass device to llvm::create_compiler_instanceAaron Watry
We'll be using dev.device_clc_version to select the default language version soon along with the existing ir_target field. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Francisco Jerez <currojerez@riseup.net> v4: Pass the device down instead of device_clc_version as a separate field v3: Revise to acknowledge that we now have the device in compile/link_program instead of the string values. v2: (Pierre) Move changes to create_compiler_instance invocation to correct patch to prevent temporary build breakage. (Jan) Use device_clc_version instead of device_version for compile/link
2018-03-05clover/llvm: Use device in llvm compilation instead of copying fieldsAaron Watry
Copying the individual fields from the device when compiling/linking will lead to an unnecessarily large number of fields getting passed around. v3: Rebase on current master v2: Use device in function args before making additional changes in following patches Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2018-03-02st/omx_bellagio: add picture profile and entry pointBoyuan Zhang
Profile and entry point were missing in the picture structure. Therefore, add them back. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2018-02-22glx: Properly handle cases where screen creation failsChuck Atkins
This fixes a segfault exposed by a29d63ecf7 which occurs when swr is used on an unsupported architecture. v2: re-work to place logic in xmesa_init_display Signed-off-by: Chuck Atkins <chuck.atkins@kitware.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Cc: mesa-stable@lists.freedesktop.org Cc: George Kyriazis <george.kyriazis@intel.com> Cc: Bruce Cherniak <bruce.cherniak@intel.com>
2018-02-19st/dri: only expose config formats that are display targetsIlia Mirkin
In the case of NVIDIA hardware, ABGR is displayable but ARGB is not. Only advertise the one set in the visuals list. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Daniel Stone <daniels@collabora.com>
2018-02-19mesa: add xbgr support adjacent to xrgbIlia Mirkin
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Daniel Stone <daniels@collabora.com>
2018-02-17gallium: use PIPE_CAP_CONSTBUF0_FLAGSMarek Olšák
2018-02-16meson: Add Haiku platform support v4Alexander von Gluck IV
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-02-15clover: Fix build after llvm r325155 and r325160Jan Vesely
r325155 ("Pass a reference to a module to the bitcode writer.") and r325160 ("Pass module reference to CloneModule") change function interface from pointer to reference. v2: Fix indentation (tab instead of spaces) Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2018-02-15meson: use va-api version reported by pkg-configDylan Baker
Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-10clover: use PIPE_SHADER_CAP_SUPPORTED_IRS to discover IRTimothy Arceri
PIPE_SHADER_CAP_PREFERRED_IR was conflicting with PIPE_SHADER_IR_NIR for compute shaders, so we let clover pick the one it wants to use. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-02-09st/va: Make the vendor string more descriptiveMark Thompson
Include the Mesa version and detail about the platform. Signed-off-by: Mark Thompson <sw@jkqxz.net> Reviewed-by: Christian König <christian.koenig@amd.com>
2018-02-09st/va: Enable vaExportSurfaceHandle()Mark Thompson
It is present from libva 2.1 (VAAPI 1.1.0 or higher). Signed-off-by: Mark Thompson <sw@jkqxz.net> Reviewed-by: Christian König <christian.koenig@amd.com>