mesa.git
4 years agoac: add ac_gpu_info::cu_mask to store bitmask of compute units
Samuel Pitoiset [Mon, 2 Mar 2020 10:52:28 +0000 (11:52 +0100)]
ac: add ac_gpu_info::cu_mask to store bitmask of compute units

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/4023>

4 years agoradv/sqtt: abort if SQTT is used on GFX6-GFX7
Samuel Pitoiset [Mon, 2 Mar 2020 15:25:33 +0000 (16:25 +0100)]
radv/sqtt: abort if SQTT is used on GFX6-GFX7

RGP only supports GFX8+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4022>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4022>

4 years agoradv/sqtt: add support for GFX8
Samuel Pitoiset [Mon, 2 Mar 2020 14:21:11 +0000 (15:21 +0100)]
radv/sqtt: add support for GFX8

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/4022>

4 years agoac/registers: adjust some definitions for thread trace on GFX8
Samuel Pitoiset [Mon, 2 Mar 2020 14:47:52 +0000 (15:47 +0100)]
ac/registers: adjust some definitions for thread trace on GFX8

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/4022>

4 years agoradv/sqtt: add radv_copy_thread_trace_info_regs() helper
Samuel Pitoiset [Mon, 2 Mar 2020 14:44:00 +0000 (15:44 +0100)]
radv/sqtt: add radv_copy_thread_trace_info_regs() helper

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/4022>

4 years agoradv/sqtt: tidy up radv_emit_thread_trace_{start,stop}
Samuel Pitoiset [Mon, 2 Mar 2020 14:32:02 +0000 (15:32 +0100)]
radv/sqtt: tidy up radv_emit_thread_trace_{start,stop}

Check for GFX10 first.

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/4022>

4 years agoradv/sqtt: fix wrong check in radv_is_thread_trace_complete()
Samuel Pitoiset [Mon, 2 Mar 2020 13:59:45 +0000 (14:59 +0100)]
radv/sqtt: fix wrong check in radv_is_thread_trace_complete()

Oops, should be equal actually.

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/4022>

4 years agoradv/winsys: fix missing initializations of shader info in the null device
Samuel Pitoiset [Fri, 28 Feb 2020 17:15:39 +0000 (18:15 +0100)]
radv/winsys: fix missing initializations of shader info in the null device

To avoid divide by zero when computing shader stats.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3999>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3999>

4 years agoiris: Don't skip fast depth clears if the color changed
Jason Ekstrand [Thu, 5 Mar 2020 23:17:40 +0000 (17:17 -0600)]
iris: Don't skip fast depth clears if the color changed

We depend on BLORP to convert the clear color and write it into the
clear color buffer for us.  However, we weren't bothering to call blorp
in the case where the state is ISL_AUX_STATE_CLEAR.  This leads to the
clear color not getting properly updated if we have back-to-back clears
with different clear colors.  Technically, we could go out of our way to
set the clear color directly from iris in this case but this is a case
we're unlikely to see in the wild so let's not bother.  This matches
what we already do for color surfaces.

Cc: mesa-stable@lists.freedesktop.org
Reported-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4073>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4073>

4 years agoswr: Fix non-pod-varargs error.
Vinson Lee [Sat, 29 Feb 2020 23:18:58 +0000 (15:18 -0800)]
swr: Fix non-pod-varargs error.

../src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp:391:24: error: cannot pass object of non-trivial type 'std::string' (aka 'basic_string<char>') through variadic function; call will abort at runtime [-Wnon-pod-varargs]
                       pFunc->getName().str());
                       ^

Fixes: ff8265b64ff1 ("gallium/swr: Fix llvm11 compilation issues")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4008>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4008>

4 years agoglthread: fall back if a param size is non-zero and a pointer param is NULL
Marek Olšák [Tue, 25 Feb 2020 01:52:06 +0000 (20:52 -0500)]
glthread: fall back if a param size is non-zero and a pointer param is NULL

