Marek Olšák
c105c8ad2c
winsys/amdgpu: remove another 8 bytes from amdgpu_winsys_bo by packing better
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
815d98c22d
gallium/pb: remove 8 bytes from pb_buffer by packing variables
...
Only svga used usages beyond 16 bits. All other drivers are OK with 16 bits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
712b629abf
gallium/pb: change pb_buffer::alignment to alignment_log2
...
Alignments are always 2^n, so store n = log2(alignment). The next commit
will take advantage of the saved space.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
3d0a4864ce
winsys/amdgpu: add amdgpu_cs::ws to reduce dereferences
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
d5b877619d
winsys/amdgpu: remove amdgpu_winsys_bo::ws
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
65495e6caa
radeon_winsys.h: add a winsys parameter to most winsys buffer functions
...
This will allow removing the winsys pointer from buffers.
The amdgpu winsys adds dummy_ws to get radeon_winsys because there can be
no radeon_winsys around (e.g. while amdgpu_winsys is being destroyed), but
we still need some way to call buffer functions.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
aed8af5456
radeon_winsys.h: add a new function radeon_bo_reference that takes a winsys
...
This will allow removing the winsys pointer from buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
522938f271
winsys/radeon: rename radeon_bo_reference -> radeon_ws_bo_reference
...
radeon_bo_reference will be a new function in radeon_winsys.h.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
6c6a39682e
gallium/pb: pass an optional winsys pointer to the buffer destroy function
...
This will allow removing the winsys pointer from buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Lionel Landwerlin
33b2daab1a
intel/compiler: lower bit sizes in NIR postprocessing
...
It appears that between preprocess & postprocess some descriptor
lowering introduces 8bit types in the shader, so run the lower bit
size again to make sure we don't have any unsupported types in our
shader.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: e06144a818 ("anv: Use 64bit_global_32bit_offset for SSBOs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4478
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9705 >
2021-04-06 23:21:30 +03:00
Alyssa Rosenzweig
d01628d24d
pan/bi: Remove conversion lowering
...
Inherited from Midgard, it's easier to just do at NIR->BIR time now that
we have a builder that doesn't suck. Impeded certain optimizations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
266de379c2
pan/bi: Generalize f2i16, f2u16
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
be74b84e6f
pan/bi: Fill in some more conversions
...
The trick is that downcasts are just swizzling out what you don't want,
so things like U32_TO_F16 can be synthesized as V2U16_TO_V2F16 with
src.h00
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
435800e750
pan/bi: Lower swizzles
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
e3e2c5b594
pan/bi: Optimize MKVEC.v2i16 generation
...
Prefer SWZ.v2i16 in cases where that's possible, it will be easier to
optimize later.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
f9bc168bd3
pan/bi: Add bi_swz_16 helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Marek Olšák
6bc7a0b366
radeonsi: fix si_compute_copy_image if DCC decompression happens before a copy
...
The buffer clear after DCC decompression overwrote user SGPRs that we set
here, leading to invalid image coordinates. Set them after we bind images.
This will actually be fixed by "radeonsi: don't decompress DCC for float
formats in si_compute_copy_image" as well.
Fixes: ad71ef9326 "radeonsi: don't use a constant buffer for the copy_image compute shader"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4583
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10061 >
2021-04-06 19:19:56 +00:00
Mike Blumenkrantz
fc7ce9b636
zink: drop VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT from compute path
...
this was dropped a while ago from gfx but I failed to pick it up for compute
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10062 >
2021-04-06 18:11:08 +00:00
Adam Jackson
84d6ee0920
mesa: Remove unused gl_config::mutableRenderBuffer
...
This bit is only meaningful for EGL, where we in fact derive it from
whether EGL_KHR_mutable_render_buffer is enabled and don't actually look
at the DRI attribute.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:17 -04:00
Adam Jackson
fa425511ed
mesa: Make _mesa_initialize_visual return void
...
The assertions here clearly never get hit, and if they did it'd mean we
were _trying_ to enable 64-bit Z or something. And checking only that
the accumulation has non-negative size is... curious. Just delete it and
clean up the callers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:16 -04:00
Adam Jackson
9dd0d68d26
mesa: Remove unused _mesa_create_framebuffer
...
One fewer gl_config in the API.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:16 -04:00
Adam Jackson
a6f1d56b7b
radeon: Exchange one curious idiom for another in radeonMakeCurrent
...
radeonMakeCurrent is the only consumer of _mesa_create_framebuffer(),
and all we're doing here is making a dummy for the context to hang on to
when there is no current drawable. intelMakeCurrent uses
_mesa_get_incomplete_framebuffer() for this instead, which is
equivalent, and which matches the usage elsewhere in the tree.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:15 -04:00
Adam Jackson
6d81b9c972
gallium: Remove curious st_visual::no_config
...
The gallium context creation API embeds storage for a whole st_visual
even if the context is to have no config. no_config was being used to
signal this, but we can just as easily check that the color format is
non-NONE.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:10 -04:00
Mike Blumenkrantz
421fbb5f5e
zink: flag DYNAMIC resources as coherent
...
the contents of these may change frequently, so we should skip all the
flush/invalidate
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9983 >
2021-04-06 12:29:56 +00:00
Mike Blumenkrantz
6ff6d01c37
zink: don't use cached mem for staging resources
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9983 >
2021-04-06 12:29:56 +00:00
Simon Ser
7499f84956
radv: fix format feature reporting for modifiers
...
The format_feature_flags bitfield is derived from the modifier if
the tiling is set to VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.
However radv will reset the tiling to either LINEAR or OPTIMAL if
the caller supplied a VkPhysicalDeviceImageDrmFormatModifierInfoEXT
in the chain.
Stop resetting the tiling, so that we can compute the correct feature
flags.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 6c83e3ea98 ("radv: Add format modifier format queries.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9978 >
2021-04-06 09:20:26 +00:00
Rhys Perry
292ac71a4a
nir/lower_tex: handle deref casts
...
A RDR2 shader has a undef->texture cast which is eventually optimized out.
Without handling NULL from nir_deref_instr_get_variable(), compiling this
shader will result in a crash.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Fixes: bc438c91d9 ("nir/lower_tex: ignore texture_index if tex_instr has deref src")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10038 >
2021-04-06 08:35:39 +00:00
Mike Blumenkrantz
00fc85a011
zink: reset queries when suspending if >50% of total pool is used
...
this is a great time for resets since there's never a renderpass active,
so an early reset here may mean avoiding a renderpass split later
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10049 >
2021-04-06 02:01:07 +00:00
Mike Blumenkrantz
f5dc4db35f
zink: defer timestamp query pool resets to end_query
...
we don't do a tc context unwrap in create_query(), so this isn't a good place
to be doing anything that needs the ctx
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10049 >
2021-04-06 02:01:07 +00:00
Mike Blumenkrantz
24923b4640
zink: check last_finished first in fence_finish early out case
...
a fence's completed flag is irrelevant if we already know it has completed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10048 >
2021-04-05 21:45:53 -04:00
Mike Blumenkrantz
d3734ae2dd
zink: relax maybe_flush batch count threshold
...
10 batch states isn't actually that many if an app happens to be flushing
a lot, so let's multiply that to catch outlier cases
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10006 >
2021-04-05 22:45:52 +00:00
Mike Blumenkrantz
1ba6dcb40f
zink: relax maybe_flush mem threshold
...
10% of video mem ends up being way too aggressive and causes constant
stalls
really this is supposed to be a failsafe against ooming in a single batch, so
using 50% here ends up serving that purpose much more effectively
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10006 >
2021-04-05 22:45:52 +00:00
Mike Blumenkrantz
e4426d7828
zink: split total_mem off to total_video_mem, use total_mem for tc
...
tc needs the total host memory available, not the total video memory
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10006 >
2021-04-05 22:45:52 +00:00
Mike Blumenkrantz
c624489968
zink: move cmdpool reset to batch state reset
...
this is a more logical place for it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9964 >
2021-04-05 22:34:16 +00:00
Mike Blumenkrantz
a565ead64a
zink: only use host mem for staging resources with linear tiling
...
VK_EXT_4444_formats strikes again
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9985 >
2021-04-05 22:24:32 +00:00
Mike Blumenkrantz
6433661cda
zink: use 2 variant to check image format props during create
...
just to be pedantic
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9984 >
2021-04-05 22:14:26 +00:00
Mike Blumenkrantz
733e07565f
zink: use vkGetPhysicalDeviceFormatProperties2 when available
...
technically shouldn't matter but whatever
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9984 >
2021-04-05 22:14:26 +00:00
Mike Blumenkrantz
3fa7ce4d46
zink: use better usage flags for staging resources
...
enforce linear bind more logically and mark with more accurate usage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9982 >
2021-04-05 21:58:08 +00:00
Mike Blumenkrantz
12f93a7377
zink: hook up cs push constant for nir_intrinsic_load_work_dim
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9966 >
2021-04-05 17:38:16 -04:00
Mike Blumenkrantz
796e95d6a7
util/threaded_context: support pipe_context::set_sample_locations
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10031 >
2021-04-05 20:52:45 +00:00
Alejandro Piñeiro
1e0a69afa7
vulkan: track number of bindings instead of max binding for CreateDescriptorSetLayout
...
As that handles better, and more clear, the case of bindingCount being
zero. For the case of Anvil and Turnip, this avoids allocating a
non-needed binding when bindingCount is zero.
Inspired on radv, that was what it was doing so far.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4526
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9905 >
2021-04-05 20:17:53 +00:00
Dave Airlie
5890c322e1
zink/ci: handle getting correct drisw driver.
...
With zink not being autopicked, fixup the CI to pick the
correct drivers for zink testing, noting that xvfb really
doesn't want zink to be chosen.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9816 >
2021-04-05 18:46:16 +00:00
Dave Airlie
3e1698fe1b
drisw: move zink down the list below the sw drivers.
...
We don't ever want drisw path picking zink as the driver,
we can revisit this when the penny wrapper work gets further
along.
This selection causes systems with nvidia/intel dual-gpus
to try and pick the intel gpu for rendering in the nvidia
context if there is no nvidia GL driver or accel doesn't work.
This is a partial revert of the original commit.
Fixes: 4a3b42a717 ("drisw: Prefer hardware-layered sw-winsys drivers over pure sw")
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9816 >
2021-04-05 18:46:16 +00:00
Bas Nieuwenhuizen
57511d1458
radv: Flush caches for shader read operations.
...
As part of the fmask expand we very much read from the images as
well ...
Fixes: 8f8d72af55 ("radv: Use access helpers for flushing with meta operations.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10042 >
2021-04-05 18:34:53 +00:00
Danylo Piliaiev
0709a6b363
turnip: fix alignment of non-32b types in workgroup memory
...
Fixes tests:
dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.float16
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10039 >
2021-04-05 17:31:11 +00:00
Samuel Pitoiset
8b80e8f832
radv: init CMASK/FMASK/DCC in parallel
...
To remove bubbles during layout transitions from UNDEFINED, especially
with MSAA because we might have all.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10004 >
2021-04-05 16:21:12 +00:00
Jesse Natalie
91dbad7956
microsoft/compiler: Fix barrier flag for shared memory
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10010 >
2021-04-05 15:58:03 +00:00
Juan A. Suarez Romero
c1bd3d3afc
ci/broadcom: update expected list
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10041 >
2021-04-05 17:40:27 +02:00
Samuel Pitoiset
14b312b223
radv: handle implicit subpass dependencies per attachment
...
From the Vulkan spec 1.2.172:
"If there is no subpass dependency from VK_SUBPASS_EXTERNAL to the
first subpass that uses an attachment, then an implicit subpass
dependency exists from VK_SUBPASS_EXTERNAL to the first subpass
it is used in."
"Similarly, if there is no subpass dependency from the last subpass
that uses an attachment to VK_SUBPASS_EXTERNAL, then an implicit
subpass dependency exists from the last subpass it is used in to
VK_SUBPASS_EXTERNAL."
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9714 >
2021-04-05 11:42:51 +00:00
Danylo Piliaiev
9b9ad8d66c
docs: mark float_controls,float16_int8,16bit_storage as done on Turnip
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9993 >
2021-04-05 09:51:46 +00:00