mesa.git
22 months agoutil: add missing R8G8B8A8_SRGB format to vk_format_map
Jonathan Marek [Thu, 21 Nov 2019 13:24:19 +0000 (08:24 -0500)]
util: add missing R8G8B8A8_SRGB format to vk_format_map

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
22 months agodocs: fix ascii html representation
Elie Tournier [Fri, 15 Nov 2019 13:41:25 +0000 (13:41 +0000)]
docs: fix ascii html representation

v2 (Eric): Use more readable ascii version

Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
22 months agoDocs: remove duplicate meson docs for windows
Elie Tournier [Fri, 15 Nov 2019 13:29:58 +0000 (13:29 +0000)]
Docs: remove duplicate meson docs for windows

This block is duplicated, we already have the windows instruction above.

Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
22 months agoci: Move freedreno's parallelism to the runner instead of gitlab-ci jobs.
Eric Anholt [Thu, 21 Nov 2019 13:12:58 +0000 (05:12 -0800)]
ci: Move freedreno's parallelism to the runner instead of gitlab-ci jobs.

I set the runners to concurrency=1, so they serve only one gitlab-ci job
at at time.  Swap over to using the parallel runner now to keep the
runners busy, more efficiently than spawning many docker containers and
downloading artifacts multiple times, and producing easier-to-understand
results for browsing on the web.

This bumps the a306 runners to 4x parallel instead of 2x like before, but
cheza gles3 drops from 6 to 4.  Current rough timings of the jobs (if no
container download):

db410c-gles2: 5:00
a630-gles2: 1:30
a630-gles3: 6:00
a630-gles31: 5:30

a630-gles3 is a bit longer than I like, but it should come back down once
I can sort out the NIR algebraic rewinding.

22 months agoglsl: add missing initialization of the location path field
Iago Toral Quiroga [Thu, 21 Nov 2019 09:05:49 +0000 (10:05 +0100)]
glsl: add missing initialization of the location path field

This was apparently missed in 67b32190f3c95, which added support
for ARB_shading_language_include to #line, including the 'path'
field for the location.

Fixes crashes in CTS with all drivers as they attempt to access
an uninitialized path string during parsing.

Fixes: 67b32190f3c95 ("glsl: add ARB_shading_language_include support to #line")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2132
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Maria Casanova <jmcasanova@igalia.com>
22 months agodocs: update features.txt for RADV
Rhys Perry [Wed, 20 Nov 2019 15:08:30 +0000 (15:08 +0000)]
docs: update features.txt for RADV

[skip ci]

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
22 months agogitlab-ci: Directly use host-mapped directory for ccache
Michel Dänzer [Wed, 20 Nov 2019 08:11:35 +0000 (09:11 +0100)]
gitlab-ci: Directly use host-mapped directory for ccache

Use hardcoded /cache/mesa/ccache for the cache, so it will be shared by
all jobs of all Mesa projects running on the same runner host. This
should increase the hit rate and decrease the worst case storage used.

Further benefits of directly using a host-mapped directory:

* Saves up to ~1 minute per job for restoring and saving the cache
  contents via the GitLab CI cache mechanism
* Cache contents generated by failed jobs are no longer lost
* Jobs running in parallel on the same runner host can get hits from
  each other

Also enable compression, so the default maximum cache size of 5G might
be sufficient.

v2:
* Move CCACHE_DIR variable to the .build-linux template

Suggested-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net> # v1
22 months agogitlab-ci: remove now useless meson-swr-glvnd build job
Samuel Pitoiset [Tue, 19 Nov 2019 13:39:31 +0000 (14:39 +0100)]
gitlab-ci: remove now useless meson-swr-glvnd build job

All things are already part of meson-main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
22 months agogitlab-ci: build GLVND in meson-clang
Samuel Pitoiset [Tue, 19 Nov 2019 13:37:32 +0000 (14:37 +0100)]
gitlab-ci: build GLVND in meson-clang

Building GLVND in meson-main doesn't work because this disables
libEGL and it's needed for running shader-db.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
22 months agogitlab-ci: build swr in meson-main
Samuel Pitoiset [Tue, 19 Nov 2019 13:36:02 +0000 (14:36 +0100)]
gitlab-ci: build swr in meson-main

