Commit Graph

241 Commits

Author SHA1 Message Date
Mike Blumenkrantz
d008aaa6da gallium: rework vbuf alignment pipe caps
this consolidates 4 pipe caps into 1 using an enum

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31482>
2024-10-07 13:09:59 +00:00
Mike Blumenkrantz
3b99f9bc0e mesa: support OVR_multiview2
this reuses the same pipe cap to indicate that
both extensions are supported

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
5c5763f6a8 gallium: add PIPE_CAP_MULTIVIEW
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Daniel Stone
ebd45f0e64 docs/gallium: Fix broken GL extension link
The :ext: macro doesn't know that astc_ldr is actually defined in the
astc_hdr spec doc.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:44 +00:00
David Rosca
1d71557397 docs: Remove OMX frontend
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30865>
2024-09-09 18:14:49 +00:00
Eric Engestrom
10bc4cc480 docs: Fix linkcheck failures
This job has been failing for a while. Make it not fail.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31059>
2024-09-09 12:54:34 +00:00
Qiang Yu
661b9061d4 gallium: add caps for KHR_shader_subgroup
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:16 +08:00
Louis-Francis Ratté-Boulianne
a4a51f22b1 gallium: add PIPE_CAP_ASTC_DECODE_MODE and expose extension
mesa will expose GL_EXT_texture_compression_astc_decode_mode
extension if the cap is enabled by the driver.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30560>
2024-08-20 05:36:15 +00:00
Rhys Perry
57080749f7 gallium: remove PIPE_CAP_SHADER_CAN_READ_OUTPUTS
nir_lower_io_to_temporaries is now done for all stages except TCS, and
nir_lower_io_to_temporaries with a TCS is a no-op.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25590>
2024-07-10 19:11:38 +00:00
Karol Herbst
0fa4eaf6f6 gallium: add PIPE_CAP_TEXTURE_SAMPLER_INDEPENDENT
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25362>
2024-06-26 10:04:02 +00:00
Erik Faye-Lund
96cf3fa355 docs: spell out "stencil reference"
This is consistent with the wording in the OpenGL spec.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
3f58be056d docs: nabled -> enabled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
9967df63df docs: unify spelling of front/back-facing
We spell these with a dash elsewhere in the docs, let's be consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
e2d94263d5 docs: mooth -> smooth
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
897e9d806f docs: tgsi -> TGSI
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:26 +00:00
Erik Faye-Lund
f7ed909761 docs: edgeflag -> edge flag
This is how we usually spell it, and also how the OpenGL specification
spells it. Let's be consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:26 +00:00
Mike Blumenkrantz
2e5d49b3dd gallium: delete PIPE_CAP_NIR_COMPACT_ARRAYS
this is now nir_shader_compiler_options::compact_arrays

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Eric Engestrom
13b88747d4 docs: fix inline c identifier reference -> inline code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Antonio Gomes
12f1a4c311 gallium: Add new PIPE_CAP_CL_GL_SHARING
We have a situation where some drivers have all the required features,
but they are not working with gl_sharing, so we end up advertising it
wrongly. Add this cap to ensure this driver was tested to work with
cl_khr_gl_sharing.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Timothy Arceri
1098afd7fb gallium: add PIPE_CAP_FP16 for AMD_gpu_shader_half_float
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Eric Engestrom
eb505979ba docs: fix syntax highlighting on non-code text snippet
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27010>
2024-01-12 08:13:39 +00:00
Marek Olšák
7a7285bc69 gallium: add PIPE_CAP_PERFORMANCE_MONITOR for GL_AMD_performance_monitor
Use a CAP instead of guessing it. radeonsi won't expose it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26262>
2023-11-28 17:34:26 +00:00
Marek Olšák
6073a149b9 gallium/docs: make CAP doc order match definition order
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26262>
2023-11-28 17:34:26 +00:00
Erik Faye-Lund
a08d33abff docs: apply permanent redirect
The HTTP URL now redirects to the HTTPS URL, so let's update our link.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26222>
2023-11-16 20:30:08 +00:00
Eric Anholt
aed6a39c10 glsl: Retire dround lowering.
We have competent lowering in NIR already available.

