summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radv: Set partial_vs_wave for pipelines with just GS, not tess.Bas Nieuwenhuizen2019-01-151-8/+20
| | | | | | | | | | | | | | | | Looking at -pro we need to enable it for pipelines with just a GS too. This seems to reduce the hangs from https://bugs.freedesktop.org/show_bug.cgi?id=109242 on a RX 550 to the point where I can't reproduce, after the false start with the wd_switch_on_eop patch due to flakiness. (but people are reporting it does not fix the issue completely for them on polaris 11) CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: also apply the GS hang workaround to draws without tessellationMarek Olšák2019-01-141-11/+14
| | | | | | | ported from AMDVLK. Cc: 18.3 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* v3d: SHARED but not necessarily SCANOUT buffers on RO must be linear.Eric Anholt2019-01-141-1/+1
| | | | | We don't have a way to talk to RO about modifiers it can do yet, so assume the minimum.
* v3d: Add support for CS barrier() intrinsics.Eric Anholt2019-01-143-0/+61
|
* v3d: Add support for CS shared variable load/store/atomics.Eric Anholt2019-01-143-13/+83
| | | | | CS shared variables are handled effectively as SSBO access to a temporary buffer that will be allocated at CS dispatch time.
* v3d: Add support for CS workgroup/invocation id intrinsics.Eric Anholt2019-01-145-1/+67
| | | | | | We get a payload for the ivec3 workgroup and an int local invocation index, and we use the core lowering to turn into the global invocation id and the local invocation id ivec3s.
* v3d: Add support for shader_image_load_store.Eric Anholt2019-01-1413-5/+848
| | | | | | This is only exposed on V3D 4.1+, because we didn't have the TMU write operations for images on 3.3 (To do GLES 3.1 there, you have to lower it to SSBO load/stores, which is a problem to solve later).
* v3d: Add SSBO/atomic counters support.Eric Anholt2019-01-149-7/+245
| | | | | So far I assume that all the buffers get written. If they weren't, you'd probably be using UBOs instead.
* v3d: Drop the GLSL version level.Eric Anholt2019-01-141-1/+1
| | | | | | This was an arbitrary "we support lots of stuff" value when I started the driver. However, at 400 we expose OES_gpu_shader5, which claims support for dynamically indexing samplers, which the driver doesn't do yet.
* v3d: Add support for matrix inputs to the FS.Eric Anholt2019-01-141-13/+14
| | | | | | We've been relying on linking splitting up our varying matrices into separate vectors, but with SSO that doesn't happen. Supporting matrix inputs isn't too hard, though.
* v3d: Add an isr to the simulator to catch GMP violations.Eric Anholt2019-01-143-0/+39
| | | | | | | Otherwise, the simulator raises the GMP interrupt and waits for it to be handled, and v3d ends up spinning in v3d_hw_tick(). Aborting right when violation happens gives us a chance to look at the backtrace of whatever thread triggered the violation.
* v3d: Fix txf_ms 2D_ARRAY array index.Eric Anholt2019-01-141-8/+10
| | | | | | We need to pass the array index through our coordinate transform unchanged. Fixes dEQP-GLES31.functional.texture.multisample.samples_1.*_2d_array
* v3d: Add support for GL_ARB_framebuffer_no_attachments.Eric Anholt2019-01-143-2/+19
| | | | | | Fixes dEQP-GLES31.functional.state_query.integer.max_framebuffer_height_getboolean when GLES3 is enabled.
* v3d: Add support for the early_fragment_tests flag.Eric Anholt2019-01-141-0/+10
| | | | | If this flag hasn't been set by the shader and it has some visible side effects, then we need to disable EZ.
* v3d: Add support for flushing dirty TMU data at job end.Eric Anholt2019-01-143-0/+43
| | | | This will be needed for SSBOs and image_load_store.
* ac: add missing 16-bit types to glsl_base_to_llvm_type()Samuel Pitoiset2019-01-141-1/+6
| | | | | | | | Fix crashes with dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.*16 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Only use 32 KiB per threadgroup on Stoney.Bas Nieuwenhuizen2019-01-141-1/+10
| | | | | | | | | | | | Causes hangs on some machines. What works for dEQP-VK.tessellation.shader_input_output.barrier: - running num_patches = 6 (which limits LDS to 32 KiB) - running num_patches = 8, and artificially cutting LDS size at 32 KiB. CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* st/dri: fix dri2_format_table for argb1555 and rgb565Marek Olšák2019-01-141-1/+1
| | | | | | | | | The bug caused that rgb565 framebuffers used argb1555. Fixes: 433ca3127a3b94bfe9a513e7c7ce594e09e1359f Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* nir: Add a bool to float32 lowering passJason Ekstrand2019-01-144-0/+181
| | | | | | | | | | | From @jekstrand's nir-1-bit-bool branch, with improved ior/inot lowering. ior: fmax instead of fadd allows removing the fsat. inot: seq(x, 0) can be better than fsub(1, x). On a2xx, it works better with the scalar instruction set. Reviewed-by: Jonathan Marek <[email protected]>
* src/intel: use new hash table and set creation helpersCaio Marcelo de Oliveira Filho2019-01-143-8/+4
| | | | | | | | | Replace calls to create hash tables and sets that use _mesa_hash_pointer/_mesa_key_pointer_equal with the helpers _mesa_pointer_hash_table_create() and _mesa_pointer_set_create(). Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* src/compiler: use new hash table and set creation helpersCaio Marcelo de Oliveira Filho2019-01-1442-160/+72
| | | | | | | | | Replace calls to create hash tables and sets that use _mesa_hash_pointer/_mesa_key_pointer_equal with the helpers _mesa_pointer_hash_table_create() and _mesa_pointer_set_create(). Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* util: Helper to create sets and hashes with pointer keysCaio Marcelo de Oliveira Filho2019-01-144-0/+27
| | | | | | | These combinations are common enough and deserve a shortcut. Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* ac/nir: set cache policy when loading/storing buffer imagesSamuel Pitoiset2019-01-141-14/+11
| | | | | | | This was missing. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: add get_cache_policy() helper and use itSamuel Pitoiset2019-01-141-12/+26
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* anv: Implement VK_KHR_depth_stencil_resolveJason Ekstrand2019-01-145-1/+204
|
* anv: Move resolve_subpass to genX_cmd_buffer.cJason Ekstrand2019-01-143-70/+59
| | | | | We may have to do transitions around certain kinds of resolves so it helps to have it genX code.
* anv/blorp: Refactor MSAA resolves into an exportable helper functionJason Ekstrand2019-01-142-132/+107
| | | | | | This function is modeled after the aux_op functions except that it has a lot more parameters because it deals with two images as well as source and destination regions.
* anv: Rename has_resolve to has_color_resolveJason Ekstrand2019-01-143-5/+5
|
* intel/blorp: Add two more filter modesJason Ekstrand2019-01-142-12/+52
|
* bin/get-pick-list.sh: fix redirection in shAndres Gomez2019-01-141-1/+1
| | | | | | | | | | | | | | "&>" is bash specific. Fixes: e0dbfc99537 ("bin/get-pick-list.sh: warn when commit lists invalid sha") Cc: Juan A. Suarez <[email protected]> Cc: Eric Engestrom <[email protected]> Cc: Dylan Baker <[email protected]> Cc: Emil Velikov <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]>
* bin/get-pick-list.sh: fix the oneline printingAndres Gomez2019-01-141-1/+1
| | | | | | | | | | | | | | | | | | | "--summary" will also print extended header information such as creations, renames and mode changes. Let's just use "--no-patch", which suppresses the diff output. v2: Use "--no-patch" instead of the "-s" abbreviation (Eric). Fixes: 559c32d2412 ("bin/get-pick-list.sh: simplify git oneline printing") Cc: Juan A. Suarez <[email protected]> Cc: Eric Engestrom <[email protected]> Cc: Dylan Baker <[email protected]> Cc: Emil Velikov <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]>
* amd/common: Restore v4i32 suffix for llvm.SI.load.const intrinsicMichel Dänzer2019-01-141-1/+1
| | | | | | | | It was accidentally dropped in commit e4803ab7d2b6 "amd/common: use llvm.amdgcn.s.buffer.load for LLVM 8.0", breaking the universe with LLVM 7. Trivial.
* amd/common/vi+: enable SMEM loads with GLC=1Nicolai Hähnle2019-01-141-3/+7
| | | | | | Only on LLVM 8.0+, which supports the new intrinsic. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: use llvm.amdgcn.s.buffer.load for LLVM 8.0Nicolai Hähnle2019-01-141-4/+8
| | | | | | llvm.SI.load.const is deprecated. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* anv/pipeline_cache: free NIR shader cacheIago Toral Quiroga2019-01-141-0/+7
| | | | | Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR' Reviewed-by: Lionel Landwerlin <[email protected]>
* glsl: Fix copying function's out to temp if dereferenced by arrayDanylo Piliaiev2019-01-141-24/+22
| | | | | | | | | | | | | | | Function's out variable could be an array dereferenced by an array: func(v[w[i]]); or something more complicated. Copy index in any case. Fixes: 76c27e47b906 ("glsl: Copy function out to temp if we don't directly ref a variable") Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Drop mark_surface_used mechanism.Kenneth Graunke2019-01-1310-105/+7
| | | | | | | | | | | | | | | | | | | | | The original idea was that the backend compiler could eliminate surfaces, so we would have it mark which ones are actually used, then shrink the binding table accordingly. Unfortunately, it's a pretty blunt mechanism - it can only prune things from the end, not the middle - since we decide the layout before we even start the backend compiler, and only limit the size. It also basically gives up if it sees indirect array access. Besides, we do the vast majority of our surface elimination in NIR anyway, not the backend - and I don't see that trend changing any time soon. Vulkan abandoned this plan a long time ago, and I don't use it in Iris, but it's still been kicking around in i965. I hacked shader-db to print the binding table size in bytes, and observed no changes with this patch. So, this code appears to do nothing useful. Acked-by: Jason Ekstrand <[email protected]>
* egl: fix python lib deprecation warningEric Engestrom2019-01-133-14/+7
| | | | | | | | | DeprecationWarning: the imp module is deprecated in favour of importlib Instead of complicated logic, just import the file directly. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* spirv: Emit switch conditions on-the-flyJason Ekstrand2019-01-121-36/+26
| | | | | | | | | | | | | Instead of emitting all of the conditions for the cases of a switch statement up-front, emit them on-the-fly as we emit the code for each case. The original justification for this was that we were going to have to build a default case anyway which would need them all. However, we can just trust CSE to clean up the mess in that case. Emitting each condition right before the if statement that uses it reduces register pressure and, in one customer benchmark, reduces spilling and improves performance by about 2x. Reviewed-by: Lionel Landwerlin <[email protected]>
* nir/gcm: Support deref instructionsJason Ekstrand2019-01-121-0/+4
| | | | | | | Even though no one's been brave enough to ever use this pass, I like to keep it functionally working. Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/nir: Call nir_opt_deref in brw_nir_optimizeJason Ekstrand2019-01-121-0/+1
| | | | | | | It's an optimization so we should probably be calling it in the optimization loop. Reviewed-by: Lionel Landwerlin <[email protected]>
* spirv: Contain the GLSLang issue #179 workaround to old GLSLangJason Ekstrand2019-01-123-18/+38
| | | | | | | | | | | Instead of applying the workaround universally, detect semi-old GLSLang via the generator ID and only enable the workaround on old GLSLang. This isn't nearly as precise as one would like it to be because the first GLSLang generator id version bump was on October 7, 2017 which is about 1.5 years after the bug was fixed. However, it at least lets us disable it for non-GLSLang and for more modern versions. Reviewed-by: Lionel Landwerlin <[email protected]>
* spirv: Whack sampler/image pointers to uniformJason Ekstrand2019-01-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | A long time in a galaxy far far away, there was a GLSLang bug with how it handled samplers passed in as function parameters. (The bug can be found here: https://github.com/KhronosGroup/glslang/issues/179.) Unfortunately, that version was shipped in several apps and has been causing heartburn for our SPIR-V parser ever since. Recent changes to NIR uncovered a moderately old bug in how we work around this issue. In particular, we ended up with a deref_cast from uniform to local which is not a no-op cast so nir_opt_deref wasn't getting rid of the cast. The only reason why it worked before was because someone just happened to call nir_fixup_deref_modes which "fixed" the cast (that shouldn't be happening) and then a later round of copy-prop would get rid of it. The fact that the deref_cast survived that long without causing trouble for other parts of NIR is a bit surprising. Just whacking the mode of the pointer seems to fix it fairly unobtrusively. Currently, only apps with this bug will have a local variable containing an image or sampler. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109304 Reviewed-by: Lionel Landwerlin <[email protected]>
* st/nir: Lower TES gl_PatchVerticesIn to a constant if linked with a TCS.Kenneth Graunke2019-01-111-0/+23
| | | | | | | | If the TCS and TES are linked together, we can simply replace the TES's gl_PatchVerticesIn system value with a constant, possibly allowing extra optimization or letting the driver avoid uploading a special value. Reviewed-by: Timothy Arceri <[email protected]>
* glsl/nir: keep bool types when native_integers=falseJonathan Marek2019-01-111-98/+63
| | | | | | | | With the new handling of bool types, the conversion to float in glsl_to_nir should not apply to bool types anymore. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl/nir: ftrunc for native_integers=false float to int castJonathan Marek2019-01-111-0/+4
| | | | | | | | out_type in the default cast case is always GLSL_TYPE_FLOAT, so we get a mov otherwise. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl/nir: int constants as float for native_integers=falseJonathan Marek2019-01-111-4/+12
| | | | | | | | | | | | All alu instructions emitted with native_integers=false expect float (or bool in some cases) constants, so this change is necessary. This will cause changes with some intrinsics which had integer sources, such as nir_intrinsic_load_uniform. Apparently it might cause issues with some opt passes, but perhaps those don't apply in OpenGL ES 2.0 cases? Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/peephole_ffma: Fix swizzle propagationJason Ekstrand2019-01-111-4/+7
| | | | | | | | | | | | | | | The num_components value passed into get_mul_for_src is used to only compose the parts of the swizzle that we know will be used so we don't compose invalid swizzle components. However, we had a bug where we passed the number of components of the add all the way through. For the given source, we need the number of components read from that source. In the case where we have a narrow add, say 2 components, that is sourced from a chain of wider instructions, we may not compose all the swizzles. All we really need to do is pass through the right number of components at each level. Fixes: 2231cf0ba3a "nir: Fix output swizzle in get_mul_for_src" Reviewed-by: Ian Romanick <[email protected]>
* nir: Allow a non-existent sampler deref in nir_lower_samplers_as_derefKenneth Graunke2019-01-111-19/+21
| | | | | | | | | | | | | | GL_ARB_gl_spirv does not provide a sampler deref for e.g. texelFetch(), so we can't assume that both are present and identical. Simply lower each if it is present. Fixes regressions in GL_ARB_gl_spirv tests since I switched everyone to using this pass. Thanks to Alejandro Piñeiro for catching these. Fixes: f003859f97c nir: Make gl_nir_lower_samplers use gl_nir_lower_samplers_as_deref Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Alejandro Piñeiro <[email protected]>
* travis: avoid using unset llvm-configEric Engestrom2019-01-111-6/+10
| | | | | | | | | | | Fixes the following errors: usage: which [-as] program ... /Users/travis/.travis/job_stages: line 110: --version: command not found ... caused by the use of an undefined $LLVM_CONFIG Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>