Now that debugoptimized isn't set and that all test jobs depend on
meson-testing, enabling swr shouldn't slowdown the CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
22 months agogitlab-ci: do not build with debugoptimized for meson-main
Samuel Pitoiset [Tue, 19 Nov 2019 11:25:36 +0000 (12:25 +0100)]
gitlab-ci: do not build with debugoptimized for meson-main

This should reduce compile time because optimizations are costly.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
22 months agogitlab-ci: add a job that only build things needed for testing
Samuel Pitoiset [Tue, 19 Nov 2019 11:23:41 +0000 (12:23 +0100)]
gitlab-ci: add a job that only build things needed for testing

For turnip and RADV testing, we will need a debugoptimized build
without UBSAN. This introduces meson-testing which builds only the
things that are needed by the test stage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
22 months agogitlab-ci: fix ldd check for Vulkan drivers
Samuel Pitoiset [Thu, 14 Nov 2019 13:00:46 +0000 (14:00 +0100)]
gitlab-ci: fix ldd check for Vulkan drivers

The 'dri' directory isn't created when building Vulkan drivers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
22 months agogitlab-ci: move building piglit into a separate script
Samuel Pitoiset [Fri, 15 Nov 2019 11:02:08 +0000 (12:02 +0100)]
gitlab-ci: move building piglit into a separate script

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
22 months agopipe-loader: check that the pointer to driconf_xml isn't NULL
Samuel Pitoiset [Wed, 20 Nov 2019 08:14:17 +0000 (09:14 +0100)]
pipe-loader: check that the pointer to driconf_xml isn't NULL

This happens when mesa is built with only swrast. The default
driver being kmsro and the default driconf file being v3d,
it's NULL and then strdup crashes.

This fixes a crash with piglit spec/egl_mesa_query_driver/conformance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
22 months agopanfrost: Add the lod_bias field
Alyssa Rosenzweig [Wed, 20 Nov 2019 14:26:48 +0000 (09:26 -0500)]
panfrost: Add the lod_bias field

Enough trial and error ... just think even *more* Midgard about where
this field might be!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
22 months agocompiler: move build definition of pp_standalone_scaffolding.c
Timothy Arceri [Thu, 21 Nov 2019 00:18:54 +0000 (11:18 +1100)]
compiler: move build definition of pp_standalone_scaffolding.c

This should fix android build issues while still allowing scons to
build the standalone compiler.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2129
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
22 months agonir/validate: validate num_components on registers and intrinsics
Karol Herbst [Fri, 15 Nov 2019 11:44:58 +0000 (12:44 +0100)]
nir/validate: validate num_components on registers and intrinsics

also make 8 and 16 compoments invalid. We will enable that later again
when we actually support it.

v2: fix validation of nir_intrinsic_instr::num_components
    correct validation of instr->num_components

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
22 months agoRevert "st/mesa: keep serialized NIR instead of nir_shader in st_program"
Mark Janes [Wed, 20 Nov 2019 22:05:50 +0000 (14:05 -0800)]
Revert "st/mesa: keep serialized NIR instead of nir_shader in st_program"

This reverts commit db0c89d4bffa01ab15dfa819dbb518739131e1a9.

Gitlab: mesa/mesa#2128
Acked-by: Marek Olšák <maraeo@gmail.com>
22 months agoRevert "st/mesa: call nir_serialize only once per shader"
Mark Janes [Wed, 20 Nov 2019 22:05:41 +0000 (14:05 -0800)]
Revert "st/mesa: call nir_serialize only once per shader"

This reverts commit 3a8d6868897c7dfe72bac09c1eddd551144ca751.

Acked-by: Marek Olšák <maraeo@gmail.com>
22 months agolima/ppir: add lod-bias support
Arno Messiaen [Sat, 2 Nov 2019 21:09:21 +0000 (22:09 +0100)]
lima/ppir: add lod-bias support

Signed-off-by: Arno Messiaen <arnomessiaen@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
22 months agoRevert "i965/fs: Merge CMP and SEL into CSEL on Gen8+"
Jason Ekstrand [Fri, 1 Nov 2019 19:22:35 +0000 (14:22 -0500)]
Revert "i965/fs: Merge CMP and SEL into CSEL on Gen8+"