So that we don't crash. This is a GL error anyway.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: fix a crash with incorrect glShaderSource parameters
Marek Olšák [Tue, 25 Feb 2020 01:46:02 +0000 (20:46 -0500)]
glthread: fix a crash with incorrect glShaderSource parameters

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add custom marshalling for glNamedBuffer(Sub)DataEXT
Marek Olšák [Tue, 25 Feb 2020 01:30:23 +0000 (20:30 -0500)]
glthread: add custom marshalling for glNamedBuffer(Sub)DataEXT

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: merge glBufferSubData and glNamedBufferSubData into 1 set of functions
Marek Olšák [Tue, 25 Feb 2020 00:58:38 +0000 (19:58 -0500)]
glthread: merge glBufferSubData and glNamedBufferSubData into 1 set of functions

This is a big cleanup.
GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD also doesn't sync anymore.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: merge glBufferData and glNamedBufferData into 1 set of functions
Marek Olšák [Tue, 25 Feb 2020 00:58:38 +0000 (19:58 -0500)]
glthread: merge glBufferData and glNamedBufferData into 1 set of functions

This is a big cleanup.
GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD also doesn't sync anymore.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: replace custom glBindBuffer marshalling with generated one
Marek Olšák [Tue, 25 Feb 2020 00:26:12 +0000 (19:26 -0500)]
glthread: replace custom glBindBuffer marshalling with generated one

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: sync instead of disabling glthread for non-VBO pointers
Marek Olšák [Fri, 21 Feb 2020 01:40:31 +0000 (20:40 -0500)]
glthread: sync instead of disabling glthread for non-VBO pointers

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: track for each VAO whether the user has set a user pointer
Marek Olšák [Fri, 21 Feb 2020 00:28:56 +0000 (19:28 -0500)]
glthread: track for each VAO whether the user has set a user pointer

This commit mainly adds basic infrastructure for tracking vertex array
state.

If glthread gets a non-VBO pointer, this commit delays disabling
glthread until glDraw is called. The next will change that to "sync"
instead of "disable".

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add marshal_call_after and remove custom glFlush and glEnable code
Marek Olšák [Thu, 20 Feb 2020 23:15:42 +0000 (18:15 -0500)]
glthread: add marshal_call_after and remove custom glFlush and glEnable code

Instead of implementing marshalling manually, this XML property allows us
to insert additional code into code-generated functions.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: don't insert an empty line after (void) cmd;
Marek Olšák [Thu, 20 Feb 2020 23:10:37 +0000 (18:10 -0500)]
glthread: don't insert an empty line after (void) cmd;

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add support for glMemoryObjectParameteriv, glSemaphoreParameterui64v
Marek Olšák [Thu, 20 Feb 2020 03:15:51 +0000 (22:15 -0500)]
glthread: add support for glMemoryObjectParameteriv, glSemaphoreParameterui64v

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add support for glCallLists, glPatchParameterfv
Marek Olšák [Thu, 20 Feb 2020 03:06:53 +0000 (22:06 -0500)]
glthread: add support for glCallLists, glPatchParameterfv

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add support for glClearNamedFramebuffer, glMaterial, glPointParameter
Marek Olšák [Thu, 20 Feb 2020 02:57:58 +0000 (21:57 -0500)]
glthread: add support for glClearNamedFramebuffer, glMaterial, glPointParameter

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add support for glFog, glLight, glLightModel, glTexEnv, glTexGen
Marek Olšák [Thu, 20 Feb 2020 02:44:26 +0000 (21:44 -0500)]
glthread: add support for glFog, glLight, glLightModel, glTexEnv, glTexGen

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add support for TexParameteri and SamplerParameteri functions
Marek Olšák [Thu, 20 Feb 2020 01:28:01 +0000 (20:28 -0500)]
glthread: add support for TexParameteri and SamplerParameteri functions

It's straightfoward except that I had to hack the python scripts to add
"marshal_count", which behaves just like "count" except that "variable_param"
is ignored. ("variable_param" changes the behavior of "count", which I don't
want)

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: replace custom ClearBuffer marshalling with generated one
Marek Olšák [Thu, 20 Feb 2020 00:54:00 +0000 (19:54 -0500)]
glthread: replace custom ClearBuffer marshalling with generated one

If the count attribute contains "enum", the count is evaluated only once.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: check the size of all variable params and clean up the code
Marek Olšák [Fri, 21 Feb 2020 01:21:45 +0000 (20:21 -0500)]
glthread: check the size of all variable params and clean up the code

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: handle complex pointer parameters and support GL functions with strings
Marek Olšák [Thu, 20 Feb 2020 00:41:25 +0000 (19:41 -0500)]
glthread: handle complex pointer parameters and support GL functions with strings

