summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-14radv: reduce the number of parameters export by the GS copy shaderHEADmasterSamuel Pitoiset1-4/+3
By using the geometry shader output usage mask. This improves all Vulkan demos that use a geometry shader (ie. geometryshader, deferredshadows, viewportarray). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-05-14radv: scan the geometry shader output usage maskSamuel Pitoiset2-0/+9
For reducing the number of parameters that are exported by the GS copy shader. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-05-14radv: run the shader info pass before emitting the GS copy shaderSamuel Pitoiset1-0/+2
For further optimizations. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-05-14radv: check that layout isn't NULL in radv_nir_shader_info_pass()Samuel Pitoiset1-1/+1
An upcoming patch will run the shader info pass on the geometry shader just before emitting the GS copy shader. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-05-14intel/blorp: Use linear formats for CCS_E clear colors in copiesJason Ekstrand1-2/+2
It's clear that the original code meant to do this and there is even a 10-line comment explaining why. Originally, we had a simple function for packing the clear colors which was unaware of sRGB. However, in a6b66a7b26ae1, when we started using ISL to do the packing, the wrong format was used. Fixes: a6b66a7b26 "intel/blorp: Use ISL instead of bitcast_color..." Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2018-05-14radv: Disable texel buffers with A2 SNORM/SSCALED/SINT for pre-vega.Bas Nieuwenhuizen1-0/+19
The hardware always interprets the alpha as unsigned and fixing it in the shader is going to add unacceptable overheads. CC: 18.0 18.1 <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106480 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-05-14radv: Fix up 2_10_10_10 alpha sign.Bas Nieuwenhuizen4-13/+98
Pre-Vega HW always interprets the alpha for this format as unsigned, so we have to implement a fixup to do the sign correctly for signed formats. v2: Improve indexing mess. CC: 18.0 18.1 <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106480 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-05-14radv: Add support for IMG_DATA_FORMAT_32_32_32.Bas Nieuwenhuizen3-4/+11
Basic sampling support for linear tiling. No CTS regressions, but it seems the blitting coverage is not very extensive. https://bugs.freedesktop.org/show_bug.cgi?id=106331 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-05-14radv: Translate logic ops.Bas Nieuwenhuizen2-30/+59
radeonsi could pass them through but the enum changed between Gallium and Vulkan, so we have to translate. In progress I made the register defines a bit more readable. CC: 18.0 18.1 <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100430 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-05-14radv: Fix multiview queries.Bas Nieuwenhuizen1-19/+20
This moves the extra queries to after the main query ended, instead of doing it after the begin and hence doing nesting. We also emit only (view count - 1) extra queries, as the main query is already there for the first view. This fixes the CTS occasionally getting stuck in dEQP-VK.multiview.queries* waiting on results. Fixes: 32b4f3c38dc "radv/query: handle multiview queries properly. (v3)" CC: 18.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-05-14meson: remove dependency antipatternEric Engestrom1-1/+1
`dep_valgrind != []` now (0.45) produces a warning that is quite explicit: WARNING: Trying to compare values of different types (DependencyHolder, list) using !=. The result of this is undefined and will become a hard error in a future Meson release. `dep_valgrind = []` used to be the recommended way to deal with non-existant dependency, but these don't work with `.found()`, so now the recommended way is to declare a impossible dependency, which null_dep does for us in Mesa. In short, we don't need and shouldn't check for `!= []` anywhere anymore. Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2018-05-14radv: remove useless check in radv_create_shaders()Samuel Pitoiset1-1/+1
radv_can_dump_shader() already handles if module is NULL. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-05-14radv: allow to dump the GS copy shader with RADV_DEBUG="shaders"Samuel Pitoiset3-5/+8
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-05-14radv: move {load,store}_var intrinsics scanning in different functionsSamuel Pitoiset1-47/+80
These are going to be crazy and we are probably going to add more scan stuff in the future. Also use switch cases instead. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-05-14android: change include "cutils/log.h" to "log/log.h" on Android API >=26jenny.q.cao4-0/+16
There is a compile warning from Android 8 (API version 26) from "include cutils/log.h" warning: "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h"-W#warnings, Change to include "log/log.h" on Android 8 or later major version to avoid this warning Signed-off-by: jenny.q.cao <jenny.q.cao@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-05-14llvmpipe: Fix random number generation for unit testsRoland Scheidegger2-2/+19
We were never producing negative numbers for signed types. Also fix only producing half the valid range for uint32, and properly clamp signed values. Because this now also properly tests snorm with actually negative values, need to increase eps for such conversions. I believe these cannot actually be hit in ordinary operation (e.g. if a snorm texture is sampled and output to snorm RT, it will still go through snorm->float and float->snorm conversion), so don't bother to do anything to fix the bad accuracy (might be quite complex). Basically, the issue is for something like snorm16->snorm8 that in the end this will just use a 8 bit arithmetic right shift. But the math behind it says we should actually do a division by 32767 / 127, which is ~258, not 256. So the result can be one bit off (values have too large magnitude), and furthermore, the shift has incorrect rounding (always rounds down). For positive numbers, these errors have different direction, but for negative ones they have the same, hence for some values the error will be 2 bit in the end. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106232
2018-05-14radv: use compute path for multi-layer images.Dave Airlie1-0/+2
I don't think the hw resolve path can't handle multi-layer images. This fixes all the: dEQP-VK.renderpass.multisample_resolve.layers_* tests on my VI card. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: <mesa-stable@lists.freedesktop.org>
2018-05-14radv: resolve all layers in compute resolve path.Dave Airlie1-6/+42
This path should iterate across all layers, I've some ideas for doing this in a single pass, but this is simpler for now. This passes the tests because we don't use the fragment path unless we have DCC, and we don't have DCC on layered images. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: <mesa-stable@lists.freedesktop.org>
2018-05-14radv/resolve: do fmask decompress on all layers.Dave Airlie1-1/+1
For a multi-layer subpass resolve we want to make sure we flush all the layers. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: <mesa-stable@lists.freedesktop.org>
2018-05-13nvc0: fix setting of subpixel precision during conservative rasterizationRhys Perry2-2/+2
Fixes: 07dac3e040 ("nvc0: add conservative rasterization support") Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-05-12anv,nir: add generated files to .gitignore(s)Rhys Perry2-0/+3
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-05-12gallium: remove aux_vertex_buffer_slot codeMarek Olšák11-95/+45
The slot index is always 0, and is pretty unlikely to change in the future. Reviewed-by: Brian Paul <brianp@vmware.com>
2018-05-13radv: add initial support for VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BITTimothy Arceri4-16/+28
When VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT is set we skip NIR linking optimisations and only run over the NIR optimisation loop once similar to the GLSLOptimizeConservatively constant used by some GL drivers. We need to run over the opts at least once to avoid errors in LLVM (e.g. dead vars it can't handle) and also to reduce the time spent compiling the IR in LLVM. With this change the Blacksmith Unity demos compilation times go from 329760 ms -> 299881 ms when using Wine and DXVK. V2: add bit to radv_pipeline_key Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106246
2018-05-12scons: Add PROGRAM_NIR_FILES.Vinson Lee1-0/+1
Fix SCons build error. Linking build/linux-x86_64-debug/gallium/targets/libgl-xlib/libGL.so.1.5 ... build/linux-x86_64-debug/mesa/libmesa.a(st_program.os): In function `st_translate_prog_to_nir': src/mesa/state_tracker/st_program.c:392: undefined reference to `prog_to_nir' Fixes: 5c33e8c7729e ("st/nir: use NIR for asm programs") Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2018-05-12st/nir: use NIR for asm programsTimothy Arceri1-7/+58
Reviewed-by: Eric Anholt <eric@anholt.net>
2018-05-12st/nir: make st_nir_opts() available externallyTimothy Arceri2-1/+3
The following patch will make use of this for asm style programs. Reviewed-by: Eric Anholt <eric@anholt.net>
2018-05-11radeon/vce: add firmware support for ver 53 and upBoyuan Zhang1-2/+2
All vce firmwares with major version greater than or equal to 53 are supported Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2018-05-11etnaviv: remove pipe_fence_handle::ctxRob Clark1-2/+0
A fence can outlive the ctx it was created from (see glmark2).. etnaviv doesn't actually need fence->ctx so lets remove it before someone makes the mistake of assuming it is a valid pointer. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-05-11swr/rast: Thread locked tiles improvementGeorge Kyriazis7-24/+152
- Change tilemgr TILE_ID encoding to use Morton-order (Z-order). - Change locked tiles set to bitset. Makes clear, set, get much faster. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-05-11swr/rast: Add Builder::GetVectorType()George Kyriazis2-0/+45
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-05-11swr/rast: Prepend the console output with a newlineGeorge Kyriazis1-1/+1
It can get jumbled with output from other threads. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-05-11swr/rast: Add ConcatLists()George Kyriazis1-0/+6
for concatenating lists Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-05-11swr/rast: Add constant initializer for uint64_tGeorge Kyriazis2-0/+6
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-05-11swr/rast: Use binner topology to assemble backend attributesGeorge Kyriazis1-1/+1
Previously was using the draw topology, which may change if GS or Tess are active. Only affected attributes marked with constant interpolation, which limited the impact. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-05-11swr/rast: Change formattingGeorge Kyriazis1-1/+6
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-05-11meson: Fix build for egl platform_x11 with dri3Ville Syrjälä1-0/+1
platform_x11 with dri3 needs inc_loader. In file included from ../src/egl/drivers/dri2/platform_x11_dri3.c:35:0: ../src/egl/drivers/dri2/egl_dri2.h:41:32: fatal error: loader_dri3_helper.h: No such file or directory In file included from ../src/egl/drivers/dri2/platform_x11.c:46:0: ../src/egl/drivers/dri2/egl_dri2.h:41:32: fatal error: loader_dri3_helper.h: No such file or directory In file included from ../src/egl/drivers/dri2/egl_dri2.c:61:0: ../src/egl/drivers/dri2/egl_dri2.h:41:32: fatal error: loader_dri3_helper.h: No such file or directory Cc: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-05-11radv: move ac_build_if_state on top of radv_nir_to_llvm.cSamuel Pitoiset1-91/+92
These helpers will be needed for future work. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-05-11radv: minor cleanups in radv_fill_shader_variant()Samuel Pitoiset1-14/+15
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-05-10winsys/amdgpu: Destroy dev_hash table when the last winsys is removed.Jan Vesely1-1/+6
Fixes memory leak on module unload. CC: <mesa-stable@lists.freedesktop.org> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-05-10ac/gpu_info: add has_read_registers_queryMarek Olšák4-3/+6
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add has_2d_tilingMarek Olšák4-5/+6
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add has_sparse_vm_mappingsMarek Olšák4-11/+12
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add has_unaligned_shader_loadsMarek Olšák4-5/+8
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10radeonsi: expose ARB_query_buffer_object on ancient kernels tooMarek Olšák1-3/+1
It doesn't use indirect dispatches. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add has_indirect_compute_dispatchMarek Olšák4-13/+11
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add kernel_flushes_tc_l2_after_ibMarek Olšák4-2/+7
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add has_format_bc1_through_bc7Marek Olšák4-6/+7
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add has_eqaa_surface_allocatorMarek Olšák4-3/+7
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10radeonsi: clean up the reset status query implementationMarek Olšák5-23/+26
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-05-10ac/gpu_info: add has_bo_metadataMarek Olšák4-2/+5
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>