This reverts commit 52c7df1643ec9af119fd66f916f7fbdbcc798d2d.  The pass,
while clearly useful for some shaders, has at least three bugs that I
was able to find fairly quickly:

 1. It doesn't work for type-converting MOVs because f > 0 is not the
    same as f2i(f) > 0

 2. CSEL is a 3src instruction and only supports one source type; it
    doesn't take this into account and tries to create instructions
    which do a F compare and a D select.  This is especially nasty to
    debug because you don't see that in the dumped assembly because we
    don't properly assert that types are the same in codegen.

 3. While you can handle 2, in theory, by reinterpreting types, you
    can't do that in the presence of source modifiers.  This pass
    doesn't even attempt to detect that.

Those are just the ones I found with the one almost trival shader I was
debugging.  There very likely may be more and.  Best thing to do for now
is just shut it off until someone has the time to figure out how to do
this properly and write tests to ensure it's correct.

Fixes: 3cb085e6d61a "i965/fs: Merge CMP and SEL into CSEL on Gen8+"
Reviewed-by: Brian Paul <brianp@vmware.com>
22 months agoradv: Enable Subgroup Arithmetic and Clustered for SI
Daniel Schürmann [Wed, 20 Nov 2019 11:41:19 +0000 (12:41 +0100)]
radv: Enable Subgroup Arithmetic and Clustered for SI

This patch also allows to enable VK_AMD_shader_ballot on SI.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
22 months agoamd/llvm: Add Subgroup Scan functions for SI
Daniel Schürmann [Wed, 20 Nov 2019 11:40:07 +0000 (12:40 +0100)]
amd/llvm: Add Subgroup Scan functions for SI

The idea of this implementation is taken from the ROCm Device Libs:
https://github.com/RadeonOpenCompute/ROCm-Device-Libs/blob/master/ockl/src/wfredscan.cl

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
22 months agolima/streamparser: Add findings introduced with gl_PointSize
Andreas Baierl [Mon, 18 Nov 2019 09:03:32 +0000 (10:03 +0100)]
lima/streamparser: Add findings introduced with gl_PointSize

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
22 months agolima/streamparser: Fix typo in vs semaphore parser
Andreas Baierl [Mon, 18 Nov 2019 08:46:21 +0000 (09:46 +0100)]
lima/streamparser: Fix typo in vs semaphore parser

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
22 months agomeson: Fix linkage of libgallium_nine with libgalliumvl
Yevhenii Kolesnikov [Thu, 7 Nov 2019 15:22:26 +0000 (17:22 +0200)]
meson: Fix linkage of libgallium_nine with libgalliumvl

