platform/upstream/mesa.git
2 years agorusticl/api: Don't check the program source for nul bytes needlessly
LingMan [Wed, 5 Oct 2022 21:36:53 +0000 (23:36 +0200)]
rusticl/api: Don't check the program source for nul bytes needlessly

At this point we already know that the Vec we've constructed cannot contain a nul byte. Avoid the
needless scan.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18978>

2 years agorusticl/api: Shrink unsafe block
LingMan [Wed, 5 Oct 2022 21:07:08 +0000 (23:07 +0200)]
rusticl/api: Shrink unsafe block

There's only two unsafe operations left here, so shrink the unsafe block to make them obvious.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18978>

2 years agorusticl/api: Factor pushing to the Vec out of the if
LingMan [Fri, 7 Oct 2022 17:56:34 +0000 (19:56 +0200)]
rusticl/api: Factor pushing to the Vec out of the if

Both branches do the same here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18978>

2 years agorusticl/api: Fix creating a program if a nul byte is within the specified string...
LingMan [Wed, 5 Oct 2022 20:00:56 +0000 (22:00 +0200)]
rusticl/api: Fix creating a program if a nul byte is within the specified string length

The code assumed that if the length of a string was specified and greater than zero, the string
would not contain a nul byte.
Legal or not, there are apparently applications which violate that assumption. Since the spec
doesn't say anything about this case, take the likely most compatible route and treat a nul byte as
terminating the string early.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7408
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18978>

2 years agorusticl/api: Drop UTF-8 conversion of input source
LingMan [Wed, 5 Oct 2022 20:49:44 +0000 (22:49 +0200)]
rusticl/api: Drop UTF-8 conversion of input source

The spec doesn't define any charset for the source code. While the vast majority of inputs are
likely to be ASCII (which a subset of UTF-8), it is better not to make assumptions.
As a nice side effect this should be a minor speedup.

`CString`s can't currently be pushed to, so use a `Vec` as intermediate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18978>

2 years agorusticl/api: Use iterators in create_program_with_source
LingMan [Wed, 5 Oct 2022 17:43:22 +0000 (19:43 +0200)]
rusticl/api: Use iterators in create_program_with_source

This replaces several instances of unsafe pointer arithmetic and dereferencing with a single unsafe
creation of a slice, which we then use normal iterators on.
The spec mandates that a null pointer is to be interpreted as if a slice filled with zeros had been
given. That case is represented by an infinite iterator returning only zero.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18978>

2 years agor300: fix generation of invalid swizzles in regalloc
Pavel Ondračka [Wed, 19 Oct 2022 08:23:11 +0000 (10:23 +0200)]
r300: fix generation of invalid swizzles in regalloc

rc_adjust_channels is inteded for moving the swizzles to a new channels
when rewriting the writemask of an instruction. However for readers one
needs to keep the swizzles in the old channels but rather convert to the
new values, so use the proper helper rc_rewrite_swizzle.

With the new swizzle fixed, we should properly detect that it would be
invalid and thus we can select the proper register class to prevent the
writemask rewrite in the regalloc.

Documentation was added to rc_adjust_channels to make it more clear what
it actually does.

Fixes a bunch of dEQP tests.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7521
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19158>

2 years agonir2dxil: Use native helper lane intrinsic on SM >= 6.6
Pedro J. Estébanez [Wed, 19 Oct 2022 16:33:20 +0000 (18:33 +0200)]
nir2dxil: Use native helper lane intrinsic on SM >= 6.6

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19170>

2 years agoaco: Pre-split result of bvh64_intersect_ray_amd.
Bas Nieuwenhuizen [Tue, 18 Oct 2022 21:56:31 +0000 (23:56 +0200)]
aco: Pre-split result of bvh64_intersect_ray_amd.

Avoids  later moves with extractions from the vector.

Reduces VALU operation in the raytrace loop by ~6%, increasing
the RT performance in Q2RTX on a 6800 XT by about ~1.3%.

Suggested by Georg.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19148>

2 years agoutil/indicies: convert u_unfilled_gen.py to write a file
Dylan Baker [Wed, 12 Oct 2022 22:25:02 +0000 (15:25 -0700)]
util/indicies: convert u_unfilled_gen.py to write a file

