- Feb 22, 2023
-
-
Eric Engestrom authored
-
Eric Engestrom authored
-
During its Ambient Occlusion calculations the game ends up calculating sin/cos of some pretty big values, for which HW produces completely bogus results (e.g. cos(3929491.25) ~= -0.011, while correct would be ~0.923). Limit the arguments to the reasonable (-2*Pi; 2*Pi) range with the limit_trig_input_range WA. Cc: mesa-stable Closes: mesa/mesa#8292 Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!21396> (cherry picked from commit 42dba8eb)
-
the pipe_resource template values need to always be initialized or else texture creation fails and rendering is broken fixes #8331 cc: mesa-stable Part-of: <mesa/mesa!21450> (cherry picked from commit b43d32b7)
-
When establishing a texture transfer map, if there is any pending changes on the texture, instead of trying direct map with DONTBLOCK first, just use the upload buffer path. Fixes piglit tests gen-teximages, arb_copy_images-formats Cc: mesa-stable Reviewed-by: Neha Bhende <bhenden@vmware.com> Part-of: <mesa/mesa!21393> (cherry picked from commit 1b9b060f)
-
Add typeless format to the compatible format lists for shareable surfaces. Fixes webgl benchmark crash in eglCreateImage running from firefox on Fedora 37. Cc: mesa-stable Reviewed-by: Martin Krastev <krastevm@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <mesa/mesa!21393> (cherry picked from commit 3a359385)
-
When an EGLImage is created from a 2D texture and used for texture sharing, the texture surface might not have been created with the SHARED bind flag. To allow these surfaces for sharing, this patch sets the USAGE SHARED bit for surfaces that can be potentially used for sharing even when the SHARED bind flag is not originally set. Instead of unconditionally enabling the SHARED bind flag for all surfaces and unnecessarily bypass the surface cache optimization, this patch only enables the USAGE SHARED bit for surfaces that also have the RENDER TARGET bind flag. When the surface handle is inquired and if the surface is currently marked as cachable, we will need to unset the cachable bit so the surface handle will not be recycled again. This patch fixes an assertion in svga_resource_get_handle() when the EGL_MESA_image_dma_buf_export extension is used in webgl benchamrk running from firefox in Fedora 37. Cc: mesa-stable Reviewed-by: Martin Krastev <krastevm@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <mesa/mesa!21393> (cherry picked from commit 75b7296f)
-
Here we use a leading space to isolate them from the code they will be inserted into. For example: #define VALUE -1.0 int a = -VALUE; Should be evaluated to int a = - -1.0; not int a = --1.0; Closes: mesa/mesa#7932 Cc: mesa-stable Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <mesa/mesa!21352> (cherry picked from commit 3a9edfc4)
-
This will be used in the following patch. Cc: mesa-stable Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <mesa/mesa!21352> (cherry picked from commit 6e29dce2)
-
Cc: mesa-stable Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <mesa/mesa!21039> (cherry picked from commit e2ad086f)
-
This fixes an issue when a vector component of an arrayed output has a deref. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Cc: mesa-stable Closes: mesa/mesa#8197 Part-of: <mesa/mesa!21028> (cherry picked from commit e13074d7)
-
AMDGPU pstate is per context but if there is multiple AMDGPU contexts in flight, the kernel can return -EBUSY. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <mesa/mesa!21222> (cherry picked from commit 6d73841d)
-
This change is wrong for two reasons: - it hangs most of the time maybe, because changing PSTATE when the application is running is broken somehow - it increases the time between triggering and generating the capture considerably, because there is a delay for changing PSTATE This restores previous logic where PSTATE is set to profile_peak at logical device creation. Though, it also re-introduces an issue with multiple logical devices (kernel returns -EBUSY) but this will be fixed in the next commit. This fixes GPU hangs when trying to record RGP captures on my NAVI21. Note that profile_peak is only required for some RDNA2 chips (including VanGogh). Cc: mesa-stable This reverts commit 923a864d. Part-of: <mesa/mesa!21222> (cherry picked from commit 663877e8)
-
resource_from_handle implementations create an additional reference to the scanout resource, which caused lima to leak those resources after commit ad4d7ca8. Do as the other drivers do and import the bo directly while creating the scanount resource. Cc: 22.3 mesa-stable Closes: mesa/mesa#8198 Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <mesa/mesa!21330> (cherry picked from commit c426e567)
-
Fixes a 4KB memory leak that happens once per-device creation. Cc: mesa-stable Signed-off-by: Italo Nicola <italonicola@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Tested-by: Chris Healy <healych@amazon.com> Part-of: <mesa/mesa!21372> (cherry picked from commit e787ddf2)
-
We loop, effectively, over two stacks: ready and to_do and finish only when both are empty. In the case where ready is empty, we pull one off of to_do, add a copy to a temporary, and push it onto the ready stack. Previously, we assumed that we would never get to the temporary copy case if to_do has exactly one entry because that would imply that there was only one copy left which means there can't possibly be a cycle to break. This was true until c7fc44f9 ("nir/from_ssa: Respect and populate divergence information") which changed things such that temporary copies sometimes get added in the case where a convergent value is copied both to convergent and divergent destinations. This patch adjusts our loop iteration to always attempt to clear the ready stack before checking if there's anything left on the to_do stack. I also added an assert to make the exit condition more clear. Fixes: c7fc44f9 ("nir/from_ssa: Respect and populate divergence information") Closes: mesa/mesa#8037 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <mesa/mesa!21315> (cherry picked from commit 4e09d37f)
-
There is an optimization in the parallel copy algorithm where, after a copy has been performed, we can treat the destination as the new source for future copies of the same source. In particular, consider the following parallel copy: A -> B, C -> A, A -> C. In this case, after we have done the A -> B copy, we can make note that the value in A is now in B and emit the sequence: A -> B, C -> A, B -> C. This allows us to resolve the swap cycle between A anc C without allocating a temporary register because we know B is also a copy of A. When one of the registers involved is convergent and the other is divergent, this optimization is problematic because, while convergent to divergent copies are fine, we can't re-use the divergent copy in later copies if any of those copies are to a convergent variable. We could, but it would require a read_first_invocation which would get messy. In In c7fc44f9 ("nir/from_ssa: Respect and populate divergence information"), we attempted to deal with this by limiting the rename optimization to the case where the divergence matched. The problem is that we did the re-name part whenever the divergence matched but only marked it as ready if the thing being copied was a destination. (We actually left two instances of loc[a] = b, one which always happened and one which only happened if we also wanted to flag the source as being ready to use as a destination.) While this technically doesn't cause any problems, it may result in more inter-mov dependencies which hurts instruction scheduling. For example, if we had the parallel copy A -> B, A -> C, A -> D, we now end up emitting the sequence A -> B, B -> C, C -> D which has many more data hazards between instructions caused by the constant shuffling. This commit restores the original logic in which we only perform the rename optimization if the rename would free up a register we will later use as a destination. This isn't entirely optimal as it still doesn't prove that there is a cycle involved first, but it should lead to a reduction in unnecessary dependencies. No shader-db changes on SKL or DG2 Fixes: c7fc44f9 ("nir/from_ssa: Respect and populate divergence information") Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!21315> (cherry picked from commit 5afba073)
-
Fixes: 2ea481b2 ("Zink: add Zink profiles file") Part-of: <mesa/mesa!20920> (cherry picked from commit fc84c63e)
-
It's supported now. Fixes: d82826ad ("anv: Implement VK_EXT_transform_feedback on Gen7") Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <mesa/mesa!21228> (cherry picked from commit ed62eec5)
-
upcoming xserver releases will emit PresentConfigureNotify with this flag set when a window is destroyed, ensuring drivers don't poll infinitely and deadlock fixes #6685 cc: mesa-stable Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <mesa/mesa!21339> (cherry picked from commit 819cbf32)
-
upcoming xserver releases will emit PresentConfigureNotify with this flag set when a window is destroyed, ensuring drivers don't poll infinitely and deadlock Closes: mesa/mesa#116 cc: mesa-stable Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <mesa/mesa!21339> (cherry picked from commit 91de576a)
-
base_mip_width is used in si_compute_copy_image when the SI_IMAGE_ACCESS_BLOCK_FORMAT_AS_UINT flag is used. width = tex->surface.u.gfx9.base_mip_width; This will be incorrect if we don't adjust it. For instance, with a 260x256 image, surf_pitch and base_mip_width are 320 before surf_pitch is updated to be 192. Both need to match, or computing the width from base_mip_width leads to incorrect result. Cc: mesa-stable Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!21253> (cherry picked from commit affa8a9f)
-
This allows dEQP-VK.pipeline.pipeline_library.* to run to finish. Fixes: e9f5de11 ("tu: Initial implementation of VK_EXT_graphics_pipeline_library") Part-of: <mesa/mesa!21328> (cherry picked from commit bce8e7f2)
-
Closes: mesa/mesa#8287 Cc: mesa-stable Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <mesa/mesa!21310> (cherry picked from commit 09501fe5)
-
this is illegal, and the u_blitter path has to be taken to guarantee enough accuracy that the strictest piglit tests pass cc: mesa-stable Part-of: <mesa/mesa!21314> (cherry picked from commit f0e15126)
-
This is to avoid out of bound register accesses (potentially leading to hangs) when the dispatch size is smaller than when is reported in the NIR subgroup_size. v2: Implement bounding with a mask (since workgroup sizes are powers of 2) (Faith) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: 530de844 ("intel,anv,iris,crocus: Drop subgroup size from the shader key") Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!21282> (cherry picked from commit 9ac192d7)
-
V_CMPX+DPP returns 0 with reads from disabled lanes, unlike V_CMP+DPP (RDNA3 ISA doc, 7.7) Fixes: baab6f18 ("aco: Optimize branching sequence during SSA elimination.") Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <mesa/mesa!20537> (cherry picked from commit 4fbcd046)
-
Eric Engestrom authored
-
Fixes strict aliasing violations flagged by GCC 12: ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h: In function ‘float as_float(uint32_t)’: ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:182:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 182 | return *reinterpret_cast<float*>(&i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h: In function ‘float3 as_float3(int3)’: ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:187:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 187 | return *reinterpret_cast<float3*>(&i3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:187:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h: In function ‘float4 as_float4(int4)’: ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:192:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 192 | return *reinterpret_cast<float4*>(&i4); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:192:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Fixes: 5f948503 ("anv: Import GRL") Part-of: <mesa/mesa!21236> (cherry picked from commit 53ce756e)
-
Eric Engestrom authored
-
Eric Engestrom authored
-
It seems broken but can't really figure out why and DCC levels aren't interleaved on GFX11. Skipping DCC initialization for levels seems to also fix it but seems safer to disable completely, as a hotfix. Fixes DCC issues with Hi-Fi Rush, Sonic Frontiers, Hogwarts Legacy and probably more. Closes: mesa/mesa#8230 Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <mesa/mesa!21186> (cherry picked from commit 5d41d825)
-
Fixes: 6043f66d ("crocus: disable Y tiling for render targets properly.") Part-of: <mesa/mesa!21300> (cherry picked from commit 6d3c79fa)
-
Eric Engestrom authored
-
Needed to build on Solaris Fixes: f58e6fee ("util/disk_cache: delete more cache items in one go when full") Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <mesa/mesa!21110> (cherry picked from commit 289eb50a)
-
LINEAR is illegal, and swapping filtering at this point still seems to be conformant given questionable GL spec requirements for LINEAR zs filtering cc: mesa-stable Part-of: <mesa/mesa!21203> (cherry picked from commit 067545eb)
-
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <mesa/mesa!21277> (cherry picked from commit eb5d7056)
-
since the array is not ralloc managed, it has be explicitly freed. cc: mesa-stable Part-of: <mesa/mesa!21285> (cherry picked from commit 96849363)
-
these will now be freed when the program itself is freed. cc: mesa-stable Part-of: <mesa/mesa!21285> (cherry picked from commit b3ed037c)
-