Dave Airlie
5decf569fc
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 >
2022-01-21 01:18:20 +00:00
Dave Airlie
3f8e7b8735
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
78d13fdbb2
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
8467047f6d
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
6e99b10632
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
03f180d88b
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
74d40c68dc
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
df9d5795c1
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
a64e5c02bd
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
0f8a3a7175
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
31d3e3ebeb
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
96b57faf35
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
9244c792f9
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
4a055c1940
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
10ac88b72f
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
5618fac786
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
ec0d62ceb5
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
84fe99b2a0
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
bc122e0769
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 >
2022-01-21 01:18:19 +00:00
Dave Airlie
e344a117af
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 >
2022-01-21 01:18:19 +00:00
Mike Blumenkrantz
129e31cd4f
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 >
2022-01-21 01:02:18 +00:00
Mike Blumenkrantz
bff042fd43
zink: link with vulkan utils
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13865 >
2022-01-21 01:02:18 +00:00
Ian Romanick
926d78a645
ntt: Extend ntt_compile::addr_declared and ntt_compile::addr_reg
...
This was identified by Coverity. 4bb9c0a28a 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 4bb9c0a28a 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: 4bb9c0a28a ("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 >
2022-01-21 00:25:38 +00:00
Rhys Perry
495debebad
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 >
2022-01-20 22:54:42 +00:00
Rhys Perry
14b8227083
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 >
2022-01-20 22:54:42 +00:00
Rhys Perry
f2fbba7920
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 >
2022-01-20 22:54:42 +00:00
Rhys Perry
312a284980
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 >
2022-01-20 22:54:42 +00:00
Rhys Perry
f68797ead7
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 >
2022-01-20 22:54:42 +00:00
Rhys Perry
43e32ad074
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 >
2022-01-20 22:54:42 +00:00
Rhys Perry
e7f91b194a
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 >
2022-01-20 22:54:42 +00:00
Rhys Perry
7f05ea3793
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 >
2022-01-20 22:54:42 +00:00
Ian Romanick
945fb51fb5
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: c92fb60007 ("intel/fs/gen12: Implement gl_FrontFacing on gen12+.")
Closes : #5876
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14625 >
2022-01-20 22:37:18 +00:00
Mike Blumenkrantz
4aaedc20c1
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 >
2022-01-20 21:33:54 +00:00
Renato Pereyra
4d95a7f800
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 >
2022-01-20 11:37:29 -08:00
Renato Pereyra
b664349973
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 >
2022-01-20 11:37:15 -08:00
Mike Blumenkrantz
a4c9276de2
docs: add features/relnotes for zink sparse texture support
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
f86e97ab34
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
7c918a807b
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
0959fd7f34
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
7e03554af0
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
30bd4ff72e
zink: handle min_lod texture operands
...
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
ac30051a5d
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
d76694a18f
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
7e7c94afaa
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
60d0a0a8ce
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
0af2b7740b
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
73ef54e342
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
dfc74d703e
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
3c05646fbe
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 >
2022-01-20 15:51:30 +00:00
Mike Blumenkrantz
1bbcd68d5f
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 >
2022-01-20 15:51:30 +00:00