Commit Graph

2889 Commits

Author SHA1 Message Date
Sergi Blanch Torne
35a9e8577c ci: Nightly run expectations update
Reviewer the results from the last nightly run completed using ci-collate tool
(gl.fd.o/gfx-ci/ci-collate) with the 'patch' feature and a bit of human
intervention, these are the changes in the expectations.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28350>
2024-04-02 07:52:42 +00:00
Iago Toral Quiroga
9fad2922fb broadcom/compiler: fix workaround for GFXH-1602
In this scenario drivers are adding a dummy attribute with a size
of 1, so we should account for it here.

Fixes missing window decorations with GTK4+.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10853
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28414>
2024-04-01 09:22:39 +00:00
Eric Engestrom
814017103c rpi/ci: another batch of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28481>
2024-03-29 22:22:21 +00:00
Eric Engestrom
d92db5e14a v3dv/ci: another batch of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28449>
2024-03-28 18:37:22 +00:00
Eric Engestrom
aaf81bd069 v3dv/ci: add more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28437>
2024-03-28 01:01:05 +00:00
Eric Engestrom
c0875d2156 rpi/ci: add flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28423>
2024-03-27 17:59:18 +00:00
Eric Engestrom
8b707e0301 v3dv/ci: track regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28420>
2024-03-27 13:29:43 +00:00
Iago Toral Quiroga
7992d44b24 v3dv: fix image creation when exceeding maxResourceSize
Fixes crashes in tests like
dEQP-VK.pipeline.monolithic.render_to_image.core.2d_array.huge.width_height_layers.r8g8b8a8_unorm
with CTS main.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28364>
2024-03-26 07:23:56 +00:00
Eric Engestrom
14279087fb ci/deqp-runner: split gl & gles groups to use the correct binary
Now that these can come from different releases, with different sets of
patches backported to them, it matters that we use the correct one.