Which avoids meson needing to wrap the generator to capture the output,
and makes it faster

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: use itertools.product in u_unfilled_gen.py
Dylan Baker [Wed, 12 Oct 2022 22:13:19 +0000 (15:13 -0700)]
util/indicies: use itertools.product in u_unfilled_gen.py

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: simplify some of u_indicies_gen.py
Dylan Baker [Wed, 12 Oct 2022 21:54:25 +0000 (14:54 -0700)]
util/indicies: simplify some of u_indicies_gen.py

v2:
  - Give variable more descriptive name to avoid shadowing

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
and avoid shadowing

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: write a file with u_indicies_gen.py
Dylan Baker [Wed, 12 Oct 2022 21:32:01 +0000 (14:32 -0700)]
util/indicies: write a file with u_indicies_gen.py

This avoids meson creating a wrapper to redirect stdout, and makes the
generator faster

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: use itertools.product instead of deeply nested loops
Dylan Baker [Wed, 12 Oct 2022 20:46:07 +0000 (13:46 -0700)]
util/indicies: use itertools.product instead of deeply nested loops

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agoutil/indicies: move common static functions to private header
Dylan Baker [Tue, 11 Oct 2022 21:08:17 +0000 (14:08 -0700)]
util/indicies: move common static functions to private header

less duplication is good

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19058>

2 years agodocs: Extend calendar entries for 22.2 by 2 releases.
Dylan Baker [Wed, 19 Oct 2022 17:11:43 +0000 (10:11 -0700)]
docs: Extend calendar entries for 22.2 by 2 releases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19172>

2 years agodocs: update calendar and link releases notes for 22.2.2
Dylan Baker [Wed, 19 Oct 2022 17:10:41 +0000 (10:10 -0700)]
docs: update calendar and link releases notes for 22.2.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19172>

2 years agodocs: Add sha256 sum for 22.2.2
Dylan Baker [Wed, 19 Oct 2022 17:06:27 +0000 (10:06 -0700)]
docs: Add sha256 sum for 22.2.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19172>

2 years agodocs: add release notes for 22.2.2
Dylan Baker [Wed, 19 Oct 2022 16:50:22 +0000 (09:50 -0700)]
docs: add release notes for 22.2.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19172>

2 years agofrontends/va: fixed an av1 decoding image corruption issue.
Ruijing Dong [Tue, 18 Oct 2022 20:33:42 +0000 (16:33 -0400)]
frontends/va: fixed an av1 decoding image corruption issue.

problem:
When playing back some clips with loop restoration parameters
enabled, the display image could be corrupted.

solution:
correct loop restoration unit size logic in vaapi interface.

CC: 22.2 <mesa-stable>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19146>

2 years agozink: add ci flake
Mike Blumenkrantz [Wed, 19 Oct 2022 11:15:05 +0000 (07:15 -0400)]
zink: add ci flake

fixes #7442

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19160>

2 years agotu: Clean up variable usage in `tu6_draw_common`
Mark Collins [Mon, 17 Oct 2022 08:57:56 +0000 (08:57 +0000)]
tu: Clean up variable usage in `tu6_draw_common`

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19107>

2 years agotu: Only write `A6XX_PC_PRIMITIVE_CNTL_0` if changed
Mark Collins [Mon, 17 Oct 2022 08:47:48 +0000 (08:47 +0000)]
tu: Only write `A6XX_PC_PRIMITIVE_CNTL_0` if changed

Increases the score in the `draw` test in `vkoverhead` to 71809
from 67170 on a HDK 888.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19107>

2 years agogallium: Default to PIPE_CAP_MIXED_COLORBUFFER_FORMATS
Alyssa Rosenzweig [Fri, 14 Oct 2022 18:01:48 +0000 (14:01 -0400)]
gallium: Default to PIPE_CAP_MIXED_COLORBUFFER_FORMATS

There are three tiers of drivers:

* Drivers that support MRT and support mixed colorbuffer formats. All modern
  hardware fits this as it becomes a spec requirement.
