We want to be able to set a descriptor table and have the instruction
pair "magically" come to be. To do so, we adjust the definition of
DTSEL_IMM (deviating a bit from the architectural definition but in
practice simplifying disassembly immensely) and add a scheduler
lowering. This ensures DTSEL is always paired correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
All the same formula: calculate an address, emit a pseudoinstruction for
the atomic, emit a postprocess that can be DCE'd if not needed.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Already checked in format_supported (only difference being cube map
arrays but the extension isn't advertised yet anyway due to missing
geometry shaders.)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Contains the InternalConversionDescriptor corresponding to the selected
render target, ready to be fed into LD_TILE.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
We can use the constant format anywhere safely as a 0-component format,
which will map fine for PIPE_FORMAT_NONE. Used so
ARB_framebuffer_no_attachments can probe.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Add some notes on what the useful combinations do and flesh out the
logic. Fixes fails in
dEQP-GLES31.functional.image_load_store.early_fragment_tests.*
It's still not entirely clear to me what the difference between "force
early" and "weak early" is from the driver's perspective, though I
suspect there are performance implications to getting it wrong. Follow
what the blob does in case of doubt..
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
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>
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>
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>
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>
../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>
../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>
../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>
../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>
../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>
../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>