Do not link libgallium_nine with libgalliumvl_stub if it's already
linked with libgalliumvl. Linking with stub leads to "duplicate
symbol" errors.

Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3
       ("meson: build gallium nine state_tracker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2040
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
22 months agodocs/release-calendar: Update for extended 19.3 rc period
Dylan Baker [Wed, 20 Nov 2019 17:57:05 +0000 (09:57 -0800)]
docs/release-calendar: Update for extended 19.3 rc period

23 months agodocs: update calendar, add news item and link release notes for 19.2.5
Dylan Baker [Wed, 20 Nov 2019 17:22:29 +0000 (09:22 -0800)]
docs: update calendar, add news item and link release notes for 19.2.5

23 months agodocs/relnotes/19.2.5: Add SHA256 sum
Dylan Baker [Wed, 20 Nov 2019 17:18:11 +0000 (09:18 -0800)]
docs/relnotes/19.2.5: Add SHA256 sum

23 months agodocs: Add relnotes for 19.2.5
Dylan Baker [Wed, 20 Nov 2019 16:54:10 +0000 (08:54 -0800)]
docs: Add relnotes for 19.2.5

23 months agonir/large_constants: use nir_index_vars and nir_variable::index
Rhys Perry [Fri, 15 Nov 2019 16:13:20 +0000 (16:13 +0000)]
nir/large_constants: use nir_index_vars and nir_variable::index

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
23 months agonir: add nir_variable::index and nir_index_vars
Rhys Perry [Fri, 15 Nov 2019 15:15:14 +0000 (15:15 +0000)]
nir: add nir_variable::index and nir_index_vars

This will be useful as a deterministic identifier/index for the variable.

v2: fix comment style

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com> (v1)
23 months agonir: make nir_variable::{num_members,num_state_slots} a uint16_t
Rhys Perry [Fri, 15 Nov 2019 14:40:19 +0000 (14:40 +0000)]
nir: make nir_variable::{num_members,num_state_slots} a uint16_t

Doesn't shrink it (at least, on x86-64) and leaves space for more members.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
23 months agodocs: add missing new features for RADV
Samuel Pitoiset [Wed, 20 Nov 2019 14:54:43 +0000 (15:54 +0100)]
docs: add missing new features for RADV

[skip ci]

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
23 months agofreedreno/ir3: enable half precision for pre-fs texture fetch
Hyunjun Ko [Thu, 24 Oct 2019 05:30:58 +0000 (05:30 +0000)]
freedreno/ir3: enable half precision for pre-fs texture fetch

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno/ir3: fixup when changing to mad.f16
Hyunjun Ko [Fri, 30 Aug 2019 08:29:10 +0000 (08:29 +0000)]
freedreno/ir3: fixup when changing to mad.f16

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno/ir3: fix printing output registers of FS.
Hyunjun Ko [Fri, 21 Jun 2019 03:18:33 +0000 (03:18 +0000)]
freedreno/ir3: fix printing output registers of FS.

Fixes: cea39af2fbf1 ("freedreno/ir3: Generalize ir3_shader_disasm()")
Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno/ir3: Enabling lowering 16-bit flrp
Neil Roberts [Thu, 6 Jun 2019 14:29:35 +0000 (16:29 +0200)]
freedreno/ir3: Enabling lowering 16-bit flrp

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno: support 16b for the sampler opcode
Hyunjun Ko [Wed, 23 Oct 2019 09:08:57 +0000 (09:08 +0000)]
freedreno: support 16b for the sampler opcode

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno/ir3: Implement f2b16 and i2b16
Neil Roberts [Wed, 27 Feb 2019 10:58:18 +0000 (11:58 +0100)]
freedreno/ir3: Implement f2b16 and i2b16

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno/ir3: Add implementation of nir_op_b16csel
Neil Roberts [Wed, 30 Jan 2019 15:41:46 +0000 (16:41 +0100)]
freedreno/ir3: Add implementation of nir_op_b16csel

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno/ir3: Support 16-bit comparison instructions
Neil Roberts [Wed, 30 Jan 2019 15:33:05 +0000 (16:33 +0100)]
freedreno/ir3: Support 16-bit comparison instructions

v2. [Hyunjun Ko (zzoon@igalia.com)]
Avoid using too much open code like "instr->regs[n]->flags |= FOO"

v3. [Hyunjun Ko (zzoon@igalia.com)]
Remove redundant code for both 16b and 32b operations.

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agofreedreno/ir3: cleanup by removing repeated code
Hyunjun Ko [Fri, 27 Sep 2019 05:41:02 +0000 (05:41 +0000)]
freedreno/ir3: cleanup by removing repeated code

Prep-work for the corresponding patch.

Reviewed-by: Rob Clark <robdclark@gmail.com>
23 months agonir/lower_alu_to_scalar: Support lowering 8- and 16-bit reduce ops
Neil Roberts [Wed, 30 Jan 2019 15:31:40 +0000 (16:31 +0100)]
nir/lower_alu_to_scalar: Support lowering 8- and 16-bit reduce ops

Reviewed-by: Rob Clark <robdclark@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agonir: Add a 8-bit bool type
Neil Roberts [Thu, 31 Jan 2019 15:05:44 +0000 (16:05 +0100)]
nir: Add a 8-bit bool type

Adds nir_type_bool8 as well as 8-bit versions of all the bool
opcodes.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agonir: Add a 16-bit bool type
Neil Roberts [Wed, 30 Jan 2019 10:02:39 +0000 (11:02 +0100)]
nir: Add a 16-bit bool type

Adds nir_type_bool16 as well as 16-bit versions of all the bool
opcodes.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agonir/opcodes: Add a helper function to generate reduce opcodes
Neil Roberts [Wed, 30 Jan 2019 09:58:48 +0000 (10:58 +0100)]
nir/opcodes: Add a helper function to generate reduce opcodes

Adds binop_reduce_all_sizes which generates both 1-bit and 32-bit
versions of the reduce operation. This reduces the code duplication a
bit and will make it easier to later add 16-bit versions as well.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agonir/opcodes: Add a helper function to generate the comparison binops
Neil Roberts [Wed, 30 Jan 2019 09:50:09 +0000 (10:50 +0100)]
nir/opcodes: Add a helper function to generate the comparison binops

Adds binop_compare_all_sizes which generates both 1-bit and 32-bit
versions of the comparison operation. This reduces the code
duplication a bit and will make it easier to later add 16-bit versions
as well.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agoradv: enable VK_KHR_shader_subgroup_extended_types on GFX6-GFX7
Samuel Pitoiset [Wed, 20 Nov 2019 10:09:10 +0000 (11:09 +0100)]
radv: enable VK_KHR_shader_subgroup_extended_types on GFX6-GFX7

Most of DEQP-VK.subgroups are skipped because 16-bit float aren't
supported but others pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
23 months agov3d: adds an extra MOV for any sig.ld*
Alejandro Piñeiro [Tue, 19 Nov 2019 10:13:15 +0000 (11:13 +0100)]
v3d: adds an extra MOV for any sig.ld*

Specifically when we are in non-uniform control flow, as we would need
to set the condition for the last instruction. If (for example) a
image atomic load stores directly their value on a NIR register,
last_inst would be a nop, and would fail when set the condition.

Fixes piglit test:
spec/glsl-es-3.10/execution/cs-ssbo-atomic-if-else-2.shader_test

Fixes: 6281f26f064ada ("v3d: Add support for shader_image_load_store.")
v2: (Changes suggested by Eric Anholt)
   * Cover all sig.ld* signals, not just ldunif and ldtmu, as all of
     them have the same restriction.
   * Update comment explaining why we add a MOV in that case
   * Tweak commit message.

v3:
   * Drop extra set of parens (Eric)
   * Add missing ld signal to is_ld_signal to fix shader-db regression.

Reviewed-by: Eric Anholt <eric@anholt.net>
23 months agov3d: Fix predication with atomic image operations
Jose Maria Casanova Crespo [Fri, 15 Nov 2019 13:46:30 +0000 (14:46 +0100)]
v3d: Fix predication with atomic image operations

Fixes dEQP test:
dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_atomic_multiple_interleaved_write_read

Fixes piglit test:
spec/glsl-es-3.10/execution/cs-image-atomic-if-else.shader_test

Fixes: 6281f26f064ada ("v3d: Add support for shader_image_load_store.")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
23 months agopanfrost: Don't print the midgard_blend_rt structs on SFBD
Tomeu Vizoso [Tue, 19 Nov 2019 12:09:57 +0000 (13:09 +0100)]
panfrost: Don't print the midgard_blend_rt structs on SFBD

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agogitlab-ci: Fix dir name for VK-GL-CTS sources
Tomeu Vizoso [Tue, 19 Nov 2019 08:12:49 +0000 (09:12 +0100)]
gitlab-ci: Fix dir name for VK-GL-CTS sources

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agopanfrost: Rework buffers in SFBD
Tomeu Vizoso [Mon, 18 Nov 2019 08:59:17 +0000 (09:59 +0100)]
panfrost: Rework buffers in SFBD

Support cases such as depth-only renders and only set stencil buffers
when needed, to match the blob's behaviour.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agopanfrost: Just print tiler fields as-is for Tx20
Tomeu Vizoso [Tue, 12 Nov 2019 11:15:02 +0000 (12:15 +0100)]
panfrost: Just print tiler fields as-is for Tx20

The tiler unit in these GPUs is quite different and we haven't reverse
engineered enough of it yet to validate and pretty print it.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
23 months agopan/midgard: Introduce quirks checks
Alyssa Rosenzweig [Wed, 20 Nov 2019 01:55:42 +0000 (20:55 -0500)]
pan/midgard: Introduce quirks checks

Rather than open-coding checks on gpu_id in the compiler, let's track
quirks applying to whatever we're compiling for, to allow us to manage
the complexity of many heterogenous GPUs in the compiler.

It was discovered that a workaround used on T720 is also required on
T820 (and presumably T830), so let's fix this. This will also decrease
friction as we continue improving T720 support.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
23 months agogitlab-ci: update for arb_shading_language_include
Timothy Arceri [Tue, 19 Nov 2019 11:46:54 +0000 (22:46 +1100)]
gitlab-ci: update for arb_shading_language_include

23 months agogitlab-ci: bump piglit checkout commit
Timothy Arceri [Tue, 19 Nov 2019 11:22:59 +0000 (22:22 +1100)]
gitlab-ci: bump piglit checkout commit

23 months agomesa: enable ARB_shading_language_include
Timothy Arceri [Wed, 14 Aug 2019 00:29:01 +0000 (10:29 +1000)]
mesa: enable ARB_shading_language_include

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/999
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: implement glCompileShaderIncludeARB()
Timothy Arceri [Fri, 30 Aug 2019 04:59:21 +0000 (14:59 +1000)]
mesa: implement glCompileShaderIncludeARB()

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add shader include lookup support for relative paths
Timothy Arceri [Mon, 2 Sep 2019 02:35:52 +0000 (12:35 +1000)]
mesa: add shader include lookup support for relative paths

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add support cursor support for relative path shader includes
Timothy Arceri [Mon, 2 Sep 2019 02:31:17 +0000 (12:31 +1000)]
mesa: add support cursor support for relative path shader includes

This will allow us to continue searching the current path for
relative shader includes.

From the ARB_shading_language_include spec:

   "If it is quoted with double quotes in a previously included
   string, then the first search point will be the tree location
   where the previously included string had been found."

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoglsl: delay compilation skip if shader contains an include
Timothy Arceri [Wed, 21 Aug 2019 06:14:02 +0000 (16:14 +1000)]
glsl: delay compilation skip if shader contains an include

If the shader contains an include when need to first run the
preprocessor before deciding if we can skip compilation based
on the shader cache.

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoglsl: add can_skip_compile() helper
Timothy Arceri [Wed, 21 Aug 2019 06:13:07 +0000 (16:13 +1000)]
glsl: add can_skip_compile() helper

We will reuse this in the following commit.

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoglsl: error if #include used while extension is disabled
Timothy Arceri [Tue, 20 Aug 2019 04:20:33 +0000 (14:20 +1000)]
glsl: error if #include used while extension is disabled

In other words make sure the shader does this:

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoglsl: add preprocessor #include support
Timothy Arceri [Wed, 14 Aug 2019 11:17:55 +0000 (21:17 +1000)]
glsl: add preprocessor #include support

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoglsl: pass gl_context to glcpp_parser_create()
Timothy Arceri [Thu, 15 Aug 2019 02:48:25 +0000 (12:48 +1000)]
glsl: pass gl_context to glcpp_parser_create()

This is a small tidy up and will be useful in the following commit.

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoglsl: add ARB_shading_language_include support to #line
Timothy Arceri [Wed, 14 Aug 2019 04:24:31 +0000 (14:24 +1000)]
glsl: add ARB_shading_language_include support to #line

From the ARB_shading_language_include spec:

   "#line must have, after macro substitution, one of the following
    forms:

       #line <line>
       #line <line> <source-string-number>
       #line <line> "<path>"

    where <line> and <source-string-number> are constant integer
    expressions and <path> is a valid string for a path supplied in the
    #include directive. After processing this directive (including its
    new-line), the implementation will behave as if it is compiling at
    line number <line> and source string number <source-string-number>
    or <path> path. Subsequent source strings will be numbered
    sequentially, until another #line directive overrides that
    numbering."

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: implement glDeleteNamedStringARB()
Timothy Arceri [Tue, 27 Aug 2019 04:24:22 +0000 (14:24 +1000)]
mesa: implement glDeleteNamedStringARB()

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: split _mesa_lookup_shader_include() in two
Timothy Arceri [Tue, 27 Aug 2019 04:22:30 +0000 (14:22 +1000)]
mesa: split _mesa_lookup_shader_include() in two