* Drivers that do not support MRT. Then this CAP is a no-op, so we might as well
  set it by default even here (this commit trivially enables the CAP for lima,
  vc4, etanviv).
* Drivers that support MRT but do not support mixed colorbuffer formats! Very
  little hardware fits this category as it doesn't suffice for MRT in most APIs.
  Unfortunately we have a few drivers that are in this category, preventing us
  from bulldozing the CAP altogether.

Given that the CAP only exists for a few legacy drivers, default it to being
enabled to avoid new drivers falling into the trap of forgetting to enable it.
Failing to set this CAP causes failures in
dEQP-GLES3.functional.fbo.completeness.*

Drivers which still do not set this CAP: nv30, r300 (older than r500), virgl in
some cases. r300/r400 is due to a hardware requirement as Emma points out.

v2: Advertise the cap on lima like the commit message claims (delete the special
case).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19079>

2 years agozink: Remove duplicate variable zm.
Vinson Lee [Sat, 15 Oct 2022 06:04:28 +0000 (23:04 -0700)]
zink: Remove duplicate variable zm.

Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In
zm = zm = create_shader_module_for_stage_optimal(ctx, screen, prog->shaders[i], prog, i, state),
zm is written twice with the same value.

Fixes: 325c703624a ("zink: add 'optimal_keys' handling for shader keys")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19086>

2 years agopvr: Remove outdated comments.
Karmjit Mahil [Tue, 13 Sep 2022 16:05:02 +0000 (17:05 +0100)]
pvr: Remove outdated comments.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19110>

2 years agopvr: Handle pipeline barrier vk_sync.
Karmjit Mahil [Tue, 31 May 2022 14:53:35 +0000 (15:53 +0100)]
pvr: Handle pipeline barrier vk_sync.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19110>

2 years agopvr: Fix overflow before widen warning for rgn headers size calculation.
Karmjit Mahil [Fri, 14 Oct 2022 12:25:46 +0000 (13:25 +0100)]
pvr: Fix overflow before widen warning for rgn headers size calculation.

This fixes CID 1515968.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19136>

2 years agopvr: Fix possible seg fault on csb copy.
Karmjit Mahil [Fri, 14 Oct 2022 12:09:41 +0000 (13:09 +0100)]
pvr: Fix possible seg fault on csb copy.

When copying the secondary command buffer's deferred control stream
to the main stream we have to first allocate space in the main
stream. In case the allocation failed we were attempting to
memcpy() to a NULL destination causing a NULL dereference.

This fixes CID 1515977.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19136>

2 years agofreedreno/a6xx: Drop max_scissor tracking
Rob Clark [Sun, 16 Oct 2022 20:01:38 +0000 (13:01 -0700)]
freedreno/a6xx: Drop max_scissor tracking

We don't actually really use this on a6xx, since SQE can early-exit IB2
when there are no more remaining primitives in the bin.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agofreedreno/a6xx: Update caps
Rob Clark [Sun, 16 Oct 2022 15:35:08 +0000 (08:35 -0700)]
freedreno/a6xx: Update caps

We should be doing all the 64b lowering.. I think that should be enough
to get us at least glsl400.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agofreedreno/a6xx: Fix primitives-generated query
Rob Clark [Tue, 18 Oct 2022 18:51:49 +0000 (11:51 -0700)]
freedreno/a6xx: Fix primitives-generated query

RBBM_PRIMCTR_7 is pre-clipped, whereas RBBM_PRIMCTR_8 is after clipping.
I believe we want pre-clipping, and this is what tu does.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agofreedreno/a6xx: Fix MAX_GEOMETRY_OUTPUT_VERTICES cap
Rob Clark [Tue, 18 Oct 2022 17:02:10 +0000 (10:02 -0700)]
freedreno/a6xx: Fix MAX_GEOMETRY_OUTPUT_VERTICES cap

Limited by the size of PC_PRIMITIVE_CNTL_5.GS_VERTICES_OUT

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agofreedreno/ir3: Lower all the 64b
Rob Clark [Sun, 16 Oct 2022 15:34:42 +0000 (08:34 -0700)]
freedreno/ir3: Lower all the 64b

