Commit Graph

165957 Commits

Author SHA1 Message Date
Jesse Natalie
884d870929 dzn: Descriptor limits are based on binding tier, not heap tier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
9f13a4a10a dzn: Usage MULTISAMPLE_LOAD support instead of RT/DS support for MSAA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
29a0bcdd84 dzn: Support EXTENDED_USAGE bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
c0d8838c30 dzn: Usage image view usage instead of image usage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
1041e0d281 dzn: Use SHADER_LOAD to indicate SAMPLED_IMAGE support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
cfc05566ab dzn: Move patched vertex buffer capability check up a level
Some of these patched formats are also needed as (trivial) image
formats, so we can't just report vertex buffer as the only supported
operation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
ceb287a509 dzn: When rendering to 3D, don't treat layers as subresources for barriers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
232c598e79 dzn: Set dynamic rendering caps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
c8b9f70fca dzn: Respect suspending/resuming flags to omit clears/resolves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
cfa260cd27 dzn: Use common physical device list/enumeration helpers
Implements EnumeratePhysicalDeviceGroups for us for free

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
0bae7a307c dzn: Support vkCmdDispatchBase
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
296ad630db spirv2dxil: Support dispatches with base group indices
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
6bb765f3d1 microsoft/compiler: Lower device index to zero
Maybe we'll support actual device groups at some point, but today
is not that day.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Jesse Natalie
725948c6c9 microsoft/compiler: Fix atomic image umax
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20823>
2023-01-24 17:22:25 +00:00
Mike Blumenkrantz
97740401dc zink: fix implicit feedback loop detection
the code here was all expecting the VkPipelineStageFlags bitfield expansions,
but u_foreach_bit() gives the actual bit, so implicit feedback loops were never
actually being detected

instead, convert back to the bitfield at the top of the loop so the value works
as expected

Fixes: 9ba0657903 ("zink: make implicit feedback loop application stricter")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20863>
2023-01-24 16:48:48 +00:00
Samuel Pitoiset
49b7f0842e radv: print depth image size with RADV_DEBUG=img
This turned out to be useful when investigating a GPU hang.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20872>
2023-01-24 15:42:44 +00:00
Lionel Landwerlin
5b79745b04 intel/common: add a INTEL_DECODE variable to parameter decoder at runtime
Sometimes you want to diff 2 runs with INTEL_DEBUG=bat, but a tiny
allocation change can mess quite badly with offsets printed in the
decoding, making it hard to look at the diff with meld.

Fortunately our decoder can avoid printing offsets. We just need a
variable to specify that.

We still use the defaults specified by the driver but you can turn
things on/off with :

INTEL_DECODE=+color,-offsets,-floats INTEL_DEBUG=bat ./my_app

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20874>
2023-01-24 15:15:17 +00:00
Lionel Landwerlin
31931754bc intel/decoder: print out compute push constants
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20874>
2023-01-24 15:15:17 +00:00
Marcin Ślusarz
536a2acfc2 intel/compiler/mesh: handle const data in task & mesh programs
Started showing up when nir_opt_large_constants call was moved in 88756cee8d.
Fixes dEQP-VK.mesh_shader.ext.smoke.monolithic.fullscreen_gradient*

Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: 88756cee8d ("intel/compiler: Run nir_opt_large_constants before scalarizing consts")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20876>
2023-01-24 14:47:21 +00:00
Marcin Ślusarz
9bb18a4f9e intel/compiler: fix generation of vec8/vec16 alu instruction
I stumbled on this when I inserted some suboptimal lowering code after all
optimizations. Adding certain subset of optimizations after my lowering code
actually avoided this bug, so I think it's not possible to hit this on upstream.

