Commit Graph

184 Commits

Author SHA1 Message Date
Kenneth Graunke b6878d456f st/mesa, iris: Add optional CPU-based ASTC void extent denorm flushing
Intel Gen9 GPUs have hardware ASTC support, but have a bug where they
don't handle denormalized values in void extent blocks correctly.  This
isn't that hard to work around - on upload, we can detect such blocks,
and flush any denorms to zero.  Because we're altering the data behind
the application's back, and applications can theoretically ask to
download the original unaltered image data, we unfortunately need to
maintain shadow copies of the data.

To make sure that we don't accidentally skip the void-extent flushing
via any fast-upload paths, and support download correctly, we plug this
into the st/mesa compressed texture format fallback paths, which store
a CPU copy of the original image data, and upload altered data.

This is unfortunately common code for what's likely to be a single
driver's issue (on a single generation), but it beats replicating an
entire framework we already have inside the driver.

Fixes dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.*
using iris on Intel Gen9 GPUs.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4167
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21943>
2023-03-17 21:30:48 +00:00
Antonio Gomes 010c18c443 gallium: Add new caps PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Nanley Chery 0a5a54b81a docs: Document the implicit barriers around blits
We're going to use resource_copy_region to copy from a resource that has
been written to with imageStore. Make it clear that this is safe.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19827>
2023-02-10 01:40:47 +00:00
Mike Blumenkrantz 2127287d4d gallium: add PIPE_CAP_NULL_TEXTURES
this allows drivers to indicate that they support sampling from null
textures instead of using fallback textures

for now, this is only used for depth-based fallback textures

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21072>
2023-02-05 13:32:02 +00:00
Gert Wollny 153af03b94 gallium: Add cap to request state validation for all dirty state
With aaa4b0e6 state validation is no longer called for all changed states,
but only for states that will be active with a new shader program.
Not all drivers support this and might prefer if the state validation
is emitted for all states that might be changed. So add a cap that the
driver can signal one or the other preference, and default to the new
behavior.

Fixes: aaa4b0e6
   st/mesa: move check_program_state code into _mesa_update_state

v2: - Rename cap and and invert its meaning, query the cap
      only once and store it in st, handle the mask update
      when updating the shader i.e. not in st_validate_state (Marek)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20493>
2023-01-12 08:34:49 +00:00
Emma Anholt 95c4241f47 docs/gallium: Explain that MSAA transfer_map must be supported.
It's called this way in various drivers, and is an established part of the
transfer_map interface.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20523>
2023-01-06 19:00:17 +00:00
Marek Olšák b9caddb4a7 glthread,gallium: add a CAP to disable glBufferSubData optimization in glthread
it regresses performance on iris

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20379>
2023-01-01 16:00:07 -05:00
Erik Faye-Lund c70c5ecd2e docs: move generic gallium envvars to root doc
It makes little sense to document the gallium envvars in multiple
places. Let's merge them all into the root envvar document.

This also moves GALLIUM_OVERRIDE_CPU_CAPS to toe root envvars doc, as
it's more generic than just LLVMpipe.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>
2022-11-15 11:25:05 +01:00
Erik Faye-Lund e7e92f7954 docs: remove duplicate envvars
These envvars are also documented in the "envvars" document, which is
more prominent. Let's just drop these duplicate definitions to avoid
confusion.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>
2022-11-15 11:25:05 +01:00
Erik Faye-Lund 4eef5628c8 docs: drop custom envvar directive
The custom envvar directive is strange. It overloads the global
namespace, where there's already a well-known envvar directive, but the
envvar role won't resolve to envvars defined using the custom directive.

It's not really critical to declare the type and default value here, and
many descriptions already include this. Let's just use the plain one,
and let the description take care of the details where needed.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>
2022-11-15 11:25:05 +01:00
Erik Faye-Lund 864e658c0a docs: properly nest envvar descriptions
These were not nested properly, making the definitions not part of the
definition lists.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>
2022-11-15 11:25:05 +01:00
Erik Faye-Lund a5f319a38e docs/tgsi: xDArray -> xD_ARRAY
This matches what we have in tgsi_strings.c, as well as the non-constant
part of the corresponding enum tgsi_texture_type values.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>
2022-11-15 10:01:15 +00:00
Erik Faye-Lund 474ba56f78 docs/gallium: move period out of quotes
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>
2022-11-15 10:01:15 +00:00
Erik Faye-Lund 306a8379ca docs: lifecycle -> life cycle
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>
2022-11-15 10:01:15 +00:00
Erik Faye-Lund 18fcd3c47c docs: un-committed -> uncommitted
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>
2022-11-15 10:01:15 +00:00
Erik Faye-Lund 4a42efb7fc docs: IPE -> PIPE
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>
2022-11-15 10:01:15 +00:00
Erik Faye-Lund 67b77d8ade docs: apply some redirects
Here's a few redirects that we should apply, in case the redirects
gets removed in the future.