The python changes add a local variable that computes the parameter size
only once.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add/update count and marshal fields for many GL functions
Marek Olšák [Wed, 19 Feb 2020 04:13:50 +0000 (23:13 -0500)]
glthread: add/update count and marshal fields for many GL functions

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: add GL_DRAW_INDIRECT_BUFFER tracking and generator support
Marek Olšák [Wed, 19 Feb 2020 21:54:45 +0000 (16:54 -0500)]
glthread: add GL_DRAW_INDIRECT_BUFFER tracking and generator support

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: don't increment variable_data if it's the last variable-size param
Marek Olšák [Wed, 19 Feb 2020 23:45:56 +0000 (18:45 -0500)]
glthread: don't increment variable_data if it's the last variable-size param

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: don't insert _mesa_post_marshal_hook into every function
Marek Olšák [Wed, 19 Feb 2020 22:29:14 +0000 (17:29 -0500)]
glthread: don't insert _mesa_post_marshal_hook into every function

Let the developer decide that in the python script.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: simplify repeated function sequences in marshal_generated.c
Marek Olšák [Wed, 19 Feb 2020 22:20:21 +0000 (17:20 -0500)]
glthread: simplify repeated function sequences in marshal_generated.c

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: use int instead of size_t where it's OK
Marek Olšák [Wed, 19 Feb 2020 21:00:53 +0000 (16:00 -0500)]
glthread: use int instead of size_t where it's OK

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: reduce pointer dereferences in glthread_unmarshal_batch
Marek Olšák [Thu, 20 Feb 2020 21:20:25 +0000 (16:20 -0500)]
glthread: reduce pointer dereferences in glthread_unmarshal_batch

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: inline _mesa_unmarshal_dispatch_cmd and convert the switch to a table
Marek Olšák [Wed, 19 Feb 2020 20:58:34 +0000 (15:58 -0500)]
glthread: inline _mesa_unmarshal_dispatch_cmd and convert the switch to a table

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: don't prefix variable_data with const
Marek Olšák [Wed, 19 Feb 2020 20:32:35 +0000 (15:32 -0500)]
glthread: don't prefix variable_data with const

Not all variable data that is constant is declared with const, such as
glDeletePerfMonitorsAMD.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agoglthread: don't generate the sync fallback if the call size is not variable
Marek Olšák [Wed, 19 Feb 2020 03:57:28 +0000 (22:57 -0500)]
glthread: don't generate the sync fallback if the call size is not variable

marshal_generated.c is 12% smaller.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

4 years agodocs: update news, calendar, and link release notes for 20.0.1
Dylan Baker [Thu, 5 Mar 2020 23:36:54 +0000 (15:36 -0800)]
docs: update news, calendar, and link release notes for 20.0.1

Also fix a couple of dates that are wrong.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4075>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4075>

4 years agodocs: Add sha256sums for 20.0.1
Dylan Baker [Thu, 5 Mar 2020 21:59:11 +0000 (13:59 -0800)]
docs: Add sha256sums for 20.0.1

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

4 years agodocs: add relnotes for 20.0.1
Dylan Baker [Thu, 5 Mar 2020 21:33:09 +0000 (13:33 -0800)]
docs: add relnotes for 20.0.1

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

4 years agodocs: update releasing to cover updated post_version.py
Dylan Baker [Mon, 28 Oct 2019 15:48:44 +0000 (08:48 -0700)]
docs: update releasing to cover updated post_version.py

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2505>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2505>

4 years agobin/post_version.py: Make the git commit as well.
Dylan Baker [Mon, 28 Oct 2019 15:47:14 +0000 (08:47 -0700)]
bin/post_version.py: Make the git commit as well.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2505>

4 years agobin/post_version.py: Pretty print the html
Dylan Baker [Thu, 24 Oct 2019 23:14:57 +0000 (16:14 -0700)]
bin/post_version.py: Pretty print the html

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2505>

4 years agobin/post_version.py: Update the release calendar as well
Dylan Baker [Thu, 24 Oct 2019 22:51:30 +0000 (15:51 -0700)]
bin/post_version.py: Update the release calendar as well

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2505>

