Samuel Pitoiset [Thu, 20 Jan 2022 22:49:08 +0000 (23:49 +0100)]
radv: fix computing the number of color samples if no attachments
When no color attachments, the rasterization samples should be used.
Fixes:
0222dace909 ("radv: Support VK_KHR_dynamic_rendering for pipeline creation.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5830
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/14642>
Pierre-Eric Pelloux-Prayer [Wed, 19 Jan 2022 11:10:49 +0000 (12:10 +0100)]
driconf: enable vs_position_always_invariant for Dirt Rally
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5648
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14614>
Pavel Ondračka [Wed, 19 Jan 2022 14:43:11 +0000 (15:43 +0100)]
r300: properly initialize new_vs in r300_draw_init_vertex_shader
Fixes the following valgrind warnings:
Conditional jump or move depends on uninitialised value(s)
at 0x5D1298C: draw_pt_so_emit_prepare (draw_pt_so_emit.c:95)
by 0x5D89FD7: llvm_middle_end_prepare (draw_pt_fetch_shade_pipeline_llvm.c:319)
by 0x5D13BFF: vsplit_prepare (draw_pt_vsplit.c:229)
by 0x5D0D5D8: draw_pt_arrays.isra.0 (draw_pt.c:124)
by 0x5D0DA08: draw_instances (draw_pt.c:484)
by 0x5D0DEB9: draw_vbo (draw_pt.c:610)
by 0x5E847D6: r300_swtcl_draw_vbo (r300_render.c:901)
by 0x5D67125: u_vbuf_draw_vbo (u_vbuf.c:1470)
by 0x5CFCAD3: cso_multi_draw (cso_context.c:1639)
by 0x58FEC37: st_draw_gallium (st_draw.c:186)
by 0x5A486BA: _mesa_draw_arrays.part.0 (draw.c:1323)
by 0x48B4E27: stub_glDrawArrays (piglit-dispatch-gen.c:12421)
Uninitialised value was created by a stack allocation
at 0x5E90D3F: r300_draw_init_vertex_shader (r300_vs_draw.c:313)
Conditional jump or move depends on uninitialised value(s)
at 0x5D175D9: draw_create_vertex_shader (draw_vs.c:70)
by 0x5E90E7A: r300_draw_init_vertex_shader (r300_vs_draw.c:366)
by 0x5E8751F: r300_create_vs_state (r300_state.c:1950)
by 0x594453B: st_create_common_variant (st_program.c:888)
by 0x594720C: st_get_common_variant (st_program.c:973)
by 0x59484B6: st_precompile_shader_variant (st_program.c:1994)
by 0x59484B6: st_finalize_program (st_program.c:2056)
by 0x58F0571: st_program_string_notify (st_cb_program.c:128)
by 0x5928C9B: st_link_tgsi (st_glsl_to_tgsi.cpp:7514)
by 0x5904B53: st_link_shader (st_glsl_to_ir.cpp:178)
by 0x58D3E08: _mesa_glsl_link_shader (link_program.cpp:91)
by 0x58865C7: link_program (shaderapi.c:1363)
by 0x58865C7: link_program_error.part.0 (shaderapi.c:1474)
by 0x48DBC5A: stub_glLinkProgram (piglit-dispatch-gen.c:34426)
Uninitialised value was created by a stack allocation
at 0x5E90D4F: r300_draw_init_vertex_shader (r300_vs_draw.c:313)
Based on Filip Gawin's
r300: set new_vs.type to PIPE_SHADER_IR_TGSI
CC: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14620>
Dave Airlie [Tue, 21 Dec 2021 04:28:31 +0000 (14:28 +1000)]
mesa/st: move perf query test to st_context, drop files.
This removes the unused cb perf query files
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Tue, 21 Dec 2021 04:27:07 +0000 (14:27 +1000)]
mesa/st: drop lots of perfquery wrappers
Just direct call into pipe driver.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Tue, 21 Dec 2021 03:51:50 +0000 (13:51 +1000)]
mesa/st: drop some bindless wrappers
Just call directly into pipe
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:14:45 +0000 (14:14 +1000)]
mesa/st: move memory query into mesa.
Drop the gl_memory_info type as it's equiv to the pipe one, and
internal
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 05:27:50 +0000 (15:27 +1000)]
mesa/st: move shader completion into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 05:21:44 +0000 (15:21 +1000)]
mesa/st: inline st_max_shader_compiler_threads
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 05:24:03 +0000 (15:24 +1000)]
mesa/ctx: store screen pointer in ctx as well
This is actually useful to have.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Tue, 21 Dec 2021 05:44:35 +0000 (15:44 +1000)]
mesa/st: move evaluate depth values into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:37:08 +0000 (14:37 +1000)]
mesa/st/vdpau: direct call the vdpau functions.
This provides versions when vdpau is turned off, removes dd.h entries
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Tue, 21 Dec 2021 05:33:24 +0000 (15:33 +1000)]
mesa/st: drop release all sampler views wrapper
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Tue, 21 Dec 2021 05:29:54 +0000 (15:29 +1000)]
mesa/st: move st_TexParameter into mesa
Some places this just passes an always true pname, so just call
sampler view invalidate directly
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Tue, 21 Dec 2021 05:22:05 +0000 (15:22 +1000)]
mesa/st: drop useless tex parameter calls.
st_TexParameter never does anything for these
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:52:24 +0000 (14:52 +1000)]
mesa/dd: drop GetProgramBinaryDriverSHA1
Just call direct into state tracker
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:27:37 +0000 (14:27 +1000)]
mesa/st: move pin l3 cache to direct check/call.
Drop another dd.h entry
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:25:21 +0000 (14:25 +1000)]
mesa/st: drop emit string marker device table entry.
Just check for the gallium callback instead
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:19:37 +0000 (14:19 +1000)]
mesa/st: directly call the uuid get funcs.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:10:37 +0000 (14:10 +1000)]
mesa/st: drop last user of st_Enable.
Move the debug output piece into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:09:14 +0000 (14:09 +1000)]
mesa/st: migrate debug callback code into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:04:33 +0000 (14:04 +1000)]
mesa/st: remove st_context from debug callback
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Dave Airlie [Mon, 20 Dec 2021 04:01:33 +0000 (14:01 +1000)]
mesa/st: move intel blackhole noop enable to frontend
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
Mike Blumenkrantz [Thu, 18 Nov 2021 22:04:02 +0000 (17:04 -0500)]
zink: hook up planar image format creation
it'll explode if used for anything, but this is how it's done
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13865>
Mike Blumenkrantz [Thu, 18 Nov 2021 21:40:56 +0000 (16:40 -0500)]
zink: link with vulkan utils
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13865>
Ian Romanick [Mon, 10 Jan 2022 22:52:08 +0000 (14:52 -0800)]
ntt: Extend ntt_compile::addr_declared and ntt_compile::addr_reg
This was identified by Coverity.
4bb9c0a28a5 added uses of a third
address register, but the arrays for tracking address registers only
have two slots.
Add back a version of the assertion from before
4bb9c0a28a5 to help
prevent future problems. I don't think any drivers that would hit
this path use NIR-to-TGSI yet, so it may be moot.
Reviewed-by: Matt Turner <mattst88@gmail.com>
CID: 1496942
CID: 1496944
Fixes:
4bb9c0a28a5 ("nir_to_tgsi: Use the same address reg mappings as GLSL-to-TGSI did.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14487>
Rhys Perry [Tue, 14 Sep 2021 17:02:01 +0000 (18:02 +0100)]
nir/algebraic: optimize expressions using fmulz/ffmaz
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Rhys Perry [Fri, 15 Oct 2021 16:23:51 +0000 (17:23 +0100)]
nir: add some missing nir_alu_type_get_base_type
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Rhys Perry [Fri, 1 Oct 2021 10:27:00 +0000 (11:27 +0100)]
nir/algebraic: optimize open-coded fmulz/ffmaz
This pattern will be found in future versions of D3D9 DXVK.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Rhys Perry [Fri, 15 Oct 2021 15:39:35 +0000 (16:39 +0100)]
nir/algebraic: add ignore_exact() wrapper
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Rhys Perry [Tue, 27 Apr 2021 11:11:37 +0000 (12:11 +0100)]
aco: create v_mac_legacy_f32/v_fmac_legacy_f32
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Rhys Perry [Tue, 21 Sep 2021 16:03:05 +0000 (17:03 +0100)]
aco: consider legacy multiplications in optimizer
Optimize omod, -(a*b), b2f(a)*b, a*1, a*0 and create MAD/FMA.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Rhys Perry [Tue, 27 Apr 2021 11:28:27 +0000 (12:28 +0100)]
radv,aco,ac/llvm: implement fmulz and ffmaz
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Rhys Perry [Wed, 28 Apr 2021 16:48:54 +0000 (17:48 +0100)]
nir: add nir_op_fmulz and nir_op_ffmaz
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>
Ian Romanick [Wed, 19 Jan 2022 00:30:37 +0000 (16:30 -0800)]
intel/fs: Fix gl_FrontFacing optimization on Gfx12+
It's not obvious why the (gl_FrontFacing ? -1.0 : 1.0) case was handled
different for Gfx12+ than for previous generations, and it's not
correct. It tries to negate the result as an integer, and it does this
before the mask operation that clears the other bits in the value.
When we eventually support dual-SIMD8 dispatch, the other front-facing
bit is in g1.6 at bit 15, so similar code should be possible there.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes:
c92fb60007f ("intel/fs/gen12: Implement gl_FrontFacing on gen12+.")
Closes: #5876
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14625>
Mike Blumenkrantz [Tue, 18 Jan 2022 20:07:31 +0000 (15:07 -0500)]
zink: fix non-modifer dmabuf usage
drivers/hardware lacking VK_EXT_image_drm_format_modifier can still use dmabuf,
but that setup has to do the old copy to linear scanout instead of copy to
modifier scanout
this requires a couple extra checks to be added to handle the case
Fixes:
619438bf7ce ("zink: check EXT_image_drm_format_modifier for dmabuf support")
fixes #5836
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14597>
Renato Pereyra [Wed, 19 Jan 2022 02:35:56 +0000 (18:35 -0800)]
anv: add helper methods related to enabling CCS for external images
Also, clarify/improve related comments
Signed-off-by: Renato Pereyra <renatopereyra@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14416>
Renato Pereyra [Thu, 6 Jan 2022 02:27:23 +0000 (18:27 -0800)]
anv: Enable implicit CCS for external images
AUX and clear state is stored in the VkDevice private binding
Signed-off-by: Renato Pereyra <renatopereyra@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14416>
Mike Blumenkrantz [Thu, 20 Jan 2022 15:49:02 +0000 (10:49 -0500)]
docs: add features/relnotes for zink sparse texture support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Thu, 13 Jan 2022 17:31:23 +0000 (12:31 -0500)]
zink: ARB_sparse_texture2
there is no vulkan driver that can currently pass all these tests, and
some of the tests themselves are broken, but this seems like it should be
correct
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:35:31 +0000 (14:35 -0500)]
zink: enable ARB_sparse_texture pipe caps
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 18:03:41 +0000 (13:03 -0500)]
zink: handle sparse texture miptail commits
basically just allocate pages for miptail levels (probably just one) and
then bind them separately since they're probably never going to be batched
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Wed, 12 Jan 2022 20:27:17 +0000 (15:27 -0500)]
zink: batch sparse texture binds
do 10 binds per submit now (4 is enough for cts but yolo)
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 16:22:43 +0000 (11:22 -0500)]
zink: handle min_lod texture operands
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 17:01:15 +0000 (12:01 -0500)]
zink: emit sparse residency cap in ntv
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 14:51:47 +0000 (09:51 -0500)]
zink: only allocate ntv residency info if it will be used
odds are it will never be used, so don't bother allocating
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 14:51:20 +0000 (09:51 -0500)]
zink: add nir_intrinsic_image_deref_sparse_load to image scanning in compiler
this flags the shader as having image use
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 15:58:29 +0000 (10:58 -0500)]
zink: always pass shader info to ntv
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 14:45:17 +0000 (09:45 -0500)]
zink: rename zink_so_info -> zink_shader_info
start passing more useful info to ntv
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Thu, 13 Jan 2022 17:27:10 +0000 (12:27 -0500)]
zink: handle residency return value from sparse texture instructions
this one's a bit tricky since vulkan doesn't support vec5, the return from
the instructions is a struct, and I don't want to add temp var support to zink
now instead the process for these ops is:
* rewrite the is_sparse_texels_resident instruction to read the first vec member of the texop
* (temporarily) decrement num_components for sparse texop's dest to get real result size
* wrap texop's return type in spirv-required struct(uint, result)
* unwrap struct, store result normally + store residency info to separate array
* for is_sparse_texels_resident, ignore the mov alu for src[0] and instead use the ssa index
from the parent instr since this is the original texop that was used to store the residency result
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Thu, 13 Jan 2022 17:26:45 +0000 (12:26 -0500)]
zink: always set actual_dest_type for ntv tex instruction emission
no-op for now
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Thu, 13 Jan 2022 17:25:58 +0000 (12:25 -0500)]
zink: implement sparse shader instructions in ntv
this automatically wraps the results into the required struct(int, result) type,
handling will come next
note that there is no cts coverage for sparseImageLoadARB, so this is purely
hypothetical
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:34:44 +0000 (14:34 -0500)]
zink: fake sparse R9G9B9E5 support as needed
these just allocate the whole thing now, which means they aren't actually
sparse, but who cares because nobody but cts is actually going to use it
and those tests pass just fine
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 7 Jan 2022 17:58:06 +0000 (12:58 -0500)]
zink: stop allocating such massive staging regions for buffer maps
this would allocate a new stream uploader for every map if the offset was
large (e.g., all sparse buffer usage), which almost immediately consumes all vram
cc: mesa-stable
fixes KHR-GL46.CommonBugs.CommonBug_SparseBuffersWithCopyOps
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 7 Jan 2022 17:56:31 +0000 (12:56 -0500)]
zink: allow sparse buffers to be suballocated
this is now symmetrical since the backing memory was being cached,
and there's no reason not to allow this since memory is no longer in use
by the time it gets returned to the cache
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:33:12 +0000 (14:33 -0500)]
zink: support sparse texture range commits
this is a bit duplicated because the buffer and image commit code is
a little shared but not enough to combine without becoming spaghetti
this will only get worse once multisampling is supported
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:34:30 +0000 (14:34 -0500)]
zink: set up image create bits for sparse textures
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:32:32 +0000 (14:32 -0500)]
zink: add get_sparse_texture_virtual_page_size hook
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Danylo Piliaiev [Wed, 19 Jan 2022 17:43:39 +0000 (19:43 +0200)]
tu: expose VK_KHR_copy_commands2
Relevant CTS tests:
dEQP-VK.api.copy_and_blit.copy_commands2.*
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14623>
Charles Giessen [Fri, 14 Jan 2022 18:14:39 +0000 (12:14 -0600)]
v3dv: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:13:30 +0000 (12:13 -0600)]
freedreno, tu: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:11:24 +0000 (12:11 -0600)]
lavapipe: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:07:25 +0000 (12:07 -0600)]
anv: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:05:46 +0000 (12:05 -0600)]
panvk: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 17:56:43 +0000 (11:56 -0600)]
radv: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Dave Airlie [Thu, 20 Jan 2022 01:55:26 +0000 (11:55 +1000)]
meson: start building intel earlier.
as intel perf is a big impact, start building the intel subdir
earlier so there is less chance of long stalls at the end waiting
for one file to link other things.
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14630>
Dave Airlie [Thu, 20 Jan 2022 01:36:16 +0000 (11:36 +1000)]
intel/perf: use a function to do common allocations
This cuts the compile time down for this file on my ryzen from
real 1m4.077s
to
real 0m30.827s
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14630>
Tapani Pälli [Tue, 18 Jan 2022 07:38:18 +0000 (09:38 +0200)]
mesa: refactor GetProgramiv to use program resource list
This way we make sure glGetActiveUniform and glGetProgramiv
are in sync about active uniform count.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5885
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14589>
Emma Anholt [Thu, 20 Jan 2022 00:55:28 +0000 (16:55 -0800)]
ci/softpipe: Drop the GS sampling known-flakes.
They haven't appeared in the last half a year since I added the IRC flake
reports.
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14627>
Emma Anholt [Wed, 19 Jan 2022 23:45:47 +0000 (15:45 -0800)]
softpipe: Request that st fix up DST_ALPHA blending for RGB render targets.
Fixes a render target of
dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.0
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14627>
Emma Anholt [Wed, 19 Jan 2022 23:28:10 +0000 (15:28 -0800)]
softpipe: respect !independent_blend_enable for color masks.
blend_buf is the resolved "are we using independent blending?" index, cbuf
is the RT we're drawing to.
Cc: mesa-stable.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14627>
Mike Blumenkrantz [Thu, 20 Jan 2022 02:04:15 +0000 (21:04 -0500)]
lavapipe: fix ptralloc typo
these calculations are so tricky I can't even type them again
Fixes:
48fde98b79f ("lavapipe: replace hard pointer calcs in dynamic render with ptralloc")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14631>
Guilherme Gallo [Wed, 12 Jan 2022 13:58:20 +0000 (10:58 -0300)]
ci: Add docs for Linux Kernel uprevs
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14514>
Dave Airlie [Tue, 21 Dec 2021 04:59:00 +0000 (14:59 +1000)]
mesa/st: merge texture obj/image alloc/free into mesa
This just drops the st wrappers for alloc/free of texture images
and objects.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Fri, 10 Dec 2021 03:14:39 +0000 (13:14 +1000)]
mesa/st: merge texture object/image structs into mesa
This just merges the subclasses into main class
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:48:38 +0000 (08:48 +1000)]
mesa/st: cleanup last bits of st perfmon code.
Just some small cleanups left to finish perfmon code movement.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:40:56 +0000 (08:40 +1000)]
mesa/st: move perfmon code from st into mesa
This merges the perfmon code after the objects have been merged.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:37:03 +0000 (08:37 +1000)]
mesa/st: merge perfmon groups init/cleanup from st into mesa
This moves the init/cleanup code from st into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:28:11 +0000 (08:28 +1000)]
mesa/st: merge perfmon counters/groups objects from st into mesa
This merges subclassed or side allocated objects into the main
ones.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 21:56:25 +0000 (07:56 +1000)]
mesa/st: merge perfmon object from st into mesa
This just merges the perf mon subclass into the base class,
and cleans up the result.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 01:19:43 +0000 (11:19 +1000)]
mesa/st: merge transform feedback code from st into mesa
After the objects are merged, this moves the rest of the code
from the state tracker into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 01:03:40 +0000 (11:03 +1000)]
mesa/st: merge st transform feedback object into gl one.
This just merges the object subclass into the main class,
this was left separate to ease review.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 18:52:37 +0000 (04:52 +1000)]
mesa/st: merge condrender code from st into mesa.
This merges conditional render code from state tracker into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 07:14:39 +0000 (17:14 +1000)]
mesa/st: merge queryobj code from st into mesa.
This merges all the query object code from st into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 06:59:03 +0000 (16:59 +1000)]
mesa/st: merge the syncobj code from st into mesa
This merges all the syncobj code into the mesa from the state tracker.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 04:37:51 +0000 (14:37 +1000)]
mesa/st: merge semaphore objects from st into mesa
Take all the semaphore objects code from state tracker and merge it
into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 04:12:49 +0000 (14:12 +1000)]
mesa/st: merge memoryobjects code from st into mesa
This takes all the memory object code from state tracker and
merges it into mesa, cleaning it up on the way.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Fri, 7 Jan 2022 06:58:42 +0000 (16:58 +1000)]
glsl: drop glheader.h include.
This is unused.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:31:03 +0000 (16:31 +1000)]
mesa: split struct gl_config into it's own header.
avoids context.h/mtypes.h deps.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:27:02 +0000 (16:27 +1000)]
mesa: more mtypes.h cleanups
Add more from pepp
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:22:05 +0000 (16:22 +1000)]
docs: update docs for new extension header.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:14:45 +0000 (16:14 +1000)]
vbo: drop unused mtypes.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:38:39 +0000 (15:38 +1000)]
glsl: drop some more context.h/mtypes.h interactions
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:28:08 +0000 (15:28 +1000)]
glsl/fp64: move context.h dependent checks into main.
allows dropping context.h include.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:11:21 +0000 (15:11 +1000)]
glsl: move off mtypes.h in lots of places.
This moves to the new split out header files, should mean less recompiling
for unrelated changes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:08:46 +0000 (15:08 +1000)]
mtypes: move gl_shader_variable to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:03:47 +0000 (15:03 +1000)]
mtypes: move bindless image/sampler objects to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:01:47 +0000 (15:01 +1000)]
mtypes: move uniform shader types to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:50:57 +0000 (14:50 +1000)]
mtypes: move transform feedback internal structs to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:45:26 +0000 (14:45 +1000)]
mtypes: more gl_active_atomic_buffer to shader_types.h
allows dropping mtypes.h in glsl compiler
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>