Lionel Landwerlin
67619d8153
intel/perf: fix perf equation subslice mask generation for gfx12+
...
v2: Fix comment change (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015 >
2021-11-05 10:22:18 +00:00
Lionel Landwerlin
a543a94404
intel/dev: fix subslice/eu total computations with some fused configurations
...
When a device has its first slice/subslice fused off, we can't use the
number of slices/subslices to iterate the mask array.
v2: Fix spelling (Marcin)
Use size_t for iterator (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reported-by: Matt Roper <matthew.d.roper@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5601
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015 >
2021-11-05 10:22:18 +00:00
Lionel Landwerlin
e10c641f00
intel/dev: reuse internal functions to set mask
...
Rather than having 2 paths to set the slice/subslice/eu masks, reuse
the other internal functions. This simplifies finding bugs within this
code :
* If we have i915 query topology support, update_from_topology() is
called.
* If we don't have query topology support but we have getparam for
slice/subslice/EU, we generate a topology data and call
update_from_topology()
* If we have no kernel support to query any kind of topology, we
generate the values return by the kernel for slice/subslice/EU and
call update_from_masks() which in turns calls
update_from_topology()
v2: Fixup typo (Adam)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015 >
2021-11-05 10:22:18 +00:00
Lionel Landwerlin
d7c6a90c26
intel/dev: don't forget to set max_eu_per_subslice in generated topology
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015 >
2021-11-05 10:22:18 +00:00
Lionel Landwerlin
d1db5d562a
intel/dev: fix HSW GT3 number of subslices in slice1
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015 >
2021-11-05 10:22:18 +00:00
Rhys Perry
12294026d5
nir/algebraic: optimize Cyberpunk 2077's open-coded bitfieldReverse()
...
fossil-db (Sienna Cichlid):
Totals from 9 (0.01% of 128647) affected shaders:
CodeSize: 29900 -> 28640 (-4.21%)
Instrs: 5677 -> 5443 (-4.12%)
Latency: 96561 -> 95025 (-1.59%)
Copies: 571 -> 544 (-4.73%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13673 >
2021-11-05 09:31:04 +00:00
Pierre-Eric Pelloux-Prayer
9b8bc712b2
mesa: remove NEW_COPY_TEX_STATE
...
Since _NEW_PIXEL isn't handled in _mesa_update_state anymore, we can
replace NEW_COPY_TEX_STATE by _NEW_BUFFERS.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13596 >
2021-11-05 10:03:04 +01:00
Pierre-Eric Pelloux-Prayer
1ee3fbd703
mesa: always call _mesa_update_pixel
...
10c75ae4
moved handling of this state to the functions that
depend on ctx->_ImageTransferState.
So we can't depend on _NEW_PIXEL being set to call this function,
since it'll be always clear earlier by _mesa_update_state_locked.
Example sequence that would trigger the issue:
glPixelTransferi(...)
glClear(...)
glTexSubImage2D(...) <-- won't use the new value set by
glPixelTransferi because glClear caused
_NEW_PIXEL to be cleared.
_NEW_PIXEL itself is kept because st_update_pixel_transfer depends
on it.
Fixes: 10c75ae4
("mesa: move _mesa_update_pixel out of _mesa_update_state")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5273
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13596 >
2021-11-05 10:02:59 +01:00
Samuel Pitoiset
6b002d2549
Revert "radv: only enable VK_EXT_display_control for vrcompositor (SteamVR)"
...
It's fixed now.
This reverts commit db7ad0c170
.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13682 >
2021-11-05 08:27:54 +01:00
orbea
0a6f079afe
build: add sha1_h for lp_texture.c
...
../mesa-9999/src/gallium/drivers/llvmpipe/lp_texture.c:55:10: fatal error: git_sha1.h: No such file or directory
Fixes: 1608a815e3
("llvmpipe: add support for EXT_memory_object(_fd)")
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Signed-off-by: orbea <orbea@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13665 >
2021-11-05 05:54:20 +00:00
Jordan Justen
6ffdcc335e
iris: Use mi_builder in iris_load_indirect_location()
...
For example, this allows us to take advantage of command-streamer
based register offsets in mi_builder.
Ref: 06cf838cbd
("intel/mi_builder: Support gen11 command-streamer based register offsets")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13652 >
2021-11-04 21:23:21 -07:00
Mike Blumenkrantz
833c0394e0
Revert "gallium/u_blitter: work around broken sample shading in llvmpipe and zink"
...
This reverts commit 8b287c3f92
.
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/13679 >
2021-11-05 02:36:32 +00:00
Mike Blumenkrantz
60a8d68285
gallivm: handle TGSI SampleId sysval
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13679 >
2021-11-05 02:36:32 +00:00
Mike Blumenkrantz
64cee33984
lavapipe: add some asserts for descriptor dynamic offsets
...
ensure that this explodes if there aren't enough offsets
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13677 >
2021-11-05 02:21:01 +00:00
Mike Blumenkrantz
8c37cd8860
zink: rework cached fbfetch descriptor fallback
...
this ended up being a little trickier than I thought; lazy
descriptors don't use dynamic ubo types for the push set,
which means drivers that (correctly) assert dynamic offset existence
explode because the descriptor template will never work with the
push set
the better, though slightly more annoying, option here is to use the
lazy manager's faster descriptor allocation and lesser complexity to
quickly grab a push set, then tweak the existing cached codepath slightly
in order to update a raw vkdescriptorset
Fixes: 417477f60e
("zink: always use lazy (non-push) updating for fbfetch descriptors")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13677 >
2021-11-05 02:21:01 +00:00
Jesse Natalie
2d1f5e3dcb
d3d12: Don't accumulate timestamp queries
...
If an app re-issues a timestamp query a lot, but doesn't ever ask
for the results, we could end up running off the end of our query
heap. But we don't actually need to advance/accumulate, so just
use a single entry in the heap.
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12920 >
2021-11-05 00:44:15 +00:00
Emma Anholt
34739cb6e2
freedreno/ir3: Fix off-by-one in prefetch safety assert.
...
This looks like just a typo, we allow up to == 0xf in the lowering pass.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668 >
2021-11-04 22:49:29 +00:00
Emma Anholt
b0f2b0e980
freedreno/a5xx: Clean up a little bit of blitter array pitch setup.
...
We have a nice helper function for determining an array pitch.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668 >
2021-11-04 22:49:29 +00:00
Emma Anholt
b26e0cdf44
freedreno/a5xx: Try to fix drawing to z/s miplevel/layer offsets.
...
Terrifyingly, no testcases are fixed by this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668 >
2021-11-04 22:49:29 +00:00
Emma Anholt
99f5b7ba1e
freedreno/a5xx: Remove bogus assertion about BO size.
...
The slice->size0 temp is being used as both the array stride (incorrectly)
and as the size of the slice (for this assert). This assert doesn't seem
to be in the right place to me, if you want to check that offset+slice
size is < bo size, you could just do that at the end of layout setup.
This caused troubles when fixing the temp to be the actual array stride
for filling out the HW state, since then rendering to nonzero levels would
think that the rendering overflowed the BO when it doesn't.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668 >
2021-11-04 22:49:29 +00:00
Emma Anholt
03d8677bca
freedreno/a6xx: Try to fix drawing to z/s miplevel/layer offsets.
...
Terrifyingly, no testcases are fixed by this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668 >
2021-11-04 22:49:29 +00:00
Emma Anholt
35f56ad856
freedreno/a5xx: Diff reduction in fd5_layout to fd6_layout.
...
This should be exactly equivalent code, except for the is_3d "level <= 1"
which doesn't bring over 6c19d37331
("freedreno/a6xx: fix 3d tex
layout") due to it failing our unit tests where we compare to the blob's
behavior. The layer_stride setup is pulling in what freedreno_resource.c
was doing after the layout setup, so we match fd6 and so that it could
potentially be checked in unit testing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668 >
2021-11-04 22:49:29 +00:00
Caio Oliveira
8fc6a11f0e
intel/blorp: Add option to emit packets that disable Mesh
...
If a driver doesn't support Mesh, don't emit anything.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13660 >
2021-11-04 14:41:06 -07:00
Caio Oliveira
ecba8178bd
intel/dev: Add an intel_device_info::has_mesh_shading bit
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13660 >
2021-11-04 14:41:06 -07:00
Marcin Ślusarz
bba26939b1
intel/decoder: Dump Task/Mesh shaders
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657 >
2021-11-04 21:01:13 +00:00
Caio Oliveira
3567d47f3e
intel/genxml: Inline the BODY structs into the instructions
...
Follows the convention used in other instructions.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657 >
2021-11-04 21:01:13 +00:00
Caio Oliveira
3fe2e862b5
intel/genxml: Add Mesh Shading structures
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657 >
2021-11-04 21:01:13 +00:00
Jesse Natalie
b34fed64fa
u_prim_restart: Fix index scanning with start offset
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13681 >
2021-11-04 20:39:25 +00:00
Mike Blumenkrantz
bc345281ab
aux/primconvert: handle singular incomplete restarts
...
if no restart indices are found, this draw must be discarded to avoid
crashing later on
Fixes: 583070748c
("util/primconvert: handle rewriting of prim-restart draws with unsupported primtype")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13630 >
2021-11-04 20:12:32 +00:00
Emma Anholt
1e869e3fb4
freedreno/a5xx+: Fix missing LA formats.
...
GL_ARB_texture_buffer_object uses these formats, and we expose it. Since
we didn't have the formats in the table, we we were using bad HW
texture/color formats for them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666 >
2021-11-04 19:07:54 +00:00
Emma Anholt
0e4fcda7e0
freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.
...
Since we're casting to unorm, the linear filtering will give bad results.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666 >
2021-11-04 19:07:54 +00:00
Jason Ekstrand
953a4ca6fe
intel: Add has_bit6_swizzle to devinfo
...
There's no good reason to have this rather complex check in three
drivers.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13636 >
2021-11-04 18:51:04 +00:00
Marek Olšák
a0dc303b45
vbo: utilize structure padding to optimize indirection cold->prims[0].begin
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13589 >
2021-11-04 18:24:15 +00:00
Marek Olšák
3f997bccc6
radeonsi: increase tc_max_cpu_storage_size
...
Viewperf benefits. The number is only slightly above the size we need.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
74adf22a0a
radeonsi: fix a typo preventing a fast depth-stencil clear
...
Fixes: 9defe8aca9
- radeonsi: implement fast Z/S clears using clear_buffer on HTILE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
c0f723ce2b
radeonsi: allow and finish TC-compatible MSAA HTILE
...
This improves perf for Catia by 4%.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
3baeaac64b
radeonsi: rename stencil_cleared_level_mask -> stencil_cleared_level_mask_once
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
b1b491cdbb
radeonsi: add a faster clear path for glClearTexImage
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
5d3aea49b8
radeonsi: fix 2 issues with depth_cleared_level_mask
...
- Unset depth_cleared_level_mask for non-clear blits. Set the flag after
the clear, so that we don't have to check blitter_running.
- Set depth_cleared_level_mask only when we set depth_clear_value.
Fixes: ff8a930cf7
- radeonsi: add _once suffix to depth_cleared_level_mask
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Tapani Pälli
4885e63a6d
vulkan/wsi: implement missing wsi_register_device_event
...
These changes implement vkRegisterDeviceEventEXT and detection of
monitor hotplug. Wsi launches a thread that listens to udev events and
signals the appropriate device fences when hotplug hapens.
v2: use wsi fences instead of syncobj api (Jason Ekstrand)
v3: refactor + cleanups, create thread on demand (Samuel Pitoiset)
v4: bring back syncobj support from initial version for radv
v5: make libudev dependency optional, check for poll errors (Simon Ser)
v6: change matching mechanism to use udev device node instead of path
v7: remove the matching mechanism
v8: fix a race with thread creation + use single mutex + other cleanups
(Jason Ekstrand)
Fixes:
dEQP-VK.wsi.display_control.register_device_event
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305 >
2021-11-04 16:57:29 +00:00
Tapani Pälli
9f6764953b
anv: setup syncobj fd via wsi_device_setup_syncobj_fd
...
Patch moves initialization of variable so that we have fd when calling
wsi initialization.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305 >
2021-11-04 16:57:29 +00:00
Tapani Pälli
01fb24d50e
radv: setup syncobj fd via wsi_device_setup_syncobj_fd
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305 >
2021-11-04 16:57:29 +00:00
Tapani Pälli
73f21ea2e1
vulkan/wsi: provide api for drivers to setup syncobj fd
...
Drivers that import sync_fd to the wsi fences can use this to set file
descriptor for syncobj related calls. This fixes permission errors when
registering display/device events and importing sync_fd from driver
side.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305 >
2021-11-04 16:57:29 +00:00
Mike Blumenkrantz
92215d8da8
zink: add khr46 to ci
...
this blocks out all the very long tests and marks failures as needed
to improve the coverage of ci
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13656 >
2021-11-04 16:42:04 +00:00
Mike Blumenkrantz
f5f2426ffd
zink: remove lazy ci job
...
the push descriptor coverage for lavapipe should be okay in ci now, and
that was the point of adding this job
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13656 >
2021-11-04 16:42:04 +00:00
Joshua Ashton
7d64f0dd16
nvc0: Fix uninitialized width/height/depth warning.
...
This can happen if view->resource is false.
Fixes a warning in GCC 9+ that's been bugging me for a very long time when building Mesa.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12955 >
2021-11-04 15:31:09 +00:00
Marek Olšák
8b287c3f92
gallium/u_blitter: work around broken sample shading in llvmpipe and zink
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602 >
2021-11-04 15:06:09 +00:00
Marek Olšák
eb34716c1f
gallium/u_blitter: do MSAA copies in 1 pass using sample shading
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602 >
2021-11-04 15:06:09 +00:00
Marek Olšák
6d483fed85
gallium/u_blitter: disable sample shading for all blits
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602 >
2021-11-04 15:06:09 +00:00
Marek Olšák
7ce3f8e639
gallium/util: fix util_can_blit_via_copy_region with unbound render condition
...
It returned false when a render condition was not bound, but it should
have returned true.
The bool stuff is random and incomplete, but that's life.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602 >
2021-11-04 15:06:09 +00:00