mesa.git
5 years agovulkan/wsi/x11: Increase the effective min. images for mailbox.
Bas Nieuwenhuizen [Mon, 20 May 2019 20:58:32 +0000 (22:58 +0200)]
vulkan/wsi/x11: Increase the effective min. images for mailbox.

We need 5 images:
1) CPU work
2) GPU work
3) idle
4) queued for flip
5) presenting

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agovulkan/wsi/x11: Wait for GPU work before present with mailbox.
Bas Nieuwenhuizen [Mon, 20 May 2019 01:10:46 +0000 (03:10 +0200)]
vulkan/wsi/x11: Wait for GPU work before present with mailbox.

Otherwise the wait only happens at flip time, which messes with
keeping idle buffers around if the GPU work makes the image miss
the next flip.

I decided not to use the wait fences as those are still xshm fences,
so that means we'd still have to wait in the application. Just doing
it before presenting makes things simpler.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agovulkan/wsi/x11: Allow using thread present-only.
Bas Nieuwenhuizen [Mon, 20 May 2019 00:59:00 +0000 (02:59 +0200)]
vulkan/wsi/x11: Allow using thread present-only.

This allows doing a potential long blocking operation before present.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agovulkan/wsi: Use one fence per image.
Bas Nieuwenhuizen [Mon, 20 May 2019 00:51:51 +0000 (02:51 +0200)]
vulkan/wsi: Use one fence per image.

Much easier to work with if we want to use them in the WS-specific
WSI implementation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agospirv: propagate access qualifiers through ssa & pointer
Lionel Landwerlin [Thu, 16 May 2019 12:06:27 +0000 (13:06 +0100)]
spirv: propagate access qualifiers through ssa & pointer

Not only variables can be flagged as NonUniformEXT but also
expressions. We're currently ignoring it in an expression such as :

   imageLoad(data[nonuniformEXT(rIndex)], 0)

The associated SPIRV :

   OpDecorate %69 NonUniformEXT
   ...
   %69 = OpLoad %61 %68

This changes propagates access qualifiers through ssa & pointers so
that when it hits a OpLoad/OpStore style instructions, qualifiers are
not forgotten.

Fixes failure the following tests :

   dEQP-VK.descriptor_indexing.*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8ed583fe523703 ("spirv: Handle the NonUniformEXT decoration")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agospirv: wrap push ssa/pointer values
Lionel Landwerlin [Mon, 1 Jul 2019 11:57:54 +0000 (14:57 +0300)]
spirv: wrap push ssa/pointer values

This refactor allows for common code to apply decoration on all
ssa/pointer values. In particular this will allow to propagage access
qualifiers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agonir: add access to image_deref intrinsics
Lionel Landwerlin [Thu, 16 May 2019 12:03:39 +0000 (13:03 +0100)]
nir: add access to image_deref intrinsics

SPIRV added the ability to access variables and have expressions non
dynamically uniform and because spirv_to_nir generates deref
instructions, we'll need to have that access there.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agomain: unreference ATIFragmentShader program before creating new one
Yevhenii Kolesnikov [Thu, 25 Jul 2019 15:15:24 +0000 (18:15 +0300)]
main: unreference ATIFragmentShader program before creating new one

Old program was overwritten without release of memory.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agostate_tracker: Add destroying routine for feedback and select stages
Yevhenii Kolesnikov [Wed, 24 Jul 2019 10:03:16 +0000 (13:03 +0300)]
state_tracker: Add destroying routine for feedback and select stages

Fixes leaking memory on iris.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agov3d: fix glDrawTransformFeedback{Instanced}()
Iago Toral Quiroga [Wed, 24 Jul 2019 08:14:33 +0000 (10:14 +0200)]
v3d: fix glDrawTransformFeedback{Instanced}()

This needs to take the vertex count from the provided transform
feedback buffer.

v2:
 - don't take the vertex count from the underlying buffer, instead,
   take it from a v3d subclass of pipe_stream_output_target (Eric).

Fixes piglit tests:
spec/ext_transform_feedback2/draw-auto
spec/ext_transform_feedback2/draw-auto instanced

Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agov3d: subclass pipe_streamout_output_target to record TF vertices written
Iago Toral Quiroga [Wed, 24 Jul 2019 07:59:25 +0000 (09:59 +0200)]
v3d: subclass pipe_streamout_output_target to record TF vertices written

Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agov3d: refactor v3d_tf_statistics_record slightly
Iago Toral Quiroga [Tue, 23 Jul 2019 09:28:52 +0000 (11:28 +0200)]
v3d: refactor v3d_tf_statistics_record slightly

Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agoRevert "panfrost: Don't DIY point size/coord fields"
Alyssa Rosenzweig [Thu, 25 Jul 2019 20:16:45 +0000 (13:16 -0700)]
Revert "panfrost: Don't DIY point size/coord fields"