Just need to enable some existing lowering.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agofreedreno/ir3: Fix clipvertex with GS+tess
Rob Clark [Mon, 17 Oct 2022 17:25:10 +0000 (10:25 -0700)]
freedreno/ir3: Fix clipvertex with GS+tess

If we have both GS and tess, GS is the stage we should run lower_clip_vs
on.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agofreedreno/a6xx: Remove unused param
Rob Clark [Sun, 16 Oct 2022 19:45:09 +0000 (12:45 -0700)]
freedreno/a6xx: Remove unused param

Minor cleanup, make it more clear that we aren't actually emitting in
IB2.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agomesa/st: ARB_vertex_attrib_64bit depend on glsl>=410
Rob Clark [Sun, 16 Oct 2022 16:40:59 +0000 (09:40 -0700)]
mesa/st: ARB_vertex_attrib_64bit depend on glsl>=410

It is possible to expose ARB_gpu_shader_fp64 without supporting
ARB_vertex_attrib_64bit.  The supported GLSL version should tell
us if 64b vertex attribs are also supported or not.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agodocs: Update freedreno features
Rob Clark [Sun, 16 Oct 2022 16:27:09 +0000 (09:27 -0700)]
docs: Update freedreno features

Another manual re-sync with reality.

There are a few extension, notably GL_ARB_texture_compression_bptc,
which are exposed but mesamatrix doesn't show as supported.  I can't
really figure out why.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

2 years agodriconf: add a workaround for Cossacks 3
Marek Olšák [Tue, 18 Oct 2022 20:49:53 +0000 (16:49 -0400)]
driconf: add a workaround for Cossacks 3

Wine issue: https://bugs.winehq.org/show_bug.cgi?id=44560

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19147>

2 years agodriconf: add a workaround for a cursor issue with kwin_wayland
Marek Olšák [Tue, 18 Oct 2022 20:49:06 +0000 (16:49 -0400)]
driconf: add a workaround for a cursor issue with kwin_wayland

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7351

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19147>

2 years agodocs: correct spelling of "freedreno"
Erik Faye-Lund [Wed, 19 Oct 2022 08:20:46 +0000 (10:20 +0200)]
docs: correct spelling of "freedreno"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "traveling"
Erik Faye-Lund [Tue, 18 Oct 2022 15:25:02 +0000 (17:25 +0200)]
docs: correct spelling of "traveling"

While "travelling" isn't incorrect, we generally prefer US english in the
docs, where "traveling" is the common form.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "correctly"
Erik Faye-Lund [Tue, 18 Oct 2022 15:24:04 +0000 (17:24 +0200)]
docs: correct spelling of "correctly"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: ie. -> i.e.
Erik Faye-Lund [Tue, 18 Oct 2022 14:52:02 +0000 (16:52 +0200)]
docs: ie. -> i.e.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: fractionary -> fractional
Erik Faye-Lund [Tue, 18 Oct 2022 14:41:47 +0000 (16:41 +0200)]
docs: fractionary -> fractional

While "fractionary" isn't incorrect language, it's much less common than
the more modern "fractional" term.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "rasterizer"
Erik Faye-Lund [Tue, 18 Oct 2022 14:58:38 +0000 (16:58 +0200)]
docs: correct spelling of "rasterizer"

