platform/upstream/mesa.git
3 years agolavapipe: enable KHR_shader_subgroup_extended_types
Dave Airlie [Tue, 7 Sep 2021 04:01:15 +0000 (14:01 +1000)]
lavapipe: enable KHR_shader_subgroup_extended_types

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm/nir: handle subgroup reduction across all types
Dave Airlie [Tue, 7 Sep 2021 04:51:48 +0000 (14:51 +1000)]
gallivm/nir: handle subgroup reduction across all types

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agolavapipe: enable KHR_shader_float16_int8
Dave Airlie [Mon, 6 Sep 2021 00:30:40 +0000 (10:30 +1000)]
lavapipe: enable KHR_shader_float16_int8

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agollvmpipe: enable FP16 and update CL + traces piglit results.
Dave Airlie [Mon, 6 Sep 2021 00:00:16 +0000 (10:00 +1000)]
llvmpipe: enable FP16 and update CL + traces piglit results.

The fails will be addressed later.

This adds a fail in GLSL compiler that is due to a workaround
that fails when fp16 constants are lowered

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm: use llvm intrinsics for 16-bit round/trunc/roundeven
Dave Airlie [Tue, 7 Sep 2021 01:17:39 +0000 (11:17 +1000)]
gallivm: use llvm intrinsics for 16-bit round/trunc/roundeven

Otherwise the inf translations don't seem to work, and the VK CTS
fails

Fixes VK CTS dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm: increase tgsi nesting call stack size
Dave Airlie [Mon, 6 Sep 2021 04:33:06 +0000 (14:33 +1000)]
gallivm: increase tgsi nesting call stack size

Some VK CTS tests are topping this out around 76, increase it to 80 for now.

Fixes:
dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.*44*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm/nir: pass the correct float builder to ddx/y
Dave Airlie [Thu, 22 Jul 2021 06:14:57 +0000 (16:14 +1000)]
gallivm/nir: pass the correct float builder to ddx/y

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm/nir: call pow with correct flt builder
Dave Airlie [Thu, 22 Jul 2021 05:59:34 +0000 (15:59 +1000)]
gallivm/nir: call pow with correct flt builder

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm/nir: handle 16-bit exp/lod using intrinsics.
Dave Airlie [Thu, 22 Jul 2021 05:36:59 +0000 (15:36 +1000)]
gallivm/nir: handle 16-bit exp/lod using intrinsics.

This just passes the 16-bit float versions to the llvm intrinsics

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agollvmpipe: lower_flrp16
Dave Airlie [Tue, 9 Mar 2021 03:15:59 +0000 (13:15 +1000)]
llvmpipe: lower_flrp16

fixes a bunch of spir-v 16-bit tests

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm: add 16-bit sin/cos via llvm intrinsic
Dave Airlie [Mon, 19 Jul 2021 02:49:00 +0000 (12:49 +1000)]
gallivm: add 16-bit sin/cos via llvm intrinsic

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivvm/nir: handle non-32bit mask scatter stores
Dave Airlie [Thu, 22 Jul 2021 04:08:31 +0000 (14:08 +1000)]
gallivvm/nir: handle non-32bit mask scatter stores

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm/nir: fix f2b32
Dave Airlie [Thu, 22 Jul 2021 03:40:49 +0000 (13:40 +1000)]
gallivm/nir: fix f2b32

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm/nir: handle conversion to 16-bit texel fetch
Dave Airlie [Thu, 22 Jul 2021 03:20:29 +0000 (13:20 +1000)]
gallivm/nir: handle conversion to 16-bit texel fetch

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agogallivm: add initial support for 16-bit float builder.
Dave Airlie [Sun, 11 Jul 2021 21:24:54 +0000 (07:24 +1000)]
gallivm: add initial support for 16-bit float builder.

This is an initial patch that is needed for OpenCL and Vulkan
support for proper 16-bit floats.

This doesn't enable the cap bit yet

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>

3 years agozink: cap max shader variants with inlined uniforms
Mike Blumenkrantz [Wed, 1 Sep 2021 20:56:52 +0000 (16:56 -0400)]
zink: cap max shader variants with inlined uniforms