This reverts commit 4508f43eed5a4528f0e8ca9d1cfcdc78857043e0, which
broke a bunch of dEQP tests (e.g. in
dEQP-GLES2.functional.draw.draw_arrays.*)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agoanv: Disable transform feedback on gen7
Jason Ekstrand [Thu, 25 Jul 2019 19:54:20 +0000 (14:54 -0500)]
anv: Disable transform feedback on gen7

It's totally implementable, it's just that the plumbing is a bit
different and we never hooked it up.  Don't advertise a broken feature.

Fixes: 36ee2fd61c8 "anv: Implement the basic form of VK_EXT_transform_feedback"
5 years agomesa: Fix GetTextureImage error reporting, again
Pierre-Eric Pelloux-Prayer [Tue, 23 Jul 2019 23:39:31 +0000 (16:39 -0700)]
mesa: Fix GetTextureImage error reporting, again

Iago Toral Quiroga fixed this in commit 94f740e3fce0cb26e4d90cb9de75b,
but it recently regressed in 0d8826f723cd8868b5271f17f18a1ab4548a1199.
Quoting Iago's original commit message for the fix:

GetTex*Image should return INVALID_ENUM if target is not valid, however,
GetTextureImage does not receive a target, and instead should return
INVALID_OPERATION if the effective target is not valid.  From the
OpenGL 4.6 core profile spec, section 8.11 Texture Queries:

   "An INVALID_OPERATION error is generated by GetTextureImage if the
    effective target is not one of TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY,
    TEXTURE_RECTANGLE, or TEXTURE_CUBE_MAP (for GetTextureImage only)."

Note that this differs from the original ARB_direct_state_access spec.

However, the EXT_direct_state_access version does take a target
parameter, so it should continue reporting INVALID_ENUM.

Fixes KHR-GL45.direct_state_access.textures_image_query_errors.

Fixes: 0d8826f723c ("mesa: refactor get_texture_image to remove duplicate code")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoiris: Use gen_mi_builder to handle CS ALU operations.
Kenneth Graunke [Mon, 1 Apr 2019 22:23:51 +0000 (15:23 -0700)]
iris: Use gen_mi_builder to handle CS ALU operations.

In a few cases, we switch to MI_MATH instead of MI_PREDICATE,
just because we were already doing math and it's easier to chain
together.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/mi: Add a unit test for gen_mi_store_if().
Kenneth Graunke [Wed, 17 Jul 2019 00:22:01 +0000 (17:22 -0700)]
intel/mi: Add a unit test for gen_mi_store_if().

This tests that predicated stores work.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/mi: Add a new gen_mi_store_if() helper.
Kenneth Graunke [Mon, 1 Apr 2019 23:33:08 +0000 (16:33 -0700)]
intel/mi: Add a new gen_mi_store_if() helper.

This performs predicated MI_STORE_REGISTER_MEM commands, assuming that
the condition is already loaded into MI_PREDICATE_DATA.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/mi: Add gen_mi_nz() and gen_mi_z() helpers.
Kenneth Graunke [Mon, 1 Apr 2019 23:01:50 +0000 (16:01 -0700)]
intel/mi: Add gen_mi_nz() and gen_mi_z() helpers.

These provide comparisons against zero.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/mi: Add a gen_mi_ior() to go with gen_mi_iand()
Kenneth Graunke [Wed, 10 Jul 2019 19:05:23 +0000 (12:05 -0700)]
intel/mi: Add a gen_mi_ior() to go with gen_mi_iand()

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/mi: Optimize away LOAD_REGISTER_REG from a register to itself
Kenneth Graunke [Mon, 1 Apr 2019 23:00:25 +0000 (16:00 -0700)]
intel/mi: Optimize away LOAD_REGISTER_REG from a register to itself

We might want to resolve something to be in a particular register,
so we can access it outside of the gen_mi framework...but it may already
be in that register, at which point there's no work to do.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoiris: Make iris_query.c a genxml-compiled file.
Kenneth Graunke [Mon, 1 Apr 2019 18:16:22 +0000 (11:16 -0700)]
iris: Make iris_query.c a genxml-compiled file.

This will let us use Jason's new MI-builder shortly.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoiris: Move iris_resolve_conditional_render to the vtable.
Kenneth Graunke [Mon, 1 Apr 2019 18:46:36 +0000 (11:46 -0700)]
iris: Move iris_resolve_conditional_render to the vtable.

It's going to be in genxml code shortly.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoiris: Refactor genxml macros and inlines into iris_genx_macros.h.
Kenneth Graunke [Fri, 12 Jul 2019 07:50:19 +0000 (00:50 -0700)]
iris: Refactor genxml macros and inlines into iris_genx_macros.h.