The new local function lookup_shader_include() will be used by
glDeleteNamedStringARB() in the following patch.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: implement glGetNamedStringivARB()
Timothy Arceri [Tue, 27 Aug 2019 03:25:57 +0000 (13:25 +1000)]
mesa: implement glGetNamedStringivARB()

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: implement glIsNamedStringARB()
Timothy Arceri [Mon, 26 Aug 2019 04:01:52 +0000 (14:01 +1000)]
mesa: implement glIsNamedStringARB()

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: make error checking optional in _mesa_lookup_shader_include()
Timothy Arceri [Mon, 26 Aug 2019 03:56:59 +0000 (13:56 +1000)]
mesa: make error checking optional in _mesa_lookup_shader_include()

This will be usefull when implementing glIsNamedStringARB() which
doesn't do error checking, it just returns false for invalid
lookups instead.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: implement glGetNamedStringARB()
Timothy Arceri [Mon, 26 Aug 2019 01:23:39 +0000 (11:23 +1000)]
mesa: implement glGetNamedStringARB()

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add glNamedStringARB() support
Timothy Arceri [Thu, 15 Aug 2019 13:38:09 +0000 (23:38 +1000)]
mesa: add glNamedStringARB() support

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add copy_string() helper
Timothy Arceri [Mon, 26 Aug 2019 00:23:11 +0000 (10:23 +1000)]
mesa: add copy_string() helper