We use rasterizer all over the docs, so let's be consistent.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "explicitly"
Erik Faye-Lund [Tue, 18 Oct 2022 14:56:56 +0000 (16:56 +0200)]
docs: correct spelling of "explicitly"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "addition"
Erik Faye-Lund [Tue, 18 Oct 2022 14:49:10 +0000 (16:49 +0200)]
docs: correct spelling of "addition"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "average"
Erik Faye-Lund [Tue, 18 Oct 2022 14:48:46 +0000 (16:48 +0200)]
docs: correct spelling of "average"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "laid"
Erik Faye-Lund [Tue, 18 Oct 2022 14:35:29 +0000 (16:35 +0200)]
docs: correct spelling of "laid"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "compression"
Erik Faye-Lund [Tue, 18 Oct 2022 14:24:43 +0000 (16:24 +0200)]
docs: correct spelling of "compression"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "commutativity"
Erik Faye-Lund [Tue, 18 Oct 2022 14:23:49 +0000 (16:23 +0200)]
docs: correct spelling of "commutativity"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "hierarchy"
Erik Faye-Lund [Tue, 18 Oct 2022 14:15:05 +0000 (16:15 +0200)]
docs: correct spelling of "hierarchy"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "maximum"
Erik Faye-Lund [Tue, 18 Oct 2022 14:07:54 +0000 (16:07 +0200)]
docs: correct spelling of "maximum"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "synced"
Erik Faye-Lund [Tue, 18 Oct 2022 13:56:48 +0000 (15:56 +0200)]
docs: correct spelling of "synced"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "simplification"
Erik Faye-Lund [Tue, 18 Oct 2022 13:39:03 +0000 (15:39 +0200)]
docs: correct spelling of "simplification"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "shareable"
Erik Faye-Lund [Tue, 18 Oct 2022 13:31:29 +0000 (15:31 +0200)]
docs: correct spelling of "shareable"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "Raspbian"
Erik Faye-Lund [Tue, 18 Oct 2022 13:20:57 +0000 (15:20 +0200)]
docs: correct spelling of "Raspbian"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "subtly"
Erik Faye-Lund [Tue, 18 Oct 2022 13:11:12 +0000 (15:11 +0200)]
docs: correct spelling of "subtly"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "choosing"
Erik Faye-Lund [Tue, 18 Oct 2022 13:10:09 +0000 (15:10 +0200)]
docs: correct spelling of "choosing"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "Khronos"
Erik Faye-Lund [Tue, 18 Oct 2022 13:08:08 +0000 (15:08 +0200)]
docs: correct spelling of "Khronos"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "to"
Erik Faye-Lund [Tue, 18 Oct 2022 13:02:11 +0000 (15:02 +0200)]
docs: correct spelling of "to"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "implementation"
Erik Faye-Lund [Tue, 18 Oct 2022 12:57:20 +0000 (14:57 +0200)]
docs: correct spelling of "implementation"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "hierarchical"
Erik Faye-Lund [Tue, 18 Oct 2022 12:46:11 +0000 (14:46 +0200)]
docs: correct spelling of "hierarchical"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "specified"
Erik Faye-Lund [Tue, 18 Oct 2022 12:26:28 +0000 (14:26 +0200)]
docs: correct spelling of "specified"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "bug fixes"
Erik Faye-Lund [Tue, 18 Oct 2022 11:41:37 +0000 (13:41 +0200)]
docs: correct spelling of "bug fixes"

This isn't a compound word in English, and we tend to write it as two
worlds.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "attempts"
Erik Faye-Lund [Tue, 18 Oct 2022 12:11:47 +0000 (14:11 +0200)]
docs: correct spelling of "attempts"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: correct spelling of "implemented"
Erik Faye-Lund [Tue, 18 Oct 2022 11:56:32 +0000 (13:56 +0200)]
docs: correct spelling of "implemented"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19139>

2 years agodocs: Remove document about XvMC
Yonggang Luo [Tue, 18 Oct 2022 05:33:29 +0000 (13:33 +0800)]
docs: Remove document about XvMC

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/19133>

2 years agonouveau: Remove XVMC_VL environment variable usage
Yonggang Luo [Tue, 18 Oct 2022 05:30:49 +0000 (13:30 +0800)]
nouveau: Remove XVMC_VL environment variable usage

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19133>

2 years agodocs: Remove rbug related documents
Yonggang Luo [Tue, 18 Oct 2022 12:57:28 +0000 (20:57 +0800)]
docs: Remove rbug related documents

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19138>

2 years agodocs: Remove graw related words
Yonggang Luo [Tue, 18 Oct 2022 12:51:24 +0000 (20:51 +0800)]
docs: Remove graw related words

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19138>

2 years agoci/windows: Update build container image with all deps so wraps can be disabled
Jesse Natalie [Sat, 27 Aug 2022 16:12:34 +0000 (09:12 -0700)]
ci/windows: Update build container image with all deps so wraps can be disabled

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18287>