Let's fix this for the next person generating suboptimal code...

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20857>
2023-01-24 13:15:58 +00:00
Yogesh Mohan Marimuthu
19b0bafe35 loader,glx,egl: remove is_different_gpu variable from loader
v2: fd number is different (Pierre-Eric)
v1: remove is_different_gpu (Pierre-Eric)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohan Marimuthu
648cbd47a7 glx: remove is_different_gpu variable from struct dri_screen
v2: fd number is different (Pierre-Eric)
v1: remove is_different_gpu (Pierre-Eric)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohan Marimuthu
31013f3ce7 egl: remove is_different_gpu variable from struct dri2_egl_display
v2: fd number is different (Pierre-Eric)
v1: remove is_different_gpu (Pierre-Eric)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohan Marimuthu
1a0ec8e8d3 loader,glx,egl,vl,d3d: loader_get_user_preferred_fd() function to return original_fd
v1: return original_fd in loader_get_user_preferred_fd() (Pierre-Eric)
v2: fix *original_id crash for android, haiku... (Pierre-Eric)
    remove extra comment (Pierre-Eric)
v2: also return render fd in case of original_fd passed is NULL (Pierre-Eric)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohan Marimuthu
1c5b61eefb loader,glx: add render_gpu tag psc->driScreen and psc->fd
v1: add render_gpu_tag (Pierre-Eric)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohan Marimuthu
c712419c1a egl: add render_gpu tag to dri2_dpy->fd and dri2_dpy->dri_screen variable
v1: add render_gpu_tag (Pierre-Eric)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohanmarimuthu
967b9ad084 egl/wayland: for prime, allocate linear_copy from display GPU VRAM
Allocates VRAM in display GPU in case of prime. Then the dma_buf is imported
into prime GPU.

v4: add image tag to __DRIimage (Marek Olšák)
v3: move display fd opening to separate commit (Pierre-Eric)
    image_format_to_fourcc() non-static to seperate commit (Pierre-Eric)
v2: close query fds after linear_copy buffer import (Marek Olšák)
    use image_format_to_fourcc() from loader_dri3_helper.c (Marek Olšák)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohanmarimuthu
42a46f2c5f loader: make image_format_to_fourcc() non-static
the image_format_to_fourcc() function will be used from
egl/wayland hence make it non-static. Also move the function
into loader_dri_helper.c from loader_dri3_helper.c since
loader_dri3_helper library depends on xcb which will make
egl wayland depend on xcb indirectly.

v2: add loader tag to extern image_format_to_fourcc() (Marek Olšák)

V3: move image_format_to_fourcc to loader_dri_helper.c
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohanmarimuthu
57b22f99a9 egl/wayland: keep display fd open for prime
Keep the display fd open for creating DRI screen on display gpu in
case of prime.

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohanmarimuthu
94946251d0 loader,glx,egl/x11: init dri_screen_display_gpu in struct loader_dri3_drawable
Initialize dri_screendisplay_gpu variable in struct laoder_dri3_drawable.
Also make dri_screen_display_gpu variable as input parameter to function
loader_dri3_drawable_init() since dri_screen variable is initialized this way.
This also helps to avoid duplicate initializing dri_screen_display_gpu
in glx and egl code.

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohanmarimuthu
5519dd0bd1 egl: create DRI screen for display GPU in case of prime
The created DRI screen can be used to allocate VRAM memory from
display GPU in case of prime.

v2: remove extra whitespace (Marek Olšák)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohanmarimuthu
b8da022da4 egl,egl/x11: keep display fd open for prime
Keep the display fd open for creating DRI screen on display gpu in
case of prime. Also close the fd opened in dri2_display_destroy()

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Yogesh Mohanmarimuthu
4e6e30215d egl: add fd_display_gpu to struct dri2_egl_display
fd opened on display gpu is saved in fd_display_gpu. It is later used
to create dri screen on display gpu.

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
2023-01-24 12:51:35 +00:00
Tapani Pälli
0813c1a6fa intel/genxml: set unused 3DSTATE_PS_EXTRA field as mbz
Wa_14015360517 mentions situations where HW produces invalid
occlusion query results when "Pixel Shader Does not write to RT"
bit is set.

"When Pixel Shader Kills Pixel is set, SW must perform a dummy render
 target write from the shader and not set this bit, so that Occlusion
 Query is correct."

