Mike Blumenkrantz
e00bb6cb98
mesa/st: use tracked samplerview swizzle values
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
0ccc0f7b50
mesa: track gl_texture_object swizzle internally
...
this moves updating of swizzles to the points at which it could possibly change
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
383b39f313
mesa/st: use pre-calculated format swizzle for samplerviews
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
e713a9a982
mesa: track format swizzles on teximage objects
...
this will only very rarely change, so stop calculating it during sampler update
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
206aad7c5c
zink: add a driver workaround for broken L4A4 on nvidia
...
KHR-GLES2.core.internalformat.copy_tex_image.luminance4_alpha4_oes,Fail
KHR-GLES2.core.internalformat.texture2d.luminance_alpha_unsigned_byte_luminance4_alpha4_oes,Fail
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
d49586cfae
zink: support emulating alpha formats using new border color quirk
...
this works for texturing only because swizzles can be used
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
d5bf01e214
zink: handle emulated alpha format clears
...
technically zink doesn't support this, but mesa/st doesn't care what drivers
support for clears
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
89c41a7750
zink: reject native blits for emulated alpha formats
...
these need u_blitter
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
88390404b8
zink: add some format functions for emulating alpha formats
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
3b27632abc
zink: stop modifying samplerview swizzle on base struct
...
this gets (stupidly?) checked in mesa/st, so changing it might trigger
erroneous asserts
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
a5b2725894
util/format: handle SRGB in util_format_luminance_to_red()
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
55ef65d4f4
gallium: add PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_ALPHA_NOT_W
...
mesa/gallium and util_format have different handling of alpha channels:
* mesa/gallium always uses w for the alpha swizzle
* util_format uses the actual component
for drivers which need to use the latter handling, this quirk will use the right
border color
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
03b893acb3
gallium: convert PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE to enum
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
1341d7aa84
mesa/st: use plumbed value for srgb_skip_decode in sampler conversion
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
1c172cdbcc
mesa/st: plumb glsl130_or_later through sampler creation
...
no functional changes
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
d1e33fa345
mesa/st: add ignore_srgb_decode param to st_convert_sampler
...
same as st_get_texture_sampler_view_from_stobj, no functional changes
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
28d033b34f
mesa: require render target bind for A/L/I in format selection
...
these are required framebuffer formats in certain versions of GL,
so don't create a texture that can't later be bound to a framebuffer
see also spec@!opengl 3.0@required-texture-attachment-formats
cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
4f28e2827c
mesa: fix blending when using luminance/intensity emulation
...
neither of these have a real alpha channel, so reuse the xrgb blend
clamping here to ensure the "right" alpha value is used
cc: mesa-stable
fixes:
spec@arb_texture_float@fbo-blending-formats
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Konstantin Kharlamov
3eec931e9b
.mailmap: change spelling for Constantine Kharlamov
...
The officially used spelling is Konstantin and I've been using it
everywhere for quite some time, so let's change it here as well
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
db11e300e9
meson: remove source_root() call in main meson.build
...
source_root function is deprecated in Meson version 0.56.0, so let's use
instead a current_source_dir() function, available in all Meson
versions.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
91362340f3
meson: remove source_root() call in nir compiler path
...
source_root function is deprecated in Meson version 0.56.0, so let's use
instead a current_source_dir() function, available in all Meson
versions. This also allows to deduplicate some code by declaring
commonly used string at the top meson.build file.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
ef611696a5
loader/dri3: remove a no-op free call
...
When modifiers == NULL, the free(modifiers) is a no-op, so we can just
remove it
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
f572961d69
loader/dri3: simplify check for reply
...
if reply == NULL, the call `free(reply)` is a no-op, so we can have a
single check instead of two.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
sjfricke
861167f41d
isl: fix bug where sb.MOCS is not being set
...
Currently the sb.MOCS is being reset to zero after struct init.
Signed-off-by: sjfricke <spencerfricke@gmail.com >
Fixes: c27fcb1d3b ("isl: Fill in MOCS for NULL depth, stencil, and HiZ buffers.")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17985 >
2022-08-12 12:35:54 +00:00
Tapani Pälli
a3a04ed6f3
glsl: add check for too large atomic counter buffer offset
...
Fixes upcoming CTS test for atomic counter buffer offsets.
"It's being clarified that placing an atomic counter into
a buffer at such an offset that the buffer is too large
results in a compilation error."
https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3124
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17905 >
2022-08-12 10:45:53 +00:00
Eric Engestrom
fd28984f84
pvr: fix memleak in error paths
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18027 >
2022-08-12 10:08:38 +00:00
Alessandro Astone
c69ba3159a
Android.mk: Disable lmsensors
...
Meson might incorrectly enable sensors if it detects lmsensors
on the host system.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6805
Cc: "22.0" "22.1" "22.2" mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17391 >
2022-08-12 08:51:11 +00:00
Marek Olšák
f81d4b7649
util/xmlconfig: allow drivers to override option values
...
This corrects the issue that we can't have DRI_CONF_MESA_GLTHREAD(false)
in gallium and then DRI_CONF_MESA_GLTHREAD(true) in drivers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
7361b67f92
glthread: add missing code for GL_ARB_sparse_texture
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
983684d763
glthread: track glBindFramebufferEXT, not just glBindFramebuffer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
f9b0dc9377
glthread: track GL_READ_FRAMEBUFFER bindings too
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
28e351673e
glthread: call _mesa_glthread_DeleteBuffers unconditionally
...
Deleted buffers were not unbound in glthread.
Fixes: 4fa24747b9 - glthread: call _mesa_glthread_BindBuffer unconditionally
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
eb4036ea5b
glthread: unbind framebuffers in glDeleteFramebuffers
...
Tests:
dEQP-GLES2.functional.lifetime.delete_bound.framebuffer
dEQP-GLES2.functional.state_query.integers.framebuffer_binding_getinteger
Fixes: e48f676835 - glthread: don't sync for more glGetIntegerv enums for glretrace
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Tapani Pälli
a9b64bd7ad
glsl: allow image*Shadow keywords on ES and GLSL >= 420
...
These were not reserved keywords in GLSL ES and also allowed on
desktop GLSL after 420. New CTS compiler tests will test this.
https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3007
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17904 >
2022-08-12 04:58:12 +00:00
Lionel Landwerlin
00d8fcee10
intel/drm-shim: update shim to support DG2
...
We were missing :
* GEM_CREATE_EXT (for local memory allocations)
* MMAP_OFFSET (new version of mmap required on DG2)
* GEOMETRY_SUBSLICE query (also required on DG2)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18005 >
2022-08-11 22:45:07 +03:00
Charmaine Lee
4393be8291
mesa/st: fix reference to nir->info after nir_to_tgsi
...
The nir shader memory is freed in nir_to_tgsi(), but the already
freed shader info is referenced later when create compute state.
To avoid referencing the freed memory, copy the shader info first before
calling nir_to_tgsi.
Fixes vmx crash running aztec on SVGA driver.
Fixes: 580f1ac473 ("nir: Extract shader_info->cs.shared_size out of union")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17999 >
2022-08-11 18:51:17 +00:00
Charmaine Lee
7426675363
svga: compare graphics shader stages against COMPUTE
...
This patch fixes the graphics shader stage comparisons that are left out in
commit 9bbf235fd9 .
Fixes: 9bbf235fd9 ("svga: compare shader type against compute not tess eval")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18004 >
2022-08-11 18:41:46 +00:00
Konstantin Seurer
2d39227a90
radv: Fix stack size calculation with stage ids
...
In create_rt_shader, we were setting group_idx to the stage index before.
Fixes the following tests:
dEQP-VK.ray_query.builtin.instancecustomindex.miss.aabbs
dEQP-VK.ray_query.builtin.objectrayorigin.miss.triangles
Fixes: c39ccce ("radv/rt: use stage ID as handle for general and closestHit shaders")
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17936 >
2022-08-11 17:59:47 +00:00
Italo Nicola
1f6bd6ece9
etnaviv: fix standalone compiler to work without a tgsi backend
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17810 >
2022-08-11 17:46:32 +00:00
Italo Nicola
b85544db19
etnaviv: skip disk cache initialization on standalone compiler
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17810 >
2022-08-11 17:46:32 +00:00
Michael Tang
a3bf0da1cb
microsoft/compiler: Change calls to NIR_INSTR_UNSUPPORTED to log to dxil_logger instead
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12510 >
2022-08-11 16:17:46 +00:00
Michael Tang
97902a9ef8
nir: add nir_instr_as_str
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12510 >
2022-08-11 16:17:46 +00:00
Michael Tang
55b3980e78
microsoft/compiler: Add dxil_logger type and parameter to nir_to_dxil
...
v2 (jenatali): Add a default logger which aborts via unreachable,
and use NULL from GL/Vulkan to use the default logger.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12510 >
2022-08-11 16:17:46 +00:00
Samuel Pitoiset
58bf84044b
radv: copy the sample locations only if the state isn't dynamic
...
If user sample locations is enabled and the state is dynamic we don't
have to copy them to the dynamic state struct.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18007 >
2022-08-11 14:53:32 +00:00
Samuel Pitoiset
0ca33a6c0d
radv: copy line stipple factor/pattern only if the state isn't dynamic
...
If line stipple is enabled and the state is dynamic we don't have to
copy factor/pattern to the dynamic state struct.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18007 >
2022-08-11 14:53:32 +00:00
Samuel Pitoiset
1d92ab921b
radv: remove unecessary radv_pipeline::uses_dynamic_stride
...
We can just rely on the dynamic states.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18007 >
2022-08-11 14:53:32 +00:00
Lionel Landwerlin
56bb29cb93
anv: don't return incorrect error code for vkCreateDescriptorPool
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7013
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17945 >
2022-08-11 14:29:33 +00:00
Mike Blumenkrantz
bc7edc1c7a
radv: force inlining on another draw function
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17993 >
2022-08-11 12:27:23 +00:00
Mike Blumenkrantz
64395f0d85
radv: remove stupid conditional from draw path
...
compilers are now provably smart enough to handle this
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17993 >
2022-08-11 12:27:23 +00:00
Pierre-Eric Pelloux-Prayer
50e6a80b5e
radeonsi/tests: cosmetic changes
...
Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17907 >
2022-08-11 11:01:31 +00:00