This will let us put the genxml boilerplate in one place, before we
expand genxml to more files shortly.  Like i965/genX_boilerplate.h.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoiris: Make an iris_genx_protos.h header for prototypes.
Kenneth Graunke [Mon, 1 Apr 2019 18:40:33 +0000 (11:40 -0700)]
iris: Make an iris_genx_protos.h header for prototypes.

This lets us specify the prototypes once, instead of cut and pasting
them per generation.  isl uses a similar approach (isl_genX_priv.h).

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoradeonsi: fix DAL hang due to incorrect DCC offset on Raven
Marek Olšák [Wed, 24 Jul 2019 02:32:02 +0000 (22:32 -0400)]
radeonsi: fix DAL hang due to incorrect DCC offset on Raven

Set the correct relative offset.

Fixes: f8b6c5a "radeonsi: rewrite si_get_opaque_metadata, also for gfx10 support"
5 years agoanv: Disable subgroup arithmetic on gen7
Jason Ekstrand [Thu, 25 Jul 2019 05:00:37 +0000 (00:00 -0500)]
anv: Disable subgroup arithmetic on gen7

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agogitlab-ci: Add a shader-db run using v3d on drm-shim.
Eric Anholt [Wed, 10 Apr 2019 22:59:12 +0000 (15:59 -0700)]
gitlab-ci: Add a shader-db run using v3d on drm-shim.

This provides significant compiler coverage during CI at a fairly low
cost in CPU time (~17s per thread for 4 threads on
gst-gitlab-htz-runner3).

I'm leaving wget in the docker image, as once this is in master I'm
planning on having an automatic shader-db comparison between master
and the branch included in the artifacts.  I also haven't done
freedreno yet, because it has some races when run in multithreaded
mode that I'm still tracking down.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
5 years agogitlab-ci: Only keep the build logs as artifacts.
Eric Anholt [Wed, 24 Jul 2019 16:27:48 +0000 (09:27 -0700)]
gitlab-ci: Only keep the build logs as artifacts.

On a build failure, we were tarring up the whole ccache directory,
build.ninja, build products, etc.  This was over 400MB compressed on a
recent early meson-main build failure, which fd.o then has to hang on
to for 4 weeks.  The build logs are probably the interesting part, are
potentially useful regardless ("how did CI's build flags differ from
mine?"), and are <500k uncompressed on my personal meson build.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
5 years agogitlab-ci: Always set libdir to lib/
Eric Anholt [Tue, 23 Jul 2019 18:12:07 +0000 (11:12 -0700)]
gitlab-ci: Always set libdir to lib/

I introduced libdir for cross-builds so we could point at the
resulting drivers without per-arch dependencies, but I'd rather not
have to type x86_64-linux-whatever for non-cross-builds either.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
5 years agofreedreno: Add support for drm-shim.
Eric Anholt [Mon, 13 May 2019 21:03:07 +0000 (14:03 -0700)]
freedreno: Add support for drm-shim.

I'm using this for shader-db analysis on x86_64 systems.

Reviewed-by: Rob Clark <robdclark@gmail.com>
5 years agov3d: Introduce a DRM shim for calling out to the simulator.
Eric Anholt [Wed, 26 Sep 2018 02:15:45 +0000 (19:15 -0700)]
v3d: Introduce a DRM shim for calling out to the simulator.

The goal is to enable testing of parts of drivers without depending on any
particular kernel version or hardware being present.

Simply set LD_PRELOAD=$PREFIX/lib/libv3d_drm_shim.so in your environment,
and we'll fake a /dev/dri/renderD128 (or whatever the next available node
is) using v3dv3.  That node can then be used with the surfaceless or gbm
EGL platforms.

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agoglsl: report no function instead of empty candidate list
Erik Faye-Lund [Thu, 13 Jun 2019 10:03:27 +0000 (12:03 +0200)]
glsl: report no function instead of empty candidate list

When generating the error message for a missing function error where
all available overloads were missing due to a too low GLSL version, we
used to report something like this:

