- Sep 16, 2020
-
-
Eric Engestrom authored
-
Eric Engestrom authored
-
To avoid using a dangling pointer. Closes: mesa/mesa#1308 Cc: mesa-stable Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com> Part-of: <mesa/mesa!6556> (cherry picked from commit 7d853966)
-
To avoid using a dangling pointer. See mesa/mesa#1308 Cc: mesa-stable Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com> Part-of: <mesa/mesa!6556> (cherry picked from commit eb60849e)
-
Closes: mesa/mesa#3230 Closes: mesa/mesa#2218 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!5789> (cherry picked from commit 25baceaf)
-
The param controls whether _mesa_destroy_debug_output should be called or not. No functional changes; this will be used by the next commit. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!5789> (cherry picked from commit 7f0b6a5d)
-
Use the _mesa_init_XXX / _mesa_destroy_XXX pattern to clearly associate the 2 functions. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!5789> (cherry picked from commit e6f7b431)
-
Use the lane mask instead of s2 for the register class. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <mesa/mesa!6699> (cherry picked from commit efa1c760)
-
This has been shown to help performance on TGL and DG1. This could be applied to gen9+, but we still need to show if it helps with those platforms. Rework: * Make change in src/intel/vulkan/genX_cmd_buffer.c too. (Ken) * Keep mask as 3 for gen < 12 Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!6684> (cherry picked from commit 20a4235c)
-
syncobj wait takes int64_t timeout and won't clamp it in kernel code, so we have to pass in INT64_MAX instead of OS_TIMEOUT_INFINITE which is UINT64_MAX. Otherwise syncobj wait with OS_TIMEOUT_INFINITE case just return fail. Fixes: c638301b "radeonsi: fix syncobj wait timeout" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <mesa/mesa!6676> (cherry picked from commit ef980ac0)
-
Remove the extra logical ORs in the ternary operation. Fixes: 5425fcf2 ("intel/blorp: Satisfy HIZ_CCS fast-clear alignments") Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!6650> (cherry picked from commit 1eff389b)
-
This allows GL 4.5 CTS to pass in full with no flags, other than that I'm not sure if it's a good or bad idea. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Cc: mesa-stable@lists.freedesktop.org Part-of: <mesa/mesa!6638> (cherry picked from commit b0722cb6)
-
The source argument for mov has index 1, not 0. Fixes a vertex shader in SuperTuxKart. Fixes: b4de9e03 ("pan/mdg: Mask spills from texture write") Reported-by: macc24 Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>~> Part-of: <mesa/mesa!6659> (cherry picked from commit a4885d26)
-
A couple of these probably aren't strictly necessary but they won't hurt. The one that's particularly tricky is a fixed-length array in nir_search.h. However, to avoid blowing up the binary size of nir_opt_algebraic by about 2x, we just assert that only small ops are used. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <mesa/mesa!6655> (cherry picked from commit d86e38af)
-
Storing a precomputed iova in reg packing wasn't possible because you'd truncate to 32 bits. Making it be .qword makes it possible. Cc: mesa-stable Part-of: <mesa/mesa!6592> (cherry picked from commit 3b3772d6)
-
SPIR-V's OpKill is a control-flow instruction but NIR's discard is not. Therefore, it can be valid SPIR-V to have if (...) { foo = /* something */ } else { discard; } use(foo); without any phi between the definition of foo and its use. This is not true in NIR, however, because NIR's discard isn't considered control-flow. Arguably, this is a NIR bug but making discard control- flow is a very deep change that can have serious ans subtle side-effects. The easier thing to do is just fix up the SSA in case we have an OpKill which might have gotten us into the above case. Fixes dEQP-VK.graphicsfuzz.vectors-and-discard-in-function with the new NIR dominance validation pass enabled. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <mesa/mesa!5288> (cherry picked from commit 7cedc412)
-
Fixes a case where opt_if_merge created code like: if (...) { break; loop { ... } } which caused opt_peel_loop_initial_if to complain that the loop pre-header wasn't a predecessor of the loop header. This patch prevents this (invalid, I think) unreachable code from being created. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Closes: mesa/mesa#3496 Fixes: 4d3f6cb9 ('nir: merge some basic consecutive ifs') Part-of: <mesa/mesa!6633> (cherry picked from commit 6cef8040)
-
Confirmed by an user on AMD HW that this driconf flag works around the issue. Gitlab: mesa/mesa#1535 CC: mesa-stable Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <mesa/mesa!6637> (cherry picked from commit 9b349187)
-
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com> Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com> Cc: mesa-stable closes #3454 Part-of: <mesa/mesa!6532> (cherry picked from commit 2c94a978)
-
syncobj wait takes absolute timeout value. Fixes: 16250237 "winsys/amdgpu: implement sync_file import/export" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <mesa/mesa!6579> (cherry picked from commit c638301b)
-
This reverts commit 4b9370cb. Fixes: 4b9370cb Closes: mesa/mesa#3429 Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <mesa/mesa!6284> (cherry picked from commit f8529420)
-
This patch fixes memory leaks when reply is allocated and is not freed on error execution path. Found by enabling address sanitizer on simple EGL app. ```c int main() { EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); EGLint major; EGLint minor; if (!eglInitialize(display, &major, &minor)) { return 1; } eglTerminate(display); return 0; } ``` Compiled with: `gcc testme.c -o testme -fsanitize=address -lasan -lEGL` Execution environment: - Windows 10, VMWare Player 15.5.2 build-15785246 without 3D accelaration - Guest OS: OpenSUSE Leap 15.2 - Mesa 19.3.4 Program output: ```sh ASAN_OPTIONS=fast_unwind_on_malloc=0 ./testme libEGL warning: DRI2: failed to authenticate ==52510==ERROR: LeakSanitizer: detected memory leaks Direct leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7fa62315f500 in malloc (/usr/lib64/libasan.so.4+0xdc500) #1 0x7fa61e12d86b (/usr/lib64/libxcb.so.1+0xf86b) #2 0x7fa61e12b5c7 (/usr/lib64/libxcb.so.1+0xd5c7) #3 0x7fa61e12cc3e (/usr/lib64/libxcb.so.1+0xec3e) #4 0x7fa61e12cd4f in xcb_wait_for_reply (/usr/lib64/libxcb.so.1+0xed4f) #5 0x7fa61ebe02a5 (/usr/lib64/libEGL_mesa.so.0+0x202a5) #6 0x7fa61ebdb5ca (/usr/lib64/libEGL_mesa.so.0+0x1b5ca) #7 0x7fa61ebd750c (/usr/lib64/libEGL_mesa.so.0+0x1750c) #8 0x7fa61ebd7554 (/usr/lib64/libEGL_mesa.so.0+0x17554) #9 0x7fa61ebd1107 (/usr/lib64/libEGL_mesa.so.0+0x11107) #10 0x400856 in main (/home/user/testme+0x400856) #11 0x7fa622ad8349 in __libc_start_main (/lib64/libc.so.6+0x24349) #12 0x4006e9 in _start (/home/user/testme+0x4006e9) SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s). ``` Signed-off-by: Andrey Vostrikov <av.linux.dev@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Cc: mesa-stable Part-of: <mesa/mesa!6611> (cherry picked from commit 42420730)
-
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Fixes: fe08f0cc ('aco: add byte_align_scalar() & trim_subdword_vector() helper functions') Part-of: <mesa/mesa!4710> (cherry picked from commit 8faf85f6)
-
Eric Engestrom authored
55765f80 replaced this with a check for the header itself. Fixes: 55765f80 ("util/u_thread: include pthread_np.h if found") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Jonathan Gray <jsg@jsg.id.au> Part-of: <mesa/mesa!6548> (cherry picked from commit 0f4d0944)
-
iris_resource_get_handle currently asserts that the resource has an aux state that is suitable for sharing. However, the caller of this function can pass a flag to specify that it will handle flushing/resolving the resource as needed for sharing. Take this flag into account when asserting the state of the aux buffer. Fixes: e8139286 ("iris/resource: Drop redundant checks for aux support") Closes: mesa/mesa#128 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!1371> (cherry picked from commit 3cf6325e)
-
The result of 0xf << 28 is a signed integer and hence overflows into the sign bit. In practice compilers did the right thing here, since the intent of the code was unsigned arithmetic anyway. Cc: mesa-stable Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <mesa/mesa!6568> (cherry picked from commit 93c8777a)
-
32-bit shifts were accidentally used before this change despite the intended output being 64 bits. This was observed when compiling Dolphin's ubershaders. Cc: mesa-stable Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <mesa/mesa!6568> (cherry picked from commit 2182bbf8)
-
The result of 0xf << 28 is a signed integer and hence overflows into the sign bit. In practice compilers did the right thing here, since the intent of the code was unsigned arithmetic anyway. These conditions were observed in: * dEQP-VK.pipeline.image.suballocation.sampling_type.combined.view_type.1d.format.r4g4b4a4_unorm_pack16.count_8.size.512x1 * dEQP-VK.binding_model.descriptorset_random.sets32.noarray.ubolimitlow.sbolimitlow.sampledimglow.outimgonly.noiub.nouab.frag.ialimithigh.0 Cc: mesa-stable Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <mesa/mesa!6568> (cherry picked from commit f18fc34c)
-
If decrement == 0 then: - it isn't safe to access the submission - even if it is, checking that the result of the atomic_sub is 0 doesn't given an unique owner anymore. So skip it. The submission always starts out with refcount >= 1, so first one to decrement to 0 still get dibs on executing it. Fixes: 4aa75bb3 "radv: Add wait-before-submit support for timelines." Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <mesa/mesa!6478> (cherry picked from commit 6b752629)
-
This can come up if, for instance, the shader does a derivative of a uniform or flat input. Ideally, NIR would use divergence analysis to get rid of the derivative in this case but it doesn't right now. This fixes a crash in F1 2017. Cc: mesa-stable@lists.freedesktop.org Reported-by: Marcin Ślusarz <marcin.slusarz@intel.com> Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <mesa/mesa!6564> (cherry picked from commit 8e8701b4)
-
We can get duplicate declarations for an index (for example dvec3 + float packed into 2 vec4s, the second one won't pack into the first's array decl), and we'd end up stepping by the wrong amount in GS vtx/prim emit. Fixes vs-gs-fs-double, sso-vs-gs-fs-array-interleave piglit tests. Fixes: 49155c32 ("draw/tgsi: fix geometry shader input/output swizzling") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!6567> (cherry picked from commit 329dee14)
-
start_offset is a byte offset. Fixes: 04a99515 Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <mesa/mesa!6557> (cherry picked from commit 87fa645b)
-
Eric Engestrom authored
-
Eric Engestrom authored
-
- Sep 02, 2020
-
-
Eric Engestrom authored
-
Eric Engestrom authored
-
Eric Engestrom authored
-
Fixes SPECviewperf 13 creo rendering. Closes: mesa/mesa#2639 Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!6259> (cherry picked from commit a1c2bd6c)
-
Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!6259> (cherry picked from commit b8445520)
-
Replace div(x) by min(div(x), FLT_MAX)) to avoid getting a NaN result when x is 0. A cheaper alternative would be to use legacy mult instructions but they're not exposed by LLVM. Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!6259> (cherry picked from commit 32f46a55)
-