2 years agoradeonsi: lower hadd and fisnormal
Karol Herbst [Wed, 28 Sep 2022 17:26:54 +0000 (19:26 +0200)]
radeonsi: lower hadd and fisnormal

Signed-off-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/19151>

2 years agonir/lower_cl_images: set binding
Karol Herbst [Wed, 28 Sep 2022 23:10:42 +0000 (01:10 +0200)]
nir/lower_cl_images: set binding

Signed-off-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/19151>

2 years agoradeonsi: fail creating textures from user memory
Karol Herbst [Wed, 28 Sep 2022 01:21:05 +0000 (03:21 +0200)]
radeonsi: fail creating textures from user memory

Signed-off-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/19151>

2 years agozink: clamp shader bindings for compute descriptors
Mike Blumenkrantz [Tue, 18 Oct 2022 14:08:38 +0000 (10:08 -0400)]
zink: clamp shader bindings for compute descriptors

this uses massively less memory for some drivers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19140>

2 years agozink: reorder context init to handle COMPUTE_ONLY
Mike Blumenkrantz [Tue, 18 Oct 2022 14:05:29 +0000 (10:05 -0400)]
zink: reorder context init to handle COMPUTE_ONLY

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19140>

2 years agozink: delete some big struct members from zink_context
Mike Blumenkrantz [Tue, 18 Oct 2022 14:04:52 +0000 (10:04 -0400)]
zink: delete some big struct members from zink_context

these were only used by descriptor caching, so now they just take up memory

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19140>

2 years agozink: clamp feedback loop layout to GENERAL if the ext isn't supported
Mike Blumenkrantz [Tue, 18 Oct 2022 15:53:41 +0000 (11:53 -0400)]
zink: clamp feedback loop layout to GENERAL if the ext isn't supported

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19140>

2 years agozink: enable tc cpu storage on some buffers
Mike Blumenkrantz [Tue, 18 Oct 2022 16:25:17 +0000 (12:25 -0400)]
zink: enable tc cpu storage on some buffers

matching freedreno usage

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19142>

2 years agocso: make memcmp and hash computation use a literal key size for blend state
Marek Olšák [Sun, 7 Aug 2022 23:41:16 +0000 (19:41 -0400)]
cso: make memcmp and hash computation use a literal key size for blend state

This results in faster lookups because memcmp and the hash computation
can be unrolled.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

2 years agocso: inline more functions because some parameters like key_size are literals
Marek Olšák [Sun, 7 Aug 2022 23:29:37 +0000 (19:29 -0400)]
cso: inline more functions because some parameters like key_size are literals

One function is moved to the header file, the other two functions are inlined
manually.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

2 years agocso: don't destroy CSOs that are saved
Marek Olšák [Sat, 6 Aug 2022 21:30:02 +0000 (17:30 -0400)]
cso: don't destroy CSOs that are saved

I think this can't happen in practice, but better safe than sorry.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

2 years agocso: fix broken optimization for sampler state lookups
Marek Olšák [Sun, 7 Aug 2022 23:59:48 +0000 (19:59 -0400)]
cso: fix broken optimization for sampler state lookups

Since the key size wasn't a constant expression, all the function inlining
didn't do much. This makes it a constant expression.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: c4e18cd4dd1 - mesa/st: add PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_FREEDRENO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

2 years agocso: constify some parameters to remove typecasts
Marek Olšák [Sat, 6 Aug 2022 21:28:34 +0000 (17:28 -0400)]
cso: constify some parameters to remove typecasts

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

2 years agocso: start without u_vbuf by default if it's not always used
Marek Olšák [Sat, 6 Aug 2022 21:28:59 +0000 (17:28 -0400)]
cso: start without u_vbuf by default if it's not always used

no functional change, but it's convenient for future work

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

