summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* driconfig: add a new engine name/version parameterLionel Landwerlin2019-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vulkan applications can register with the following structure : typedef struct VkApplicationInfo { VkStructureType sType; const void* pNext; const char* pApplicationName; uint32_t applicationVersion; const char* pEngineName; uint32_t engineVersion; uint32_t apiVersion; } VkApplicationInfo; This enables the Vulkan implementations to apply workarounds based off matching this description. Here we add a new parameter for matching the driconfig options with the following : <device driver="anv"> <application engine_name_match="MyOwnEngine.*" engine_versions="10:12,40:42"> <option name="blaaah" value="true" /> </application> </device> v2: switch engine name match to use regexps v3: Verify that the regexec returns REG_NOMATCH for match failure (Eric) v4: Add missing bit that went to the following commit (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: 19.2 <[email protected]>
* gallium: util_set_vertex_buffers_mask(..): make use of u_bit_consecutive(..)Christian Gmeiner2019-09-141-3/+2
| | | | | | | Also move the clearing of the bits out of if/else. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: Restore VSX for llvm >= 4Adam Jackson2019-09-121-0/+14
| | | | | | | | Accidentally dropped in 4fdd455eeb7cffadee86f06c685005a3b64ce94b. Fixes: 4fdd455e ("gallium: Require LLVM >= 3.4) Reported-by: Ilia Mirkin <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* tgsi_to_nir: Translate TGSI_INTERPOLATE_COLOR as INTERP_MODE_NONEDanylo Piliaiev2019-09-121-1/+1
| | | | | | | | | | | | | | | | Translating TGSI_INTERPOLATE_COLOR as INTERP_MODE_SMOOTH made it for drivers impossible to have flatshaded color inputs. Translate it to INTERP_MODE_NONE which drivers interpret as smooth or flat depending on flatshading state. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111467 Fixes: 770faf54 ("tgsi_to_nir: Improve interpolation modes.") Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium/ttn: VARYING_SLOT_PSIZ and VARYING_SLOT_FOGC are scalarIago Toral Quiroga2019-09-121-0/+10
| | | | Reviewed-by: Eric Anholt <[email protected]>
* u_format: float type for R11G11B10_FLOAT/R9G9B9E5_FLOATJonathan Marek2019-09-111-2/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* u_format: add ETC2 to util_format_srgb/util_format_linearJonathan Marek2019-09-111-0/+12
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Require LLVM >= 3.9Adam Jackson2019-09-114-153/+3
| | | | | | | | 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]>
* gallium: Require LLVM >= 3.8Adam Jackson2019-09-111-4/+2
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Require LLVM >= 3.7Adam Jackson2019-09-112-33/+4
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Require LLVM >= 3.6Adam Jackson2019-09-114-250/+82
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Require LLVM >= 3.5Adam Jackson2019-09-113-28/+2
| | | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> [ Michel Dänzer: Dropped jessie line from debian-install.sh again ]
* gallium: Require LLVM >= 3.4Adam Jackson2019-09-115-164/+6
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* prog_to_nir, tgsi_to_nir: make sure kill doesn't discard NaNsMarek Olšák2019-09-111-0/+4
| | | | Reviewed-by: Connor Abbott <[email protected]>
* gallium: Fix util_format_get_depth_onlyKenneth Graunke2019-09-101-1/+1
| | | | | | | This is a pipe format, not a boolean. Fixes: 5849e0612cc ("gallium/auxiliary: Add util_format_get_depth_only() helper.") Reviewed-by: Tapani Pälli <[email protected]>
* gallium: Add ARB_gl_spirv supportCaio Marcelo de Oliveira Filho2019-09-101-0/+4
| | | | | | | | | | | | | | The PIPE_CAP_GL_SPIRV capability enables ARB_gl_spirv and ARB_spirv_extensions, and will make sure the corresponding SPIR-V capabilities and extensions lists are initialized. The additional PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS capability enables the support for Variable Pointers in SPIR-V shaders. This depends on the driver and is not mandatory for ARB_gl_spirv support. v2: Add a PIPE_CAP for Variable Pointers. (Marek) Reviewed-by: Alejandro Piñeiro <[email protected]> [v1]
* gallivm: drop LLVM<3.3 code paths as no build system allows thatEric Engestrom2019-09-065-42/+36
| | | | | Suggested-by: Michel Dänzer <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* gallivm: replace more complex 3.x version check with LLVM_VERSION_MAJOR/MINOREric Engestrom2019-09-067-71/+74
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* gallivm: replace major llvm version checks with LLVM_VERSION_MAJOREric Engestrom2019-09-068-26/+34
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* aux/draw: replace binary HAVE_LLVM checks with LLVM_AVAILABLEEric Engestrom2019-09-068-26/+26
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* gallivm: replace `0x` version print with actual version stringEric Engestrom2019-09-061-2/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* tgsi_to_nir: Remove dependency on libglsl.Timur Kristóf2019-09-062-14/+18
| | | | | | | | | This commit removes the GLSL dependency in TTN by manually recording the textures used and calling nir_lower_samplers instead of its GL counterpart. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: allow specifying filter callback in lower_alu_to_scalarVasily Khoruzhick2019-09-061-1/+1
| | | | | | | | | | | | | Set of opcodes doesn't have enough flexibility in certain cases. E.g. Utgard PP has vector conditional select operation, but condition is always scalar. Lowering all the vector selects to scalar increases instruction number, so we need a way to filter only those ops that can't be handled in hardware. Reviewed-by: Qiang Yu <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* gallium: Plumb through a way to disable GLSL const loweringConnor Abbott2019-09-051-0/+4
| | | | | | | | | | For radeonsi, we will prefer the NIR pass as it'll generate better code (some index calculation and a single load vs. a load, then index calculation, then another load) and oftentimes NIR optimization can kick in and make all the access indices constant. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallivm: add barrier support for compute shaders.Dave Airlie2019-09-042-1/+23
| | | | | | | When the code is executing an hits a barrier, it will suspend the coroutine and return control to the coroutine dispatcher. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add support for compute shared memoryDave Airlie2019-09-043-19/+46
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add new compute related intrinsicsDave Airlie2019-09-042-0/+19
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add coroutine pass manager supportDave Airlie2019-09-043-1/+32
| | | | | | | coroutines require a proper pass manager, so add the passes to the correct places Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add coroutine support files to gallivm.Dave Airlie2019-09-044-0/+273
| | | | | | | These wrap the coroutine intrinsics and also add some higher level wrappers around coroutine begin, end and suspend procedures Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/flow: add counter reset for loopsDave Airlie2019-09-042-0/+20
| | | | | | This allows the counter value to be forced to a certain value Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/hud: add CPU usage support for DragonFly/NetBSD/OpenBSDJan Beich2019-09-031-2/+41
| | | | | | | | | Each BSD has slightly different sysctl for retrieving per-CPU times. FreeBSD returns long while NetBSD returns uint64_t. On OpenBSD return type differs between summation and per-CPU times. DragonFly is compatible with FreeBSD. Signed-off-by: Jan Beich <[email protected]>
* ttn: fix 64-bit shift on 32-bit `1`Eric Engestrom2019-09-041-1/+1
| | | | | | | | Fixes: 4d0b2c7aaac3cf3de5af ("ttn: Update shader->info as we generate code.") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* ttn: Fill out more info fieldsConnor Abbott2019-09-031-0/+4
| | | | | | We'll use these in radeonsi. Reviewed-by: Marek Olšák <[email protected]>
* gallium/auxiliary/indices: consistently apply start only to inputErik Faye-Lund2019-08-311-10/+10
| | | | | | | | | | | | | | | | | | The majority of these only apply the start argument to the input, but a few of them also does for the output-array. util_primconvert, the only user of this argument expects this pass a non-zero start-argument does not expect this to be applied to the output; if it is, it will write outside of allocated memory, leading to VRAM corruption. The reason this doesn't seem to have been noticed before, is that no driver currently use util_primconvert to convert a primitive-type to itself, which is the cases where this was broken. But for Zink, this will no longer be true, because we need to eliminate the use of 8-bit index-buffers. Signed-off-by: Erik Faye-Lund <[email protected]> Fixes: 28f3f8d413f ("gallium/auxiliary/indices: add start param") Reviewed-by: Rob Clark <[email protected]>
* gallivm: disable accurate cube corner for integer textures.Dave Airlie2019-08-301-1/+6
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111511 Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: use fallback code for mul_hi with llvm >= 7.0Roland Scheidegger2019-08-291-1/+6
| | | | | | | | | | | | | LLVM 7.0 ditched the pmulu intrinsics. This is only a trivial patch to use the fallback code instead. It'll likely produce atrocious code since the pattern doesn't match what llvm itself uses in its autoupgrade paths, hence the pattern won't be recognized. Should fix https://bugs.freedesktop.org/show_bug.cgi?id=111496 Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallium: Don't emit identical endian-dependent pack/unpack code.Eric Anholt2019-08-281-5/+11
| | | | | | | | | Reduces the size of the u_format_table.c file by 140k (out of 1.64M) and makes me less confused about endianness in gallium. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Fix big-endian addressing of non-bitmask array formats.Eric Anholt2019-08-281-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | The formats affected are: - LA x (16_FLOAT, 32_FLOAT, 32_UINT, 32_SINT) - R8G8B8 x (UNORM, SNORM, SRGB, USCALED, SSCALED, UINT, SINT) - RG/RGB/RGBA x (64_FLOAT, 32_FLOAT, 16_FLOAT, 32_UNORM, 32_SNORM, 32_USCALED, 32_SSCALED, 32_FIXED, 32_UINT, 32_SINT) - RGB/RGBA x (16_UNORM, 16_SNORM, 16_USCALED, 16_SSCALED, 16_UINT, 16_SINT) - RGBx16 x (UNORM, SNORM, FLOAT, UINT, SINT) - RGBx32 x (FLOAT, UINT, SINT) - RA x (16_FLOAT, 32_FLOAT, 32_UINT, 32_SINT) The updated st_formats.c unit test checks that the formats affected by this change are all array formats in the equivalent Mesa format (if any). Mesa's array format definition is clear: the value stored is an array (increasing memory address) of values of the channel's type. It's also the only thing that makes sense for the RGB types, or very large types like RGBA64_FLOAT (A should not move to the low address because the cpu is BE). Acked-by: Roland Scheidegger <[email protected]> Acked-by: Adam Jackson <[email protected]> Tested-by: Matt Turner <[email protected]> (unit tests on BE) Reviewed-by: Marek Olšák <[email protected]>
* gallium: Drop a bit of dead code from the pack/unpack python.Eric Anholt2019-08-281-2/+0
| | | | | | | | Nothing used this var. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Drop the useless union wrapper on pack/unpack.Eric Anholt2019-08-281-28/+22
| | | | | | | | | Nothing accessed the .value field, just the .chan. Unwrap all the code from the union, for clarity (and 13k less generated code). Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Skip generating the pack/unpack union if we don't use it.Eric Anholt2019-08-281-1/+1
| | | | | | | | | Shaves 30k off of the 1.6M .c file, and makes for less noise for me trying to understand how gallium formats actually work. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: fix appveyor build after images changesDave Airlie2019-08-271-1/+2
|
* llvmpipe: enable ARB_shader_image_load_storeDave Airlie2019-08-271-1/+2
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add memory barrier supportDave Airlie2019-08-271-0/+11
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add support for fences api on older llvmDave Airlie2019-08-272-0/+16
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* draw: add vs/gs images supportDave Airlie2019-08-278-7/+316
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add image load/store/atomic supportDave Airlie2019-08-277-10/+684
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/tgsi: add image interface to tgsi builderDave Airlie2019-08-272-1/+20
| | | | | | | This adds the callbacks for the driver/gallium binding for image operations. Reviewed-by: Roland Scheidegger <[email protected]>
* draw: add jit image type for vs/gs images.Dave Airlie2019-08-272-19/+109
| | | | | | | This introduces the jit image type into the jit interface for vertex/geom shaders Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add a basic image limitDave Airlie2019-08-271-0/+2
| | | | Reviewed-by: Roland Scheidegger <[email protected]>