Fixes: 78ea3bb43d ("ci/deqp: use the proper gl/gles releases for deqp-gl*, deqp-gles*, deqp-egl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28343>
2024-03-24 22:14:06 +00:00
Eric Engestrom
197e3f7109 v3dv/ci: assume list of dEQP-VK.wsi.*.maintenance1.present_modes.* flakes is the same between xcb & xlib and between rpi4 & rpi5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:10:42 +00:00
Eric Engestrom
a856d30b72 v3dv/ci: add more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:08:06 +00:00
Eric Engestrom
7156575dcb v3dv/ci: assume dEQP-VK.wsi.wayland.swapchain.simulate_oom.* have been fixed
We'll add them back if it turns out 1900617baf was not enough to fix them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:08:06 +00:00
Yonggang Luo
1ac1c0843f treewide: Replace usage of macro DEBUG with MESA_DEBUG when possible
This is achieved by the following steps:

#ifndef DEBUG => #if !MESA_DEBUG
defined(DEBUG) => MESA_DEBUG
#ifdef DEBUG => #if MESA_DEBUG

This is done by replace in vscode

excludes
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu

These are safe because those files should keep DEBUG macro is already excluded;
and not directly replace DEBUG, as we have some symbols around it.

Use debug or NDEBUG instead of DEBUG in comments when proper

This for reduce the usage of DEBUG,
so it's easier migrating to MESA_DEBUG

These are found when migrating DEBUG to MESA_DEBUG,
these are all comment update, so it's safe

Replace comment /* DEBUG */ and /* !DEBUG */ with proper /* MESA_DEBUG */ or /* !MESA_DEBUG */ manually

DEBUG || !NDEBUG -> MESA_DEBUG || !NDEBUG
!DEBUG && NDEBUG -> !(MESA_DEBUG || !NDEBUG)

Replace the DEBUG present in comment with proper new MESA_DEBUG manually

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Eric Engestrom
951aa2fa82 v3dv/ci: add other flakes seen during nightly run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
423e85caf5 v3dv/ci: mark the dEQP-VK.wsi.*.maintenance1.deferred_alloc.* flakes seen so far as happening on all platforms
Not all of these have flaked on all platforms yet, but enough that it's
safer to just consider that alloc issues might not be platform-specific.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
648490f7ce vc4/ci: add another spec@arb_vertex_buffer_object@vbo-subdata-many draw flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
5f2915e8ee vc4/ci: add another spec@!opengl 1.1@depthstencil-default_fb-drawpixels flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
fa0f834453 v3d/ci: mark spec@ext_framebuffer_blit@fbo-blit-check-limits as fixed
It looks like it has been fixed for many drivers yesterday, but
apparently not vc4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
David Heidelberg
d8f53f698c util: move gen_zipped_file into generic util and rename to gen_zipped_xml_file
Make the filename more descriptive and since the file is used by
multiple drivers, move it into appropriate util/ directory.

Cosmetics:
 - use SPDX license tag
 - add newline before main function

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27804>
2024-03-21 20:48:41 +00:00
Iago Toral Quiroga
83f53be8c7 broadcom/ci: add skips for unsupported features
Currently 92% of our Vulkan CI tests hit "Not Supported" test
cases, which is ridiculously high. Add a bunch of skips, some
of which include very large categories of tests of features we
already know we don't support, so we stop wasting so much time
skipping tests.

With this, we can also increase the fraction of tests we execute
for vulkan significantly, while still keeping job run times
under control.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28264>
2024-03-21 11:47:50 +00:00
Eric Engestrom
795046a8d4 v3dv/ci: update expectations
A big chunk of the new flakes and timeouts are caused by enabling new
tests in f977e4d4f5 ("v3dv: Enable
EXT_swapchain_maintenance1").

I'm not quite sure what happened with
`dEQP-VK.wsi.wayland.swapchain.simulate_oom.*` but now at least half of
them are flaky on rpi4 (between Skip and Crash), so moving the whole
block to flakes. On rpi5 I haven't seen them flake yet so tentatively
removing them entirely, but there's a good chance the issue is common
and they'll have to be put into flakes on rpi5 at some point as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28316>
2024-03-21 11:20:18 +00:00
Joshua Ashton
fc263e0308 v3dv: Enable EXT_swapchain_colorspace
No-op.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28275>
2024-03-20 18:24:26 +00:00
Joshua Ashton
f977e4d4f5 v3dv: Enable EXT_swapchain_maintenance1
This was missing, this is implemented in common code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28275>
2024-03-20 18:24:25 +00:00
Juan A. Suarez Romero
d87ccf0632 broadcom/ci: add new expected failures
Add more expected failures that should have been included in
74be42d9a4.

Fixes: 74be42d9a4 ("broadcom/ci: add new expected test failures")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28298>
2024-03-20 16:06:35 +00:00
Iago Toral Quiroga
bf3c1cf568 broadcom/ci: add a test that fails only in CI
This is a known bug in CTS affecting a number of tests in the
renderpass, renderpass2 and dynamic_rendering categories, but
it seems this is the only one triggered by CI. The bug has been
fixed in CTS 1.3.7.3.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
74be42d9a4 broadcom/ci: add new expected test failures
These start executing with dynamic rendering, and despite the name,
they don't actually require shader object. The reason they fail
is a bug in CTS (main).

Note: these are a crash in CI, but in CTS main they are a Fail.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
55a8c20e4d broadcom/ci: skips for tests that don't check for extension support correctly
We want these as skips instead of fails because there are many tests involved
and not all of them fail, so every time we add a new feature and change the
subset of tests we run in CI we start hitting different tests and we have
to keep patching the list, so just move them to skips since we know we don't
support them and we should not be running them.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
92172760e2 v3dv: enable VK_KHR_dynamic_rendering
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
7a2b17235d v3dv: also emit subpass clears with secondary command buffers
With dynamic rendering secondary command buffers can start subpasses
so we need this. Outside dynamic rendering secondary command buffers
won't be calling here since they are restricted to record commands
within a subpass.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
e9b44a3bb5 v3dv: handle render pass continue flag with dynamic passes
If a secondary command buffer recording a dynamic pass has the
VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT flag
then the rendering information for it should come from a
VkCommandBufferInheritanceRenderingInfo struct in the pNext
chain instead of the usual render pass information in the
VkCommandBufferInheritanceInfo struct. We take the information
from the new struct and build a render pass description from it
assuming a setup without a framebuffer (which is optional for
regular render passes too).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
f4ec92084e v3dv: fix resume address patching for secondary command buffers
Because we are cloning these into primaries but the cloning is
superficial the command lists in them still point to the original
jobs and therefore paching new addresses would make the packing
code add the BO of the resume address to the original job. This
has two problems:

1. This is probably not what we want since the patching should only
be affecting the clone.
2. The bo_count of the clone job will not be updated accordingly and
we end up with a mismatch that will blow up when we submit.

The solution used here is a big hack, but works for now: we just
specify the address by its full offset rather than a relative
offset from a BO. We already have to add all the BOS in the resume
job manually which will include this the BO for the branch address
too, so this is fine.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
0bb04c019e v3dv: rename SECONDARY job type to INCOMPLETE
This was used only in secondary CL command buffers so it made
sense but with dynamic rendering we are going to also have
regular CLs also in secondaries (since secondaries can now
record full dynamic rendering passes), so renaming this to
INCOMPLETE makes more sense, since this is really what they
refer to: parts of CLs that are intended to be merged into
other primaries through branching.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
2478939b69 v3dv: implement dynamic rendering resume/suspend
Dynamic rendering allows the client to suspend recording of a
render pass and have it continued in a different command buffer.
When a suspended command buffer is submitted to a queue, the
resuming command buffer must be te next one in submission order.
This means we need to be able to "merge" or "stitch" together
these command buffers at submit time.

To accomplish this, when we suspend a command buffer we emit
a BRANCH instruction to finish it. Then at submit time, when
we know the resuming job, we patch the BRANCH address with the
address of the resuming binning list (bcl). This is very similar
to how we execute secondary command buffers inside a render pass.
Also, only the last resuming job should flush the binning lists
in the bcl since we won't have processed the full binning command
list until we have execute the last linked job in the resume
list.

Since all jobs and command buffers in the suspend/resume chain
must be part of the same dynamic render pass, we only need to
produce and emit the render command list (rcl) once.

Since the way we implement stitching is that we branch from the
suspending job into the resuming one, the first job suspending
will link into all the resuming jobs necessary to complete the
chain, therefore, after the stitching is complete, we only want
to submit the first job in the suspend/resume chain, and thus,
we only produce and emit the rcl for this one job.

Notice as well that suspending only affects the last job
recording a dynamic rendering pass (the one that needs the branch
so we can resume execution with another job in another command
buffer).

Resuming affects all jobs in the dynamic render pass, since
we won't produce RCLs for them (as only the originating job
on the suspend/resume chain will emit the RCL).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
c15e0aac17 v3dv: implement vkCmdBeginRendering and vkCmdEndRendering
With this we are able to run basic dynamic render passes, however,
we are still missing a few things like support for secondary
render passes, suspend/resume, etc that will be adding in follow-up
patches.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
78015a9da3 v3dv: don't assume that pipelines have a render pass
This builds up on the previous patch and rewrites all the pipeline
code that fetched information from the pipeline's render pass (which
will be NULL for dynamic rendering) to instead fetch it through the
new rendering_info field, which will be valid for both regular and
dynamic render passes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
e22d843fa4 v3dv: add a vk_render_pass_state to pipelines
With dynamic rendering the API formally eliminates render passes,
so the pipeline create info can now have a NULL render pass, in
which case rendering info must be provided via pNext struct
VkPipelineRenderingCreateInfo, or if this is missing too then
defaults to no multiview and no attachments.