Another situation is when writing to UAV or to NULL render target.
Patch sets field as 'must be zero' to discourage possible use of it.

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/20849>
2023-01-24 10:28:15 +00:00
Tapani Pälli
205d40b8db mesa: move component bits queries as GL ES only
These enums have been removed/deprecated long time ago from desktop
GL. Here we remove them from modern GL while still allow for compat
contexts (~old apps). This change matches proprietary drivers and makes
our behaviour same within CTS with some tests.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20719>
2023-01-24 10:04:28 +00:00
Iago Toral Quiroga
a81063d2ca v3dv: ensure we allocate at least the requested space for a CL
While we are already ensuring we allocate at least 8192 bytes should
this not be the first allocation and our allocations are typically just
a few bytes, multilayered framebuffers with large numbers of layers may
require more space than that in a single allocation.

Fixes: 3325950648 ('v3dv: increase BO allocation size when growing CLs')
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20871>
2023-01-24 09:49:14 +00:00
Mike Blumenkrantz
0c6e56c391 mesa: (more) correctly handle incomplete depth textures
according to GL spec, incomplete shadow samplers should return 0

this is technically possible for drivers to do using a RGBA texture in
the sense that somehow it's been working, but it's broken at the gallium-level
for what drivers should be expecting to see in such circumstances given
that such scenarios have been binding a RGBA texture to use with shadow samplers

instead, we can give drivers a fallback Z32 texture to avoid format/sampler
mismatches and complying with expected behavior

see also KHR-GL46.incomplete_texture_access.sampler for driver-specific testing

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20817>
2023-01-24 09:13:48 +00:00
Mike Blumenkrantz
818cc30852 mesa: populate gl_program::ShadowSamplers mask from shader data
this data is already processed, it just isn't being propagated for whatever reason

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20817>
2023-01-24 09:13:48 +00:00
Mike Blumenkrantz
64140a73c1 mesa: remove dead parameter doc for _mesa_new_texture_object()
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20817>
2023-01-24 09:13:48 +00:00
Mike Blumenkrantz
ef3205ae57 zink: pass depth swizzle data block to shader compile
with everything now hooked up, this should fix all related test failures

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
336d7630fd zink: remove old depth swizzle workaround
this is already handled in match_tex_dests(), so it does nothing here

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
b6518f3ba5 zink: create another samplerview for shadow textures
when doing legacy depth texture mode sampling, it's necessary to keep
another view that has the right (R in component 0) swizzle so that depth
values can actually be returned in cases where it would otherwise be
a constant value due to swizzling

this also allows zink_sampler_view::shadow_needs_shader_swizzle to be removed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
c46fb43473 zink: plug in the program/module parts of shadow texture mode emulation
this is clunky because of how big the swizzle data block is,
but the gist of it is the data block is stored onto the shader module key
after all the other data, and then it gets manually hashed/compared in
relevant cases

it's gross, but so is this functionality

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
ef233d43f4 zink: block pipeline fast-pathing for any programs using depth texture modes
the data for this is too big to compress into a shader key, so these pipelines
will always consume more cpu

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
1b2bf99f05 zink: rework depth sampler splatting in shaders
this enables passing a zink_fs_shadow_key to the compiler to manually
apply a swizzle other than R/R/R/R to depth texture results

currently no data is passed, so the previous splatting behavior is preserved

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
5193f4f712 zink: add a fs shader key member to indicate depth texturing mode
this does nothing now besides track the data

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
f62ccaacb8 zink: track depth swizzle on samplerviews
this will provide info for shader rewrites

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
c20c79f584 zink: add an extra_data param to zink_shader_compile
this is extra shader key data that can be used in various ways per stage
and is too large to fit into the shader key

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
e9e4c6266e zink: break out tex dest rewriting into separate function
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00
Mike Blumenkrantz
368197923b zink: flag old-style shadow tex mask for fragment shaders
this will be useful for handling depth texturing modes

only 32 are tracked now for performance reasons

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
2023-01-24 08:30:09 +00:00