Commit Graph

135593 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 9dd9e0200d pan/bi: Implement barriers
Only control barriers are meaningful upon a closer read.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
2021-02-18 21:48:21 +00:00
Alyssa Rosenzweig 60bee70103 pan/bi: Stub scoreboarding
This is not a real implementation. But I'm working on barriers right
now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
2021-02-18 21:48:21 +00:00
Jesse Natalie 5b0a10823b microsoft/clc: Use driver_location for metadata instead of re-computing offsets
Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
2021-02-18 21:33:54 +00:00
Jesse Natalie 3ee8f2ccba microsoft/clc: Move inline samplers to the end of the variable list
Since inline samplers are uniforms, just like kernel args, and
nir_lower_vars_to_explicit_types will assign driver_location based
on order in the variable list, move the inline samplers to the end
of the list to prevent them from creating gaps in the kernel arg
offsets.

Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
2021-02-18 21:33:54 +00:00
Jesse Natalie d773257012 microsoft/clc: Fix wrap modes for inline samplers for integer textures
Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
2021-02-18 21:33:54 +00:00
Jesse Natalie 9da8179a1e microsoft/clc: Let lower_vars_to_explicit_types fill kernel input driver_location
Importantly, also run that before mucking with the variable list via image lowering,
which removes and inserts variables, making the driver_location no longer line up
with metadata.

Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
2021-02-18 21:33:54 +00:00
Jason Ekstrand 7c8c14a988 intel/mi_builder: Add tests for gen_mi_z and gen_mi_nz
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
2021-02-18 21:28:40 +00:00
Jason Ekstrand 9145d77707 intel/mi_builder: Rewrite unit tests in terms of constant folding
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
2021-02-18 21:28:40 +00:00
Jason Ekstrand efdbe53eda intel/mi_builder: Add constant folding
This also serves as pretty clear documentation of each helper's
semantics.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
2021-02-18 21:28:40 +00:00
Jason Ekstrand dbcbb321ad intel/mi_builder: Short-circuit shifts in more cases
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
2021-02-18 21:28:40 +00:00
Jason Ekstrand c64d7aa8e3 intel/mi_builder: Fix a misleading comment
This doesn't actually assume the top 32 bits of the source value are
zero.  Instead, it does (src >> shift) & UINT32_MAX regardless of what
the top bits of src are.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
2021-02-18 21:28:40 +00:00
Jason Ekstrand 40df12d4ce intel/mi_builder: Delete a bogus comment
It actually returns ~0/0.  We're about to make things more self-
documenting so we can delete the comment instead of fixing it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
2021-02-18 21:28:40 +00:00
Jason Ekstrand 749ae5af93 intel/mi_builder: Create a context in the tests
This makes them work on the simulator

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
2021-02-18 21:28:40 +00:00
Adam Jackson 3f290b4f65 nouveau: Silence a warning at -Og
../src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp: In member function ‘void nv50_ir::AlgebraicOpt::handleCVT_EXTBF(nv50_ir::Instruction*)’:
   ../src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp:2238:57: warning: ‘offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Just set it to 0 to handle the corner case.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson 86b85798bd nouveau: Silence some warnings at -Og
../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp: In member function ‘bool {anonymous}::Converter::handleInstruction(const tgsi_full_instruction*)’:
   ../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:3419:22: warning: ‘src1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    3419 |          geni = mkOp3(op, dstTy, dst0[c], fetchSrc(0, c), src1, mkImm(0x1f));
   ../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:3272:15: warning: ‘val1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    3272 |          mkOp1(OP_EX2, TYPE_F32, dst0[1], val1);

Can't happen, just initialize them to NULL.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson ba4b9cc0c7 gallivm: Silence a warning at -Og
../src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c: In function ‘lp_build_sample_image_linear’:
   ../src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c:1412:24: warning: ‘have_corners’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    1412 |          have_corner = LLVMBuildLoad(builder, have_corners, "");

I don't think you can get here and really not have it initialized, but
if you _could_ then it would clearly be wrong to do anything, so do
nothing instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson 109f9f3910 vl: Silence a warning at -Og
../src/gallium/auxiliary/vl/vl_winsys_dri.c: In function ‘vl_dri2_screen_texture_from_drawable’:
   ../src/gallium/auxiliary/vl/vl_winsys_dri.c:239:34: warning: ‘back_left’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     239 |    dri2_handle.stride = back_left->pitch;