---8<---
0:224(14): error: no matching function for call to
           `textureCubeLod(samplerCube, vec3, float)'; candidates are:
0:224(14): error: type mismatch
---8<---

This is a pretty confusing error message, and can throw people off when
debugging. So let's instead check if any overload is available before we
decide what to print. This allow us to report something like this
instead:

---8<---
0:224(14): error: no function with name 'textureCubeLod'
0:224(14): error: type mismatch
---8<---

This is arguably easier to understand for programmers, and doesn't send
you on a wild goose chase to figure out what argument is wrong just
because you stopped reading the message prematurely. I'm of course
referring to a friend, not me. For sure. I would never do that.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agoradv: Set correct metadata size for GFX9+.
Bas Nieuwenhuizen [Thu, 25 Jul 2019 14:53:34 +0000 (16:53 +0200)]
radv: Set correct metadata size for GFX9+.

Without correct size, radeonsi assumes the metadata is incorrect,
which can and will cause issues.

Since the metadata is really incorrect without the size, let us
fix that.

Fixes: e43cc3e3afc "radv/gfx9: handle GFX9 opaque metadata"
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agoanv: report HOST_ALLOCATION as supported for images
Arcady Goldmints-Orlov [Tue, 23 Jul 2019 19:36:48 +0000 (14:36 -0500)]
anv: report HOST_ALLOCATION as supported for images

Report VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT as
supported for images. It was being shown supported for buffers, but not
images.

Fixes: 69cc6272fbc1 ("anv: Implement VK_EXT_external_memory_host")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agoradv/gfx10: fix intensity formats by setting ALPHA_IS_ON_MSB
Samuel Pitoiset [Wed, 24 Jul 2019 14:50:38 +0000 (16:50 +0200)]
radv/gfx10: fix intensity formats by setting ALPHA_IS_ON_MSB

This fixes
dEQP-VK.rasterization.primitive_size.points.point_size_*

This also fixes some black squares with the Sascha SSAO demo.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: use L2 for DMA copy/fill operations
Samuel Pitoiset [Thu, 25 Jul 2019 13:38:51 +0000 (15:38 +0200)]
radv/gfx10: use L2 for DMA copy/fill operations

It's coherent and faster. GFX7-GFX9 should also support this but
for now only uses L2 for GFX10 because it's untested on previous gens.

This fixes dEQP-VK.memory.pipeline_barrier.transfer_*

This also fixes some missing geometry in Dawn Of War III because
VBOs weren't updated correctly.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agopan/midgard: Optimize varying projection
Alyssa Rosenzweig [Wed, 24 Jul 2019 22:37:24 +0000 (15:37 -0700)]
pan/midgard: Optimize varying projection

We add a new opt pass fusing perspective projection with varyings. Minor
win..? We don't combine non-varying projections, since if we're too
agressive, the extra load/store traffic will hurt us so it's not really
a win in practice.

total instructions in shared programs: 3915 -> 3913 (-0.05%)
instructions in affected programs: 76 -> 74 (-2.63%)
helped: 1
HURT: 0

total bundles in shared programs: 2520 -> 2519 (-0.04%)
bundles in affected programs: 46 -> 45 (-2.17%)
helped: 1
HURT: 0

total quadwords in shared programs: 4027 -> 4025 (-0.05%)
quadwords in affected programs: 80 -> 78 (-2.50%)
helped: 1
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add perspective projection recombine pass
Alyssa Rosenzweig [Wed, 24 Jul 2019 03:02:56 +0000 (20:02 -0700)]
pan/midgard: Add perspective projection recombine pass

We don't use it yet, since it's actually a shader-db regression. This is
primarily helpful as an intermediate step for attaching projection to
varyings.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Force perspective ops to use vec4
Alyssa Rosenzweig [Wed, 24 Jul 2019 22:36:46 +0000 (15:36 -0700)]
pan/midgard: Force perspective ops to use vec4

It doesn't make sense to use them with anything less.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add R27-only op handling
Alyssa Rosenzweig [Wed, 24 Jul 2019 21:58:46 +0000 (14:58 -0700)]
pan/midgard: Add R27-only op handling

We use a special conflicting register class.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add OP_R27_ONLY helper
Alyssa Rosenzweig [Wed, 24 Jul 2019 21:52:57 +0000 (14:52 -0700)]
pan/midgard: Add OP_R27_ONLY helper

While load/store ops like st_vary can take an argument in either
r26/r27, ops like those for perspective projection must specifically
take their argument in r27.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Enable RA for st_vary
Alyssa Rosenzweig [Wed, 24 Jul 2019 19:54:59 +0000 (12:54 -0700)]
pan/midgard: Enable RA for st_vary

Now that all the piping is in place to do so without regressions, we
flip on automatic register allocation for varyings. Hooray!

total instructions in shared programs: 4025 -> 3915 (-2.73%)
instructions in affected programs: 1667 -> 1557 (-6.60%)
helped: 62
HURT: 0
helped stats (abs) min: 1 max: 3 x̄: 1.77 x̃: 2
helped stats (rel) min: 0.93% max: 20.00% x̄: 10.80% x̃: 10.64%
95% mean confidence interval for instructions value: -1.89 -1.66
95% mean confidence interval for instructions %-change: -12.50% -9.11%
Instructions are helped.

total bundles in shared programs: 2683 -> 2520 (-6.08%)
bundles in affected programs: 1066 -> 903 (-15.29%)
helped: 62
HURT: 0
helped stats (abs) min: 1 max: 3 x̄: 2.63 x̃: 3
helped stats (rel) min: 2.94% max: 42.86% x̄: 23.85% x̃: 22.50%
95% mean confidence interval for bundles value: -2.83 -2.43
95% mean confidence interval for bundles %-change: -27.73% -19.97%
Bundles are helped.

total quadwords in shared programs: 4192 -> 4027 (-3.94%)
quadwords in affected programs: 1584 -> 1419 (-10.42%)
helped: 62
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 2.66 x̃: 3
helped stats (rel) min: 1.85% max: 30.00% x̄: 16.49% x̃: 16.52%
95% mean confidence interval for quadwords value: -2.87 -2.46
95% mean confidence interval for quadwords %-change: -19.14% -13.84%
Quadwords are helped.

total registers in shared programs: 433 -> 411 (-5.08%)
registers in affected programs: 67 -> 45 (-32.84%)
helped: 23
HURT: 1
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 25.00% max: 50.00% x̄: 41.30% x̃: 50.00%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 14.29% max: 14.29% x̄: 14.29% x̃: 14.29%
95% mean confidence interval for registers value: -1.09 -0.74
95% mean confidence interval for registers %-change: -45.45% -32.52%
Registers are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Remove check for `class`
Alyssa Rosenzweig [Wed, 24 Jul 2019 21:10:12 +0000 (14:10 -0700)]
pan/midgard: Remove check for `class`

Fixes classes defaulting to vec4 in some cases.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Move uniforms to special registers
Alyssa Rosenzweig [Wed, 24 Jul 2019 20:29:36 +0000 (13:29 -0700)]
pan/midgard: Move uniforms to special registers

The load/store pipes can't take a uniform register in, so an explicit
move is necessary here.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Emit st_vary registers in install_registers
Alyssa Rosenzweig [Wed, 24 Jul 2019 19:53:58 +0000 (12:53 -0700)]
pan/midgard: Emit st_vary registers in install_registers

Now that we have its registers handled normally like the rest of the IR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add mir_lower_special_reads helper
Alyssa Rosenzweig [Wed, 24 Jul 2019 19:53:08 +0000 (12:53 -0700)]
pan/midgard: Add mir_lower_special_reads helper

Given the constraints on special registers, we add a helper for lowering
these by inserting moves (copies) where needed to satsify the ISA
constraints.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add emit_explicit_constant helper
Alyssa Rosenzweig [Wed, 24 Jul 2019 19:52:27 +0000 (12:52 -0700)]
pan/midgard: Add emit_explicit_constant helper

We generalize the constant emission helper used in fragment writeout as
we'll also need it for vertex outputs.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add mir_rewrite_index_src_tag
Alyssa Rosenzweig [Wed, 24 Jul 2019 19:51:51 +0000 (12:51 -0700)]
pan/midgard: Add mir_rewrite_index_src_tag

Specialized version of a rewrite that only rewrites a certain type of
instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add class check
Alyssa Rosenzweig [Wed, 24 Jul 2019 18:33:26 +0000 (11:33 -0700)]
pan/midgard: Add class check

This ensures the rules for accessing special register classes are
satisfied. This is asserted as a prepass should have lowered offending
uses to something satisfying these rules. Special register classes are
*not* work registers and cannot be used for RMW operations; they are
essentially 1-way pipes straight into/from fixed-function logic in the
shader cores.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Implement class spilling
Alyssa Rosenzweig [Wed, 24 Jul 2019 18:16:48 +0000 (11:16 -0700)]
pan/midgard: Implement class spilling

We reuse the same register spilling mechanism as for work->memory to
spill special->work registers, e.g. to allow writing out more than 2
vec4 varyings (without better scheduling anyway).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Extend liveness analysis to st_vary
Alyssa Rosenzweig [Wed, 24 Jul 2019 18:16:15 +0000 (11:16 -0700)]
pan/midgard: Extend liveness analysis to st_vary

These can consume sources now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Implement load/store register classing
Alyssa Rosenzweig [Wed, 24 Jul 2019 17:03:24 +0000 (10:03 -0700)]
pan/midgard: Implement load/store register classing

This does not yet support special->work spilling, nor does it support
multiclass breakup. These corner cases will be handled in succeeding
commits.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Allocate special register classes
Alyssa Rosenzweig [Wed, 24 Jul 2019 15:31:46 +0000 (08:31 -0700)]
pan/midgard: Allocate special register classes

We'll want to also handle load/store and texture registers in our RA
loop.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Move copy propagation into its own file
Alyssa Rosenzweig [Wed, 24 Jul 2019 14:23:19 +0000 (07:23 -0700)]
pan/midgard: Move copy propagation into its own file

We also expose some utilities it uses as general MIR helpers.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add mir_simple_swizzle helper
Alyssa Rosenzweig [Wed, 24 Jul 2019 03:02:06 +0000 (20:02 -0700)]
pan/midgard: Add mir_simple_swizzle helper

Checks for x/xy/xyz/xyzw style swizzles (slightly more general but you
get the idea).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add mir_single_use helper
Alyssa Rosenzweig [Wed, 24 Jul 2019 03:01:44 +0000 (20:01 -0700)]
pan/midgard: Add mir_single_use helper

Helps as an optimization heuristic.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Compute I/O counts from shader_info
Alyssa Rosenzweig [Wed, 24 Jul 2019 00:02:38 +0000 (17:02 -0700)]
panfrost: Compute I/O counts from shader_info

...rather than exposing it in the vendored compiler region.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Don't DIY point size/coord fields
Alyssa Rosenzweig [Tue, 23 Jul 2019 23:55:38 +0000 (16:55 -0700)]
panfrost: Don't DIY point size/coord fields

Again, it's in shader_info for us!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Use nir_gather_info information about discards
Alyssa Rosenzweig [Tue, 23 Jul 2019 23:52:40 +0000 (16:52 -0700)]
panfrost: Use nir_gather_info information about discards

No need to track this ourselves!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Use NIR helper invocations info
Alyssa Rosenzweig [Tue, 23 Jul 2019 23:49:37 +0000 (16:49 -0700)]
panfrost: Use NIR helper invocations info

We don't need to guesstimate this ourselves. This will help when we
bringup derivatives.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost/sfbd: Flesh out fragment job
Alyssa Rosenzweig [Wed, 24 Jul 2019 15:39:39 +0000 (08:39 -0700)]
panfrost/sfbd: Flesh out fragment job

We include a zsbuf attachment function based on how the corresponding
MFBD code works, as well as extending cbufs to mipmapped rendering while
we're at it.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Disable tiled formats on SFBD systems
Alyssa Rosenzweig [Wed, 24 Jul 2019 15:41:04 +0000 (08:41 -0700)]
panfrost: Disable tiled formats on SFBD systems

Just because we don't have the format codes to render to them yet.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Move require_sfbd to screen
Alyssa Rosenzweig [Wed, 24 Jul 2019 15:46:15 +0000 (08:46 -0700)]
panfrost: Move require_sfbd to screen

We'll need it to specialize resource creation by chip.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Reserve, but do not upload, shader padding
Alyssa Rosenzweig [Tue, 23 Jul 2019 17:14:46 +0000 (10:14 -0700)]
panfrost: Reserve, but do not upload, shader padding

Fixes invalid read errors reported by valgrind.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agoutil/ra: Add a getter for a node class
Alyssa Rosenzweig [Wed, 24 Jul 2019 18:19:21 +0000 (11:19 -0700)]
util/ra: Add a getter for a node class

Complements the existing getters and the setter for node class. To be
used in the Panfrost RA refactor.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agopanfrost/ci: Update kernel to 5.2
Tomeu Vizoso [Thu, 25 Jul 2019 09:58:08 +0000 (11:58 +0200)]
panfrost/ci: Update kernel to 5.2

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agoegl: Also query modifiers when exporting DMABuf
Nicolas Dufresne [Sun, 14 Jul 2019 18:48:11 +0000 (14:48 -0400)]
egl: Also query modifiers when exporting DMABuf

This fixes eglExportDMABUFImageQueryMESA() so it will report the
modififers of the underlying image. Without this information,
re-importing will likely be broken as it is rare these days that no
modifiers are used.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Fixes: 8f7338f284cdb1fef64c ("egl: add initial EGL_MESA_image_dma_buf_export v2.4")
5 years agomesa: Enable GL_MESA_framebuffer_flip_y for GL 4.3
Heinrich Fink [Tue, 4 Jun 2019 15:19:47 +0000 (17:19 +0200)]
mesa: Enable GL_MESA_framebuffer_flip_y for GL 4.3

Extend MESA_framebuffer_flip_y to be used with OpenGL versions 4.3 and
higher. OpenGL 4.3 adds FramebufferParameteri needed by this extension.

Reviewed-by: Fritz Koenig <frkoenig@google.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agopanfrost: Don't expose some atomic stuff even with dEQP
Alyssa Rosenzweig [Wed, 24 Jul 2019 02:18:44 +0000 (19:18 -0700)]
panfrost: Don't expose some atomic stuff even with dEQP

Fixes dEQP crashes.

Fixes: 2f93ecd654e ("panfrost: Fake CAPs for dEQP-GLES31")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agogallium: fix windows build from params change.
Dave Airlie [Wed, 24 Jul 2019 23:33:36 +0000 (09:33 +1000)]
gallium: fix windows build from params change.

This is why we can't have nice things. I'm sure there's someway
to do this with {0} but I really don't have time for that.

Fixes: 2631fd3b0bf ("gallivm: rework lp_build_tgsi_soa to take a struct")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agonir/algebraic: add scmp algebraic optimizations
Jonathan Marek [Wed, 24 Jul 2019 17:33:17 +0000 (13:33 -0400)]
nir/algebraic: add scmp algebraic optimizations

When 'x' is the result of a scmp op:

x != 0.0 or x == 1.0: passthrough
x == 0.0 or x != 1.0: invert

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agonir/algebraic: add option to lower fall_equalN/fany_nequalN
Jonathan Marek [Sun, 2 Jun 2019 22:44:49 +0000 (18:44 -0400)]
nir/algebraic: add option to lower fall_equalN/fany_nequalN

Add generic lowerings for fall_equalN/fany_nequalN. These should be optimal
for vec4 backends that doesn't have any special instructions for it, as
long as they support saturate.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agonir/algebraic: add fdot2 optimizations
Jonathan Marek [Fri, 21 Jun 2019 01:56:29 +0000 (21:56 -0400)]
nir/algebraic: add fdot2 optimizations

Add simple fdot2 optimizations that are missing.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agonir/algebraic: add option to lower fdph
Jonathan Marek [Fri, 21 Jun 2019 01:47:16 +0000 (21:47 -0400)]
nir/algebraic: add option to lower fdph

For backends that don't have a 'fdph' instructions

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agonir: replace lower_sincos with algebraic opt
Jonathan Marek [Wed, 8 May 2019 14:26:49 +0000 (10:26 -0400)]
nir: replace lower_sincos with algebraic opt

This version has less ops for the same precision.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
5 years agonir/algebraic: allow swizzle in nir_algebraic replace expression
Jonathan Marek [Fri, 21 Jun 2019 01:23:53 +0000 (21:23 -0400)]
nir/algebraic: allow swizzle in nir_algebraic replace expression

This is to allow optimizations in nir_opt_algebraic not otherwise possible

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
5 years agogallium/u_transfer_helper: fix assert in RGTC case
Rob Clark [Mon, 22 Jul 2019 21:23:52 +0000 (14:23 -0700)]
gallium/u_transfer_helper: fix assert in RGTC case

Previously we'd hit the unreachable() for uploading RGTC.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agomain: Free memory allocated for gl_bitmap_atlas structure
Yevhenii Kolesnikov [Tue, 23 Jul 2019 15:35:29 +0000 (18:35 +0300)]
main: Free memory allocated for gl_bitmap_atlas structure

Structure itself wasn't freed during context tear-down, causing a
memory leak on iris.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
5 years agonir,intel: lower if (cond) demote() to new intrinsic demote_if(cond)
Daniel Schürmann [Thu, 18 Jul 2019 11:39:49 +0000 (13:39 +0200)]
nir,intel: lower if (cond) demote() to new intrinsic demote_if(cond)

This will effectively enable the optimization in anv.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
5 years agoi965: Use NIR to lower legacy userclipping.
Kenneth Graunke [Sun, 21 May 2017 08:36:14 +0000 (01:36 -0700)]
i965: Use NIR to lower legacy userclipping.

This allows us to drop legacy userclip plane handling in both the vec4
and FS backends, and simplifies a few interfaces.

v2 (Jason Ekstrand):
 - Move brw_nir_lower_legacy_clipping to brw_nir_uniforms.cpp because
   it's i965-specific.
 - Handle adding the params in brw_nir_lower_legacy_clipping
 - Call brw_nir_lower_legacy_clipping from brw_codegen_vs_prog

Co-authored-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoanv: Implement VK_EXT_subgroup_size_control
Jason Ekstrand [Thu, 21 Feb 2019 20:50:10 +0000 (14:50 -0600)]
anv: Implement VK_EXT_subgroup_size_control

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoanv/pipeline: Plumb pipeline shader stage create flags
Jason Ekstrand [Fri, 22 Feb 2019 21:21:13 +0000 (15:21 -0600)]
anv/pipeline: Plumb pipeline shader stage create flags

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/compiler: Allow for required subgroup sizes
Jason Ekstrand [Tue, 9 Jul 2019 19:28:18 +0000 (14:28 -0500)]
intel/compiler: Allow for required subgroup sizes

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/compiler: Allow for varying subgroup sizes
Jason Ekstrand [Fri, 22 Feb 2019 21:28:24 +0000 (15:28 -0600)]
intel/compiler: Allow for varying subgroup sizes

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agonir/lower_subgroups: Properly lower masks when subgroup_size == 0
Jason Ekstrand [Thu, 11 Jul 2019 03:20:00 +0000 (22:20 -0500)]
nir/lower_subgroups: Properly lower masks when subgroup_size == 0

Instead of building a constant mask (which depends on knowing the
subgroup size), we build an expression.  Because the pass uses the
nir_shader_lower_instructions helper, subgroup lowering will be run on
any newly emitted instructions as well as the previously existing
instructions.  In particular, if the subgroup size is known, the newly
emitted subgroup_size intrinsic will get turned into a constant and a
later constant folding pass will clean it up.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agovulkan: Update the XML and headers to 1.1.116
Jason Ekstrand [Thu, 4 Jul 2019 20:10:23 +0000 (15:10 -0500)]
vulkan: Update the XML and headers to 1.1.116

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/compiler: Be more conservative about subgroup sizes in GL
Jason Ekstrand [Fri, 22 Feb 2019 16:48:39 +0000 (10:48 -0600)]
intel/compiler: Be more conservative about subgroup sizes in GL

The rules for gl_SubgroupSize in Vulkan require that it be a constant
that can be queried through the API.  However, all GL requires is that
it's a uniform.  Instead of always claiming that the subgroup size in
the shader is 32 in GL like we have to do for Vulkan, claim 8 for
geometry stages, the maximum for fragment shaders, and the actual size
for compute.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/compiler: Lower gl_SubgroupSize in postprocess_nir
Jason Ekstrand [Thu, 21 Feb 2019 21:29:12 +0000 (15:29 -0600)]
intel/compiler: Lower gl_SubgroupSize in postprocess_nir

Instead of lowering the subgroup size so early, wait until we have more
information.  In particular, we're going to want different subgroup
sizes from different stages depending on the API.  We also defer
lowering of subgroup masks because the ge/gt masks require the subgroup
size to generate a subgroup mask.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agointel/nir: Make brw_nir_apply_sampler_key more generic
Jason Ekstrand [Fri, 22 Feb 2019 17:15:21 +0000 (11:15 -0600)]
intel/nir: Make brw_nir_apply_sampler_key more generic

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agonir: Add lowering for nir_op_irem and nir_op_imod
Sagar Ghuge [Tue, 16 Apr 2019 06:06:23 +0000 (23:06 -0700)]
nir: Add lowering for nir_op_irem and nir_op_imod

Tested on Gen > 9.

v2: 1) Fix lowering
    2) Keep a consistent i/u order (Matt Turner)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agomain: Fix memleaks in mesa_use_program
Yevhenii Kolesnikov [Thu, 11 Jul 2019 10:00:46 +0000 (13:00 +0300)]
main: Fix memleaks in mesa_use_program

Add freeing of SubroutineIndexes to the _mesa_free_shader_state.

Fixes: 4566aaaa5b1 ("mesa/subroutines: start adding per-context
subroutine index support (v1.1)")
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agointel/compiler: don't use a keyword struct for a class fs_reg
Andrii Simiklit [Tue, 23 Jul 2019 11:48:58 +0000 (14:48 +0300)]
intel/compiler: don't use a keyword struct for a class fs_reg

warning: struct 'fs_reg' was previously declared as a class
Fixes: e64be391 ("intel/compiler: generalize the combine constants pass")
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
5 years agolima/ppir: fix disassembler temp read/write print
Qiang Yu [Sat, 20 Jul 2019 10:11:07 +0000 (18:11 +0800)]
lima/ppir: fix disassembler temp read/write print

temp read/write use negtive offset, and handle
alignment==1 case.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
5 years agogallium+mesa: fix tgsi_semantic array type
Eric Engestrom [Tue, 23 Jul 2019 09:01:44 +0000 (10:01 +0100)]
gallium+mesa: fix tgsi_semantic array type

Fixes: ed23335a313dfc9cec26 ("gallium: use enums in p_shader_tokens.h (v2)")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoutil: fix no-op macro (bad number of arguments)
Eric Engestrom [Tue, 23 Jul 2019 09:03:26 +0000 (10:03 +0100)]
util: fix no-op macro (bad number of arguments)

Fixes: b8e077daee4d6369d774 ("util: no-op __builtin_types_compatible_p() for non-GCC compilers")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agoradv/gfx10: enable VK_EXT_transform_feedback
Samuel Pitoiset [Tue, 23 Jul 2019 12:53:34 +0000 (14:53 +0200)]
radv/gfx10: enable VK_EXT_transform_feedback

When a pipeline uses transform feedback, the driver fallbacks to
the legacy path because NGG support for streamout is a non-trivial
amount of work.

AMDVLK also uses the legacy path for streamout, while RadeonSI
uses the new NGG path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: do not enable NGG if a pipeline uses XFB
Samuel Pitoiset [Tue, 23 Jul 2019 13:12:42 +0000 (15:12 +0200)]
radv/gfx10: do not enable NGG if a pipeline uses XFB

NGG GS for streamout requires a bunch of work, so enable it with
the legacy path only for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: emit streamout shader config
Samuel Pitoiset [Tue, 23 Jul 2019 12:55:16 +0000 (14:55 +0200)]
radv/gfx10: emit streamout shader config

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: declare streamout user SGPRs
Samuel Pitoiset [Tue, 23 Jul 2019 12:53:45 +0000 (14:53 +0200)]
radv/gfx10: declare streamout user SGPRs

Required for legacy streamout.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>