avoid making a new shader for every frame forever

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: simplify shader variant update loop
Mike Blumenkrantz [Fri, 3 Sep 2021 14:06:22 +0000 (10:06 -0400)]
zink: simplify shader variant update loop

a single continue makes this much easier to read

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: split out inlined uniform shader variants into separate cache
Mike Blumenkrantz [Wed, 1 Sep 2021 20:55:32 +0000 (16:55 -0400)]
zink: split out inlined uniform shader variants into separate cache

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: remove default_variants storage in program struct
Mike Blumenkrantz [Wed, 1 Sep 2021 20:52:12 +0000 (16:52 -0400)]
zink: remove default_variants storage in program struct

these should naturally be the first entry in the list when it matters

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: replace shader module hash table with a list
Mike Blumenkrantz [Wed, 1 Sep 2021 20:46:27 +0000 (16:46 -0400)]
zink: replace shader module hash table with a list

this should be significantly more performant for the majority of cases
since it's rare that shaders have multiple variants outside of unit tests,
so now there can just be a list of shaders being iterated instead where the
first entry is the last used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: move shader cache to gfx program struct
Mike Blumenkrantz [Wed, 1 Sep 2021 20:16:39 +0000 (16:16 -0400)]
zink: move shader cache to gfx program struct

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: stop using hash table for compute programs
Mike Blumenkrantz [Wed, 1 Sep 2021 20:15:50 +0000 (16:15 -0400)]
zink: stop using hash table for compute programs

this is pointless since there's no variants yet

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: store shader key to shader module
Mike Blumenkrantz [Wed, 1 Sep 2021 20:12:54 +0000 (16:12 -0400)]
zink: store shader key to shader module

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: move uniform size calc for shader keys into keybox
Mike Blumenkrantz [Wed, 1 Sep 2021 20:09:22 +0000 (16:09 -0400)]
zink: move uniform size calc for shader keys into keybox

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>

3 years agozink: move shader keys to be persistent on pipeline state
Mike Blumenkrantz [Wed, 1 Sep 2021 19:44:34 +0000 (15:44 -0400)]
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>

3 years agozink: move xfb updates to just before draw
Mike Blumenkrantz [Thu, 16 Sep 2021 03:47:30 +0000 (23:47 -0400)]
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>

3 years agozink: simplify flagging last vertex stage for updating
Mike Blumenkrantz [Wed, 1 Sep 2021 19:35:55 +0000 (15:35 -0400)]
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>

3 years agozink: only update gfx pipeline cache after creating a real pipeline
Mike Blumenkrantz [Wed, 1 Sep 2021 17:58:31 +0000 (13:58 -0400)]
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>

3 years agozink: remove some ctx references from shader/pipeline compile
Mike Blumenkrantz [Wed, 1 Sep 2021 17:58:05 +0000 (13:58 -0400)]
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>

3 years agozink: remove ctx references from shader compile path
Mike Blumenkrantz [Wed, 1 Sep 2021 17:57:32 +0000 (13:57 -0400)]
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>

3 years agozink: make tcs shader generation take screen param
Mike Blumenkrantz [Wed, 1 Sep 2021 17:56:02 +0000 (13:56 -0400)]
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>

3 years agozink: move pending prim type to gfx pipeline struct
Mike Blumenkrantz [Wed, 1 Sep 2021 17:51:14 +0000 (13:51 -0400)]
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>

3 years agollvmpipe/cs: rework coroutine context handling (v2)
Dave Airlie [Tue, 17 Aug 2021 18:38:58 +0000 (04:38 +1000)]
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>

3 years agollvmpipe: shorten hold time on the screen mutex
Dave Airlie [Tue, 17 Aug 2021 19:57:31 +0000 (05:57 +1000)]
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>

3 years agogallivm/coro: use a phi instead of alloca
Dave Airlie [Tue, 17 Aug 2021 06:10:24 +0000 (16:10 +1000)]
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>

