summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* intel/compiler: handle GLSL_TYPE_INTERFACE as GLSL_TYPE_STRUCTCaio Marcelo de Oliveira Filho2019-03-233-3/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* spirv: Add an execution environment to the optionsCaio Marcelo de Oliveira Filho2019-03-232-0/+9
| | | | | | | | | | Also updates gl_spirv to pick the right one. At the moment nothing uses it, but upcoming functionality part of ARB_gl_spirv will use it, and we also later can be more assertful when handling certain features for each of the execution environments. Reviewed-by: Alejandro Piñeiro <[email protected]> Acked-by: Karol Herbst <[email protected]>
* egl: Add a 565 pbuffer-only EGL config under X11.Eric Anholt2019-03-221-0/+47
| | | | | | | | | | | | | | The CTS requires a 565-no-depth-no-stencil (meaning d/s not-required, not not-present) config for ES 3.0, but at depth 24 of X11 we wouldn't do so. We can satisfy that bad requirement using a pbuffer-only visual with whatever other buffers the driver happens to have given us. I've tried to raise this as an absurd requirement with Khronos and made no progress. v2: Make sure it's single sample, no depth, no stencil. Comment typo fix Reviewed-by: Adam Jackson <[email protected]>
* nir: Handle array-deref-of-vector case in loop analysisCaio Marcelo de Oliveira Filho2019-03-221-3/+6
| | | | | | | SPIR-V can produce those for SSBO and UBO access. Found when testing the ARB_gl_spirv series. Reviewed-by: Timothy Arceri <[email protected]>
* freedreno: add ESSL capRob Clark2019-03-221-0/+7
| | | | | | | | | Report 320 for a6xx, which isn't *quite* true (no geom/tess, in particular), but other caps keep the reported GL and GLSL versions correct (3.1 / 3.10 es). But reporting 320 will switch on EXT_gpu_shader5, which is the goal. Signed-off-by: Rob Clark <[email protected]>
* mesa/st: use ESSL cap top enable gpu_shader5Rob Clark2019-03-221-3/+14
| | | | | | | | | | | | | For GLES2+ contexts, enable EXT_gpu_shader5 if the driver exposes a sufficiently high ESSL feature level, even if the GLSL feature level isn't high enough. This allows drivers to support EXT_gpu_shader5 in GLES contexts before they support all the additional features of ARB_gpu_shader5 in GL contexts. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add PIPE_CAP_ESSL_FEATURE_LEVELRob Clark2019-03-223-0/+14
| | | | | | | | | | | | | Adds a new cap to allow drivers to expose higher shading language versions in GLES contexts, to avoid having to report an artificially low version for the benefit of GL contexts. The motivation is to expose EXT_gpu_shader5 even though a driver may not support all the features needed for the corresponding GL extension (ARB_gpu_shader5). Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* swr: Fix build with llvm-9.0.Vinson Lee2019-03-222-0/+24
| | | | | | | | | | | | | | | | | Fix build error after llvm-9.0svn r352827 ("[opaque pointer types] Add a FunctionCallee wrapper type, and use it."). In file included from ./rasterizer/jitter/builder.h:158:0, from swr_shader.cpp:35: ./rasterizer/jitter/gen_builder_meta.hpp: In member function ‘llvm::Value* SwrJit::Builder::VGATHERPD(llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, const llvm: :Twine&)’: ./rasterizer/jitter/gen_builder_meta.hpp:51:117: error: no matching function for call to ‘cast(llvm::FunctionCallee)’ Function* pFunc = cast<Function>(JM()->mpCurrentModule->getOrInsertFunction("meta.intrinsic.VGATHERPD", pFuncTy)); ^ Suggested-by: Philip Meulengracht <[email protected]> Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Alok Hota <[email protected]>
* spirv,nir: lower frexp_exp/frexp_sig inside a new NIR passSamuel Pitoiset2019-03-229-133/+221
| | | | | | | | | | This lowering isn't needed for RADV because AMDGCN has two instructions. It will be disabled for RADV in an upcoming series. While we are at it, factorize a little bit. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: use generic float types for frexp_exp and frexp_sigSamuel Pitoiset2019-03-221-2/+2
| | | | | | | Only the exponent needs to be 32-bit signed integer. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Fix anonymous union initialization with older GCC.Vinson Lee2019-03-221-4/+6
| | | | | | | | | | | | | | | | | | | | Fix this build error with GCC 4.4.7. CC nir/nir_opt_copy_prop_vars.lo nir/nir_opt_copy_prop_vars.c: In function ‘load_element_from_ssa_entry_value’: nir/nir_opt_copy_prop_vars.c:454: error: unknown field ‘ssa’ specified in initializer nir/nir_opt_copy_prop_vars.c:455: error: unknown field ‘def’ specified in initializer nir/nir_opt_copy_prop_vars.c:456: error: unknown field ‘component’ specified in initializer nir/nir_opt_copy_prop_vars.c:456: error: extra brace group at end of initializer nir/nir_opt_copy_prop_vars.c:456: error: (near initialization for ‘(anonymous).<anonymous>’) nir/nir_opt_copy_prop_vars.c:456: warning: excess elements in union initializer nir/nir_opt_copy_prop_vars.c:456: warning: (near initialization for ‘(anonymous).<anonymous>’) Fixes: 96c32d77763c ("nir/copy_prop_vars: handle load/store of vector elements") Signed-off-by: Vinson Lee <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109810 Reviewed-by: Andres Gomez <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* iris: Push heavy memchecker code to DEBUGChris Wilson2019-03-222-1/+13
| | | | | | | | | | | | | | | | Invoking VALGRIND_CHECK_MEM_IS_DEFINED pulls in enough code to convince gcc to not inline __gen_uint and results in a lot of packing code ending up out-of-line with lots of stack copying. To ameliorate this, only insert the check inside the packer if DEBUG is defined and instead perform the validation checking before submitting the batch to the kernel. This should give accurate results if --trace-origins=yes is used, and failing that we can recompile in full debug mode to check on insertion. Improve drawoverhead baseline by 25% with a default build with valgrind-dev installed (with effectively no loss of vg coverage). Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Fix batch chaining map_next increment.Kenneth Graunke2019-03-221-1/+1
| | | | Caught by Chris Wilson; split out from his valgrind patch.
* freedreno/ir3: disable early-z for SSBO/image writesRob Clark2019-03-221-0/+12
| | | | | | | | | | | Fixes: dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_depth dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_stencil dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_depth_fbo dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_stencil_fbo Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: rename has_kill to no_earlyzRob Clark2019-03-229-10/+10
| | | | | | | There are other cases where we need to disable early-z, like image writes. So rename to something more generic. Signed-off-by: Rob Clark <[email protected]>
* ac/nir: implement 16-bit pack/unpack opcodesRhys Perry2019-03-221-0/+24
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* vulkan/overlay: improve error reportingLionel Landwerlin2019-03-221-125/+89
| | | | | | | | We can show the actual command & line where the failure happened Signed-off-by: Lionel Landwerlin <[email protected]> Suggested-by: Tapani Pälli <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: check return value of swapchain get imagesLionel Landwerlin2019-03-221-8/+11
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: silence validation layer warningsLionel Landwerlin2019-03-221-5/+5
| | | | | | | v2: Drop call to FreeDescriptorSet Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: properly register layer object with loaderLionel Landwerlin2019-03-221-9/+24
| | | | | | | | This is required by the validation layers if we want to validate the commands inserted by the overlay layer. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* radv: Fix driverUUIDJózef Kucia2019-03-221-1/+1
| | | | | | Fixes: 14cad8786a8 ("radv: generate the same driver UUID as radeonsi") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: Cross validate variable's invariance by explicit invariance onlyDanylo Piliaiev2019-03-217-9/+30
| | | | | | | | | | | | | | | | | | 'invariant' qualifier is propagated on variables which are used to calculate other invariant variables, however when we are matching variable's declarations we should take into account only explicitly declared invariance because invariance propagation is an implementation specific detail. Thus new flag is added to ir_variable_data which indicates 'invariant' qualifier being explicitly set in the shader. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100316 Fixes: 89b60492 ('glsl: Add a pass to propagate the "invariant" and "precise" qualifiers') Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Fix GL_NUM_DEVICE_UUIDS_EXTJózef Kucia2019-03-221-0/+3
| | | | | Cc: [email protected] Reviewed-by: Tapani Pälli <[email protected]>
* iris: Skip resolves and flushes altogether if unnecessaryKenneth Graunke2019-03-213-9/+27
| | | | Improves drawoverhead baseline scores by 1.17x.
* iris: Skip framebuffer resolve tracking if framebuffer isn't dirtyKenneth Graunke2019-03-212-70/+84
| | | | Improves drawoverhead baseline score by 1.86x.
* iris: Skip input resolve handling if bindings haven't changedKenneth Graunke2019-03-213-10/+19
| | | | | This brings the drawoverhead 16 Tex w/ no state change score from 22% of baseline to 97% of baseline.
* iris: Fix util_vma_heap_init size for IRIS_MEMZONE_SHADERKenneth Graunke2019-03-211-1/+1
| | | | Fixes assertions when disabling bucket allocators.
* softpipe: fix integer texture swizzling for 1 vs 1.0fDave Airlie2019-03-221-4/+5
| | | | | | | | The swizzling was putting float one in not integer 1. This fixes a lot of arb_texture_view-rendering-formats cases. Reviewed-by: Brian Paul <[email protected]>
* softpipe: remove shadow_ref assert.Dave Airlie2019-03-221-1/+0
| | | | | | | | | | | | I don't think this really buys us anything and TG4 with cubemap arrays falls over because sampler == 2, but otherwise works fine. Fixes: ./bin/textureGather fs shadow r CubeArray repeat on softpipe with ARB_gpu_shader5 enabled. Reviewed-by: Brian Paul <[email protected]>
* softpipe: handle 32-bit bitfield insertsDave Airlie2019-03-221-3/+7
| | | | | | Fixes piglits if ARB_gpu_shader5 is enabled Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix 32-bit bitfield extractDave Airlie2019-03-221-2/+12
| | | | | | | | These didn't deal with the width == 32 case that TGSI is defined with. Fixes piglit tests if ARB_gpu_shader5 is enabled. Reviewed-by: Brian Paul <[email protected]>
* nir: fix opt_if_loop_last_continue()Timothy Arceri2019-03-221-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than skipping code that looked like this: loop { ... if (cond) { do_work_1(); continue; } else { break; } do_work_2(); } Previously we would turn this into: loop { ... if (cond) { do_work_1(); continue; } else { do_work_2(); break; } } This was clearly wrong. This change checks for this case and makes sure we now leave it for nir_opt_dead_cf() to clean up. Reviewed-by: Ian Romanick <[email protected]>
* anv: fix build on NougatGurchetan Singh2019-03-214-6/+22
| | | | | | AHardwareBuffer is only available on O and above. Reviewed-by: Tapani Pälli <[email protected]>
* anv: move anv_GetMemoryAndroidHardwareBufferANDROID up a bitGurchetan Singh2019-03-211-28/+28
| | | | | | No functional change, just makes the next patch a little easier. Reviewed-by: Tapani Pälli <[email protected]>
* v3d: Remove some dead members of struct v3d_compile.Eric Anholt2019-03-211-12/+0
| | | | These are more vc4 leftovers.
* v3d: Upload all of UBO[0] if any indirect load occurs.Eric Anholt2019-03-214-167/+20
| | | | | | | | | | | | | | | The idea was that we could skip uploading the constant-indexed uniform data and just upload the uniforms that are variably-indexed. However, since the VS bin and render shaders may have a different set of uniforms used, this meant that we had to upload the UBO for each of them. The first case is generally a fairly small impact (usually the uniform array is the most space, other than a couple of FSes in shader-db), while the second is a larger impact: 3DMMES2 was uploading 38k/frame of uniforms instead of 18k. Given that the optimization is of dubious value, has a big downside, and is quite a bit of code, just drop it. No change in shader-db. No change on 3DMMES2 (n=15).
* v3d: Move constant offsets to UBO addresses into the main uniform stream.Eric Anholt2019-03-215-11/+22
| | | | | | | | | | We'd end up with the constant offset in the uniform stream anyway, since they're bigger than small immediates. Avoids the extra uniforms and adds in the shader in favor of just adding once on the CPU. shader-db: total instructions in shared programs: 6496865 -> 6494851 (-0.03%) total uniforms in shared programs: 2119511 -> 2117243 (-0.11%)
* v3d: Rename v3d_tmu_config_data to v3d_unit_data.Eric Anholt2019-03-213-13/+13
| | | | | | I want to reuse this for encoding small constant UBO/SSBO offsets into the uniform stream to reduce the extra uniform loads and adds for the small constant offsets.
* configure.ac/meson.build: Add options for library suffixesBenjamin Gordon2019-03-215-21/+21
| | | | | | | | | | | | | | | | | When building the Chrome OS Android container, we need to build copies of mesa that don't conflict with the Android system-supplied libraries. This adds options to create suffixed versions of EGL and GLES libraries: libEGL.so -> libEGL${egl-lib-suffix}.so libGLESv1_CM.so -> libGLESv1_CM${gles-lib-suffix}.so libGLESv2.so -> libGLES${gles-lib-suffix}.so This is similar to what happens when --enable-libglvnd is specified, but without the side effects of linking against libglvnd. To avoid unexpected clashes with the suffixed appended by libglvnd, make it an error to specify both --enable-libglvnd and --with-egl-lib-suffix. Reviewed-by: Eric Engestrom <[email protected]>
* nir: Record non-vector/scalar varyings as unmovable when compactingKenneth Graunke2019-03-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | In some cases, we can end up with varying structs that aren't split to their member variables. nir_compact_varyings attempted to record these as unmovable, so it would leave them be. Unfortunately, it didn't do it right for non-vector/scalar types. It set the mask to: ((1 << (elements * dmul)) - 1) << var->data.location_frac where elements is the number of vector elements. For structures and other non-vector/scalars, elements is 0...so the whole mask became 0. This caused nir_compact_varyings to assign other varyings on top of the structure varying's location (as it appeared to take up no space). To combat this, we just set elements to 4 for non-vector/scalar types, so that the entire slot gets marked as unmovable. Fixes KHR-GL45.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_in on iris. Reviewed-by: Timothy Arceri <[email protected]>
* freedreno/ir3: dynamic UBO indexing vs 64b pointersRob Clark2019-03-211-2/+2
| | | | | | | Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.uniform_fragment and similar things with multiple UBOs Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix bit_countRob Clark2019-03-211-2/+23
| | | | | | | | | Seems like it can only work 16b at a time. Fixes dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.* TODO need to check if this limitation applies to a3xx as well. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: additional loweringRob Clark2019-03-211-0/+6
| | | | | | | | | For some things that show up when we expose higher glsl TODO check blob traces to see if we have instructions for some of this? I guess we don't but worth a check.. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: optimize sam.s2en to samRob Clark2019-03-213-6/+36
| | | | | | | Detect when sampler/texture idx are immediate and switch to non s2en encoding. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: enable indirect tex/samp (sam.s2en)Rob Clark2019-03-212-22/+73
| | | | | | | | | | For now it uses indirect for everything. The next step is for the ir3_cp pass to detect the case that tex and samp idx are immediate and convert the sam instruction back to the non .s2en variant. But doing that in a following patch so we can shake out the bugs with .s2en more easily. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: find # of samplers from uniform varsRob Clark2019-03-213-13/+13
| | | | | | | When we have indirect samplers, we cannot tell the max sampler referenced. Instead just refer to the number of sampler uniforms. Signed-off-by: Rob Clark <[email protected]>
* nir: move gls_type_get_{sampler,image}_count()Rob Clark2019-03-213-42/+45
| | | | | | | I need at least the sampler variant in ir3.. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* freedreno/ir3: fix regmask for merged regsRob Clark2019-03-212-3/+13
| | | | | | | | On a6xx+ with half-regs conflicting with full-regs, the legalize pass needs to set appropriate sync bits, such as (sy), on writes to full regs that conflict with half regs, and visa-versa. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix sam.s2en encodingRob Clark2019-03-212-9/+12
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix sam.s2en decodingRob Clark2019-03-211-3/+5
| | | | Signed-off-by: Rob Clark <[email protected]>