These are mostly of the 301 (moved permanently) kind, but also a
few where the site probably *should* have used the permanent
error-code.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19574>
2022-11-10 17:26:19 +01:00
Erik Faye-Lund b925665e4e docs: link to web.archive.org for dead links
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19574>
2022-11-10 17:17:49 +01:00
Erik Faye-Lund ba78af66c6 docs: use ext-role for GL / VK extensions
This makes sure that we generate proper links to all of these
extensions.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19594>
2022-11-09 16:10:55 +00:00
Erik Faye-Lund 24372e4882 docs: NV_gpu_shader4 -> NV_gpu_program4
There's no GL_NV_gpu_shader4 extension, and the TEX opcode is defined in
NV_gpu_program4. Correct the mistake.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19594>
2022-11-09 16:10:55 +00:00
Erik Faye-Lund b51d1af1c1 docs: feeddback -> feedback
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19594>
2022-11-09 16:10:55 +00:00
Erik Faye-Lund 9b55f1c12b docs: upgrade some links to https
We're in 2022 now, and HTTPS is available in a lot more places in the
past. Let's upgrade some links, to protect the privacy of our readers.

The links that are left either don't support HTTPS, or are simply dead
and needs to be updated anyway. That's besides the scope of this
merge-request, so I'm leaving that for someone else.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19492>
2022-11-07 10:58:12 +00:00
Erik Faye-Lund ebf33212ed docs: eg -> e.g.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19494>
2022-11-04 16:38:06 +00:00
Erik Faye-Lund e082cff56b docs/gallium: glsl -> GLSL
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19494>
2022-11-04 16:38:06 +00:00
Erik Faye-Lund 45b4f82091 docs/gallium: fixup broken markup
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19494>
2022-11-04 16:38:06 +00:00
Erik Faye-Lund 5525d0b196 docs: use inline-code instead of default role
A single backtick escaped string in Sphinx refers to the "default role"
which is vague, and in practice ends up producing the HTML cite-element.
That's almost certainly not what these uses wanted.

A bunch of these would probably be better served using appropriate roles
instead of inline-code markup, but this is almost certainly what was
meant here instead. Let's not let perfect be the enemy of good here, and
just do what was intended. Using the right roles everywhere is a big
task.

I usually don't do changes like these to the relnotes, but in this case
there were a *single* article that had these mistakes. I assume that was
an early bug in the script that generateg the relnotes. Let's patch it,
so we don't get misrendering if we change the default-role.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19494>
2022-11-04 16:38:06 +00:00
Erik Faye-Lund f5eb25ec9f docs/tgsi: quote literal numbers
This makes them stand out a bit, and render using a monospace font.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund eaa0b58963 docs/tgsi: mark pseudocode as such
This is more semantically strong.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund c69dbe9d81 docs/tgsi: always use uppercase for instruction names
This reads a bit cleaner.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund 42afb3095b docs/tgsi: use src1 instead of "second arg"
This is more consistent with what we do elsewhere here.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund a9fce4d2be docs/tgsi: put emphasis on src etc
This makes them stand out a bit more.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund d264ec7b22 docs/gallium: use math-role for zero and one also
Without this, the zero and one renders with a different font than the
other equations. There's no good reason for this, so let's just use the
math-role for these too.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund be857778bb docs/gallium: use table instead of list
This makes this a bit easer to read, as the equations line up properly.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund c85a05a685 docs/gallium: use definition-lists for member-lists
For some reason, we started with headings for some of these, and then
switched to definition lists midway though.

Let's stick with the definition lists, as that looks a bit more tidy.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19460>
2022-11-03 07:40:35 +00:00
Erik Faye-Lund 8070a8c6e7 docs: spell ATI codenames in allcaps
This seems to be the official spelling from ATI/AMD as well.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
2022-11-02 10:16:44 +00:00
Erik Faye-Lund c35f5a8806 docs: nVidia -> NVIDIA
While we're at it, also spell the code-names in allcaps, like NVIDIA
does. One exception is Fermi, which is spelled like a proper noun.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
2022-11-02 10:16:44 +00:00
Erik Faye-Lund 9fea95d907 docs: Adreno aXXX -> Adreno XXX
The names of these are "Adreno XXX" or "aXXX", not "Adreno aXXX".

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
2022-11-02 10:16:44 +00:00
Emma Anholt 07bac4094a gallium: update docs about PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF.
We can provide better guidance on when to (un-)set this given that
everyone's on NIR now.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16539>
2022-11-01 14:55:56 -07:00
Lionel Landwerlin 5d88ab63e2 st/gallium: plumb protected context creation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8092>
2022-10-27 10:53:18 +00:00
Lionel Landwerlin b30f1327f9 gallium: rename PROTECTED_CONTENT cap into PROTECTED_SURFACE
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8092>
2022-10-27 10:53:18 +00:00
Erik Faye-Lund 2e320da72f docs: dependant -> dependent
We generally prefer US English in the docs, so let's correct this.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund f2e688f042 docs: hw -> HW
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund 672fc2527b docs: xyzw -> XYZW
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund f69fe8c279 docs: llvmpipe -> LLVMpipe
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund b3e0a70908 docs: radeon -> Radeon
Let's also do radeonsi -> RadeonSI while we're at it.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund af00076741 docs: freedreno -> Freedreno
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund e23c3fcb4e docs: rgb -> RGB
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund f1bc496785 docs: consistently spell OK in allcaps
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:45 +00:00
Erik Faye-Lund d356b1dc63 docs: correct spelling of "Gouraud"
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:44 +00:00
Erik Faye-Lund 9d8bf93420 docs: correct spelling of "specifies"
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19191>
2022-10-25 10:06:44 +00:00