4 years agodocs: Update release notes with current process
Dylan Baker [Thu, 5 Mar 2020 18:31:22 +0000 (10:31 -0800)]
docs: Update release notes with current process

There's a lot of stuff here that's out of date, update it to something
more modern.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4066>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4066>

4 years agodocs/submittingpatches: Fix confusing typo + missing pronoun
Dylan Baker [Thu, 5 Mar 2020 18:49:51 +0000 (10:49 -0800)]
docs/submittingpatches: Fix confusing typo + missing pronoun

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4066>

4 years agogitlab-ci: add a job that runs Fossilize on RADV/Polaris10
Samuel Pitoiset [Wed, 5 Feb 2020 16:04:20 +0000 (17:04 +0100)]
gitlab-ci: add a job that runs Fossilize on RADV/Polaris10

RADV_FORCE_FAMILY forces creating a null device that allows RADV
to be instanced without AMDGPU.

The Fossilize database only contains pipelines from the Sascha
Vulkan triangle demos at the moment. I will add more once this
is merged.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3960>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3960>

4 years agogitlab-ci: enable building the test image for VK unconditionally
Samuel Pitoiset [Wed, 26 Feb 2020 07:49:27 +0000 (08:49 +0100)]
gitlab-ci: enable building the test image for VK unconditionally

It was diabled because RADV is the only driver that tests Vulkan
and running CTS on my personal machine and without recovery is
not safe enough for CI (too long and too unstable).

Now that we are going to test Fossilize with RADV, it's needed to
build the test image for VK unconditionally. As RADV now supports
creating NULL devices, the fossilize jobs can run everywhere.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3960>

4 years agogitlab-ci: add Fossilize support to detect compiler regressions
Samuel Pitoiset [Wed, 26 Feb 2020 08:33:14 +0000 (09:33 +0100)]
gitlab-ci: add Fossilize support to detect compiler regressions

Fossilize is equivalent to vkpipeline-db but it's definitely more
robust. This is based on the CI traces system.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3960>

4 years agogitlab-ci: build Fossilize in the test image for VK
Samuel Pitoiset [Wed, 26 Feb 2020 08:32:41 +0000 (09:32 +0100)]
gitlab-ci: build Fossilize in the test image for VK

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3960>

4 years agoaco: only reserve sgprs for vcc if it's used
Rhys Perry [Fri, 21 Feb 2020 12:23:28 +0000 (12:23 +0000)]
aco: only reserve sgprs for vcc if it's used

pipeline-db (Vega):

Totals:
SGPRS: 5186302 -> 5075616 (-2.13 %)
VGPRS: 3704580 -> 3704580 (0.00 %)
Spilled SGPRs: 144859 -> 144859 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 4124 -> 4124 (0.00 %) dwords per thread
Code Size: 247315944 -> 247315944 (0.00 %) bytes
LDS: 1311 -> 1311 (0.00 %) blocks
Max Waves: 674560 -> 674562 (0.00 %)

Totals from affected shaders:
SGPRS: 536992 -> 426306 (-20.61 %)
VGPRS: 356404 -> 356404 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 8498748 -> 8498748 (0.00 %) bytes
LDS: 8 -> 8 (0.00 %) blocks
Max Waves: 113832 -> 113834 (0.00 %)

There are some small code size changes in a few RotTR shaders and a small
increase in max_waves in two Detroit: Become Human shaders.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3906>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3906>

4 years agoaco: improve control flow handling in GFX6-9 NOP pass
Rhys Perry [Thu, 27 Feb 2020 19:56:22 +0000 (19:56 +0000)]
aco: improve control flow handling in GFX6-9 NOP pass

Fixes Detroit: Become Human hang. Also affects World of Warships.