This will be used by the various ARB_shading_language_include
functions in the following patches.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add _mesa_lookup_shader_include() helper
Timothy Arceri [Fri, 23 Aug 2019 04:36:53 +0000 (14:36 +1000)]
mesa: add _mesa_lookup_shader_include() helper

This will be used both by the glsl compiler and the GL API.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add helper to validate tokenise shader include path
Timothy Arceri [Fri, 23 Aug 2019 04:33:41 +0000 (14:33 +1000)]
mesa: add helper to validate tokenise shader include path

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add ARB_shading_language_include infrastructure to gl_shared_state
Timothy Arceri [Thu, 15 Aug 2019 04:34:39 +0000 (14:34 +1000)]
mesa: add ARB_shading_language_include infrastructure to gl_shared_state

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoglsl: add infrastructure for ARB_shading_language_include
Timothy Arceri [Wed, 14 Aug 2019 00:25:14 +0000 (10:25 +1000)]
glsl: add infrastructure for ARB_shading_language_include

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agomesa: add ARB_shading_language_include stubs
Timothy Arceri [Mon, 5 Aug 2019 05:40:44 +0000 (15:40 +1000)]
mesa: add ARB_shading_language_include stubs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
23 months agoradv: Do not change scratch settings while shaders are active.
Bas Nieuwenhuizen [Thu, 31 Oct 2019 21:53:30 +0000 (22:53 +0100)]
radv: Do not change scratch settings while shaders are active.