Drivers exposing CAP_DOUBLES but not SHADER_CAP_DROUND:
- d3d12 (NIR lowers ~0 if the underlying impl doesn't do floats)
- svga (Now sets the NIR lowering options)
- softpipe (Doesn't do GL4 so you can't use doubles anyway)
- llvmpipe (Lowers dround_even in NIR and passees the rest through
            successfully)
- zink (NIR lowers ~0 if the underlying impl doesn't do floats,
        otherwise passes things through successfully, except needed
        dround_even lowering to avoid lavapipe regression with
        native doubles)
- r600 (sets NIR rounding lowering flags, and lowers all fsign)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>
2023-10-24 00:16:30 +00:00
Eric Anholt
b1b0ebba1e glsl: Remove int64 div/mod lowering.
Most drivers that can expose GL4 were claiming the cap anyway (llvmpipe,
softpipe, zink, iris, nvc0, radeonsi, r600, freedreno, d3d12), and just
doing lowering in NIR if nessary.

crocus was only claiming the cap for gen8, but the backend compiler
enables NIR lowering regardless.

svga is the only other GL4 driver that didn't set it, and we can just set
the NIR lowering flag.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>
2023-10-24 00:16:30 +00:00
Rob Clark
5cccd6d689 mesa: Implement MESA_texture_const_bandwidth
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9891
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-10-14 17:28:28 +00:00
Asahi Lina
32a79e9be7 docs/tgsi: Specify that depth texture fetches are replicated
This is what drivers do, and code like u_blitter expects this.

Commit 6cac9c748e implied that this was already specified, but only
stencil actually was, depth was still listed as TBD. Let's actually
specify this for future reference.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22361>
2023-07-19 23:21:36 +00:00
Lucas Fryzek
6b2fa965c6 gallium: Remove PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND
Since the mesa state tracker can promote RGB texture formats
to RGBA texture formats (among other formats) without exposing
any of that information to a driver, it is more desirable to
have the behaviour of `PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND`
be the default. This avoids rendering bugs where an application
sets `DST_ALPHA` blending on a format where there is no alpha
channel, that has been promoted to a format that actually has an
alpha channel. The driver can instead rely on the common code
in the state tracker to convert the blending parameter to one
that reflects the limitations of the application requested format,
as long as `PIPE_CAP_INDEP_BLEND_FUNC` is supported.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24044>
2023-07-11 15:52:08 +00:00
Italo Nicola
a1eabeff66 gallium: remove PIPE_CAP_CLEAR_TEXTURE
ARB_clear_texture is now implemented in common code.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23735>
2023-07-10 15:23:06 +00:00
Karol Herbst
a8df5cfa3a gallium: change PIPE_COMPUTE_CAP_SUBGROUP_SIZE to a bitfield of sizes
This will be required for `cl_intel_required_subgroup_size`, but it
already helps implementing OpenCL subgroups as this allows us to check
with every subgroup size when implementing
`CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT`.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22893>
2023-07-07 12:27:35 +00:00
Karol Herbst
f0b2944a0b gallium: add PIPE_COMPUTE_CAP_MAX_SUBGROUPS
This is required for enabling OpenCL subgroups.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22893>
2023-07-07 12:27:35 +00:00
Karol Herbst
98d6edc6ad gallium: add get_compute_state_subgroup_size
This will be required by drivers supporting multiple subgroup sizes with
a given CSO to properly implement OpenCL subgroups.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22893>
2023-07-07 12:27:35 +00:00
Karol Herbst
11cb1a7bd7 docs: add missing get_compute_state_info documentation
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22893>
2023-07-07 12:27:35 +00:00
norablackcat
660f2eabe1 gallium: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
Emma Anholt
0ac9541804 gallium: Drop PIPE_SHADER_CAP_PREFERRED_IR.
Now everyone's saying NIR, and doing any NTT internally.  The only returns
of TGSI were in gallivm_get_shader_param() and
tgsi_exec_get_shader_param(), but the drivers were returning NIR instead
of calling down to them.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>
2023-06-12 17:37:54 +00:00
Yonggang Luo
070d02b04b docs: Update document about pipe_prim_type with mesa_prim
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>
2023-06-03 03:29:03 +00:00
Axel Davy
f0e9c225d8 docs/gallium: Clarify PIPE_CAP_CLIP_PLANES
Drivers with PIPE_CAP_CLIP_PLANES set to 0,
such as zink, ignore clip_plane_enable.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22644>
2023-05-08 21:41:21 +00:00
Erik Faye-Lund
19961f8195 docs/tgsi: use \ll and \gg for left and right shift
This renders a bit cleaner.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:40:35 +02:00
Erik Faye-Lund
abcd3423e9 docs/tgsi: fixup latex for TEX and TEX2
We need to excape the underscores for shadow_ref, as well as escape
non-math symbols.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:40:31 +02:00
Erik Faye-Lund
b7327296d5 docs/tgsi: do not use math-block for non-latex
This block isn't valid latex, so let's just use a pseudocode-block like
we do elsewhere here.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:40:27 +02:00
Erik Faye-Lund
f94c95ab5a docs/tgsi: use math-notations for conditionals
These are math-blocks, which is supposed to use math-notation for
conditionals. So let's change it to math notation.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:40:23 +02:00
Erik Faye-Lund
02908b26bb docs/tgsi: wrap overly long lines
While we're at it, use some alignment so the equations still reads
reasonably.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:40:17 +02:00
Erik Faye-Lund
d22ee93f97 docs/tgsi: fixup bad latex
It's better to split these two equations in two than to try to write
extra text that needs lots of escaping. This fixes the LaTeX rendering
to be somewhat readable.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:40:10 +02:00
Erik Faye-Lund
d8871ac2ed docs/tgsi: fix bad latex
We need empty spaces here, otherwise LaTeX thinks it's one equation, and
puts it all back onto one line.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:40:04 +02:00
Erik Faye-Lund
f84d1033c1 docs/tgsi: fix up indent
There's a mixture of indent styles here, with either two or three
spaces. We have standardized on three spaces for .rst-files in the
editorconfig, so let's apply that.

While we're at it, make sure math-blocks are indented into their
opcode-block. While the result might look the same most of the time,
this matters when we have textual explaination following math-blocks,
like we have in a few caess. If we don't indent the math there, we
end up with having to unindent the text following the math-block for it
not to count as a part of the math block, which looks very confusing
when reading the source code.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21893>
2023-05-05 21:39:57 +02:00
Erik Faye-Lund
870871c6a7 docs: correct spelling of "source"
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22286>
2023-04-26 08:09:37 +00:00
Erik Faye-Lund
9b1a99c89e docs: codepath -> code-path
This is consistent with how we spell this elsewhere in the docs.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22286>
2023-04-26 08:09:37 +00:00
Erik Faye-Lund
dc788aaa6f docs: backfacing -> back-facing
This is consistent with how the OpenGL spec spells it.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22286>
2023-04-26 08:09:37 +00:00
Alyssa Rosenzweig
a9f9953928 docs/gallium: Note samplers are not used for txf
Now that PIPE_CAP_TEXTURE_BUFFER_SAMPLER is gone, txf does not require samplers
for any texture on any Gallium driver. NIR already requires drivers to ignore
sampler_index for non-sampler operation (mainly txf), and nowadays all Gallium
drivers ingest NIR. So, document that samplers aren't bound for txf (etc) as
part of the Gallium frontend-driver contract.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22223>
2023-04-07 01:15:41 +00:00