summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* gallium: remove PIPE_SHADER_CAP_SCALAR_ISAMarek Olšák2019-10-102-4/+0
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi_to_nir: use nir_shader_compiler_options::lower_to_scalarMarek Olšák2019-10-101-5/+3
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi_to_nir: add #ifdef header guardsMarek Olšák2019-10-101-0/+5
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi/scan: add tgsi_shader_info::msaa_images_declaredMarek Olšák2019-10-092-0/+19
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: remove si_vid_join_surfaces and use combined planar allocationsMarek Olšák2019-10-092-0/+45
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* vl: use u_format in vl_video_buffer_formatsMarek Olšák2019-10-093-100/+25
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/u_tests: test NV12 allocation and exportMarek Olšák2019-10-091-0/+159
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/util: add planar format layouts and helpersMarek Olšák2019-10-094-7/+108
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/util: remove enum numbering from util_format_layoutMarek Olšák2019-10-091-9/+9
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/tgsi: add support for DEMOTE and READ_HELPER opcodesIlia Mirkin2019-10-071-2/+2
| | | | | | | | | | This mirrors the intrinsics in the GLSL IR. One could imagine an alternate definition where reading the semantic would account for the READ_HELPER functionality, but that feels potentially dodgy and could be subject to CSE unpleasantness. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE to skip util_range lockMarek Olšák2019-10-073-14/+24
| | | | | | | | | u_upload_mgr sets it, so that util_range_add can skip the lock. The time spent in tc_transfer_flush_region decreases from 0.8% to 0.2% in torcs on radeonsi. Reviewed-by: Kenneth Graunke <[email protected]>
* util: use simple_mtx_t for util_rangeMarek Olšák2019-10-071-5/+6
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: Add PIPE_CAP_DEMOTE_TO_HELPER_INVOCATIONCaio Marcelo de Oliveira Filho2019-09-301-0/+3
| | | | | | | | | | | | To enable EXT_demote_to_helper_invocation: This extension adds a "demote" keyword that is similar to "discard" but only suppresses subsequent writes and outputs to the framebuffer, and does not terminate the execution of the invocation. For the remainder of the execution, the invocation is "demoted" to act like a helper invocation. Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi_to_nir: handle PIPE_FORMAT_NONE in image opcodesMarek Olšák2019-09-301-0/+3
| | | | | | radeonsi doesn't use the format and internal shaders don't set it. Reviewed-By: Timur Kristóf <[email protected]>
* gallium/vl: don't set PIPE_HANDLE_USAGE_EXPLICIT_FLUSHMarek Olšák2019-09-241-4/+1
| | | | | | | | | because vl doesn't call flush_resource and I wasn't able to find all places where flush_resource needs to be called. This fixes corrupted / unflushed surfaces with fullscreen videos on Raven. Cc: 19.1 19.2 <[email protected]>
* tgsi_to_nir: fix 2-component system values like tess_level_inner_defaultMarek Olšák2019-09-231-1/+3
| | | | | Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: fix masked out image loadsMarek Olšák2019-09-231-2/+1
| | | | | | | This caused a failure in NIR validation. Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util/u_queue: track job size and limit the size of queue growthTimothy Arceri2019-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | When both UTIL_QUEUE_INIT_RESIZE_IF_FULL and UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY are set, we can get into a situation where the queue never executes and grows to a huge size due to all other threads being busy. This is the case with the shader cache when attempting to compile a huge number of shaders up front. If all threads are busy compiling shaders the cache queues memory use can climb into the many GBs very fast. The use of these two flags with the shader cache is intended to allow shaders compiled at runtime to be compiled as fast as possible. To avoid huge memory use but still allow the queue to perform optimally in the run time compilation case, we now add the ability to track memory consumed by the jobs in the queue and limit it to a hardcoded 256MB which should be more than enough. Reviewed-by: Marek Olšák <[email protected]>
* gallium: extend resource_get_param to be as capable as resource_get_handleMarek Olšák2019-09-184-8/+29
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAP"Christian Gmeiner2019-09-181-0/+3
| | | | | | | | | | There are GPUs that do not support this feature. This reverts commit e871abe452ad40efcccb0bab6b88fc31d0551e29 Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallivm: Limit DEBUG workaround to LLVM < 7Michel Dänzer2019-09-171-0/+4
| | | | | | As of version 7, LLVM uses LLVM_DEBUG instead of just DEBUG. Reviewed-by: Timothy Arceri <[email protected]>
* 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]>