summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-11Merge branch 'master' of git://anongit.freedesktop.org/git/mesa/mesaHEADmasterKevin Brace8300-564582/+2276861
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2020-08-11util: Fix memory leaks in unit test.Vinson Lee1-0/+3
Fix warnings reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable bt1 going out of scope leaks the storage it points to. leaked_storage: Variable bt2 going out of scope leaks the storage it points to. Fixes: d0d14f3f6481 ("util: Add unit test for stack backtrace caputure") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6246>
2020-08-11src/mesa: add GL_NV_half_float extension support (v2)Yogesh Mohan Marimuthu11-0/+618
This patch adds support for GL_NV_half_float extension. v2: fix main_test failure Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6219>
2020-08-11dri_util: Update internal_format to GL_RGB8 for MESA_FORMAT_B8G8R8X8_UNORMNanley Chery1-1/+1
Port the change done for RGBX8888 in 02a1f95386b43bf46cd1c8297d0955242f554fa2. If XR24 images are considered to be VIEW_CLASS_24_BITS-compatible, it's reasonable to assume that XB24 images would be as well. Fixes: bf576772ab4d ("dri_util: add driImageFormatToSizedInternalGLFormat function") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6095>
2020-08-11aco: execute branch instructions in WQM if necessaryDaniel Schürmann1-6/+5
It could happen that only the branch condition was computed in WQM and not the branch instruction. There is now some rendundancy which should be cleaned up. Fixes: 3817fa7a4d1f51c385b28a2e45a1edf227526028 ('aco: fix WQM handling in nested loops') Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6260>
2020-08-11nir: nir_range_analysis needs to be updated for vec16Jesse Natalie1-1/+4
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6275>
2020-08-11aco: don't move memory accesses to before control barriersRhys Perry1-0/+6
Fixes random failures of dEQP-VK.image.qualifiers.volatile.cube_array.r32i and similar tests on Vega. fossil-db (Navi): Totals from 6 (0.00% of 135946) affected shaders: VMEM: 1218 -> 1110 (-8.87%); split: +2.46%, -11.33% SMEM: 174 -> 189 (+8.62%) Copies: 84 -> 87 (+3.57%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Fixes: cd392a10d05 ('radv/aco,aco: use scoped barriers') Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6174>
2020-08-11radv: limit LATE_ALLOC_GS to prevent a GPU hang on GFX10Samuel Pitoiset1-0/+4
Found by inspection, doesn't fix anything known. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6279>
2020-08-11radv/gfx10: add missing initialization of registersSamuel Pitoiset1-1/+29
Found by inspection. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6277>
2020-08-11etnaviv: completely turn off MSAAChristian Gmeiner1-9/+2
MSAA worked before etnaviv landed in upstream mesa but got broken over time. Disable MSAA completely until it is fixed again. Fixes problems/crashes with applications that want to make use of MSAA. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5608>
2020-08-11nir/lower_ssbo: Don't set align_* for atomicsAlyssa Rosenzweig1-2/+4
Fixes crashes when lowering atomic SSBOs: run: ../src/compiler/nir/nir.h:1875: nir_intrinsic_align_mul: Assertion `info->index_map[NIR_INTRINSIC_ALIGN_MUL] > 0' failed. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6204>
2020-08-11anv: add a check for depthStencilState before using itTapani Pälli1-40/+34
v2: move the code under existing correct check! Fixes: e4590c075009 ("anv: depth/stencil dynamic state support") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3375 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6240>
2020-08-11anv: fix up dynamic clip emissionLionel Landwerlin2-21/+37
There were 2 issues : * We were not emitting the clip state when the pipeline changed * On Gen7 we did not program the front facing & cull mode dynamic values in the clip state Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: c34d8ac26e0a21 ("anv: handle dynamic viewport count") Closes https://gitlab.freedesktop.org/mesa/mesa/-/issues/3379 Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6265>
2020-08-11anv: centralize vk to gen arraysLionel Landwerlin4-160/+92
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6265>
2020-08-11freedreno/decode: try harder to not crash in disasmRob Clark4-38/+43
Move the handling for catching asserts when we start decoding garbage into disasm-a3xx. This way it can also cover other cases where cffdec tries to disassemble memory, such as SP_xS_OBJ_START. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6242>
2020-08-11freedreno/crashdec: handle section name typosRob Clark2-7/+28
The fixes tag isn't so much because it was incorrect before, but because I'm going to send a kernel patch to fix the typo, and that will break old crashdec. Fixes: 1ea4ef0d3be ("freedreno: slurp in decode tools") Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6242>
2020-08-11freedreno/ir3: add more disasm statsRob Clark5-48/+117
Add tracking for # of instructions per category, similar to the last patch. Also add a few other shader-db stats that were missing on the disasm side, to make it easier to compare to shaders from cmdstream traces. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6243>
2020-08-11freedreno/ir3: add tracking for # of instructions per categoryRob Clark4-4/+38
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6243>
2020-08-10gallium/u_transfer_helper: add util functions for doing deinterleaving ↵Mike Blumenkrantz2-1/+134
during map in some cases (e.g., zink and d3d12) we only want to split the depth and stencil buffers when we're mapping them, and we can handle packed buffers in other cases, so being able to reuse the u_transfer_helper functionality is still desired but only if we can preserve the underlying buffer the rest of the time Kenneth Graunke notes during post-review: Vulkan reads/copies on packed Z24S8 only return depth, so we need to use separate Z24 and S8 reads and do packing tricks. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5338>
2020-08-10gallium: add pipe_transfer_usage for z/s only mappingsMike Blumenkrantz1-0/+10
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5338>
2020-08-10intel/fs: work around gen12 lower-precision source modifier limitationMark Janes1-1/+14
GEN:BUG:1604601757 prevents source modifiers for multiplication of lower precision integers. lower_mul_dword_inst() splits 32x32 multiplication into 32x16, and needs to eliminate source modifiers in this case. Closes: #3329 Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2020-08-10intel/fs: Assert if lower_source_modifiers converts 32x16 to 32x32 ↵Mark Janes1-0/+6
multiplication Lowering source modifiers will convert a 16bit source to a 32bit value. In the case of integer multiplication, this will reverse previous lowering performed by lower_mul_dword_inst. Assert to prevent an illegal DxD operation (and GPU hang). Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2020-08-10android: pan/bi: Separate disasm/compiler targetsMauro Rossi3-3/+33
Fixes the following building errors: ld.lld: error: undefined symbol: bi_interp_mode_name >>> referenced by bi_print.c:207 (external/mesa/src/panfrost/bifrost/bi_print.c:207) ... ld.lld: error: undefined symbol: bi_round_mode_name >>> referenced by bi_print.c:285 (external/mesa/src/panfrost/bifrost/bi_print.c:285) ld.lld: error: undefined symbol: bi_clause_type_name >>> referenced by disassemble.c:142 (external/mesa/src/panfrost/bifrost/disassemble.c:142) ... ld.lld: error: undefined symbol: bi_ldst_type_name >>> referenced by disassemble.c:0 (external/mesa/src/panfrost/bifrost/disassemble.c:0) Fixes: 14bb72c68 ("pan/bi: Separate disasm/compiler targets") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
2020-08-10android: pan/mdg: Separate disassembler and compiler targetsMauro Rossi3-1/+35
Fixes the following building errors: ld.lld: error: undefined symbol: mir_print_constant_component >>> referenced by disassemble.c:356 (external/mesa/src/panfrost/midgard/disassemble.c:356) ... ld.lld: error: undefined symbol: mir_print_constant_component >>> referenced by disassemble.c:416 (external/mesa/src/panfrost/midgard/disassemble.c:416) Fixes: b792d613e ("pan/mdg: Separate disassembler and compiler targets") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
2020-08-10android: panfrost: Move pandecode into lib/Mauro Rossi5-55/+2
Fixes the following building errors: target C: libpanfrost_decode <= external/mesa/src/panfrost/pandecode/common.c ... clang: error: no such file or directory: 'external/mesa/src/panfrost/pandecode/common.c' clang: error: no input files Fixes: d62a6e7c5 ("panfrost: Move pandecode into lib/") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
2020-08-10android: panfrost: Rename encoder/ to lib/Mauro Rossi6-31/+31
Fixes the following building errors: target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_attributes.c ... clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_attributes.c' clang: error: no input files target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_afbc.c ... clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_afbc.c' clang: error: no input files Fixes: 1c62b5528 ("panfrost: Rename encoder/ to lib/") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
2020-08-10aco: set constant_data_offset correctly in the case of merged shadersRhys Perry1-10/+8
setup_nir() is done for all shaders before any of them are selected, so constant_data_offset could be incorrect for the first shader. Fixes incorrect geometry in Mafia III and Max Payne 3. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2768 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6205>
2020-08-10radeon/vcn: fix jpeg decode for navi10Thong Thai1-1/+1
Fixes an issue where the JPEG decode would timeout when decoding certain JPEG files. Signed-off-by: Thong Thai <thong.thai@amd.com> Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6249>
2020-08-10radv: Do not consider layouts fast-clearable on compute queue.Bas Nieuwenhuizen1-1/+2
We cannot decompress from the compute queue. While I'm pretty sure VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL is only useful on the graphics queue, I cannot find a VU that prevents the transition from happening on another queue, so we need to be careful here. This patch ensures we do the decompression on the barrier that changes the queue ownership. Another problem was that DCC images were considered fast-clearable when not DCC compressed, which resulted in a mess with concurrent queue ownership. Cc: <mesa-stable@lists.freedesktop.org> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3387 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6252>
2020-08-10radv: Add forcecompress debug flag.Bas Nieuwenhuizen4-11/+26
Enables DCC/HTILE/CMASK/FMASK when supported, not just when we think it is beneficial. This is helpful to detect compression bugs with CTS. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6252>
2020-08-10intel/perf: export performance counters sorted by [group|set] and nameMarcin Ślusarz1-7/+67
It's a lot easier to deal with them in RenderDoc when they are in some meaningful order. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
2020-08-10intel/perf: split load_oa_metricsMarcin Ślusarz1-12/+18
Move oa_metrics_available out of load_oa_metrics and call build_unique_counter_list outside. This change is a preparation for the next patch. It should not have any functional impact. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
2020-08-10intel/perf: fix performance counters availability after glFinishMarcin Ślusarz5-16/+19
Currently Linux kernel gathers performance counters at fixed intervals (~5-10ms), so if application uses AMD_performance_monitor extension and immediately after glFinish() asks GL driver for HW performance counter values it might not get any data (values == 0). Fix this by moving the "read counters from kernel" code from "is query ready" to "get counter values" callback with a loop around it. Unfortunately it means that the "read counters from kernel" code can spin for up to 10ms. Ideally kernel should gather performance counters whenever we ask it for counter values, but for now we have deal with what we have. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
2020-08-10intel/perf: streamline error handling in read_oa_samples_untilMarcin Ślusarz1-12/+16
No functional changes. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
2020-08-10intel/perf: fix how pipeline stats are storedMarcin Ślusarz1-1/+1
It matters only when counters are not ordered by offset. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
2020-08-10intel/perf: fix calculation of used counter spaceMarcin Ślusarz1-1/+3
It matters only when counters are not ordered by offset. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
2020-08-10radv: report a better error message when QueueWaitIdle() failedSamuel Pitoiset1-2/+20
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6230>
2020-08-10radv: report errors back to the application via VK_EXT_debug_reportSamuel Pitoiset2-9/+26
Help for debugging. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6230>
2020-08-10radv: rework the error function helpers a bitSamuel Pitoiset2-8/+28
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6230>
2020-08-10radv: report the spirv-nir logs back to the applicationSamuel Pitoiset1-0/+39
Via VK_EXT_debug_report to help debugging various SPIRV->NIR issues. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6223>
2020-08-10radv: Fix assert that is too strict.Bas Nieuwenhuizen1-2/+2
The added assert fails on MSAA images if we disable FMASK .... Reordered things. Fixes: c6aadbae715 "radv: Don't use both DCC and CMASK for single sample images." Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3385 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6232>
2020-08-10radeon/radeon_vce: fix out of target bitrate in CBR mode (H.264)Louis Li1-1/+11
StoneyRidge may not comply to required target bitrate when generating H.264 stream in CBR mode. Signed-off-by: Louis Li <Ching-shih.Li@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4384>
2020-08-09r600: Enable compute shaders for NIR code pathGert Wollny1-5/+1
There are still regessions compared to TGSI, but there are also many fixes. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-08-09r600/sfn: Force a minimum of 4 GPRs, it seems to fix atomicsGert Wollny1-0/+2
This fixes spec@arb_compute_shader@execution@atomic-counter on HD 5450 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-08-09r600/sfn: handle querying SSBO sizeGert Wollny2-0/+29
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-08-09r600/sfn: Correct ssbo instruction handlingGert Wollny2-7/+38
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-08-09r600/sfn: correct allocating and emitting of atomicsGert Wollny3-27/+23
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-08-09r600/sfn: Add a mapping table for atomicsGert Wollny3-0/+14
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-08-09r600/sfn: add r600 specific lowering pass for atomics and use itGert Wollny1-0/+133
v2: rebase to use global variable lists Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-08-09r600/sfn: Sort uniforms by binding and offsetGert Wollny1-0/+28
This is required to get atomics right. v2: rebase to use global variable lists Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>