Since we don't want to have separate paths all over the place
whenever we need to access render pass / rendering info for the
pipeline, we will always produce a valid vk_render_pass_state
struct with the relevant information even when we have a render
pass, so we can rely on that always being available.

A follow-up patch will rewrite all the places where we assumed
the existence of a render pass in the pipeline to instead fetch
the info it needs from this new field instead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
10df187540 v3dv: add a helper to setup a framebuffer for dynamic rendering
Since the plan is to leverage our render pass infrastructure, we
also need to setup a framebuffer from the rendering info provided
with dynamic rendering.

We allocate the framebuffer lazily, only once, if a dynamic render
pass is used. To do this, we make it so it can hold the maximum
number of attachments possible with our hardware.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
6684aa09ff v3dv: add helper to build a render pass for dynamic rendering
The idea is to build a regular render pass from the rendering info
provided with dynamic rendering. We will use this when recording
dynamic render passes to leverage our existing implementation
for render passes with dynamic rendering.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
72c3769437 v3dv: add helper to check if we need to use a draw for a depth/stencil clear
We will need this when setting up dynamic render passes too.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
f1e6e58aef v3dv: add a helper to constrain clip window to render area
We will need to do the same when setting up dynamic render passes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
f285f69677 v3dv: refactor checking and adding pending jobs
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
e1b52e3052 v3dv: fix copying v3dv_end_query_info into primaries from secondaries
We had missed copying the count field.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
93f9f2bcbb v3dv: always set view index before drawing
It is allowed for a shader to enable the multiview extension
even if the draw call in which it is used doesn't use multidraw.
This allows the shader to still use gl_ViewIndex, which will
always be 0 in that scenario.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
aeee18be1b v3dv: fix subpass clear with draw call for multi-layered framebuffers
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Juan A. Suarez Romero
4f6f2cea6a v3dv: enable smooth line rendering
This is based on a lowering that we are already using in the OpenGL
driver.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28171>
2024-03-18 12:09:12 +00:00
Juan A. Suarez Romero
f5d4242928 v3dv: assume that rasterization state can be NULL
So far to check if rasterization discard is enabled or not we assumed
that rasterization state struct was never NULL.

However, as this will change with VK_EXT_extended_dynamic_state3, it can
be a good idea just to assume it can be NULL, so adding the check too.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28171>
2024-03-18 12:09:11 +00:00
Eric Engestrom
f455ac88b8 vc4/ci: add flake
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56377699
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56392947
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56421981

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28238>
2024-03-18 10:37:13 +00:00
Yonggang Luo
680e707534 treewide: Replace the invalid usage #if DEBUG with #ifdef DEBUG
This is done by find&replace and exclude the following folders in vscode
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu

This is a prepare step for re-working https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21946

These issues are found when to try switch DEBUG to MESA_DEBUG=0|1 in MR

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28083>
2024-03-15 16:08:18 +00:00
Guilherme Gallo
c6b65ac639 v3d/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164970

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Juan A. Suarez Romero
69fbd5cb90 v3d: fix line coords with perspective projection
The algorithm used to rendering smooth lines worked under the assumption
that line coords were in the [0, 1] range. This was correct when using
an orthogonal projection, but not when using a perspective projection.

With a perspective projection (where the value for 1/Wc set in the VPM
is not 1.0), line coords values are also affected by this projection, so
the values are not in this range.

To deal with this, we normalize the line coords using the Wc value so
the range becomes [0, 1], and the smooth line rendering works as
expected.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10496
Fixes: ee4d51f8b2 ("v3d: Add a lowering pass for line smoothing")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28072>
2024-03-11 12:42:50 +00:00