When the scratch ringbuffer settings are changed, the shader unit has
to be idle or we will have shaders using old and new settings.

That combination is not supported on the HW (likely the offset is
ringbuffer idx * WAVESIZE * 1024).

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
23 months agoturnip: Drop the copy of the formats table.
Eric Anholt [Tue, 12 Nov 2019 00:08:25 +0000 (16:08 -0800)]
turnip: Drop the copy of the formats table.

Now that we can (mostly) generate a pipe format for a VkFormat, use that
to answer queries about formats.  This will let us refactor the freedreno
format table surface layout code to be shared between gallium and vulkan.

This causes us to expose fewer formats for now (on a 1/100 CTS run I'm
doing, skips go from 3671 to 3835 out of 5145 tests).  Fails stay about
the same (478 -> 434, but the run is pretty flaky and we're doing fewer
tests now).

v2: Rebase on master, throw a finishme on missing vk-to-pipe formats that
    tu used to support.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> (v1)
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
23 months agoutil: Add a mapping from VkFormat to PIPE_FORMAT.
Eric Anholt [Wed, 6 Nov 2019 23:26:32 +0000 (15:26 -0800)]
util: Add a mapping from VkFormat to PIPE_FORMAT.

I'm planning on using this from radv and tu for queries about formats.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
23 months agowinsys/amdgpu: detect noop dependencies on the same ring correctly
Marek Olšák [Thu, 14 Nov 2019 22:56:13 +0000 (17:56 -0500)]
winsys/amdgpu: detect noop dependencies on the same ring correctly

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agoac: fill num_rings for remaining IPs
Marek Olšák [Thu, 14 Nov 2019 22:49:51 +0000 (17:49 -0500)]
ac: fill num_rings for remaining IPs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agoac: add radeon_info::num_rings and move ring_type to amd_family.h
Marek Olšák [Thu, 14 Nov 2019 22:43:12 +0000 (17:43 -0500)]
ac: add radeon_info::num_rings and move ring_type to amd_family.h

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agonir: don't use GLenum16 in nir.h
Marek Olšák [Tue, 12 Nov 2019 01:03:40 +0000 (20:03 -0500)]
nir: don't use GLenum16 in nir.h

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
23 months agonir: move data.descriptor_set above data.index for better packing
Marek Olšák [Thu, 7 Nov 2019 23:02:06 +0000 (18:02 -0500)]
nir: move data.descriptor_set above data.index for better packing

