- Jul 03, 2024
-
-
Eric Engestrom authored
-
Eric Engestrom authored
-
- Jul 02, 2024
-
-
Eric Engestrom authored
-
Coverity has spotted a place where we could in theory overflow. In reality it wont happen as the potential overflow is a bitfield with a maximum of two values. Add an `assume()` statement to help out the compiler and document our assumption. fixes: dc1aedef Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!29825> (cherry picked from commit dc604f34)
-
Catching these programmatically without false positives / negatives is surprisingly tricky, go back to the known-working list for now. Closes: mesa/mesa#11398 Fixes: ad0edea5 ("st/dri: Check format properties from format helpers") Fixes: 5ca85d75 ("dri: Fix BGR format exclusion") v2: * Also put back lima fails removed by 9eeaa461 ("egl/gbm: Enable RGBA configs"), as those tests are now failing again. Part-of: <mesa/mesa!29979> (cherry picked from commit cbd19e09)
-
Eric Engestrom authored
-
Eric Engestrom authored
-
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <mesa/mesa!29836> (cherry picked from commit 884397b5)
-
Eric Engestrom authored
-
Gallium/tests/trivial requires dynamic pipe loader at runtime, that is, $prefix/$libdir/gallium-pipe/pipe_*.so must get built and installed. so let's build it if build-tests is enabled. v2: - Fix error of meson when both of clover and tests are enabled (dbaker) Signed-off-by: Luc Ma <luc@sietium.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <!27180> (cherry picked from commit 6b5a1261)
-
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <mesa/mesa!29778> (cherry picked from commit b8f89260) Part-of: <mesa/mesa!29985>
-
Cc: mesa-stable Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <mesa/mesa!29778> (cherry picked from commit 57e74d7b) Part-of: <mesa/mesa!29985>
-
One variant uses a protected scratch surface the other not. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <mesa/mesa!29778> (cherry picked from commit 3ccf80f9) Part-of: <mesa/mesa!29985>
-
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <!29778> (cherry picked from commit 08a4e0a2) Part-of: <!29985>
-
Eric Engestrom authored
-
812b3415 added rules for upcasts with comparisons with a variety of types. The float & unsigned rules should be ok, but the signed integer rules are unsound as currently implemented. This can cause end-to-end miscompiles. I originally hit this issue while debugging a large real world OpenCL kernel. I found the bug symptoms changed when disabling loop unrolling, which tipped me off to a compiler bug. I've reduced it to a minimal test case. Imagine my surprise when I find out the NIR my backend ingested was already constant folded to be wrong. In the minimal test case, during optimization we have NIR: 32 %6 = .... 64 %9 = i2i64 %6 64 %44 = load_const (0x0000000000000001) 1 %45 = ilt %9, %44 (0x1) This is a simple check (int64_t)%6 < 1. nir_opt_algebraic turns this into: 32 %6 = ... 64 %9 = i2i64 %6 64 %44 = load_const (0x0000000000000001) 64 %55 = load_const (0x0000000080000000 = 2147483648) 1 %56 = ilt %55 (0x80000000), %44 (0x1) 64 %57 = load_const (0x000000007fffffff = 2147483647) 1 %58 = ilt %57 (0x7fffffff), %44 (0x1) 32 %59 = i2i32 %44 (0x1) 1 %60 = ilt %6, %59 1 %61 = ior %58, %60 1 %62 = iand %56, %61 This pile of math constant-folds to an unconditional "false"! The problem is %56. At first glance, INT32_MIN < 1 is true so %56 should be true. Indeed, it should. But here's the kicker: both constants are 64-bit here, so the ilt operation is a 64-bit comparison -- that left-hand side is INT32_MIN zero-extended to 64-bit for the signed comparison at 64-bit. So in fact, it evaluates to false, causing the whole expression to go false. If we're going to do a 64-bit comparison for %56, then we need to sign-extend the bound. So we'll just adjust the Python and be on our way, right? Unfortunately the issue is deeper. According to the comment in the generated nir_opt_algebraic.c file, the guilty algebraic rule is: ('ilt', ('i2i64', 'a@32'), '#b') => ('iand', ('ilt', -2147483648, 'b'), ('ior', ('ilt', 2147483647, 'b'), ('ilt', 'a', ('i2i32', 'b')))) From a Python perspective? That rule is correct. -2147483648 < 1 is a true statement. Adjusting the Python rule is not the appropriate solution here, since the issue is more fundamental and might affect other rules. The real problem is the translation of that Python replacement tree into C, incorrectly zero-extending -2147483648 into 0x0000000080000000 instead of sign-extending to 0xffffffff80000000. Crawling down the rabbit hole of the generated algebraic file, we see the constant encoded as: { .constant = { { nir_search_value_constant, 64 }, nir_type_int, { -0x80000000 /* -2147483648 */ }, } }, NIR correctly translates the negative constant to a C level negate operation of its absolute value. This maps to the correct sign-extension... ...for all constants except for INT_MIN. Because that constant lacks a ULL suffix, it is a 32-bit integer. And for this integer (only), negating it hits signed integer overflow (UB!) and then we end up with an effective zero-extension when going to 64-bit. This patch fixes the end-to-end miscompile. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Closes: #11402 Cc: mesa-stable Part-of: <mesa/mesa!29952> (cherry picked from commit 270446ee)
-
This fixes spec@!opengl 1.0@gl-1.0-polygon-line-aa spec@!opengl 1.1@clipflat and multiple piglit tests failures on VGPU9 device Fixes: 76725452 ("gallium: move vertex stride to CSO") Reviewed-by: Brian Paul <brian.paul@broadcom.com> Part-of: <mesa/mesa!29947> (cherry picked from commit 8b8f347e)
-
Initialize the number of modifiers when `max` is 0 as documented [1]: If <max_formats> is 0, no formats are returned, but the total number of formats is returned in <num_formats>, and no error is generated. [1] https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt Fixes: d74ea2c1 ("llvmpipe: Implement dmabuf handling") Reported-by: Michal Odehnal <modehnal@redhat.com> Tested-by: Michal Odehnal <modehnal@redhat.com> Reviewed-by: Lucas Fryzek <lfryzek@igalia.com> Signed-off-by: José Expósito <jexposit@redhat.com> Part-of: <mesa/mesa!29941> (cherry picked from commit 1ef3b38f)
-
Found by luck. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <mesa/mesa!29940> (cherry picked from commit bc52e773) [Eric: add back WRITE_BIT, to set both] mesa/mesa!29940 (comment 2476173)
-
- Jun 30, 2024
-
-
As reported by mesa/mesa#10674 this option is broken. Indeed, when "with_clc" is false the compilation process failed with the following error: "ERROR: Unknown variable "idep_mesaclc". Fixes: 815a6647 ("meson: do not pull in clc for clover") Closes: mesa/mesa#10674 Signed-off-by: Patrick Lerda <patrick9876@free.fr> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <mesa/mesa!29646> (cherry picked from commit 82e9880b)
-
Eric Engestrom authored
-
- Jun 27, 2024
-
-
This is not safe when we have conditional spills since we could be spilling disabled lanes with undefined values that could overwrite valid data for those lanes from a previous spill of the same temp that was unconditional (or that condionally enabled those same lanes). Fixes some Piglit OpenCL tests as well as the following OpenCL tests: integer_divideAssign integer_moduloAssign integer_mad_sat integer_ops integer_divideAssign integer_ops integer_mad_sat integer_ops integer_moduloAssign integer_ops quick_char_math integer_ops quick_short_math math_brute_force half_powr math_brute_force pow math_brute_force pown math_brute_force powr math_brute_force rootn Fixes: 597560e2 ('broadcom/compiler: always enable per-quad on spill operations') Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <!29909> (cherry picked from commit d1f8351f)
-
The multop instruction implicitly writes rtop which is not preserved acrosss thread switches. We can spill the sources of the multop (since these would happen before multop) and the destination of umul24 (since that would happen after umul24). Fixes some OpenCL tests when V3D_DEBUG=opt_compile_time is used to choose a different compile configuration. cc: mesa-stable Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!29909> (cherry picked from commit 38b7f411)
-
Eric Engestrom authored
-
In a scenario where two non-concurrent cmdbufs are submitted to the compute queue and with the second one using DGCC, the driver would have chained the CS of the first cmdbuf to the new IB created right after the DGC IB is executed. Found while working on DGC task shader with vkd3d-proton. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <mesa/mesa!29913> (cherry picked from commit fec9b56f)
-
- Jun 26, 2024
-
-
Otherwise it might change the order between a load_shared and a shared_atomic on the same location. Cc: mesa-stable Part-of: <mesa/mesa!29918> (cherry picked from commit 3482ea59)
-
nir_opt_preamble sometimes adds useless expressions, in which case we may have stc instructions and no corresponding use of the constant. Things can go sideways when these aren't included in the constlen, so far only observed when earlypreamble is enabled. Fixes: ccc64b7e ("ir3: Plumb through store_uniform_ir3 intrinsic") Part-of: <mesa/mesa!29903> (cherry picked from commit c42f6597)
-
radv has a comment in radv_meta_dcc_retile.c: * BPE is always 4 at the moment and the rest is derived from the tilemode. radeonsi has in si_retile_dcc: /* We have only 1 variant per bpp for now, so expect 32 bpp. */ assert(tex->surface.bpe == 4); This fixes ext_image_dma_buf_import-modifiers for radeonsi. Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!29612> (cherry picked from commit abd04812)
-
We shouldn't use this extension at all if we're not using the HTML builder. This should hopefully fix this issue a bit more fundamentally. This caused issues when using the spelling extension, something I do locally from time to time. Fixes: f72033bb ("docs: add bootstrap extension") Part-of: <mesa/mesa!29888> (cherry picked from commit f4e7204e)
-
Eric Engestrom authored
-
Due to undefined Operands, it might not be enough to check the predecessors' register demand. Cc: mesa-stable Part-of: <mesa/mesa!29804> (cherry picked from commit 4c2f231c)
-
Fixes: //exec is empty here loop { %1:s[16-17] = ... if () { break } %2:s[16-17] = ... continue_or_break } %3 = phi %1, undef //because of the undef, %2 can use s[16-17] and overwrite the address load(%3:s[16-17]) No fossil-db changes. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Fixes: bbe46524 ("aco: create lcssa phis for continue_or_break loops when necessary") Closes: mesa/mesa#11333 Part-of: <mesa/mesa!29838> (cherry picked from commit e3ffc244)
-
indirect store lowering will use if/else which changes the control flow of the shader. Fixes: 110887de ("nir: Add a new pass to lower array dereferences on vectors") Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <mesa/mesa!29894> (cherry picked from commit 93f790b0)
-
indirect store lowering will change control flow, so we should not preserve control flow metadate when it's present. Fixes: 35b8f6f4 ("nir: Add a new pass to lower array dereferences on vectors") Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <mesa/mesa!29894> (cherry picked from commit 09b4ba27)
-
I'm not really sure if this ever matters in real-life, but os.pardir exists and we should probably use it instead of hard-coding it to '..'. Fixes: 67485efd ("docs: prepare for hawkmoth") Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <mesa/mesa!11494> (cherry picked from commit 09c1f3b9)
-
Ohterwise we might get caught up in memory corruptions I still have no explanation for. Fixes spontanous crashes with radeonsi and the OpenCL CTS. Cc: mesa-stable Part-of: <mesa/mesa!29880> (cherry picked from commit 9d458b7f)
-
Since commit 18d8c3ca we were allocating a little more than what we were actually using (2621440 bytes instead of 2097152, aka 0x280000 instead of 0x200000), and we were not properly marking the BO as internal. No applications should be misbehaving because of this. Fixes: 18d8c3ca ("anv: Add missing ANV_BO_ALLOC_INTERNAL") Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <mesa/mesa!29337> (cherry picked from commit 2f65acfb)
-
This will disable cases with 2D array views (which could be views to 3D texture) but enables on regular 2D surfaces which seems to work fine. Fixes: 70382f7f ("intel/isl/xe2: Enable route of Sampler LD message to LSC") Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <mesa/mesa!29760> (cherry picked from commit 4a0a716b)
-
Refresh if older than a day, not less than a day old. Fixes: 3f119a1f ("util/disk_cache: Add marker on cache usage") Part-of: <mesa/mesa!29728> (cherry picked from commit 9b775d26)
-