Mike Blumenkrantz
19fbdb9064
zink: move shader keys to be persistent on pipeline state
...
save a cycle or two zeroing and populating this on every recalc
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
80604fee4a
zink: move xfb updates to just before draw
...
it's illegal to bind the pipeline after xfb has begun
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
ff5991e86a
zink: simplify flagging last vertex stage for updating
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
e515d9791e
zink: only update gfx pipeline cache after creating a real pipeline
...
async pipelines may not require updates here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
7438d670dd
zink: remove some ctx references from shader/pipeline compile
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
c587152eba
zink: remove ctx references from shader compile path
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:31 -04:00
Mike Blumenkrantz
ab4d8ed1e9
zink: make tcs shader generation take screen param
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:31 -04:00
Mike Blumenkrantz
da10f13de9
zink: move pending prim type to gfx pipeline struct
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:31 -04:00
Dave Airlie
259e26e5e3
llvmpipe/cs: rework coroutine context handling (v2)
...
Get comfy.
llvmpipe coroutines have a stack frame. This is created by hooking
in malloc and coro.alloc and coro.size intrinsics.
LLVM has an CoroElide pass that is meant to allow that stack frame
to be done as an alloca in the caller instead of using the malloc path.
The CoroElide pass relies on the coroutine being inlined (fixed that).
The CoroElide pass relies on there being a direct connect between
coro.destroy(i8 *arg) and arg = coro.begin(id). However due to the
way the compute shaders are launched, there is no way to ensure that
link. Fixing the CoroElide pass seems quite difficult, I considered
having a force CoroElide always flag to make it dtrt, however I'm not
sure how ugly that would end up.
My first attempt tried to preallocate the stacks at a fixed size,
this turned out to be naive as the stack frame size was not sized
like I expected. Instead the first coro to run allocs enough for
everyone, so avoid the massive amounts of small allocations.
This remove coro malloc from a lot of profiles and shaves another 30s
or so from OpenCL ./conversions/test_conversions uchar_uin
(from 4.40m to just under 4m on my ryzen 7 1800x)
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:34 +10:00
Dave Airlie
8d3e97344c
llvmpipe: shorten hold time on the screen mutex
...
There is no requirement to hold this mutex over the wait. I doubt
it matters much in practice.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:29 +10:00
Dave Airlie
4ccee031e9
gallivm/coro: use a phi instead of alloca
...
this just matches what the docs recommend
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:27 +10:00
Dave Airlie
69109e0b19
llvmpipe/cs: rework thread pool for avoid mtx locking
...
This helps reduced the mtx lock/unlock overheads for the threadpool
if the work evenly distributes across the number of threads.
The CL CTS conversions tests really hit this, and this takes maybe 10-20s
off a 5min test run.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:06 +10:00
Mike Blumenkrantz
53aade0ef0
zink: fix enabled vertex buffer mask calculation
...
the mask can't entirely be calculated based on the integer parameters,
as it's possible for some of the "bind" slots to actually be unbinds,
so remove bits as necessary to fix this
also add some debug asserts to ensure I don't break this again for the
tenth time
Fixes: 6dd02a5139 ("zink: stop using util_set_vertex_buffers_mask()")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12871 >
2021-09-16 01:43:40 +00:00
Icecream95
09bb8602f3
pan/bi: Don't set dependencies for +BLEND in blend shaders
...
The dependency wait should already have been done in the fragment
shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12461 >
2021-09-15 22:42:03 +00:00
Dave Airlie
d9a784520a
lavapipe: enable dynamic index ubo/ssbo
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689 >
2021-09-16 08:05:59 +10:00
Dave Airlie
fc0bf57632
gallivm/ssbo: cast ssbo index to int type.
...
Since these can be loaded from ubos or other places now.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689 >
2021-09-16 08:05:56 +10:00
Dave Airlie
1ccac4abff
gallivm/ssbo: fix up dynamic indexed ssbo load/stores/atomics
...
Although the index has to be dynamically uniform, if we don't ever
execute a few lanes then we'll have 0, so it important to read the
ssbo index from the first active lane.
Just loop over them all.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689 >
2021-09-16 08:05:51 +10:00
Jesse Natalie
3415bf0268
egl: Add a basic Windows driver
...
This is enough to run wglgears ported to EGL (desktop GL)
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
06e95693fb
egl: Detect Windows platform using GDI
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
58389dd55f
egl: Don't try to dereference native displays unless there's a detectable platform
...
Not all native displays are pointers to dereferenceable memory, e.g.
DCs on Windows. Don't bother dereferencing if no platforms are available
that can be detected that way.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
eb7d150743
egl: Use the .def file for Windows
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
e775b07c17
egl: Add wgl/gallium dependencies for Windows platform
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
e76db0f165
meson, egl: Support building for the Windows platform
...
Add a stub EGL driver for Windows
Fix compiler issues in egl/main
Ensure Windows build produces libEGL.dll
Default EGL to enabled for Windows when building a Gallium driver
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
b8a23fa893
meson: Include EGL after gallium
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
9716209761
wgl: Add stw_* DLL exports for EGL support
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
0574265256
wgl: Swap buffers via pointer instead of HDC
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
90d2b93731
wgl: Add a stw_dev getter
...
Data imports need to be marked __declspec(dllimport), so
just export a function instead of data.
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
bb706ca93a
wgl: Use HWND instead of HDC as primary framebuffer handle
...
EGL's native window is an HWND, so this removes the need to
GetDC from the creation path there.
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
ddedf59625
wgl: Add an explicit iPixelFormat for context creation
...
If it's 0, then it's looked up from the framebuffer for the specified HDC
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
9c875b040c
wgl: Un-inline helpers which use stw_own_mutex
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
7d96e19b92
wgl: Add iPixelFormat to stw_pixelformat_info
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
49d83de072
wgl: Split DrvReleaseContext to support unbind via pointer
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
c4806ae03c
wgl: Make contexts current with framebuffers instead of HDCs
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
be9f9886fe
wgl: Allow creating framebuffers that aren't in the global window list
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
8b9b5cdbf4
wgl: Make contexts current with pointer instead of DHGLRC
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
0d3a215819
wgl: Pass share context as pointer instead of DHGLRC
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
ca1cceeed5
wgl: Create contexts and DHGLRCs separately
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Mike Blumenkrantz
6a240a1c95
zink: stop setting nr_samples for null surfaces
...
this is a special value that shouldn't be set
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12875 >
2021-09-15 19:41:51 +00:00
Mike Blumenkrantz
8e9ec440af
zink: don't copy inner surface refcount
...
this leaks surfaces. lots of surfaces.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12875 >
2021-09-15 19:41:51 +00:00
Dave Airlie
929db0a818
intel/decode/gfx6: add support for gfx6 CC/VIEWPORT pointers.
...
These have 3 sub states encoded and valid fields on SNB.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12864 >
2021-09-16 05:13:16 +10:00
Samuel Pitoiset
09ef427f94
radv/ci: add a list of expected failures for VanGogh
...
Empty means 100% passrate like Sienna Cichlid.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12872 >
2021-09-15 18:20:07 +02:00
Filip Gawin
4655196796
r300: make global variables const (if possible)
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12860 >
2021-09-15 14:53:17 +00:00
Filip Gawin
765b3b3b11
r300: fix usage of COVERED_PTR_MASKING_ENABLE for r500
...
http://developer.amd.com/wordpress/media/2013/10/
R5xx_Acceleration_v1.5.pdf
On page 281 you can see that register ZB:ZB_BW_CNTL
is using 19th bit for enabling this feature on r500.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12861 >
2021-09-15 14:41:19 +00:00
Samuel Pitoiset
3bb5082900
radv: advertise EXT_shader_atomic_float2 with LLVM 14+
...
The intrinsics aren't exposed on earlier LLVM versions.
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/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
7a25451752
ac/llvm: implement nir_intrinsic_global_atomic_{fmin,fmax}
...
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/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
9deee80f51
ac/llvm: implement nir_intrinsic_shared_atomic_{fmin,fmax}
...
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/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
efe40c98ed
ac/llvm: implement nir_intrinsic_ssbo_atomic_{fmin,fmax}
...
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/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
cf3e31fd11
ac/llvm: implement nir_intrinsic_image_deref_atomic_{fmin,fmax}
...
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/12716 >
2021-09-15 14:10:42 +00:00
Marek Vasut
9373db5d94
freedreno: a2xx: Handle samplerExternalOES like sampler2D
...
There should be no difference in handling these two samplers,
handle GLSL_SAMPLER_DIM_EXTERNAL just like GLSL_SAMPLER_DIM_2D
to fix "unimplemented sampler 6" error in case someone tries to
use samplerExternalOES in shader program.
Signed-off-by: Marek Vasut <marex@denx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12817 >
2021-09-15 13:50:01 +00:00
Iago Toral Quiroga
09cb4e3010
v3dv: start using Broadcom's device identifiers
...
Instead of creating our own based on the V3D version. CTS waivers
are registered using a combination of VendorID and DeviceID, so if
we want to reuse any wavers filed by Broadcom we want to use the
same identifiers. We are already using the Broadcom VendorId, so
let's start using the same deviceID as well.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12865 >
2021-09-15 12:54:48 +00:00