4 bytes down

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
23 months agoglsl_to_nir: rename image_access to mem_access
Marek Olšák [Thu, 7 Nov 2019 22:54:42 +0000 (17:54 -0500)]
glsl_to_nir: rename image_access to mem_access

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
23 months agonir/print: only print image.format for image variables
Marek Olšák [Thu, 7 Nov 2019 22:54:13 +0000 (17:54 -0500)]
nir/print: only print image.format for image variables

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
23 months agonir: move data.image.access to data.access
Marek Olšák [Thu, 7 Nov 2019 21:53:58 +0000 (16:53 -0500)]
nir: move data.image.access to data.access

The size of the data structure doesn't change.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
23 months agost/mesa: call nir_serialize only once per shader
Marek Olšák [Fri, 8 Nov 2019 00:24:57 +0000 (19:24 -0500)]
st/mesa: call nir_serialize only once per shader

It was called twice.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agost/mesa: keep serialized NIR instead of nir_shader in st_program
Marek Olšák [Sat, 2 Nov 2019 03:55:58 +0000 (23:55 -0400)]
st/mesa: keep serialized NIR instead of nir_shader in st_program

This decreases memory usage, because serialized NIR is more compact.

If shader_has_one_variant is true and the shader is uncached, the first
variant is created from nir_shader, otherwise the first variant and
all other variants are created from serialized NIR.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agost/mesa: call nir_sweep in st_finalize_nir
Marek Olšák [Tue, 19 Nov 2019 21:35:59 +0000 (16:35 -0500)]
st/mesa: call nir_sweep in st_finalize_nir

This is invoked sooner before (pre-)compiling the first variant and is
also applied to fixed-func and ARB programs.

23 months agost/mesa: subclass st_vertex_program for VP-specific members
Marek Olšák [Sat, 2 Nov 2019 03:04:11 +0000 (23:04 -0400)]
st/mesa: subclass st_vertex_program for VP-specific members

Inheritance:
    gl_program -> st_program -> st_vertex_program

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agost/mesa: more cleanups after unification of st_vertex/common_program
Marek Olšák [Sat, 2 Nov 2019 03:21:14 +0000 (23:21 -0400)]
st/mesa: more cleanups after unification of st_vertex/common_program

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agost/mesa: rename occurences of stcp to stp to correspond to st_program
Marek Olšák [Sat, 2 Nov 2019 02:47:29 +0000 (22:47 -0400)]
st/mesa: rename occurences of stcp to stp to correspond to st_program

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
23 months agost/mesa: cleanups after unification of st_vertex/common program
Marek Olšák [Sat, 2 Nov 2019 02:46:11 +0000 (22:46 -0400)]
st/mesa: cleanups after unification of st_vertex/common program

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>