- Sep 02, 2020
-
-
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)
-
This fixes specviewperf13 catia test rendering. Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!6259> (cherry picked from commit f8c0e201)
-
If supported this means that src_x/src_y/width/height parameters of CopyTex functions will not be clipped using the read framebuffer's dimensions. Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!6259> (cherry picked from commit d94bec5c)
-
Only advertise VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT if CLOCK_MONOTONIC_RAW is defined. Fixes the build on OpenBSD which has CLOCK_MONOTONIC but not CLOCK_MONOTONIC_RAW. Fixes: 67a2c149 ("vulkan: Add VK_EXT_calibrated_timestamps extension (radv and anv) [v5]") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!6517> (cherry picked from commit 4500e6e4)
-
Return the smallest value of available non-kernel physical memory and the static per process data size limit as the amount of available system memory on OpenBSD. Fixes: b80930a6 ("anv: add support for VK_EXT_memory_budget") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!6517> (cherry picked from commit b30bd6fe)
-
Replace local get_available_system_memory() function with os_get_available_system_memory(). Fixes: b80930a6 ("anv: add support for VK_EXT_memory_budget") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <!6517> (cherry picked from commit 5b1ed09f)
-
Add os_get_available_system_memory() derived from src/intel/vulkan/anv_device.c get_available_system_memory() Fixes: b80930a6 ("anv: add support for VK_EXT_memory_budget") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!6517> (cherry picked from commit 033dcb29)
-
Replace non-portable sysinfo() use with Mesa's os_get_total_physical_memory() Fixes: 060a6434 ("anv: Advertise larger heap sizes") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!6517> (cherry picked from commit 81b163fb)
-
The raw query is meant to be used with MDAPI [1]. When using this metric without this library, we usually selected the TestOa metric to provide some default sensible values (instead of undefined). Historically this TestOa metric lived in the kernel at ID=1. We removed all metrics from the kernel in kernel commit 9aba9c188da136 ("drm/i915/perf: remove generated code"). This fixes the Mesa code to use a valid metric set ID (1 could work some of the time, but not guaranteed). [1] : https://github.com/intel/metrics-discovery v2: Store fallback metric at init time v3: Drop TestOa lookout v4: Skip the existing queries (Marcin) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> CC: <mesa-stable@lists.freedesktop.org> Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com> (v1) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!6438> (cherry-picked from commit ec1fa1d5)
-
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!6438> (cherry-picked from commit f1da3bb3)
-
The immediate case is pretty uncommon to see but it can happen, in theory. BROADCAST is typically used to uniformize values and those are usually 32-bit. However, it does come up in some subgroup ops. Fixes: 49c21802 "intel/compiler: Split has_64bit_types into float/int" Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!6211> (cherry picked from commit cccb497d)
-
I have no idea how this pass ever worked. I guess it worked ok on the one or two piglit tests but the whole thing seemed very fragile. It makes a number of undocumented and unasserted assumptions and they aren't always valid. This rewrite makes a number of changes: 1. It now properly handles the case where the gl_SampleMask write comes before the gl_FragColor or gl_FragData[0] write. 2. It should early-exit faster because it now looks at bits in shader_info::outputs_written instead of looking for variables. 3. Instead of the fragile variable lookup where we try to look the variable up by both location and driver_location and match, we just use the driver_location calculations used by brw_fs_nir. 4. It asserts that the index parameter to store_output is a constant instead of silently failing if it isn't. 5. We now actually assert the implicit assumption that the two writes are in the same block. We go even further and assert that they are in the last block in the shader. 6. In the case where 3 or fewer components of the output are written, we explicitly choose to leave the sample mask alone. Fixes: 7ecfbd4f "nir: Add alpha_to_coverage lowering pass" Closes: #3166 Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <mesa/mesa!6233> (cherry picked from commit b6fdb140)
-
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!5171> (cherry picked from commit e017ee95)
-
Eric Engestrom authored
Closes: mesa/mesa#1845 Signed-off-by: Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!3500> (cherry picked from commit bc6d6fd0)
-
In FIFO presentation mode we block either on our present-queue or on Present events after an image was transmitted. In case we receive completion events without idle events at some point we exhaust our acquire-queue and can not block anymore on present-queue. Ensure that the consumer has at least one image to acquire before blocking again on present-queue. Otherwise wait for one from the X server. CC: mesa-stable Closes: mesa/mesa#3344 Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <mesa/mesa!6513> (cherry picked from commit ec5e918e)
-
Add a counter to count how many images from our swapchain are currently "sent" to the X server via Present extension. An image is sent when it has been presented but we have not yet received an idle event for it. CC: mesa-stable Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <mesa/mesa!6513> (cherry picked from commit d0bc1ad3)
-
If a is Nan, fsat(NaN) is expected to be 0 and some optimizations should be marked as inexact. Fixes a GPU hang with Death Stranding and RADV/ACO (RADV/LLVM isn't affected because it lowers fsat). No fossils-db change. Closes: mesa/mesa#3368 Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6519> (cherry picked from commit bc123c39)
-
Closes: mesa/mesa#3465 Cc: 20.1 20.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <mesa/mesa!6531> (cherry picked from commit 52cac068)
-
Fix warnings reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable info going out of scope leaks the storage it points to. Fixes: 9bc5b2d1 ("vulkan: add initial device selection layer. (v6.1)") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <!6509> (cherry picked from commit 004119d5)
-
It's not enough to multiply by a .w reciprocal, we have to be taking the reciprocal of the thing we're actually multiplying against. Fixes incorrect rendering in Manhattan. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Cc: mesa-stable Part-of: <mesa/mesa!6525> (cherry picked from commit 41d0a81c)
-
Required for pthread_set_name_np() on OpenBSD as there is no pthread_setaffinity_np() to define PTHREAD_SETAFFINITY_IN_NP_HEADER. Fixes: dcf9d91a ("util: Handle differences in pthread_setname_np") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!5630> (cherry picked from commit 55765f80)
-
Fix absolute to relative timeout computation. Add sanity checks to futex_wait() - handle the NULL timeout pointer case - avoid negative cases. From Matthieu Herrb and Scott Cheloha. Fixes: c91997b6 ("util/futex: use futex syscall on OpenBSD") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Acked-by: Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!5630> (cherry picked from commit c66c5b38)
-
Follow libGL and only include -ldl in gbm pkg-config file if libdl was actually found. Many systems have these functions in libc and don't have libdl. Fixes: 816bf7d1 ("meson: build gbm") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!5630> (cherry picked from commit 0398caa9)
-
Mesa builds with -std=c99 but uses timespec_get() a c11 function. Build with _ISOC11_SOURCE for c11 visibility when -std is specified. On linux c11 visibility comes from defining _GNU_SOURCE. Fixes: e3a8013d ("util/u_queue: add util_queue_fence_wait_timeout") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!5630> (cherry picked from commit f9a7e6e8)
-
memfd_create() is a linux syscall replace the use of it with shm_mkstemp() on OpenBSD. unconditionally include stdlib.h for mkstemp()/mkostemp() Fixes: c0376a12 ("util: add anon_file.h for all memfd/temp file usage") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!5630> (cherry picked from commit 6e9c0661)
-
Since cbee1bfb endian.h is unconditionally used if available. glibc has byte order defines with two leading underscores. OpenBSD has private defines with a single leading underscore in machine/endian.h and public defines in endian.h with no underscore. The code under the endian.h block did not check if symbols were defined before equating them so '#if __BYTE_ORDER == __LITTLE_ENDIAN' would turn into '#if 0 == 0' which is always true. Fixes: cbee1bfb ("meson/configure: detect endian.h instead of trying to guess when it's available") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!5630> (cherry picked from commit 7eab6845)
-
I'm honestly not sure how passing a builder by-value ever worked. I guess the struct is mostly copyable. In any case, that's the wrong way to use it and it's causing issues. Fixes: 7ecfbd4f "nir: Add alpha_to_coverage lowering pass" Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <mesa/mesa!6233> (cherry picked from commit 72dc06e0)
-
- the offsets are inclusive-exclusive so the +1 was wrong - Since the GPU doesn't do the interpolation on depth (as we render per layer), we have to add an offset for the pixel center. CC: mesa-stable Closes: mesa/mesa#3073 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <mesa/mesa!6458> (cherry picked from commit 4d40a719)
-
The content of rsc->pending_ctx could be changed from multiple contexts and thus from multiple threads. The per-context lock is not sufficient to protect this list. Add per-resource lock to protect this list. Fixes: e5cc66df ("etnaviv: Rework locking") Signed-off-by: Marek Vasut <marex@denx.de> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <mesa/mesa!6454> (cherry picked from commit 60975ebe)
-
This function is not used, remove it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <mesa/mesa!6454> (cherry picked from commit da660c90)
-
PTB assumes that base instance to be 0 at start of tile, but hw would not do that, we need to set it. It is worth to note that the opcode name is somewhat confusing as what it really sets is the base instance. We could rename the opcode, but then the name would be different to the original Broadcom name, so confusing in any case. This fixes several dEQP-GLES3 and dEQP-GLES31 tests that passes individually, but started to fail depending on other tests running before using base instance different to zero. This is the backport of a Vulkan patch that fixed some Vulkan CTS tests that start to fails after some other tests used an instance id. CC: 20.2 20.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <mesa/mesa!6447> (cherry picked from commit 05a03499)
-
Fixes: 276d22c5 ("v3d: Add some more new packets for V3D 4.x.") CC: 20.2 20.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <mesa/mesa!6447> (cherry picked from commit 2e8b6f64)
-
Return the actual number of planes in these formats (one) instead of the number of planes used for lowering (two). Fixes: d5c85783 ("gallium/dri2: Fix creation of multi-planar modifier images") Acked-by: Anuj Phogat <anuj.phogat@gmail.com> Part-of: <mesa/mesa!6449> (cherry picked from commit 36bd3e98)
-
This fixes: KHR-GL45.gl_spirv.spirv_modules_positive_test Fixes: 75ce078a "radeonsi: enable NIR by default and document GL 4.6 support" Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <mesa/mesa!6460> (cherry picked from commit a6189088)
-
If you have a sequence where there is a single buffer associated with the current render target, and then you end up shadowing it on the 3d pipe (u_blitter), because of how we swap the new shadow and rsc before the back-blit, you could end up confusing things into thinking that the blitters framebuffer state is the same as the current framebuffer state. Re-organizing the sequence to swap after the blit is complicated when also having to deal with CPU memcpy blit path, and the batch/rsc accounting. So instead just detect this case and flush if we need to. Fixes: dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_clear dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_draw Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <mesa/mesa!6434> (cherry picked from commit 1fa43a4a)
-
Several optimization paths, including constant folding, can lead to indexing vector with an out of bounds index. Out-of-bounds writes could be eliminated per spec: Section 5.11 (Out-of-Bounds Accesses) of the GLSL 4.60 spec says: "In the subsections described above for array, vector, matrix and structure accesses, any out-of-bounds access produced undefined behavior.... Out-of-bounds writes may be discarded or overwrite other variables of the active program." Fixes piglit tests: spec@glsl-1.20@execution@vector-out-of-bounds-access@fs-vec4-out-of-bounds-1 spec@glsl-1.20@execution@vector-out-of-bounds-access@fs-vec4-out-of-bounds-6 CC: <mesa-stable@lists.freedesktop.org> Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <mesa/mesa!6363> (cherry picked from commit 5922d57a)
-