Commit Graph

145018 Commits

Author SHA1 Message Date
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
Eric Engestrom 2585d2d6fb docs: shorten "last release" note to fit on the website without horizontal scrolling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12798>
2021-09-15 22:24:26 +01:00
Eric Engestrom 810184e27e docs: add plan for 21.3.x release cycle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12397>
2021-09-15 20:47:26 +00: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
Guilherme Gallo 7244aa1980 gitlab-ci: refactor timeout constants and tweak timeout values
* Refactor timeouts and retry attempts constants to variables in the top
  of the python script.

* Increase LAVA job timeout value from 1 minute to 5 minutes, since the
  timeout detection is just a heuristic based on the log silence in LAVA
  devices. If we keep 1 minute timeout, maybe we could cancel jobs that
  have tasks which may take too long to respond. Also, one minute
  timeout is prone to misdetect scenarios when some network errors or
  slowness may happen.

* Increase polling rate to check if the job has started from 1 check
  every 30 seconds to 1 check every 10 seconds. Since it was taking 30
  seconds in the worst case to start to get the log output from a LAVA
  job. It is important to note that some LAVA jobs take less than 2
  minutes to finish, so a 10 second wait would be more suitable in those
  cases.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12870>
2021-09-15 15:12:52 +00: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
Samuel Pitoiset 3a26dfe761 radv/llvm: fix vertex input fetches with 16-bit floats
Not ideal but ac/llvm and RADV works with integers, so passing a
16-bit float type would break more than it helps.

Fixes a few CTS with 16-bit float IO.

Fixes: 3fb229e010 ("ac,radeonsi: load VS inputs at the call site of nir_intrinsic_load_input")
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/12835>
2021-09-15 11:48:01 +00:00
Juan A. Suarez Romero 7d5aea9edf ci/v3d: add piglit flake
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12866>
2021-09-15 12:55:42 +02:00
Samuel Pitoiset 5eda8e5fe9 radv/llvm: fix using Wave32
The Wave32 pass manager has been removed a while ago.

Fixes: 94a1f45e15 ("ac/llvm: set target features per function instead of per target machine")
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/12833>
2021-09-15 12:31:32 +02:00
Samuel Pitoiset 9bf977ffa5 radv: reduce SQTT traffic when instruction timing is disabled
Some tokens can be excluded without instruction timing. This reduces
RGP capture sizes significantly.

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/12853>
2021-09-15 10:48:58 +02:00
Joshua Ashton fe96cea2f3 radv: Disable DCC on storage images that cannot support DCC image stores
Additional work is needed for storage images with DCC without DCC image stores to not be broken.

Fixes black screens in Doom Eternal.

Fixes: #5345
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12818>
2021-09-15 00:21:04 +00:00