2 years agoglthread: don't sync for glIsEnabled(GL_BLEND, GL_LIGHTING, GL_POLYGON_STIPPLE)
Marek Olšák [Sat, 27 Aug 2022 22:01:53 +0000 (18:01 -0400)]
glthread: don't sync for glIsEnabled(GL_BLEND, GL_LIGHTING, GL_POLYGON_STIPPLE)

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agoglthread remove the unused *last pointer from unmarshal functions
Marek Olšák [Tue, 27 Sep 2022 00:16:48 +0000 (20:16 -0400)]
glthread remove the unused *last pointer from unmarshal functions

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agoglthread: merge and collapse glBindBuffer calls that unbind and then bind
Marek Olšák [Mon, 22 Aug 2022 00:32:08 +0000 (20:32 -0400)]
glthread: merge and collapse glBindBuffer calls that unbind and then bind

This is a small optimization for viewperf. See the comment in the code.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agogl_marshal.py: C style fixups
Marek Olšák [Mon, 29 Aug 2022 23:17:33 +0000 (19:17 -0400)]
gl_marshal.py: C style fixups

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agogallium/u_threaded: don't call simplify_draw_info redundantly
Marek Olšák [Sat, 13 Aug 2022 14:04:22 +0000 (10:04 -0400)]
gallium/u_threaded: don't call simplify_draw_info redundantly

It's always called for the first and second draw in a row, and if they
can't be merged, the second draw becomes the first draw in the next call,
and simplify_draw_info is called again on that. Thus, it's called twice
on any draw that isn't merged. To prevent that, call it when we add
the draws.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agoglthread: rewrite CallList merging and do it in the app thread
Marek Olšák [Mon, 22 Aug 2022 03:49:14 +0000 (23:49 -0400)]
glthread: rewrite CallList merging and do it in the app thread

This looks simpler and hopefully faster, but it may just move the overhead
to the app thread.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agoglthread: demystify Draw function names
Marek Olšák [Sun, 21 Aug 2022 23:47:32 +0000 (19:47 -0400)]
glthread: demystify Draw function names

Since we had the freedom to write our own marshal and unmarshal Draw
functions, we turned it into a mess by doing whatever we want in those
functions. For example, DrawElementsInstancedBaseVertex actually
implemented DrawArraysInstancedBaseInstanceBaseInstance.

Add 4 internal GL functions that pass user buffers through marshal
/unmarshal functions, and clean up the other names to match their
behavior.

The new functions don't need any parameters in their definitions because
we don't call them directly.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agoglapi: remove EXT and ARB suffixes from Draw functions
Marek Olšák [Sun, 21 Aug 2022 22:27:08 +0000 (18:27 -0400)]
glapi: remove EXT and ARB suffixes from Draw functions

This swaps the function names with aliased names that don't have those
suffixes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agoglthread: add more DrawArrays/Elements variants with fewer fields
Marek Olšák [Sun, 21 Aug 2022 22:05:09 +0000 (18:05 -0400)]
glthread: add more DrawArrays/Elements variants with fewer fields

The idea is to save 8 bytes per call by removing 2 fields that are not
specified by the user such as instance_count=1, basevertex=0, and
baseinstance=0.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agoglthread: use a constant expression instead of cmd_size in custom functions
Marek Olšák [Sat, 13 Aug 2022 05:49:35 +0000 (01:49 -0400)]
glthread: use a constant expression instead of cmd_size in custom functions

cmd_size is constant in these cases

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agogl_marshal.py: simplify print_sync_call and rename to print_call
Marek Olšák [Thu, 11 Aug 2022 15:59:26 +0000 (11:59 -0400)]
gl_marshal.py: simplify print_sync_call and rename to print_call

no spaces around = is a python convention for implicit arguments only

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agogl_marshal.py: inline functions for readability
Marek Olšák [Thu, 11 Aug 2022 15:08:42 +0000 (11:08 -0400)]
gl_marshal.py: inline functions for readability

All functions have only one use. Jumping constantly between functions
in the file is confusing.

No spaces around = is a python convention for implicit arguments only.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

2 years agogl_marshal.py: remove the -O1 hack and manual SET_* inlining
Marek Olšák [Thu, 11 Aug 2022 13:27:52 +0000 (09:27 -0400)]
gl_marshal.py: remove the -O1 hack and manual SET_* inlining

The compile times aren't so bad anymore now that the initialization is
split among all 8 files.

Also add one assertion.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>