James Park
328a350387
vulkan/util,vulkan/wsi,radv: Add typed outarray API
...
MSVC cannot perform GCC __typeof__ for C code. (C++ has decltype.)
Add adjacent functions to allow specifying types manually.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7270 >
2020-10-27 08:47:52 -07:00
Rhys Perry
437995bb70
aco: remove all-undef phi opt
...
This doesn't look like it would create correct IR for 8/16-bit phis and
doesn't seem to help anything. If we ever want to do this, it's probably
better done in nir_opt_remove_phis().
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
70ff262cda
aco: use v_mov_b32_sdwa for some 16-bit constants
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
b882598ee1
aco: remove some unused optimizations
...
These are unused now that we almost always use p_parallelcopy for simple
copies.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
d20a752c0d
aco: use Builder::copy more
...
fossil-db (Navi):
Totals from 6973 (5.07% of 137413) affected shaders:
SGPRs: 381768 -> 381776 (+0.00%)
VGPRs: 306092 -> 306096 (+0.00%); split: -0.00%, +0.00%
CodeSize: 24440844 -> 24421196 (-0.08%); split: -0.09%, +0.01%
MaxWaves: 86581 -> 86583 (+0.00%)
Instrs: 4682161 -> 4679578 (-0.06%); split: -0.06%, +0.00%
Cycles: 68793116 -> 68261648 (-0.77%); split: -0.83%, +0.05%
fossil-db (Polaris):
Totals from 8154 (5.87% of 138881) affected shaders:
VGPRs: 338916 -> 338920 (+0.00%); split: -0.00%, +0.00%
CodeSize: 23540428 -> 23540488 (+0.00%); split: -0.00%, +0.00%
MaxWaves: 49090 -> 49091 (+0.00%)
Instrs: 4576085 -> 4576101 (+0.00%); split: -0.00%, +0.00%
Cycles: 51720704 -> 51720888 (+0.00%); split: -0.00%, +0.00%
Most of the Navi cycle/instruction changes are from 8/16-bit parallel-rdp
shaders. They appear to be improved because the p_create_vector from
lower_subdword_phis() was blocking constant propagation.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
e54c111c45
aco: always use p_parallelcopy for pre-RA copies
...
Most fossil-db changes are because literals are applied earlier
(in label_instruction), so use counts are more accurate and more literals
are applied.
fossil-db (Navi):
Totals from 79551 (57.89% of 137413) affected shaders:
SGPRs: 4549610 -> 4542802 (-0.15%); split: -0.19%, +0.04%
VGPRs: 3326764 -> 3324172 (-0.08%); split: -0.10%, +0.03%
SpillSGPRs: 38886 -> 34562 (-11.12%); split: -11.14%, +0.02%
CodeSize: 240143456 -> 240001008 (-0.06%); split: -0.11%, +0.05%
MaxWaves: 1078919 -> 1079281 (+0.03%); split: +0.04%, -0.01%
Instrs: 46627073 -> 46528490 (-0.21%); split: -0.22%, +0.01%
fossil-db (Polaris):
Totals from 98463 (70.90% of 138881) affected shaders:
SGPRs: 5164689 -> 5164353 (-0.01%); split: -0.02%, +0.01%
VGPRs: 3920936 -> 3921856 (+0.02%); split: -0.00%, +0.03%
SpillSGPRs: 56298 -> 52259 (-7.17%); split: -7.22%, +0.04%
CodeSize: 258680092 -> 258692712 (+0.00%); split: -0.02%, +0.03%
MaxWaves: 620863 -> 620823 (-0.01%); split: +0.00%, -0.01%
Instrs: 50776289 -> 50757577 (-0.04%); split: -0.04%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
6db5fbf9f2
aco: allow literals on sub-dword p_parallelcopy
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
74e2e9b682
aco: don't use bld.copy() in handle_operands()
...
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
a834d9ef86
aco: expand vectors passed as copy operands
...
Most copies which hit this case use p_create_vector, but in the future
p_parallelcopy will be used instead.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
e092f34dfa
aco: copy-propgate through p_create_vector during value numbering
...
fossil-db (Navi):
Totals from 182 (0.13% of 137413) affected shaders:
SGPRs: 9304 -> 9312 (+0.09%)
VGPRs: 7636 -> 7620 (-0.21%); split: -0.26%, +0.05%
CodeSize: 733516 -> 733092 (-0.06%); split: -0.07%, +0.01%
MaxWaves: 2478 -> 2479 (+0.04%)
Instrs: 139664 -> 139561 (-0.07%); split: -0.09%, +0.02%
Cycles: 3215104 -> 3214080 (-0.03%); split: -0.04%, +0.01%
fossil-db (Polaris):
Totals from 161 (0.12% of 138881) affected shaders:
VGPRs: 5608 -> 5596 (-0.21%); split: -0.29%, +0.07%
CodeSize: 605336 -> 605120 (-0.04%); split: -0.05%, +0.02%
Instrs: 117957 -> 117902 (-0.05%); split: -0.07%, +0.02%
Cycles: 3105008 -> 3103876 (-0.04%); split: -0.04%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
0f31fa1b64
aco: skip value numbering of copies
...
Instead, copy-propagate through and remove them.
This improves value numbering in this situation:
a = ...
b = copy a
c = copy a
use(b)
use(c)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
72b307a338
aco: don't do divergent break+discard
...
If the shader does:
loop {
if (divergent)
discard
else
a()
b()
}
then a()'s block will dominate b()'s block in the logical CFG, but not the
linear CFG. This will cause value numbering to try to combine SLAU from
a() and b().
This didn't happen with break/continue because sanitize_if() would move
a() out of the branch. Using sanitize_if() to fix this doesn't look easy,
because discards are not control flow instructions in NIR.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
Rhys Perry
d4503a9020
aco: update phi_map in add_subdword_operand()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: 56345b8c61
("aco: allow reading/writing upper halves/bytes when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216 >
2020-10-27 15:24:38 +00:00
James Park
23fb54bf7f
aco: Clean up some C++ usages
...
Iterate over maps by reference to avoid copies.
Replace find/insert with insert to avoid double search.
Use range-based for loop, avoiding copies by reference. Delete comment.
Erase by iterator instead of key to avoid repeat search.
Iterators unneeded to modify unwaited_instrs. Use range-based for loop.
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7285 >
2020-10-27 14:57:16 +00:00
Samuel Pitoiset
79347f5cd4
radv: enable VK_AMD_mixed_attachment_samples on GFX6-GFX7
...
Now that dEQP-VK.pipeline.multisample.mixed_attachment_samples.* pass,
it should be safe to also enable this extension on these old chips.
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/4913 >
2020-10-27 14:13:50 +00:00
Samuel Pitoiset
ee1d30ab8a
radv: flush CB before and after FMASK_DECOMPRESS or DCC_DECOMPRESS
...
According to RadeonSI and AMDVLK, it seems required to flush CB
before and after FMASK_DECOMPRESS or DCC_DECOMPRESS.
This shouldn't much affect performance because the driver already
flushes CB after these operations (including FCE too).
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/4913 >
2020-10-27 14:13:50 +00:00
Erik Faye-Lund
3fee91d2e7
docs: add link to extension spec
...
We already do this for all the other VK extensions, so we might as well
do this for VK_EXT_vertex_attribute_divisor as well.
Fixes: 2ff97847d1
("docs: document zink's gl > 3.0 requirements")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7312 >
2020-10-27 12:56:01 +00:00
Daniel Stone
76f74bd653
CI: Only run OpenCL tests when we need to
...
Like the other drivers, set up rules so we don't run piglit-cl unless we
need to.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3695
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7330 >
2020-10-27 12:37:11 +00:00
Samuel Pitoiset
48e83f7665
radv: do not perform a FMASK expand for non-writeable MSAA images
...
It should only be required for writeable MSAA images.
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/7292 >
2020-10-27 13:16:50 +01:00
Daniel Schürmann
cb12879401
aco: fix GFX8 16-bit packing
...
def.physReg() was uninitialized.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Fixes: d96f387e7a
('aco: improve code sequences for 16bit packing')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7334 >
2020-10-27 12:56:14 +01:00
Iago Toral Quiroga
666817ce84
v3dv: grow meta descriptor pool dynamically
...
Our blit shader path allocates a descriptor pool to create
combined image sampler descriptors for blit source images. So
far, we had sized this pool statically and the driver would
fail if we ever need to allocate more descriptors than that.
With this change, we switch to using a dynamic allocation
mechanism instead where we allocate as many pools as we need to
meet descriptor set allocation requirements for the command buffer.
Also, every time a new pool needs to be created, we double its
size (up to a limit), so we can start small and avoid wasting
memory for command buffers that only have a small number of blits,
while trying to keep allocation overhead low for command buffers
that record a lot of blits.
v2: use existing framework for automatic destruction of private
driver objects to free allocated pools.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7311 >
2020-10-27 10:15:28 +00:00
Michel Dänzer
6b874eb42c
ci: Run git_archive job if all_paths matches
...
The lack of this could break post-merge pipelines:
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/218636
(I missed this in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7278 )
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7319 >
2020-10-27 09:21:32 +00:00
Italo Nicola
e5cd5e9cec
pan/mdg: fix LOCAL_STORAGE wls_instances packing
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7315 >
2020-10-27 07:43:35 +00:00
Iago Toral Quiroga
e4b170a720
v3dv: enable the logicOp feature
...
For us this is mostly handled in the compiler by a NIR lowering so
for the Vulkan driver we only need to make sure that we program our
shader key correctly from the pipeline state, which we were already
doing.
It doesn't look like CTS has any coverage for this yet so it has only
been smoke tested, but it seems to be working correctly, as expected.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7313 >
2020-10-27 07:44:37 +01:00
Marek Olšák
af0435cbfe
Revert "radeonsi: use staging buffer uploads for most VRAM buffers"
...
This reverts commit fd6bbdcf59
.
Fixes: fd6bbdcf59
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3611
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7262 >
2020-10-27 04:58:53 +00:00
Vinson Lee
e29fb8e80f
amd/addrlib: Initialize Gfx10Lib members in constructor.
...
Fix defects reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member m_numPkrLog2 is not
initialized in this constructor nor in any functions that it
calls.
uninit_member: Non-static class member m_numSaLog2 is not
initialized in this constructor nor in any functions that it
calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7178 >
2020-10-26 18:11:07 -07:00
Rob Clark
006ce7358c
freedreno/gmem: Respect max-height limits too
...
There is an upper bound on # of bits we have to encode bin height on
various gens, which we could exceed with larger GMEM sizes and low
byte/pixel formats.
The max-width limits are initialized based on corresponding bitfield
sizes.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7222 >
2020-10-26 21:48:36 +00:00
Rob Clark
9f5c8ff0ae
freedreno: Rework GMEM limit init
...
Split out into helper that can be re-used by gmemtool, to de-duplicate
the limits table. And convert to switch instead of if-else ladder.
A little bit of duplication, but that will no longer be the case with
additional limits added in next patch.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7222 >
2020-10-26 21:48:36 +00:00
Boris Brezillon
6c6693e043
pan/bi: Fix ms_idx type to catch missing ms_index source
...
nir_tex_instr_src_index() returns a negative result when the requested
source does not exist, but we cast that to an unsigned type thus losing
this information.
Fixes: b83c293674
("pan/bi: Add basic support for txf_ms")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314 >
2020-10-26 19:11:33 +01:00
Boris Brezillon
eaed477652
pan/bi: Add ult support
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314 >
2020-10-26 19:11:29 +01:00
Boris Brezillon
f77bbc9236
pan/bi: Lower {i,u}{min,max} instructions
...
There's no native integer min/min instruction on Bifrost, lower those
to a cmp+bcsel pair.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314 >
2020-10-26 19:11:24 +01:00
Boris Brezillon
1c8b8e3c82
pan/bi: Add support for load_point_coord
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314 >
2020-10-26 19:11:20 +01:00
Boris Brezillon
55c0dd943e
pan/bi: Add support for load_front_face
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314 >
2020-10-26 19:11:16 +01:00
Boris Brezillon
0a582b53f2
panfrost: Preload primitive flags when gl_FrontFacing is accessed
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314 >
2020-10-26 19:11:01 +01:00
Michel Dänzer
b92eadb29c
ci: Add "check mr" job to needs: of build jobs
...
So that if the former fails, build & test jobs won't run, wasting less
time & CI resources.
This requires slight tweaks to the rules: of the former job, to make
sure it always exists when the build jobs do.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7278 >
2020-10-26 16:42:17 +00:00
Rhys Perry
27ce5d921e
aco: remove isel_context::allocated
...
Now that we have Program::temp_rc, we can replace it with the first
temporary id allocated for NIR's ssa defs.
No fossil-db changes on Navi.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7067 >
2020-10-26 15:14:32 +00:00
Rohan Garg
6f68cacf61
virgl: Always enable emulated BGRA and swizzling unless specifically told not to
...
The emulation is turned on by default only for GLES hosts when the
host does not support the BGRA/RGBA external/internal format
combination.
This can be turned off by setting VIRGL_DEBUG=noemubgra,nobgraswz
environment variable.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6847 >
2020-10-26 15:01:34 +00:00
Jason Ekstrand
3d9ffdcc72
nir/lower_memcpy: Don't mask the store
...
For constant-size memcpys, we can do as much as a vec4 at a time. We
were accidentally masking the store to only the .x component.
Fixes: a3177cca99
"nir: Add a lowering pass to lower memcpy"
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7305 >
2020-10-26 14:47:19 +00:00
Rob Clark
67238f95b5
freedreno: Disallow tiled if SHARED and not QCOM_COMPRESSED
...
If the user is not aware of modifiers, and wants to allocate a shared
resource, we shouldn't leave them with tiled.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3678
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7308 >
2020-10-26 14:36:24 +00:00
Rob Clark
63bdbfd045
freedreno: Update import/export traces
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7308 >
2020-10-26 14:36:24 +00:00
Andrew Randrianasulu
5f686c308a
st/va: fix build with old libva
...
Closes : #3682
Fixes: 0eccd158
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7297 >
2020-10-26 14:21:34 +00:00
Andrii Simiklit
638ebdea78
glx: get rid of memory leak
...
It fixes Coverity issue: `CID 1468356: Resource leaks (RESOURCE_LEAK)`
Fixes: e1964496
("glx: initial plumbing to let users force-enable/disable extensions")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7310 >
2020-10-26 12:49:09 +00:00
Erik Faye-Lund
26f58e87a0
mapi: do not return thread-specific data for wrong thread
...
If the current thread asks for either the current context or the current
dispatch table for a thread that has not yet set any context current, we
currently risk returning the wrong data if there was only a single
thread that had called u_current_init() yet.
So let's first check if the only expected thread-id is the one getting
these, and return NULL and/or __glapi_noop_table instead if not.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7280 >
2020-10-26 12:35:22 +00:00
Erik Faye-Lund
61d40ae4d0
mapi: do not call thread-unsafe dispatch getter
...
When not using the USE_ELF_TLS code-path, this function is
thread-unsafe, because it returns u_current_table if set without
consulting the ThreadSafe variable in u_current.c.
There's a short period where this can cause problems, if a program uses
multiple threads, but only have made a single context current so far. If
the program issues OpenGL commands from the initialized thread while a
new thread is setting u_current_table to __glapi_noop_table, we will
return the wrong table here.
It doesn't seem right to have two versions of the code that does the
same anyway, so let's use the version that doesn't have this problem
instead.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7280 >
2020-10-26 12:35:21 +00:00
Erik Faye-Lund
65d6f258c5
mapi: remove unused function
...
This function is unused, and also unsafe. Let's just get rid of it.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7280 >
2020-10-26 12:35:21 +00:00
Daniel Schürmann
cf083f1d02
aco: use do_pack() for self-intersecting operations.
...
This improves the code for GFX8+, but is slightly
worse for GFX6_7.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7189 >
2020-10-26 12:21:13 +00:00
Daniel Schürmann
d96f387e7a
aco: improve code sequences for 16bit packing
...
This includes using alignbyte for GFX6 and GFX7,
and 32-bit instructions for GFX8.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7189 >
2020-10-26 12:21:13 +00:00
Daniel Schürmann
40bfb08828
aco: refactor GFX6_7 subdword copy lowering
...
The new code uses alignbyte which leads
to shorter code and preserves the operand's
registers.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7189 >
2020-10-26 12:21:13 +00:00
Eleni Maria Stea
06b41ca589
iris: add support for fence signal capability
...
This enables GL_EXT_semaphore feature.
v2:
* reversed previous commit that was conditionally setting the signal
fence capability if the syncobj was present
* reversed previous commit that was introducing a bool has_syncobj that
is not necessary anymore
v3:
* changed the signal function to use fence->seqno due to recent changes
to master
v4:
* changed the signal callback to use the new structs of the fences
backend (iris_fine_fence)
v5:
* removed check for ctx == NULL in iris_fence_signal and await functions
as at the time they are called we always have a context
* splitted a line to not exceed width
v6:
* put back the if(ctx) check in iris_fence_await, if this is an error
the fix should be in a different MR
Signed-off-by: Eleni Maria Stea <estea@igalia.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7042 >
2020-10-26 12:13:54 +00:00
Eleni Maria Stea
aa1d298b33
iris: handle PIPE_FD_TYPE_SYNCOBJ type
...
Add support for importing syncobj semaphore types from fd handles.
v2:
* Used a C99 initializer instead of memset for drm_syncobj_handle in
iris_fence.c
Signed-off-by: Eleni Maria Stea <estea@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7042 >
2020-10-26 12:13:54 +00:00