3 years agollvmpipe/cs: rework thread pool for avoid mtx locking
Dave Airlie [Mon, 16 Aug 2021 01:18:15 +0000 (11:18 +1000)]
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>

3 years agozink: fix enabled vertex buffer mask calculation
Mike Blumenkrantz [Wed, 15 Sep 2021 14:50:03 +0000 (10:50 -0400)]
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: 6dd02a5139a ("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>

3 years agopan/bi: Don't set dependencies for +BLEND in blend shaders
Icecream95 [Tue, 17 Aug 2021 22:49:54 +0000 (10:49 +1200)]
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>

3 years agolavapipe: enable dynamic index ubo/ssbo
Dave Airlie [Thu, 2 Sep 2021 01:27:06 +0000 (11:27 +1000)]
lavapipe: enable dynamic index ubo/ssbo

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689>

3 years agogallivm/ssbo: cast ssbo index to int type.
Dave Airlie [Thu, 2 Sep 2021 01:57:06 +0000 (11:57 +1000)]
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>

3 years agogallivm/ssbo: fix up dynamic indexed ssbo load/stores/atomics
Dave Airlie [Thu, 2 Sep 2021 00:49:05 +0000 (10:49 +1000)]
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>

3 years agodocs: shorten "last release" note to fit on the website without horizontal scrolling
Eric Engestrom [Mon, 16 Aug 2021 21:24:14 +0000 (22:24 +0100)]
docs: shorten "last release" note to fit on the website without horizontal scrolling

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12798>

3 years agodocs: add plan for 21.3.x release cycle
Eric Engestrom [Mon, 16 Aug 2021 21:07:48 +0000 (22:07 +0100)]
docs: add plan for 21.3.x release cycle

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12397>

3 years agoegl: Add a basic Windows driver
Jesse Natalie [Sat, 4 Sep 2021 14:46:49 +0000 (07:46 -0700)]
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>

3 years agoegl: Detect Windows platform using GDI
Jesse Natalie [Wed, 8 Sep 2021 19:54:17 +0000 (12:54 -0700)]
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>

3 years agoegl: Don't try to dereference native displays unless there's a detectable platform
Jesse Natalie [Wed, 8 Sep 2021 19:51:53 +0000 (12:51 -0700)]
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>

3 years agoegl: Use the .def file for Windows
Jesse Natalie [Sat, 4 Sep 2021 15:09:50 +0000 (08:09 -0700)]
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>

3 years agoegl: Add wgl/gallium dependencies for Windows platform
Jesse Natalie [Wed, 1 Sep 2021 16:31:35 +0000 (09:31 -0700)]
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>

3 years agomeson, egl: Support building for the Windows platform
Jesse Natalie [Wed, 1 Sep 2021 15:54:13 +0000 (08:54 -0700)]
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>

3 years agomeson: Include EGL after gallium
Jesse Natalie [Wed, 1 Sep 2021 16:31:04 +0000 (09:31 -0700)]
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>

3 years agowgl: Add stw_* DLL exports for EGL support
Jesse Natalie [Sat, 4 Sep 2021 14:46:38 +0000 (07:46 -0700)]
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>

3 years agowgl: Swap buffers via pointer instead of HDC
Jesse Natalie [Sat, 4 Sep 2021 15:02:57 +0000 (08:02 -0700)]
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>

3 years agowgl: Add a stw_dev getter
Jesse Natalie [Sat, 4 Sep 2021 15:07:45 +0000 (08:07 -0700)]
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>

3 years agowgl: Use HWND instead of HDC as primary framebuffer handle
Jesse Natalie [Sat, 4 Sep 2021 15:06:48 +0000 (08:06 -0700)]
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>

3 years agowgl: Add an explicit iPixelFormat for context creation
Jesse Natalie [Sat, 4 Sep 2021 15:00:07 +0000 (08:00 -0700)]
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>

3 years agowgl: Un-inline helpers which use stw_own_mutex
Jesse Natalie [Sat, 4 Sep 2021 14:58:51 +0000 (07:58 -0700)]
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>

3 years agowgl: Add iPixelFormat to stw_pixelformat_info
Jesse Natalie [Sat, 4 Sep 2021 14:58:17 +0000 (07:58 -0700)]
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>

3 years agowgl: Split DrvReleaseContext to support unbind via pointer
Jesse Natalie [Sat, 4 Sep 2021 14:56:23 +0000 (07:56 -0700)]
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>

3 years agowgl: Make contexts current with framebuffers instead of HDCs
Jesse Natalie [Thu, 2 Sep 2021 18:20:54 +0000 (11:20 -0700)]
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>

3 years agowgl: Allow creating framebuffers that aren't in the global window list
Jesse Natalie [Sat, 4 Sep 2021 14:54:00 +0000 (07:54 -0700)]
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>

3 years agowgl: Make contexts current with pointer instead of DHGLRC
Jesse Natalie [Sat, 4 Sep 2021 14:51:59 +0000 (07:51 -0700)]
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>

3 years agowgl: Pass share context as pointer instead of DHGLRC
Jesse Natalie [Thu, 2 Sep 2021 15:51:34 +0000 (08:51 -0700)]
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>

3 years agowgl: Create contexts and DHGLRCs separately
Jesse Natalie [Thu, 2 Sep 2021 15:44:57 +0000 (08:44 -0700)]
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>

3 years agozink: stop setting nr_samples for null surfaces
Mike Blumenkrantz [Wed, 15 Sep 2021 19:05:36 +0000 (15:05 -0400)]
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>

3 years agozink: don't copy inner surface refcount
Mike Blumenkrantz [Wed, 15 Sep 2021 19:04:47 +0000 (15:04 -0400)]
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>

3 years agointel/decode/gfx6: add support for gfx6 CC/VIEWPORT pointers.
Dave Airlie [Wed, 15 Sep 2021 03:07:46 +0000 (13:07 +1000)]
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>

3 years agoradv/ci: add a list of expected failures for VanGogh
Samuel Pitoiset [Wed, 15 Sep 2021 16:12:03 +0000 (18:12 +0200)]
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>

3 years agogitlab-ci: refactor timeout constants and tweak timeout values
Guilherme Gallo [Wed, 15 Sep 2021 14:03:16 +0000 (11:03 -0300)]
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>

3 years agor300: make global variables const (if possible)
Filip Gawin [Tue, 14 Sep 2021 21:14:51 +0000 (23:14 +0200)]
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>

3 years agor300: fix usage of COVERED_PTR_MASKING_ENABLE for r500
Filip Gawin [Tue, 14 Sep 2021 21:39:02 +0000 (23:39 +0200)]
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>

3 years agoradv: advertise EXT_shader_atomic_float2 with LLVM 14+
Samuel Pitoiset [Fri, 3 Sep 2021 07:22:03 +0000 (09:22 +0200)]
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>

3 years agoac/llvm: implement nir_intrinsic_global_atomic_{fmin,fmax}
Samuel Pitoiset [Fri, 3 Sep 2021 08:35:51 +0000 (10:35 +0200)]
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>

3 years agoac/llvm: implement nir_intrinsic_shared_atomic_{fmin,fmax}
Samuel Pitoiset [Fri, 3 Sep 2021 08:19:39 +0000 (10:19 +0200)]
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>

3 years agoac/llvm: implement nir_intrinsic_ssbo_atomic_{fmin,fmax}
Samuel Pitoiset [Fri, 3 Sep 2021 08:25:47 +0000 (10:25 +0200)]
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>

3 years agoac/llvm: implement nir_intrinsic_image_deref_atomic_{fmin,fmax}
Samuel Pitoiset [Fri, 3 Sep 2021 08:25:37 +0000 (10:25 +0200)]
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>

3 years agofreedreno: a2xx: Handle samplerExternalOES like sampler2D
Marek Vasut [Sun, 12 Sep 2021 15:09:55 +0000 (17:09 +0200)]
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>

3 years agov3dv: start using Broadcom's device identifiers
Iago Toral Quiroga [Wed, 15 Sep 2021 06:30:15 +0000 (08:30 +0200)]
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>

3 years agoradv/llvm: fix vertex input fetches with 16-bit floats
Samuel Pitoiset [Mon, 13 Sep 2021 14:48:41 +0000 (16:48 +0200)]
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: 3fb229e010f ("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>

3 years agoci/v3d: add piglit flake
Juan A. Suarez Romero [Wed, 15 Sep 2021 10:55:27 +0000 (12:55 +0200)]
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>

3 years agoradv/llvm: fix using Wave32
Samuel Pitoiset [Mon, 13 Sep 2021 13:41:39 +0000 (15:41 +0200)]
radv/llvm: fix using Wave32

The Wave32 pass manager has been removed a while ago.

Fixes: 94a1f45e15a ("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>

3 years agoradv: reduce SQTT traffic when instruction timing is disabled
Samuel Pitoiset [Tue, 14 Sep 2021 13:47:39 +0000 (15:47 +0200)]
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>

3 years agoradv: Disable DCC on storage images that cannot support DCC image stores
Joshua Ashton [Tue, 14 Sep 2021 02:36:07 +0000 (03:36 +0100)]
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>

3 years agonir: Drop the unused instr arg for src/dest copy functions.
Emma Anholt [Wed, 7 Jul 2021 18:06:11 +0000 (11:06 -0700)]
nir: Drop the unused instr arg for src/dest copy functions.

Now that we don't use ralloc, we don't need this arg to get at the right
ralloc ctx.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir: Switch from ralloc to malloc for NIR instructions.
Emma Anholt [Wed, 7 Jul 2021 17:30:05 +0000 (10:30 -0700)]
nir: Switch from ralloc to malloc for NIR instructions.

By replacing the 48-byte ralloc header with our exec_node gc_node (16
bytes), runtime of shader-db on my system across this series drops
-4.21738% +/- 1.47757% (n=5).

Inspired by discussion on #5034.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir/tests: Fix transmuting an SSA dest to be non-SSA
Emma Anholt [Fri, 13 Aug 2021 22:07:15 +0000 (15:07 -0700)]
nir/tests: Fix transmuting an SSA dest to be non-SSA

With the de-ralloc changes, having the register dest not have its .reg
properly initialized caused crashes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir/lower_phis_to_scalar: Use nir_instr_free() to free instrs.
Emma Anholt [Wed, 7 Jul 2021 17:43:12 +0000 (10:43 -0700)]
nir/lower_phis_to_scalar: Use nir_instr_free() to free instrs.

Preparation for de-rallocing instrs.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir: Add all allocated instructions to a GC list.
Emma Anholt [Wed, 7 Jul 2021 17:22:21 +0000 (10:22 -0700)]
nir: Add all allocated instructions to a GC list.

Right now we're using ralloc to GC our NIR instructions, but ralloc has
significant overhead for its recursive nature so it would be nice to use a
simpler mechanism for GCing instructions.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir: Consistently pass the instr to nir_src_copy().
Emma Anholt [Wed, 7 Jul 2021 18:04:49 +0000 (11:04 -0700)]
nir: Consistently pass the instr to nir_src_copy().

The arg says it's supposed to be the instr, not the shader.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir: Consistently pass the shader to the shader arg of instr creation.
Emma Anholt [Wed, 7 Jul 2021 17:49:32 +0000 (10:49 -0700)]
nir: Consistently pass the shader to the shader arg of instr creation.

We were using the ralloc parent in some places, which should work out to
be the shader I think, but to de-ralloc the instrs we should just pass the
existing shader pointer in.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir/from_ssa: Use nir_instr_free() to free instrs instead of ralloc.
Emma Anholt [Wed, 7 Jul 2021 19:38:11 +0000 (12:38 -0700)]
nir/from_ssa: Use nir_instr_free() to free instrs instead of ralloc.

This code was being tricky with passing a mem_ctx instead of the shader,
then freeing the mem_ctx when the pass was done and all the parallel
copies had been removed from the shader.  Use the right type for instr
creation and do a bit of manual list management to prepare the way for
non-ralloc NIR instrs.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir: Pull the instr list free function out to a helper.
Emma Anholt [Wed, 7 Jul 2021 19:46:49 +0000 (12:46 -0700)]
nir: Pull the instr list free function out to a helper.

With the de-rallocing, we're going to have some more places that free a
list of instrs.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir: Add a nir_instr_free() to replace ralloc_free(instr).
Emma Anholt [Wed, 7 Jul 2021 17:07:46 +0000 (10:07 -0700)]
nir: Add a nir_instr_free() to replace ralloc_free(instr).

This will gain another step shortly.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>

3 years agonir/lower_gs_intrinsics: Make nir_lower_gs_intrinsics be idempotent
Ian Romanick [Fri, 10 Sep 2021 00:31:24 +0000 (17:31 -0700)]
nir/lower_gs_intrinsics: Make nir_lower_gs_intrinsics be idempotent

Calling this lower pass twice in a row would cause spurious
set_vertex_and_primitive_count(0, undef) intrinsics after the proper
set_vertex_and_primitive_count intrinsic.  This pretty much turns any
geometry shader into garbage.

Fix this by treating nir_intrinsic_emit_vertex_with_counter and
nir_intrinsic_end_primitive_with_counter just like the non-_with_counter
versions.  If no blocks would need set_vertex_and_primitive_count
intrinsics added, exit the pass before doing any work.  This prevents
the need for DCE to do extra clean up later.

Since this pass is potentially called multiple times via multiple
invocations of a finalize_nir callback, it is (hypothetically?) possible
that control flow could be changed to add new blocks that need this
intrinsic.  The check implemented in this commit should be robust
against that possibility.

v2: Add a_block_needs_set_vertex_and_primitive_count.  Suggested by
Timur.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12802>

3 years agonir/lower_gs_intrinsics: Return progress if append_set_vertex_and_primitive_count...
Ian Romanick [Thu, 9 Sep 2021 23:54:11 +0000 (16:54 -0700)]
nir/lower_gs_intrinsics: Return progress if append_set_vertex_and_primitive_count makes progress

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 542d40d698a ("nir: Add new GS intrinsics that maintain a count of emitted vertices.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12802>

3 years agoradeonsi: enable NGG passthrough when LDS is used, document the real constraints
Marek Olšák [Wed, 1 Sep 2021 07:43:34 +0000 (03:43 -0400)]
radeonsi: enable NGG passthrough when LDS is used, document the real constraints

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>

3 years agoradeonsi: fix incorrect comments about VGT_SHADER_STAGES_EN
Marek Olšák [Mon, 30 Aug 2021 06:21:19 +0000 (02:21 -0400)]
radeonsi: fix incorrect comments about VGT_SHADER_STAGES_EN

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>

3 years agoradeonsi: don't set edgeflags for TES and blit VS
Marek Olšák [Sun, 22 Aug 2021 20:32:50 +0000 (16:32 -0400)]
radeonsi: don't set edgeflags for TES and blit VS

they are disabled (TES) or have no effect (blit VS)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>

3 years agoradeonsi: use a trick to extract and pack edgeflags using fewer instructions
Marek Olšák [Wed, 1 Sep 2021 01:45:21 +0000 (21:45 -0400)]
radeonsi: use a trick to extract and pack edgeflags using fewer instructions

This removes 4 instructions from the prim export packing.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>

3 years agoradeonsi: convert gfx10_emit_ge_pc_alloc to radeon_opt_set_uconfig_reg
Marek Olšák [Wed, 18 Aug 2021 19:27:47 +0000 (15:27 -0400)]
radeonsi: convert gfx10_emit_ge_pc_alloc to radeon_opt_set_uconfig_reg

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>

3 years agoradeonsi: eliminate redundant SPI_SHADER_PGM_RSRC3/4_GS register writes
Marek Olšák [Wed, 18 Aug 2021 17:05:16 +0000 (13:05 -0400)]
radeonsi: eliminate redundant SPI_SHADER_PGM_RSRC3/4_GS register writes

They don't change much.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>