Commit graph

167720 commits

Author SHA1 Message Date
Ian Romanick
1d5033823e nir/inline_uniforms: Change num_offsets type to uint8_t
This is step 0 in an attempt to unify a bunch of nir_inline_uniforms.c
and lvp_inline_uniforms.c code.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21179>
2023-02-10 03:18:23 +00:00
Emma Anholt
6b6f757e23 ci/crocus: Update HSW expectations.
2 good-looking trace updates, one new crash.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
b01c3553f7 ci/radv: Update navi21 llvm xfails.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
9adfe49563 ci/nouveau: Disable the gm20b jobs entirely.
The old (broken, hw failure) board isn't really hooked up right now, and
I'm waiting on buying some remaining bits to set up the 10 boards sitting
in the box here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
ba73aaa0da ci/freedreno: Update a3xx piglit_shader xfails.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
e182970692 ci/freedreno: Add an xfail for a618 VK full run.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
a8a6be1641 ci/freedreno: Update a530 manual-run xfails.
A lot of this looks like fractional run test list updates.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
e267d72979 ci/freedreno: Disable the a306_piglit_gl job.
It's broken with recurring hangchecks.  Someone would need to restabilize
it, but turn it off for anyone to find until someone (me? :( ) cares.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
238fcd30ed ci/zink: Update TGL full-run xfails.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt
1a862c74bc ci: Disable systems in my farm that haven't recovered.
We lost power in a storm, and these ones didn't come back afterwards.  I
suspect I need a new PSU.  And maybe some surge protection for the future.
:(

I've left the CI code in place for some day when I hopefully swap out the
power supplies.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Nanley Chery
2e13456bca mesa/st: Measure compressed fallback unmap paths
Add code to help find performance issues. The logging is disabled by
default.

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
Nanley Chery
fdabf886be mesa/st: Enable compute-based transcoding to DXT5
By enabling this path, we get a 56% decrease in upload time on a texture
upload microbenchmark. This was measured on an Ice Lake with an iris
driver that tries to use the compressed format fallback path.

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
Nanley Chery
6d57614fd0 mesa/st: Add st_texture_image_resource_level
Returns the level of the gl_texture_image with respect to the resource
it's allocated within. Example: returns 0 for non-finalized texture.

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
Nanley Chery
637ff22413 mesa/st: Add st_compute_transcode_astc_to_dxt5
Add a function to upload ASTC data, transcoding it to BC3/DXT5 in the
process.

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
Nanley Chery
1f8f1a0d9b mesa/st: Add and use create_bc1_endpoint_ssbo
Create and cache the SSBO used by the BC1 compute shader program.

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
Nanley Chery
bab950a4ac mesa/st: Add get_compute_program
Add a function to create and cache the compute programs that will be
used to transcode ASTC to DXT5.

Note that the error paths in st_create_context_priv may actually lead to
segfaults if hit. I've been able to work around them by 1) moving them
further down and 2) returning early from st_glFlush if st->pipe is NULL.
I don't know if that's the right solution however.

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
Nanley Chery
c4a6176d19 mesa: Create _mesa_CreateShaderProgramv_impl
Factor out the implementation of _mesa_CreateShaderProgramv so that we
can make programs that will encode DXT5.

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
Nanley Chery
cb296db853 glsl: Modify the #includes in the DXT5 shaders
1. Drop the commented out includes. Shader caching is disabled if those
   are found.

2. Replace the active includes with "%s". Later on, we'll construct the
   final strings with vasprintf. One downside to doing this is that the
   glsl file extensions are no longer true. These files are now
   templates.

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
Nanley Chery
96cb3ba424 glsl: Add compute shaders to encode DXT5/BC3
These compute shaders are from the MIT-licensed GPU compressor, Betsy.
I have included copyright headers, inlined the __sharedOnlyBarrier macro
definition from the "UavCrossPlatform_piece_all.glsl" header when
applicable, and made the following changes to support GLES:

   * Conditionally disable the const keyword in the BC3 shaders
   * Make the params uniform in the BC4 shader uint2
   * Avoid implicit data type conversions in the BC3 shaders
   * Use constructors for array initialization in the BC1 shader
   * Add precision qualifiers to the BC3 shaders
   * Output to an rgba16ui image for the BC1 and BC4 shaders
   * Set the version of the BC3 shaders to 310 es

Ref: https://github.com/darksylinc/betsy/tree/cc723dcae9
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
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
Dave Airlie
6043f66dd3 crocus: disable Y tiling for render targets properly.
The old code would disallow linear targets as well which would confuse
things with reimporting dma-bufs.

Fixes: 32728dc66e ("crocus: introduce main resource configuration helper.")
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21209>
2023-02-10 01:25:42 +00:00
Tapani Pälli
db6c374919 iris: disable preemption for 3DPRIMITIVE during streamout
This is required by Wa_16013994831.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19947>
2023-02-09 21:40:10 +02:00
Lionel Landwerlin
ebc4893947 intel/fs: fix mesh indirect movs
The size in src[2] is in byte and needs to cover any possible data
accessed in src[0] by the indirection. That way the register
allocation is aware of what cannot be spilled for the instruction to
execute on valid data.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 70ace2bbcd ("intel/compiler: Implement Task Output and Mesh Input")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21188>
2023-02-09 15:35:55 +00:00
Mike Blumenkrantz
dc91f2c71b zink: set PIPE_CAP_SURFACE_REINTERPRET_BLOCKS
this fixes perf for CompressedTexSubImage and makes DOOM2016 run at full speed

ref #8223

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21218>
2023-02-09 09:54:27 -05:00
Mike Blumenkrantz
e3b746e3a3 zink: use GPL to handle (simple) separate shader objects
apps/games using separate shader objects end up passing the separable
shaders to the link_shader hook individually, which is still not ideal for
zink's usage since the more optimal path is to have all the shaders and create
a RAST+FS GPL stage that can run all the inter-stage io handlers

it IS technically possible to handle this for simple VS+FS pipelines using
GPL, however, but it's kinda gross. such shaders now use descriptor buffer
to create their own pipelines/layouts/descriptors async, and then a "separable"
variant of the gfx program can be created by fast-linking these together

the "separable" gfx program can't handle shader variants, but it can do basic
pipeline caching for PSO state changes, which makes it flexible enough to sorta
kinda maybe handle the most basic cases of separate shader objects

descriptor buffer is used because having to create and manage a separate architecture
for sets/pools/templates is too nightmarish even for me

this is, at best, a partial solution, but it's the best the vulkan api can
currently do

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
60b26a6b1f zink: enable combining intermediate gpl libs from combine function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
ab69cba807 zink: move gpl input/output funcs to zink_pipeline.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
4f8a548af1 zink: allow multiple gpl libraries in zink_create_gfx_pipeline_combined()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
7efec7fb61 zink: add gpl flags for libraries based on shaders passed
no change to current operations

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
983f30f8ba zink: split out gfx pipeline library creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
5ae973c7d3 zink: add flags param to zink_pipeline_layout_create()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
bdb97b3f20 zink: split out VkShaderModule creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21197>
2023-02-09 13:57:50 +00:00
Mike Blumenkrantz
36595e94c7 zink: avoid the descriptor set multiplier for bindless buffers
the bindless descriptor buffer is already correctly sized, so it needs
to avoid the huge set multiplier or it'll explode all available vram

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21216>
2023-02-09 08:08:22 -05:00
Mike Blumenkrantz
f14571e393 zink: flag bindless_init before calling zink_batch_bind_db() in init
this otherwise fails to bind the bindless buffer

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21216>
2023-02-09 07:49:22 -05:00
Samuel Pitoiset
1fdf6e140d docs: add missing RADV_PERFTEST=video_decode
Fixes: 9477f117f4 ("radv/video: add initial frameworking.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21158>
2023-02-09 12:05:26 +00:00
Tatsuyuki Ishi
9fdc145ad6 radv: Assert the hardware support rbplus when emitting rbplus state.
If someone forget to check for rbplus before setting dirty bits, it's going
to cause really mysterious bugs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21189>
2023-02-09 08:32:20 +00:00
Tatsuyuki Ishi
a36efe3e19 radv: Fix missing rbplus_allowed check for dynamic PS epilogs.
This created really mysterious bugs on gfx10.

Fixes flickering in a bunch of DXVK games, most visibly Overwatch 2.

Fixes: eb07a11b8f ("radv: add support for compiling PS epilogs on-demand")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8258
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21189>
2023-02-09 08:32:20 +00:00
Samuel Pitoiset
46aee750c6 radv: stop skipping the cache for monolithic graphics pipelines with GPL
Only libraries and optimized (LTO) pipelines are still unsupported,
but there is no reason to skip the cache for monolithic pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21198>
2023-02-09 08:11:45 +00:00
Samuel Pitoiset
26896616c1 radv: stop skipping the cache for compute/raytracing pipelines with GPL
This was a hard solution somewhat.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21198>
2023-02-09 08:11:45 +00:00
Samuel Pitoiset
53cea404f7 radv: simplify creating a FS epilog from a library
It's now compiled in radv_graphics_pipeline_compile().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21140>
2023-02-09 07:48:03 +00:00
Samuel Pitoiset
06d17fccfb radv: make sure to disable MRT compaction when compiling a PS epilog with GPL
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21140>
2023-02-09 07:48:03 +00:00
Samuel Pitoiset
16e4dd3e37 radv: fix disabling MRT compaction for on-demand PS epilogs
Some dynamic states require to compile PS epilogs on-demand. In this
case, MRT compaction should be disabled because we don't know the CB
state when compiling the fragment shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21140>
2023-02-09 07:48:03 +00:00
Samuel Pitoiset
ea5c893289 radv: regroup PS epilog info when generating the graphics pipeline key
No logical change.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21140>
2023-02-09 07:48:03 +00:00
Samuel Pitoiset
84d006ef11 radv: simplify determining when the fragment shader needs an epilog
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21140>
2023-02-09 07:48:03 +00:00
Samuel Pitoiset
b41c6c3a50 radv: cleanup graphics pipeline library flags uses
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21140>
2023-02-09 07:48:03 +00:00
Samuel Pitoiset
7976316f3e radv: fix skipping graphics pipeline compilation when the FS is NULL
Fixes: 3eb97b9d33 ("radv: skip compilation when possible with GPL fast-linking")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21192>
2023-02-09 07:27:53 +00:00
Tapani Pälli
88cadf1454 intel/blorp: disable REP16 for gfx12+ with R10G10B10_FLOAT_A2
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21137>
2023-02-09 06:34:43 +00:00
Yonggang Luo
948f4e4d07 util: Fixes error: no previous prototype for 'mesa_cache_db_entry_remove'
Fixes: c92c99481f ("util/mesa-db: Support removal of cache entries")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21191>
2023-02-09 04:05:39 +00:00
Emma Anholt
a2fbd2fbd0 zink: Add tracing of blit operations.
I found this useful in lining up some perfetto traces between zink+anv and
iris, and understanding what was going on in them.  Also it's a demo of
being able to insert annotations for work in the command stream, which I
suspect we'll want more of.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20657>
2023-02-09 03:27:34 +00:00
Emma Anholt
4dc6390445 u_trace: Add an interface for checking trace enablement outside a context.
For zink, we want to know if we should pass command stream markers down to
the underlying driver, but we don't have our own trace context we're
recording trace events with.  We definitely want those markers if the
underlying driver is going to be doing perfetto tracing, or is requesting
marker tracing.  So, create an interface for querying those flags before
they get copied down to an actual u_trace_context.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20657>
2023-02-09 03:27:34 +00:00