The server would be broken if it failed to inform us of the back left
buffer, but let's leave nothing to chance.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson 5cf6c9e609 nir/ttn: Silence some warnings at -Og
../src/gallium/auxiliary/nir/tgsi_to_nir.c: In function ‘ttn_mem’:
   ../src/gallium/auxiliary/nir/tgsi_to_nir.c:1724:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    1724 |       instr = nir_intrinsic_instr_create(b->shader, op);
   ../src/gallium/auxiliary/nir/tgsi_to_nir.c:1697:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    1697 |       instr = nir_intrinsic_instr_create(b->shader, op);

Add some more unreachable() to make this go away.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson 10bcf25766 gallivm: Silence a warning at -Og
../src/gallium/auxiliary/gallivm/lp_bld_arit.c: In function ‘lp_build_round_arch’:
   ../src/gallium/auxiliary/gallivm/lp_bld_arit.c:2042:7: warning: ‘intrinsic_root’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    2042 |       lp_format_intrinsic(intrinsic, sizeof intrinsic, intrinsic_root, bld->vec_type);

Can't happen, mark it unreachable.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson 36ea1758fd loader: Silence a warning at -Og
../src/loader/loader_dri3_helper.c: In function ‘dri3_free_buffers’:
   ../src/loader/loader_dri3_helper.c:2022:46: warning: ‘n_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    2022 |    for (buf_id = first_id; buf_id < first_id + n_id; buf_id++) {

Can't happen, mark it unreachable.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson b882857d28 glsl: Silence a warning at -Og
../src/compiler/glsl/gl_nir_link_uniforms.c:1786:50: warning: ‘blocks’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    1786 |             const struct gl_uniform_block *const block =

Just do nothing if we somehow fail to initialize blocks.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson 89acceda60 glsl: Silence some warnings at -Og
./src/compiler/glsl/link_uniforms.cpp: In member function ‘virtual void parcel_out_uniform_storage::visit_field(const glsl_type*, const char*, bool, const glsl_type*, glsl_interface_packing, bool)’:
   ../src/compiler/glsl/link_uniforms.cpp:1171:61: warning: ‘id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    1171 |       calculate_array_size_and_stride(prog, &this->uniforms[id],

   ../src/compiler/glsl/link_uniform_initializers.cpp: In function ‘gl_uniform_storage* linker::get_storage(gl_shader_program*, const char*)’:
   ../src/compiler/glsl/link_uniform_initializers.cpp:41:42: warning: ‘id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      41 |       return &prog->data->UniformStorage[id];

Can't happen, but flow control apparently can't prove it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson 831eff15f8 glsl: Silence a warning at -Og
../src/compiler/glsl/gl_nir_link_uniforms.c: In function ‘gl_nir_link_uniforms’:
   ../src/compiler/glsl/gl_nir_link_uniforms.c:1747:39: warning: ‘num_blocks’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    1747 |                for (unsigned i = 0; i < num_blocks; i++) {

Don't have the patience to seee how you'd hit this but doing nothing is
clearly the right edge case behavior.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson f2b3ecb84f softfloat: Silence a warning at -Og
../src/util/softfloat.c: In function ‘_mesa_shift_right_jam_m’:
   ../src/util/softfloat.c:432:16: warning: ‘tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     432 |         *tmp++ = 0;

You could actually hit this if you called _mesa_shift_right_jam_m with
size_words = 0 and dist < 32. Not that you'd _do_ that, but. In this
case do nothing instead of writing through an uninitialized pointer.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Adam Jackson fad353d7f8 nir: Silence a warning at -Og
This throws a curious warning:

   In file included from ../src/compiler/nir/nir.h:32,
                    from ../src/compiler/nir/nir_opt_if.c:24:
   ../src/compiler/nir/nir_opt_if.c: In function ‘opt_if_loop_last_continue’:
   ../src/compiler/glsl/list.h:415:64: warning: ‘nif’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     415 |    return !exec_list_is_empty(list) ? list->tail_sentinel.prev : NULL;
         |                                                                ^

What's going on here is not enough of the optimizer has run to be able
to prove that nif is always initialized. So just handle the "can't
happen" case as if it could.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
2021-02-18 20:59:43 +00:00
Mike Blumenkrantz 03d3294e35 gallium/trace: remove transfer_map assert
this breaks tracing with tc due to the "latest" mechanism which maintains
copies of resources

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9107>
2021-02-18 18:26:15 +00:00
Alyssa Rosenzweig c6ed8bf77c panfrost: Fix uniform_count on Midgard
The compiler ABI specifies push uniforms at a 4-byte granularity (like
Bifrost), but Midgard require a 16-byte granularity. As such if the
number of pushed words is not a multiple of 4, there is a buffer overrun
at shader load time. Ordinarily this is inaccessible so the garbage is
ignored.

However, there was a great deal of confusion around the `uniform_cutoff`
variable. In some cases (such a full glmark2 run on a 64-bit processor),
the push uniforms would be at the end of a BO and the overrun would
cause a page fault.

Remove uniform_cutoff entirely and work with count directly to avoid
faulting, and round the count up to be defensive.

Closes: #4289
Fixes: ed810eb0a0 ("panfrost: Don't truncate uniform_count")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Robin Murphy <robin.murphy@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9109>
2021-02-18 16:06:36 +00:00
Mike Blumenkrantz 0fc146e7da zink: enable GL_CLAMP cap
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
2021-02-18 14:32:05 +00:00
Mike Blumenkrantz e8f71f6ac4 mesa/st: add PIPE_CAP_GL_CLAMP
when this is not set, this triggers shader and sampler state updates any time a sampler
starts or stops using GL_CLAMP, applying bitmasks needed to run nir_lower_tex
and setting CLAMP_TO_BORDER/CLAMP_TO_EDGE as necessary to mimic the behavior

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
2021-02-18 14:32:05 +00:00
Mike Blumenkrantz 10e71d5c9a mesa/st: add pipe_sampler_state::border_color_is_integer
some drivers need to know whether the border color format is integer,
so this allows disambiguation between samplers based on format types

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
2021-02-18 14:32:05 +00:00
Mike Blumenkrantz b154a4154b nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs
this fixes mipmapping with saturate by saturating the coord param while
passing an additional param (partial derivatives or lod) that uses the
unsaturated coord value

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
2021-02-18 14:32:05 +00:00
Timur Kristóf a6e1178f91 aco: Disallow LSHS temp-only I/O when VS output is written indirectly.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9100>
2021-02-18 12:10:56 +00:00
Timur Kristóf 72c348f85c radv/llvm: Fix reporting LDS stats of tess control shaders.
The LLVM backend forgot to set config->lds_size, which is used
for reporting LDS stats.

Fixes: cf89bdb9ba "radv: align the LDS size in calculate_tess_lds_size()"
Signed-off-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/9098>
2021-02-18 11:57:22 +00:00
Timur Kristóf 48f349971f aco: Fix LDS statistics of tess control shaders.
The calculate_tess_lds_size function already returns the size in blocks
of the encoding granule, but we forgot to adjust config->lds_size.
This variable is not used to actually set the LDS size used for TCS,
but by ACO to make scheduling decisions.

Fossil DB stats on Sienna Cichlid:
Please note that the +3729.43% is NOT a regression.
The real LDS size used didn't change, it was just reported incorrectly.

Totals from 1342 (0.96% of 139391) affected shaders:
VGPRs: 60880 -> 80240 (+31.80%); split: -0.05%, +31.85%
CodeSize: 3378456 -> 3381224 (+0.08%); split: -0.23%, +0.31%
LDS: 687104 -> 26312192 (+3729.43%)
MaxWaves: 29794 -> 23962 (-19.57%)
Instrs: 644194 -> 644610 (+0.06%); split: -0.32%, +0.39%
Cycles: 2675068 -> 2676804 (+0.06%); split: -0.31%, +0.38%
VMEM: 428840 -> 517418 (+20.66%); split: +22.53%, -1.88%
SMEM: 91831 -> 88587 (-3.53%); split: +5.70%, -9.23%
VClause: 22740 -> 19384 (-14.76%); split: -16.18%, +1.42%
SClause: 19116 -> 18373 (-3.89%); split: -4.34%, +0.46%
Copies: 66662 -> 63448 (-4.82%); split: -5.55%, +0.73%

Fixes: cf89bdb9ba "radv: align the LDS size in calculate_tess_lds_size()"
Signed-off-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/9098>
2021-02-18 11:57:22 +00:00
Lionel Landwerlin d8ce76977f anv: track buffer creation flags
So we know a buffer is protected.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
2021-02-18 11:21:14 +02:00
Lionel Landwerlin d6294a13a6 anv: track command buffer pool flags
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
2021-02-18 11:21:03 +02:00
Lionel Landwerlin 207ee2b6a9 isl: add external parameter to isl_mocs()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
2021-02-18 11:20:59 +02:00
Lionel Landwerlin e484478727 genxml: Add PIPE_CONTROL protected memory bits
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
2021-02-18 11:20:55 +02:00
Lionel Landwerlin 1b43528ade genxml: add MI_SET_APPID on Gen12+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
2021-02-18 11:20:51 +02:00
Samuel Pitoiset b02c709b70 radv: use the pipeline key as hash for pipeline bind markers
It's way easier to identify a pipeline compared to a random CPU addr.

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/9083>
2021-02-18 08:28:49 +00:00
Samuel Pitoiset 51f3855cc4 radv: only emit pipeline bind markers for application pipelines
We don't want to emit markers for internal operations.

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/9083>
2021-02-18 08:28:49 +00:00
Samuel Pitoiset 7a377708fd radv: add support for user event markers with SQTT
This enables VK_EXT_debug_marker only if SQTT is enabled, otherwise
it's just useless.

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/9099>
2021-02-18 08:17:59 +01:00
Jason Ekstrand 7c63be7ffc anv/android: Re-implement AcquireImageANDROID
Instead of doing a vkQueueSubmit() and hoping for the best, use the
actual sync FD that gets passed in from SurfaceFlinger.  The semaphore
and fence FD import functions already handle the -1 case for us so the
implementation is almost trivial.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8814>
2021-02-18 06:11:05 +00:00
Vinson Lee fa3cd19697 nv50/ir: Initialize ValueDef member origin in constructors.
Fix defects reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member origin is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9036>
2021-02-17 20:30:23 -08:00
Dave Airlie 620afb0956 lavapipe: set viewport state dirty on first execute
This makes sure the viewport state gets emitted so that
draw gets viewports setup and the vertex shader doesn't crash.

Fixes bug uncovered with dEQP-VK.api.descriptor_set_layout_lifetime.graphics
once asan fix was done.

Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093>
2021-02-18 01:07:32 +00:00
Dave Airlie 5c00efec23 lavapipe: avoid pointer to pipeline layout in execution
pipeline layout lifetime is only during command buffer recording,
Don't store pointers to it, just extract them around it.

Fixes asan use-after-free in
dEQP-VK.api.pipeline.pipeline_layout.lifetime.destroy_after_end

Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093>
2021-02-18 01:07:32 +00:00
Dave Airlie f94a5f30e0 lavapipe: add reference counting to descriptor set layout
asan flagged some use after frees, copy the anv solution
of refcounting the descriptor set layout objects.

dEQP-VK.api.descriptor_set.descriptor_set_layout_lifetime.*

Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093>
2021-02-18 01:07:32 +00:00
Eric Anholt d12cecbd53 ci/freedreno: Drop the "arm64" in front of job names.
All our jobs are arm64, and it made it hard to find jobs in the gitlab UI
which loves to truncate names.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070>
2021-02-18 00:49:00 +00:00
Eric Anholt 9500341847 ci/freedreno: Add a fractional gles31 run with asan enabled.
We have to disable the GLSL unit tests because with asan it runs way too
much code under qemu and times out.  Those unit tests have coverage on
x86, anyway.

I also included a vulkan run, which is disabled by default due to timeouts
that I need to sort out still.  It should be a useful tool for turnip
devs, though.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070>
2021-02-18 00:49:00 +00:00
Eric Anholt d1b63211c4 ci: Allow better customization of the name of the artifacts for minio.
To have asan testing, we need two different sets of artifacts per arch.
Plus, "UPLOAD_FOR_LAVA" was misnamed at this point anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070>
2021-02-18 00:49:00 +00:00