pipeline-db (Tahiti):
Totals from affected shaders:
SGPRS: 0 -> 0 (0.00 %)
VGPRS: 0 -> 0 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 0 -> 0 (0.00 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 0 -> 0 (0.00 %)

pipeline-db (Polaris):
Totals from affected shaders:
SGPRS: 17168 -> 17168 (0.00 %)
VGPRS: 11296 -> 11296 (0.00 %)
Spilled SGPRs: 1870 -> 1870 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 1472628 -> 1473292 (0.05 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 628 -> 628 (0.00 %)

pipeline-db (Vega):
Totals from affected shaders:
SGPRS: 17168 -> 17168 (0.00 %)
VGPRS: 11296 -> 11296 (0.00 %)
Spilled SGPRs: 1870 -> 1870 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 1409716 -> 1410380 (0.05 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 0 -> 0 (0.00 %)

Max Waves is lower than it should be because of a null winsys bug.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4004>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4004>

4 years agoaco: consider non-hazard writes in handle_raw_hazard_internal
Rhys Perry [Thu, 27 Feb 2020 19:47:01 +0000 (19:47 +0000)]
aco: consider non-hazard writes in handle_raw_hazard_internal

I think this helps GFX6 in particular because code like this is common:
s_add_i32       s4, 0x60, s3
s_mov_b32       s5, 0
s_load_dwordx4  s[4:7], s[4:5], 0x0
s_buffer_load_dword s4, s[4:7], 0xcc

pipeline-db (Tahiti):
Totals from affected shaders:
SGPRS: 1923878 -> 1923878 (0.00 %)
VGPRS: 1528964 -> 1528964 (0.00 %)
Spilled SGPRs: 476 -> 476 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 88723604 -> 88528880 (-0.22 %) bytes
LDS: 241 -> 241 (0.00 %) blocks
Max Waves: 145402 -> 145402 (0.00 %)

pipeline-db (Polaris):
Totals from affected shaders:
SGPRS: 428128 -> 428128 (0.00 %)
VGPRS: 353092 -> 353092 (0.00 %)
Spilled SGPRs: 119251 -> 119251 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 57580468 -> 57563964 (-0.03 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 11631 -> 11631 (0.00 %)

piepline-db (Vega):
Totals from affected shaders:
SGPRS: 425016 -> 425016 (0.00 %)
VGPRS: 349588 -> 349588 (0.00 %)
Spilled SGPRs: 117835 -> 117835 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 54890792 -> 54874432 (-0.03 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 54 -> 54 (0.00 %)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4004>

4 years agoaco: improve get_wait_states()
Rhys Perry [Fri, 28 Feb 2020 15:56:43 +0000 (15:56 +0000)]
aco: improve get_wait_states()

pipeline-db (Tahiti):
Totals from affected shaders:
SGPRS: 21208 -> 21208 (0.00 %)
VGPRS: 22388 -> 22388 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 3278596 -> 3277004 (-0.05 %) bytes
LDS: 19 -> 19 (0.00 %) blocks
Max Waves: 238 -> 238 (0.00 %)

pipeline-db (Polaris):
Totals from affected shaders:
SGPRS: 64 -> 64 (0.00 %)
VGPRS: 96 -> 96 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 5200 -> 5192 (-0.15 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 10 -> 10 (0.00 %)

pipeline-db (Vega):
Totals from affected shaders:
SGPRS: 0 -> 0 (0.00 %)
VGPRS: 0 -> 0 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 0 -> 0 (0.00 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 0 -> 0 (0.00 %)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4004>

4 years agoaco: add new NOP insertion pass for GFX6-9
Rhys Perry [Tue, 25 Feb 2020 11:27:33 +0000 (11:27 +0000)]
aco: add new NOP insertion pass for GFX6-9

This new pass is more similar to the GFX10 pass and should be able to
handle control flow better.

No pipeline-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4004>

4 years agoiris: Enable HiZ and stencil CCS for blorp blit destinations
Jason Ekstrand [Tue, 11 Feb 2020 00:18:02 +0000 (18:18 -0600)]
iris: Enable HiZ and stencil CCS for blorp blit destinations

Now that blorp blits write to depth and stencil as depth and stencil, we
can leave HiZ and stencil CCS enabled for blorp blit destinations.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>

4 years agoiris: Enable CCS for copies from HiZ+CCS depth buffers
Jason Ekstrand [Fri, 7 Feb 2020 22:20:32 +0000 (16:20 -0600)]
iris: Enable CCS for copies from HiZ+CCS depth buffers

Ever since b274469daae, BLORP is able to sample from whatever the
sampler supports.  In c0c899cf7892, we added HiZ support for copies from
HiZ compressed depth buffers but forgot HiZ+CCS.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>

4 years agoanv: Enable HiZ for VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
Jason Ekstrand [Wed, 5 Feb 2020 16:12:26 +0000 (10:12 -0600)]
anv: Enable HiZ for VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>

4 years agoblorp: Write to depth/stencil images as depth/stencil when possible
Jason Ekstrand [Wed, 5 Feb 2020 09:59:01 +0000 (03:59 -0600)]
blorp: Write to depth/stencil images as depth/stencil when possible

On Gen4 and G45 and earlier, we have to handle weird offsetting to write
to depth and stencil due to a lack of proper depth mipmapping support in
hardware.  On Gen6, we have to deal with strange HiZ and stencil
layouts.  Prior to Gen9, we also had to do crazy things for stencil
writes because we didn't support GL_ARB_shader_stencil_export and
friends in hardware.  However, starting with Gen7 for depth and Gen9 for
stencil, we can easily write out with the "right" hardware.  This allows
us to leave HiZ and other compression enabled for blorp_blit() and
blorp_copy() operations.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>

4 years agoiris: Allow HiZ on blit sources
Jason Ekstrand [Mon, 2 Mar 2020 19:54:22 +0000 (13:54 -0600)]
iris: Allow HiZ on blit sources

Ever since 95cc5438ebf, BLORP has been able to read from HiZ-compressed
depth buffers as long as the sampler supports HiZ.  This just makes iris
stop doing the unneeded resolve.

Closes: #2583
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>

4 years agoisl: Set 3DSTATE_DEPTH_BUFFER::Depth correctly for 3D surfaces
Jason Ekstrand [Wed, 5 Feb 2020 15:03:30 +0000 (09:03 -0600)]
isl: Set 3DSTATE_DEPTH_BUFFER::Depth correctly for 3D surfaces

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>

4 years agodocs: Update stable process around using fixes: and gitlab
Dylan Baker [Wed, 11 Dec 2019 19:01:57 +0000 (11:01 -0800)]
docs: Update stable process around using fixes: and gitlab

Currently the docs still recommend using
mesa-stable@lists.freedesktop.org, which is pretty awful. We really
don't want a second mailing list and it's mostly full of junk because of
CC: tags anyway.
This changes the preferred actions to be:
1) use a fixes: tag ahead of time
2) use a Cc tag ahead of time if fixes isn't appropriate
3) Use a gitlab MR against the staging/ branch for post-merge/backport
   nominations

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3056>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3056>

4 years agoturnip: fix tile->slot calculation
Jonathan Marek [Tue, 17 Dec 2019 22:29:02 +0000 (17:29 -0500)]
turnip: fix tile->slot calculation

Fixes HW binning cases when the horizontal number of tiles isn't divisible
by the horizontal number of pipes (only happens with more than 32 tiles).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3142>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3142>

4 years agoturnip: improve binning pipe layout config
Jonathan Marek [Tue, 17 Dec 2019 22:22:46 +0000 (17:22 -0500)]
turnip: improve binning pipe layout config

The old code looks the same as GL driver, but we get things like
pipe_count = {32, 1}, which seems bad.

This uses similar logic as for tiles which produces a balanced pipe_count
width/height.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3142>

4 years agoRevert "spirv: Use a simpler and more correct implementaiton of tanh()"
Kristian H. Kristensen [Thu, 27 Feb 2020 19:38:53 +0000 (11:38 -0800)]
Revert "spirv: Use a simpler and more correct implementaiton of tanh()"

This reverts commit da1c49171d0df185545cfbbd600e287f7c6160fa.

The reduced formula has precision problems on fp16 around 0.  Bring
back the old formula, but make sure to keep the clamping.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4054>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4054>

4 years agoRevert "glsl: Use a simpler formula for tanh"
Kristian H. Kristensen [Thu, 27 Feb 2020 00:52:45 +0000 (16:52 -0800)]
Revert "glsl: Use a simpler formula for tanh"

This reverts commit 9807f502eb7a023be619a14119388b2a43271b0e.

The simplified formula doesn't pass the tanh dEQP tests when we lower
to fp16 math.

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

4 years agopan/bi: Add bi_print_shader
Alyssa Rosenzweig [Thu, 5 Mar 2020 13:23:43 +0000 (08:23 -0500)]
pan/bi: Add bi_print_shader

Woot! That's the last of it! IR printing is now complete*

*until the IR gets updated when new shiny things are added.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_print_block
Alyssa Rosenzweig [Thu, 5 Mar 2020 13:22:07 +0000 (08:22 -0500)]
pan/bi: Add bi_print_block

Almost there...

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_print_clause
Alyssa Rosenzweig [Thu, 5 Mar 2020 13:10:02 +0000 (08:10 -0500)]
pan/bi: Add bi_print_clause

Again for post-sched purposes.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_print_bundle for printing bi_bundle
Alyssa Rosenzweig [Thu, 5 Mar 2020 12:57:49 +0000 (07:57 -0500)]
pan/bi: Add bi_print_bundle for printing bi_bundle

Post-schedule, nops are significnat here.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_instruction printing
Alyssa Rosenzweig [Wed, 4 Mar 2020 14:21:50 +0000 (09:21 -0500)]
pan/bi: Add bi_instruction printing

So we can debug the IR in memory before code emit has happened. We'd
like to have a complete dump of the IR -- neglecting this with Midgard
was one of those mistakes I've regretted so let's get this right for the
first time around.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Move bi_interp_mode_name to bi_print
Alyssa Rosenzweig [Wed, 4 Mar 2020 14:21:25 +0000 (09:21 -0500)]
pan/bi: Move bi_interp_mode_name to bi_print

Instead of open-coding it in the middle of the disassembler.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add BIR manipulation routines to bir.c
Alyssa Rosenzweig [Wed, 4 Mar 2020 14:19:06 +0000 (09:19 -0500)]
pan/bi: Add BIR manipulation routines to bir.c

New file.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Move some print routines out of the disasm
Alyssa Rosenzweig [Tue, 3 Mar 2020 20:39:04 +0000 (15:39 -0500)]
pan/bi: Move some print routines out of the disasm

These are generally useful for debug of the compiler IR even prior to
code emit; let's share these.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add IR iteration macros
Alyssa Rosenzweig [Tue, 3 Mar 2020 19:32:28 +0000 (14:32 -0500)]
pan/bi: Add IR iteration macros

Copypaste from Midgard, for the most part.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add quirks system
Alyssa Rosenzweig [Tue, 3 Mar 2020 19:27:05 +0000 (14:27 -0500)]
pan/bi: Add quirks system

Modeled after the Midgard system. Already we know of two
compiler-visible differences between G52 and G71, so let's keep track so
we can eventually port the compiler to other Bifrost systems.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add high-latency property for classes
Alyssa Rosenzweig [Tue, 3 Mar 2020 18:55:33 +0000 (13:55 -0500)]
pan/bi: Add high-latency property for classes

This is required to know how to schedule legally, and also influences
some issues relating to RA.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add CSEL condition
Alyssa Rosenzweig [Thu, 5 Mar 2020 12:46:00 +0000 (07:46 -0500)]
pan/bi: Add CSEL condition

Along with src_types, this is enough to represent CSEL.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_branch data
Alyssa Rosenzweig [Tue, 3 Mar 2020 18:48:13 +0000 (13:48 -0500)]
pan/bi: Add bi_branch data

For BI_BRANCH, of course. Meshes well with the cfg.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Extract bifrost_branch structure
Alyssa Rosenzweig [Tue, 3 Mar 2020 18:47:49 +0000 (13:47 -0500)]
pan/bi: Extract bifrost_branch structure

It's in the disassembler as bitfields, let's extract to a proper
structure so we can see what's there.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add pred/successors to build CFG
Alyssa Rosenzweig [Tue, 3 Mar 2020 18:47:13 +0000 (13:47 -0500)]
pan/bi: Add pred/successors to build CFG

We'll want this for analysis passes or something, probably.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add constants to bi_clause
Alyssa Rosenzweig [Tue, 3 Mar 2020 18:01:41 +0000 (13:01 -0500)]
pan/bi: Add constants to bi_clause

Scheduling will have to pay attention to this.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add EXTRACT, MAKE_VEC synthetic ops
Alyssa Rosenzweig [Tue, 3 Mar 2020 13:57:03 +0000 (08:57 -0500)]
pan/bi: Add EXTRACT, MAKE_VEC synthetic ops

These allow translating between the vector I/O and scalar ALUs,
facilitated by an RA dance to ensured contiguous registers are used.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add source type for conversions
Alyssa Rosenzweig [Tue, 3 Mar 2020 13:37:15 +0000 (08:37 -0500)]
pan/bi: Add source type for conversions

We should now be able to unambiguously represent conversions.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add swizzles
Alyssa Rosenzweig [Tue, 3 Mar 2020 13:35:51 +0000 (08:35 -0500)]
pan/bi: Add swizzles

Requires a new field on bifrost_instruction, as well as a new class
property and a new class for the dedicated swizzle ops.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Clarify special op scheduling
Alyssa Rosenzweig [Tue, 3 Mar 2020 13:16:50 +0000 (08:16 -0500)]
pan/bi: Clarify special op scheduling

They're encoded on ADD but eat the full cycle.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add clause header fields to bi_clause
Alyssa Rosenzweig [Tue, 3 Mar 2020 13:09:18 +0000 (08:09 -0500)]
pan/bi: Add clause header fields to bi_clause

These will be filled out during scheduling (and possibly RA), to be used
when emitting code.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add class-specific ops
Alyssa Rosenzweig [Tue, 3 Mar 2020 12:58:05 +0000 (07:58 -0500)]
pan/bi: Add class-specific ops

For disambiguating things like min and max within the MINMAX class.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add constant field to bi_instruction
Alyssa Rosenzweig [Tue, 3 Mar 2020 12:47:29 +0000 (07:47 -0500)]
pan/bi: Add constant field to bi_instruction

Now that we can index it.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add special indices
Alyssa Rosenzweig [Tue, 3 Mar 2020 12:45:33 +0000 (07:45 -0500)]
pan/bi: Add special indices

For fixed registers, uniforms, and constants, which bypass the usual SSA
mechanism to map well to the ISA.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add dest_type field to bifrost_instruction
Alyssa Rosenzweig [Tue, 3 Mar 2020 03:03:05 +0000 (22:03 -0500)]
pan/bi: Add dest_type field to bifrost_instruction

A number of opcodes within a class are disambiguated by type/size, and
whether modifiers make sense or not depends on whether the instruction
acts like a float.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_clause, bi_bundle abstractions
Alyssa Rosenzweig [Tue, 3 Mar 2020 03:00:07 +0000 (22:00 -0500)]
pan/bi: Add bi_clause, bi_bundle abstractions

These will be used during and after scheduling.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add PAN_SCHED_* flags
Alyssa Rosenzweig [Tue, 3 Mar 2020 02:53:13 +0000 (21:53 -0500)]
pan/bi: Add PAN_SCHED_* flags

Class (mostly) determines scheduling options.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_load_vary structure
Alyssa Rosenzweig [Tue, 3 Mar 2020 02:48:51 +0000 (21:48 -0500)]
pan/bi: Add bi_load_vary structure

For ld_vary in the IR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Pull out bifrost_load_var
Alyssa Rosenzweig [Tue, 3 Mar 2020 02:45:47 +0000 (21:45 -0500)]
pan/bi: Pull out bifrost_load_var

We're not using this structure yet but we want everything in the ISA
ready for us.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bi_load structure
Alyssa Rosenzweig [Tue, 3 Mar 2020 02:19:16 +0000 (21:19 -0500)]
pan/bi: Add bi_load structure

Fills out the class for LD_ATTR, LD_VAR_ADDR

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add bifrost_minmax_mode field
Alyssa Rosenzweig [Tue, 3 Mar 2020 01:53:47 +0000 (20:53 -0500)]
pan/bi: Add bifrost_minmax_mode field

We'll open up a union for class specific data, since this is interesting
only to BI_MINMAX. (And even then...)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Add a bifrost_roundmode field
Alyssa Rosenzweig [Tue, 3 Mar 2020 01:52:36 +0000 (20:52 -0500)]
pan/bi: Add a bifrost_roundmode field

And a class property signaling it's okay to use.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

4 years agopan/bi: Factor out enum bifrost_minmax_mode
Alyssa Rosenzweig [Tue, 3 Mar 2020 01:51:03 +0000 (20:51 -0500)]
pan/bi: Factor out enum bifrost_minmax_mode

We'll want it from the compiler-side.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>