mesa.git
5 years agost/nine: Refactor shader constants ureg_src computation
Axel Davy [Sun, 20 Jan 2019 19:57:01 +0000 (20:57 +0100)]
st/nine: Refactor shader constants ureg_src computation

Put the shader constant code in one place to better change
that code in future commits.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Manually upload vs and ps constants
Axel Davy [Sun, 20 Jan 2019 19:44:17 +0000 (20:44 +0100)]
st/nine: Manually upload vs and ps constants

In future commits we will introduce more fine-grained
uploads

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: use helper ureg_DECL_sampler everywhere
Axel Davy [Sun, 20 Jan 2019 10:25:47 +0000 (11:25 +0100)]
st/nine: use helper ureg_DECL_sampler everywhere

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Compact pixel shader key
Axel Davy [Sun, 13 Jan 2019 21:25:46 +0000 (22:25 +0100)]
st/nine: Compact pixel shader key

Compact the shader key to make room for new
elements.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Compact nine_ff_get_projected_key
Axel Davy [Sun, 13 Jan 2019 21:16:35 +0000 (22:16 +0100)]
st/nine: Compact nine_ff_get_projected_key

Only the first four sampler slots can be used
by ff ps < 0x14, thus the size of the key
can be reduced.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Refactor param->rel
Axel Davy [Thu, 5 Apr 2018 20:38:03 +0000 (22:38 +0200)]
st/nine: Refactor param->rel

Refactor param->rel to enable different paths
for constants and inputs relative addressing.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Regroup param->rel tests
Axel Davy [Thu, 5 Apr 2018 20:31:27 +0000 (22:31 +0200)]
st/nine: Regroup param->rel tests

Regroup all the param->rel assertions into one assertion for better clarity
and better covering.
param->rel on an input can only happen with float constants for vs,
or with inputs on vs/ps 3.0.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Control shader constant inlining with drirc
Axel Davy [Sat, 27 Apr 2019 16:30:02 +0000 (18:30 +0200)]
st/nine: Control shader constant inlining with drirc

Until we use async shader compilation for constant inlining,
don't enable it unless user asks for it.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Recompile optimized shaders based on b/i consts
Axel Davy [Sun, 8 Apr 2018 15:06:00 +0000 (17:06 +0200)]
st/nine: Recompile optimized shaders based on b/i consts

Boolean and Integer constants are used in d3d9 for flow control.

Boolean are used for if/then/else and Integer constants
for loops.
The compilers can generate better code if these values are known
at compilation.
I haven't met so far a game that would change the values of these
constants frequently (and when they do, they set to the values used
for the previous draw call, and thus the changes get filtered out).

Thus it makes sense to inline these constants and recompile the shaders.
The commit sets a bound to the number of variants for a given shader
to avoid too many shaders to be generated.

One drawback is it means more shader compilations. It would probably
make sense to compile these shaders asynchronously or let the user
control the behaviour with an env var, but this is not done here.

The games I tested hit very few shader variants, and the performance
impact was negligible, but it could help for games with uber shaders.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agodrirc: Add Gallium nine workaround for Rayman Legends
Axel Davy [Sat, 27 Apr 2019 17:18:00 +0000 (19:18 +0200)]
drirc: Add Gallium nine workaround for Rayman Legends

The game requires it to display many textures properly.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Add drirc option to use data_internal for dynamic textures
Axel Davy [Wed, 10 Apr 2019 21:09:08 +0000 (23:09 +0200)]
st/nine: Add drirc option to use data_internal for dynamic textures

dynamic textures seem to have predictable stride. This stride
should be the same as for a ram buffer.

It seems some game don't check the actual stride value, assuming
it to be the expected one.
Thus this workaround (protected by drirc option) is to use an intermediate
ram buffer.

Fixes Rayman Legends texture issues when enabled.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Support internal compressed format for volumes
Axel Davy [Wed, 10 Apr 2019 21:05:58 +0000 (23:05 +0200)]
st/nine: Support internal compressed format for volumes

Reuse the generic path to support compressed formats.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Support internal compressed format for surfaces
Axel Davy [Wed, 10 Apr 2019 21:03:06 +0000 (23:03 +0200)]
st/nine: Support internal compressed format for surfaces

Reuse the generic path to support compressed formats.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Refactor volume GetSystemMemPointer
Axel Davy [Wed, 10 Apr 2019 20:53:02 +0000 (22:53 +0200)]
st/nine: Refactor volume GetSystemMemPointer

It will make it easier to reuse in another place.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Refactor surface GetSystemMemPointer
Axel Davy [Wed, 10 Apr 2019 20:48:51 +0000 (22:48 +0200)]
st/nine: Refactor surface GetSystemMemPointer

It will make it easier to reuse in another place.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: rename *_conversion to *_internal
Axel Davy [Wed, 10 Apr 2019 20:38:43 +0000 (22:38 +0200)]
st/nine: rename *_conversion to *_internal

Rename these variables to a new name which will
fit new usages introduced in later commits.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Optimize volume upload with conversion
Axel Davy [Wed, 10 Apr 2019 20:21:48 +0000 (22:21 +0200)]
st/nine: Optimize volume upload with conversion

Use nine_context_box_upload instead of locking the pipe
for volume upload with format conversion.
nine_context_box_upload already handles format
conversion.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Optimize surface upload with conversion
Axel Davy [Wed, 10 Apr 2019 20:16:54 +0000 (22:16 +0200)]
st/nine: Optimize surface upload with conversion

Use nine_context_box_upload instead of locking the pipe
for surface upload with format conversion.
nine_context_box_upload already handles format
conversion.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Fix SINCOS input
Axel Davy [Sat, 13 Apr 2019 10:25:57 +0000 (12:25 +0200)]
st/nine: Fix SINCOS input

SINCOS takes an input with replicated swizzle.
the swizzle can be on any component, not just x.
Enable it to read from any component, but also
use a temporary register to avoid dst/src aliasing.

No known game is fixed by this change as it seems
the input swizzle is commonly on x for this instruction,
and src and dst don't alias.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Ignore nooverwrite for systemmem
Axel Davy [Fri, 12 Apr 2019 22:39:59 +0000 (00:39 +0200)]
st/nine: Ignore nooverwrite for systemmem

Systemmem has a specific behaviour we don't
mimick exactly.
That makes Halo feel free to use nooverwrite
with it all the time, even when reading again
at the same location.
Ignore nooverwrite to have proper synchronization.

Fixes: https://github.com/iXit/Mesa-3D/issues/348
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Enable modifiers on ps 1.X texcoords
Axel Davy [Wed, 10 Apr 2019 19:07:29 +0000 (21:07 +0200)]
st/nine: Enable modifiers on ps 1.X texcoords

For many ps 1.X instructions, we were reading the
texcoords directly, instead of through tx_src_param,
resulting in modifiers getting ignored.
Use tx_src_param for all these instructions.

Fixes: https://github.com/iXit/Mesa-3D/issues/337
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Always return OK on SetSoftwareVertexProcessing
Axel Davy [Tue, 9 Apr 2019 21:57:37 +0000 (23:57 +0200)]
st/nine: Always return OK on SetSoftwareVertexProcessing

This would need more tests to know exactly
if INVALIDCALL can be returned in some
situations.
It seems some games expect D3D_OK,
even when noop and illegal.

Fixes:
https://github.com/iXit/Mesa-3D/issues/302
https://github.com/iXit/Mesa-3D/issues/338

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Finish if nooverwrite after normal mapping
Axel Davy [Wed, 24 Apr 2019 21:58:38 +0000 (23:58 +0200)]
st/nine: Finish if nooverwrite after normal mapping

d3d's nooverwrite and gallium's unsynchronized
have different semantics.
Indeed nooverwrite says the applications won't
write to locations needed by previous draws,
which is less strong than unsynchronized which
won't synchronize previous writes.

Thus in case app is locking without discard/nooverwrite,
then using nooverwrite, we need to add a
synchronization.

Fixes: https://github.com/iXit/wine-nine-standalone/issues/29
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Fix buffer/texture unbinding in nine_state_clear
Axel Davy [Thu, 4 Apr 2019 21:08:35 +0000 (23:08 +0200)]
st/nine: Fix buffer/texture unbinding in nine_state_clear

Previously nine_state_clear was not using
NineBindBufferToDevice and NineBindTextureToDevice
to unbind buffers and textures (but used nine_bind)

This was resulting in an uncorrect bind count for these
resources.

Combined with
0ec4e5f630ed68ece3f176b174cfd66eff023904
Some buffers were scheduled to be uploaded directly
after they were locked (because the bind count incorrectly
assumed they were needed for the next draw call),
which resulted in uploads before the data was written.

To simplify a bit the code (and because I needed to
add a pointer to device),
remove the stateblock usage from nine_state_clear and
rename to nine_device_state_clear.

Fixes:
https://github.com/iXit/Mesa-3D/issues/345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Upload managed buffers only at draw using them
Axel Davy [Thu, 4 Apr 2019 21:06:44 +0000 (23:06 +0200)]
st/nine: Upload managed buffers only at draw using them

When a draw call is emited, buffers in the
device->update_buffers list are uploaded.

This patch removes buffers from the list if they
are not bound anymore.

Behaviour found studying:
https://github.com/iXit/Mesa-3D/issues/345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Upload managed textures only at draw using them
Axel Davy [Thu, 4 Apr 2019 21:01:08 +0000 (23:01 +0200)]
st/nine: Upload managed textures only at draw using them

When a draw call is emited, textures in the
device->update_textures list are uploaded.

This patch removes textures from the list if they
are not bound anymore.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Use FLT_MAX/2 for RCP clamping
Axel Davy [Fri, 22 Feb 2019 19:41:00 +0000 (20:41 +0100)]
st/nine: Use FLT_MAX/2 for RCP clamping

This seems to fix Rayman (which adds things
to the RCP result, and thus gets an Inf),
while not having regressions.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agost/nine: Fix D3DWindowBuffer_release for old wine nine support
Axel Davy [Sat, 27 Apr 2019 13:45:12 +0000 (15:45 +0200)]
st/nine: Fix D3DWindowBuffer_release for old wine nine support

No-one reported bugs for that, but is seems
c442dd789066104e5e84cc90d98a7ff5cd6296cf
and previous commits used APIs not defined until
nine minor version 3.
This patch should prevent crash in this case.

Also turn off the resize feature in this case,
as we won't prevent a buffer leak anymore.

Cc: "19.0" mesa-stable@lists.freedesktop.org
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
5 years agoturnip: update to use the new features struct names
Eric Engestrom [Tue, 23 Apr 2019 12:48:39 +0000 (13:48 +0100)]
turnip: update to use the new features struct names

These were updated in version 1.1.106 of vulkan.h to make more sense
with the extension names.  We may as well keep with the times.

See also: 90108deb277d33d19233 "anv: Update to use the new features struct names"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
5 years agoradv: update to use the new features struct names
Eric Engestrom [Tue, 23 Apr 2019 12:47:10 +0000 (13:47 +0100)]
radv: update to use the new features struct names

These were updated in version 1.1.106 of vulkan.h to make more sense
with the extension names.  We may as well keep with the times.

See also: 90108deb277d33d19233 "anv: Update to use the new features struct names"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agoanv: add support for VK_EXT_memory_budget
Eric Engestrom [Tue, 8 Jan 2019 12:45:38 +0000 (12:45 +0000)]
anv: add support for VK_EXT_memory_budget

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
5 years agoutil: add os_read_file() helper
Eric Engestrom [Mon, 28 Jan 2019 15:44:12 +0000 (15:44 +0000)]
util: add os_read_file() helper

readN() taken from igt.
os_read_file() inspired by igt_sysfs_get()

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
5 years agoiris: Enable fast clear colors on gen11.
Rafael Antognolli [Wed, 3 Apr 2019 00:03:57 +0000 (17:03 -0700)]
iris: Enable fast clear colors on gen11.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoiris: Update the surface state clear color address when available.
Rafael Antognolli [Wed, 3 Apr 2019 00:10:26 +0000 (17:10 -0700)]
iris: Update the surface state clear color address when available.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoiris: Use the linear version of the surface format during fast clears.
Rafael Antognolli [Tue, 23 Apr 2019 22:18:01 +0000 (15:18 -0700)]
iris: Use the linear version of the surface format during fast clears.

Newer gens (> 9) will start doing the linear -> sRGB conversion of the
clear color for us, if we use a sRGB surface format. So let's make sure
that doesn't happen and keep the same semantics as before.

Even though the hardware could convert the clear color for us during
fast clear, that converted color is only used for sampling. For resolve,
the original color would be used (without the conversion). So we convert
it ourselves and the same converted color gets used for both sampling
and resolving, simplifying the whole logic.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoiris: Support sRGB fast clears even if the colorspaces differ.
Rafael Antognolli [Fri, 19 Apr 2019 00:47:36 +0000 (17:47 -0700)]
iris: Support sRGB fast clears even if the colorspaces differ.

We were disabling fast clears if the view format had a different
colorspace than the resource format (sRGB vs linear or vice-versa). But
we actually support them if we use the view format to decide if we
should encode the clear color into sRGB colorspace.

Also add a missing linear -> sRGB surface format conversion (we don't
want the clear color to be encoded to sRGB again during resolve).

v2: Do not track sRGB colorspace during fast clears (Nanley).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoegl: fixup autotools-specific wording
Eric Engestrom [Wed, 24 Apr 2019 12:21:18 +0000 (13:21 +0100)]
egl: fixup autotools-specific wording

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agodocs: haiku can be built using meson
Eric Engestrom [Wed, 24 Apr 2019 12:19:24 +0000 (13:19 +0100)]
docs: haiku can be built using meson

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agodocs: use past tense when talking about autotools
Eric Engestrom [Wed, 24 Apr 2019 12:19:51 +0000 (13:19 +0100)]
docs: use past tense when talking about autotools

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agodocs: replace autotools intructions with meson equivalent
Eric Engestrom [Wed, 24 Apr 2019 12:16:57 +0000 (13:16 +0100)]
docs: replace autotools intructions with meson equivalent

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agodocs: drop autotools python information
Eric Engestrom [Wed, 24 Apr 2019 12:18:12 +0000 (13:18 +0100)]
docs: drop autotools python information

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agodocs: remove unsupported GL function name mangling
Eric Engestrom [Wed, 24 Apr 2019 11:39:30 +0000 (12:39 +0100)]
docs: remove unsupported GL function name mangling

This was only supported in autotools, which has since been deleted.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agomesa: Add missing display list support for GL_FOG_COORDINATE_SOURCE
Ian Romanick [Sat, 27 Apr 2019 06:50:47 +0000 (23:50 -0700)]
mesa: Add missing display list support for GL_FOG_COORDINATE_SOURCE

Fixes: fe5d67d95f3 ("Implement EXT_fog_coord and EXT_secondary_color.")
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Cc: Brian Paul <brianp@vmware.com>
5 years agodocs: document MESA_GLSL=errors keyword
Alejandro Piñeiro [Thu, 18 Apr 2019 13:58:35 +0000 (15:58 +0200)]
docs: document MESA_GLSL=errors keyword

Added with commit 0161691f3518, still checked on shaderapi.c
_mesa_get_shader_flag method.

Fixes: 0161691f3518db310411 "mesa: add GLSL_REPORT_ERRORS debug flag"
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agowinsys/svga/drm: Include sys/types.h
Khem Raj [Mon, 25 Feb 2019 20:06:47 +0000 (20:06 +0000)]
winsys/svga/drm: Include sys/types.h

vmw_screen.h uses dev_t which is defines in sys/types.h
this header is required to be included for getting dev_t
definition. This issue happens on musl C library, it is hidden
on glibc since sys/types.h is included through another
system headers

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agoRevert "meson: drop GLESv1 .so version back to 1.0.0"
Ross Burton [Mon, 25 Feb 2019 20:06:48 +0000 (20:06 +0000)]
Revert "meson: drop GLESv1 .so version back to 1.0.0"

This patch claimed that the autotools build generates libGLESv1_CM.so.1.0.0, but
it doesn't:

es1api_libGLESv1_CM_la_LDFLAGS = \
        -no-undefined \
        -version-number 1:1 \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)

Revert commit cc15460e182148292be877bec5a8a61cec57377d to ensure that the
autotools and meson builds produce the same libraries.

Fixes: cc15460e182148292be8 "meson: drop GLESv1 .so version back to 1.0.0"
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agoanv: enable descriptor indexing capabilities
Juan A. Suarez Romero [Mon, 29 Apr 2019 15:10:24 +0000 (17:10 +0200)]
anv: enable descriptor indexing capabilities

This enables the remaining capabilities in SPV_EXT_descriptor_indexing.

Fixes: 6e230d7607f "anv: Implement VK_EXT_descriptor_indexing"
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv: enable descriptor indexing capabilities
Juan A. Suarez Romero [Mon, 29 Apr 2019 15:05:13 +0000 (17:05 +0200)]
radv: enable descriptor indexing capabilities

This enables the remaining capabilities in SPV_EXT_descriptor_indexing.

Fixes: 0e10790558b "radv: Enable VK_EXT_descriptor_indexing."
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agospirv: add missing SPV_EXT_descriptor_indexing capabilities
Juan A. Suarez Romero [Mon, 29 Apr 2019 15:02:45 +0000 (17:02 +0200)]
spirv: add missing SPV_EXT_descriptor_indexing capabilities

Add ShaderNonUniformEXT, UniformBufferArrayNonUniformIndexingEXT,
SampledImageArrayNonUniformIndexingEXT,
StorageBufferArrayNonUniformIndexingEXT,
StorageImageArrayNonUniformIndexingEXT,
InputAttachmentArrayNonUniformIndexingEXT,
UniformTexelBufferArrayNonUniformIndexingEXT and
StorageTexelBufferArrayNonUniformIndexingEXT capabilities.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agospirv: Properly handle SpvOpAtomicCompareExchangeWeak
Caio Marcelo de Oliveira Filho [Tue, 30 Apr 2019 00:07:01 +0000 (17:07 -0700)]
spirv: Properly handle SpvOpAtomicCompareExchangeWeak

The code was handling the Weak variant in some cases, but missing
others, e.g. the get_deref_nir_atomic_op.  Add all the missing cases
with the same behavior of the non-Weak SpvOpAtomicCompareExchange.

Note that the Weak variant is basically an alias, as SPIR-V 1.3,
Revision 7 says

    "OpAtomicCompareExchangeWeak

    Deprecated (use OpAtomicCompareExchange).

    Has the same semantics as OpAtomicCompareExchange."

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
5 years agopanfrost/ci: Initial commit
Tomeu Vizoso [Mon, 29 Apr 2019 16:33:22 +0000 (16:33 +0000)]
panfrost/ci: Initial commit

These files implement running almost all of deqp-gles2 on Chomebooks of
the rk3399-gru-kevin type in Collabora's LAVA lab.

The approach follows what is currently being used for virglrenderer,
but scheduling the actual test jobs via LAVA.

We start by building a container in Docker that contains a suitable
rootfs and kernel for the DUT, deqp and all dependencies for building
Mesa itself.

The Mesa is built and the rootfs, deqp and Mesa are combined in a cpio
ramdisk. A LAVA job is generated, submitted to LAVA and the results are
processed by simply comparing them to the expectations that are stored
in git. Any code that changes the expectations (hopefully tests are
fixed) needs to also update the expectations file.

The next step is adding support for other devices, possibly in other
LAVA labs.

In order to use this, the repository has to be configured to run the
gitlab-ci.yaml file from the panfrost/ci dir, and a LAVA token needs to
be setup.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agoiris: Do not advertise multisampled image load/store.
Rafael Antognolli [Mon, 29 Apr 2019 23:02:58 +0000 (16:02 -0700)]
iris: Do not advertise multisampled image load/store.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agofreedreno/a6xx: pre-bake UBWC flags in texture-view
Rob Clark [Sun, 28 Apr 2019 16:35:15 +0000 (09:35 -0700)]
freedreno/a6xx: pre-bake UBWC flags in texture-view

Small cleanup.  No need to defer this to emit time.

Signed-off-by: Rob Clark <robdclark@chromium.org>
5 years agofreedreno/a6xx: small texture emit cleanup
Rob Clark [Sun, 28 Apr 2019 16:23:29 +0000 (09:23 -0700)]
freedreno/a6xx: small texture emit cleanup

Prep work for fb_read (blend_equation_advanced)

Switch to using 'enum pipe_shader_type' everywhere, and (optional, in
non-cache / slowpath case) pass ctx instead of image/ssbo state.  In the
fb_read case we also need to access the framebuffer state, so having
the ctx simplifies things.

Signed-off-by: Rob Clark <robdclark@chromium.org>
5 years agofreedreno/ir3: switch fragcoord to sysval
Rob Clark [Fri, 26 Apr 2019 21:40:17 +0000 (14:40 -0700)]
freedreno/ir3: switch fragcoord to sysval

Because who are we kidding... it is a sysval.

Signed-off-by: Rob Clark <robdclark@chromium.org>
5 years agoi965: Re-enable fast color clears for GEN11.
Plamena Manolova [Mon, 29 Apr 2019 19:57:58 +0000 (22:57 +0300)]
i965: Re-enable fast color clears for GEN11.

This patch re-enables fast color clears for GEN11.
It also ensures that we use linear color formats
for sRGB surfaces during fast clears.

Signed-off-by: Plamena Manolova <plamena.n.manolova@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
5 years agointel/blorp: Make blorp update the clear color in gen11.
Rafael Antognolli [Wed, 3 Apr 2019 00:08:52 +0000 (17:08 -0700)]
intel/blorp: Make blorp update the clear color in gen11.

Hardware docs say that Gen11 requires the use of two MI_ATOMICs of size
QWORD when updating the clear color. The second MI_ATOMIC also needs CS
Stall and Return Data Control set.

v2: Remove include of srgb header (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agointel/genxml: Update MI_ATOMIC genxml definition.
Rafael Antognolli [Wed, 3 Apr 2019 00:07:17 +0000 (17:07 -0700)]
intel/genxml: Update MI_ATOMIC genxml definition.

Change some of the single bit fields to booleans, and add an enum with
the definition of the ATOMIC_OPCODE.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agointel/genxml: Support base-16 in value & start fields in gen_sort_tags.py
Jordan Justen [Fri, 19 Apr 2019 22:31:29 +0000 (15:31 -0700)]
intel/genxml: Support base-16 in value & start fields in gen_sort_tags.py

With python's int(), if the optional second parameter is 0, then
python will support the 0x prefix for hex numbers.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agoisl: Set ClearColorConversionEnable.
Plamena Manolova [Thu, 14 Mar 2019 20:28:20 +0000 (22:28 +0200)]
isl: Set ClearColorConversionEnable.

The ClearColorConversionEnable bit needs to be set
for GEN11 when inderect clear colors are used.

Signed-off-by: Plamena Manolova <plamena.n.manolova@gmail.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
5 years agodelete autotools input files
Eric Engestrom [Wed, 24 Apr 2019 11:26:58 +0000 (12:26 +0100)]
delete autotools input files

Leftovers from when autotools was deleted.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agodelete autotools .gitignore files
Eric Engestrom [Wed, 24 Apr 2019 11:18:46 +0000 (12:18 +0100)]
delete autotools .gitignore files

One special case, `src/util/xmlpool/.gitignore` is not entirely deleted,
as `xmlpool.pot` still gets generated (eg. by `ninja xmlpool-pot`).

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agoiris: Only enable GL_AMD_depth_clamp_separate on Gen9+
Kenneth Graunke [Mon, 29 Apr 2019 20:25:12 +0000 (13:25 -0700)]
iris: Only enable GL_AMD_depth_clamp_separate on Gen9+

The hardware feature is new as of Gen9+.  I accidentally enabled it on
Gen8.

5 years agoiris: Set XY Clipping correctly.
Kenneth Graunke [Mon, 29 Apr 2019 06:25:10 +0000 (23:25 -0700)]
iris: Set XY Clipping correctly.

I was setting it based off a pipe_rasterizer_state field that appears
to be entirely dead outside of the draw module respecting it.

I should be setting it when the primitive type reaching the SF is
neither points nor lines.  This is, unfortunately, rather dirty,
as we have to look at the rasterizer state, the geometry shader state,
the tessellation evaluation shader state, and the primitive type...

5 years agoac,ac/nir: use a better sync scope for shared atomics
Rhys Perry [Thu, 25 Apr 2019 13:44:40 +0000 (14:44 +0100)]
ac,ac/nir: use a better sync scope for shared atomics

https://reviews.llvm.org/rL356946 (present in LLVM 9 and later) changed
the meaning of the "system" sync scope, making it no longer restricted to
the memory operation's address space. So a single address space sync scope
is needed for shared atomic operations (such as "system-one-as" or
"workgroup-one-as") otherwise buffer_wbinvl1 and s_waitcnt instructions
can be created at each shared atomic operation.

This mostly reimplements LLVMBuildAtomicRMW and LLVMBuildAtomicCmpXchg
to allow for more sync scopes and uses the new functions in ac->nir with
the "workgroup-one-as" or "workgroup" sync scopes.

      F1 2017 (4K, Ultra High settings, TAA), avg FPS : 59 -> 59.67 (+1.14%)
     Strange Brigade (4K, ~highest settings), avg FPS : 51.5 -> 51.6 (+0.19%)
RotTR/mountain (4K, VeryHigh settings, FXAA), avg FPS : 57.2 -> 57.2 (+0.0%)
    RotTR/tomb (4K, VeryHigh settings, FXAA), avg FPS : 42.5 -> 43.0 (+1.17%)
  RotTR/valley (4K, VeryHigh settings, FXAA), avg FPS : 40.7 -> 41.6 (+2.21%)
                         Warhammer II/fallen, avg FPS : 31.63 -> 31.83 (+0.63%)
                         Warhammer II/skaven, avg FPS : 37.77 -> 38.07 (+0.79%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoglx: Fix synthetic error generation in __glXSendError
Hal Gentz [Sun, 24 Mar 2019 22:52:39 +0000 (16:52 -0600)]
glx: Fix synthetic error generation in __glXSendError

To quote Uli Schlachter, who understands this stuff more than I do:

>   The function __glXSendError() in mesa's src/glx/glx_error.c invents an X11
> protocol error out of thin air. For the sequence number it uses dpy->request.
> This is the sequence number of the last request that was sent. _XError() will
> then update dpy->last_request_read based on the sequence number of the error
> that just "came in".
>
>   If now another something comes in with a sequence number less than
> dpy->last_request_read, since sequence numbers are monotonically increasing,
> widen() will incorrectly add 1<<32 to the sequence number and things might go
> downhill afterwards.

`__glXSendErrorForXcb` was also patched, as that's the function that
`glXCreateContextAttribsARB` actually uses.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99781
Cc: mesa-stable@lists.freedesktop.org
Fixes: ad503c41 'apple: Initial import of libGL for OSX from AppleSGLX svn repository'
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
5 years agoRevert "anv: limit URB reconfigurations when using blorp"
Lionel Landwerlin [Sat, 27 Apr 2019 03:35:32 +0000 (11:35 +0800)]
Revert "anv: limit URB reconfigurations when using blorp"

In commit 0d46e404 ("anv: limit URB reconfigurations when using
blorp") we tried to limit the number of URB reconfiguration by
checking if the last allocation is large enough to fit the blorp
dispatch.

We used the last bound pipeline to compare the allocation. The problem
with this is that the pipeline is bound but its commands might not
have been emitted into the command buffer yet.

Let's just revert commit 0d46e404677264bfb12ada15290e39c10a5eb455
since it didn't seem to yield any performance improvement.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0d46e404 ("anv: limit URB reconfigurations when using blorp")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110535
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
5 years agomesa/st: remove always-false state
Erik Faye-Lund [Thu, 7 Mar 2019 12:21:50 +0000 (13:21 +0100)]
mesa/st: remove always-false state

This code is essentially dead now.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa/st: accept NULL and empty buffer objects
Erik Faye-Lund [Wed, 6 Mar 2019 11:18:28 +0000 (12:18 +0100)]
mesa/st: accept NULL and empty buffer objects

It's prefectly legal and well-defined to render using a non-existing
or empty buffer object. The data coming out of the buffer object isn't
well defined unless we have the robustness flag set on the context, but
that's a different matter, and up to the shader hardware; it's the same
as out-of-bounds reads.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoswr: support NULL-resources
Erik Faye-Lund [Wed, 6 Mar 2019 12:28:51 +0000 (13:28 +0100)]
swr: support NULL-resources

It's legal for a buffer-object to have a NULL-resource, but let's just
skip over it, as there's nothing to do.

This patch switches the order of the conditionals in swr_update_derived,
so the logic becomes a bit more straight forward:

if (is_user_buffer)
   ...
else if (resource)
   ...
else
   ...

...instead of this:

if (!is_user_buffer)
   if (resource)
      ...
   else
      ...
else
   ...

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Alok Hota <alok.hota@intel.com>
5 years agonouveau: support NULL-resources
Erik Faye-Lund [Wed, 6 Mar 2019 12:28:42 +0000 (13:28 +0100)]
nouveau: support NULL-resources

It's legal for a buffer-object to have a NULL-resource, but let's just
skip over it, as there's nothing to do.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
5 years agoi915: support NULL-resources
Erik Faye-Lund [Wed, 6 Mar 2019 12:28:24 +0000 (13:28 +0100)]
i915: support NULL-resources

It's legal for a buffer-object to have a NULL-resource, but let's just
skip over it, as there's nothing to do.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
5 years agogallium/u_vbuf: support NULL-resources
Erik Faye-Lund [Wed, 6 Mar 2019 12:29:35 +0000 (13:29 +0100)]
gallium/u_vbuf: support NULL-resources

It's legal for a buffer-object to have a NULL-resource, but let's just
skip over it, as there's nothing to do.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa/st: remove impossible error-check
Erik Faye-Lund [Tue, 4 Dec 2018 12:52:25 +0000 (13:52 +0100)]
mesa/st: remove impossible error-check

st_setup_current never sets this flag, and it's already checked against
right before. So let's remove this pointless check.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoglsl/linker: check for xfb_offset aliasing
Andres Gomez [Wed, 30 Jan 2019 13:58:42 +0000 (15:58 +0200)]
glsl/linker: check for xfb_offset aliasing

From page 76 (page 80 of the PDF) of the GLSL 4.60 v.5 spec:

  " No aliasing in output buffers is allowed: It is a compile-time or
    link-time error to specify variables with overlapping transform
    feedback offsets."

Currently, this is expected to fail, but it succeeds:

  "

    ...

    layout (xfb_offset = 0) out vec2 a;
    layout (xfb_offset = 0) out vec4 b;

    ...

  "

Fixes the following piglit test:
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert

Fixes the following test:
KHR-GL44.enhanced_layouts.xfb_output_overlapping

v2:
  - Use a data structure to track the used components instead of a
    nested loop (Ilia).

v3:
  - Take the BITSET_WORD array out from the
    gl_transform_feedback_buffer struct and make it local to the
    validation process (Timothy).
  - Do not use a nested scope for the validation (Timothy).

v4:
  - Add reference to the fixed piglit test in the commit log.
  - Add reference to the fixed VK-GL-CTS test in the commit
    log (Tapani).
  - Empty initialize the BITSET_WORD pointers array (Tapani).

Cc: Timothy Arceri <tarceri@itsqueeze.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
5 years agolima/ppir: fix pointer referenced after a free
Patrick Lerda [Mon, 29 Apr 2019 08:43:51 +0000 (10:43 +0200)]
lima/ppir: fix pointer referenced after a free

Issue detected by valgrind.

Fixes: 92d7ca4b1cd ("gallium: add lima driver")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
5 years agoradv: consider MESA_VK_VERSION_OVERRIDE when setting the api version
Eleni Maria Stea [Mon, 29 Apr 2019 07:00:17 +0000 (09:00 +0200)]
radv: consider MESA_VK_VERSION_OVERRIDE when setting the api version

Before setting the physical device API version, we should check if the
MESA_VK_VERSION_OVERRIDE environment variable is set and take it into
account.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agointel/fs: Don't emit empty ELSE blocks.
Kenneth Graunke [Wed, 3 Apr 2019 21:24:31 +0000 (14:24 -0700)]
intel/fs: Don't emit empty ELSE blocks.

While we can clean this up later, it's trivial to not generate the
stupid code in the first place, which saves some optimization work.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agonir: Add a new nir_cf_list_is_empty_block() helper.
Kenneth Graunke [Mon, 8 Apr 2019 18:22:20 +0000 (11:22 -0700)]
nir: Add a new nir_cf_list_is_empty_block() helper.

Helper and name suggested by Eric Anholt.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agoglsl/list: Add an exec_list_is_singular() helper.
Kenneth Graunke [Mon, 8 Apr 2019 18:10:08 +0000 (11:10 -0700)]
glsl/list: Add an exec_list_is_singular() helper.

Similar to list_is_singular() in util/list.h.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agoanv: expose VK_EXT_queue_family_foreign on Android
Tapani Pälli [Fri, 12 Apr 2019 09:52:43 +0000 (12:52 +0300)]
anv: expose VK_EXT_queue_family_foreign on Android

VK_ANDROID_external_memory_android_hardware_buffer requires this
extension. It is safe to enable it since currently aux usage is
disabled for ahw buffers.

Fixes following dEQP extension dependency test on Android:
   dEQP-VK.api.info.device#extensions

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agolima/ppir: Add gl_FragCoord handling
Andreas Baierl [Fri, 26 Apr 2019 13:06:13 +0000 (15:06 +0200)]
lima/ppir: Add gl_FragCoord handling

Treat gl_FragCoord variable as a system value and lower the w component
with a nir pass.
Add the necessary bits for correct codegen.

Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
5 years agonir: add rcp(w) lowering for gl_FragCoord
Andreas Baierl [Fri, 26 Apr 2019 13:01:43 +0000 (15:01 +0200)]
nir: add rcp(w) lowering for gl_FragCoord

On some hardware (e.g. Mali400) the shader needs to apply some
transformations for correct gl_FragCoord handling. The lowering
actions look like the following in pseudocode:
   gl_FragCoord.xyz = gl_FragCoord_orig.xyz
   gl_FragCoord.w = 1.0 / gl_FragCoord_orig.w

Add this lowering as a nir pass in preparation for using it in the driver.

Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agodocs: changed "Done" to "DONE" in features.txt
Romain Failliot [Sat, 27 Apr 2019 21:02:21 +0000 (17:02 -0400)]
docs: changed "Done" to "DONE" in features.txt

Mesamatrix.net expects uppercase.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agopanfrost: Workaround -bshadow regression
Alyssa Rosenzweig [Sun, 28 Apr 2019 21:39:20 +0000 (21:39 +0000)]
panfrost: Workaround -bshadow regression

I have *no* idea what's happening here, but let's not regress an app
that used to work in the mean time while we're figuring it out..

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agopanfrost/midgard: Safety check immediate precision degradations
Alyssa Rosenzweig [Sun, 28 Apr 2019 15:46:47 +0000 (15:46 +0000)]
panfrost/midgard: Safety check immediate precision degradations

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agopanfrost: Use fp32 (not fp16) varyings
Alyssa Rosenzweig [Sun, 28 Apr 2019 15:21:34 +0000 (15:21 +0000)]
panfrost: Use fp32 (not fp16) varyings

In a perfect world, we'd use fp16 varyings for mediump and fp32 for
highp, allowing us to get a performance win without sacrificing
conformance. Unfortunately, we're not there (yet), so it's better we
assume always fp32 than always fp16 to avoid artefacts / breaking a lot
of deqp.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agopanfrost/midgard: imov workaround
Alyssa Rosenzweig [Sun, 28 Apr 2019 04:58:43 +0000 (04:58 +0000)]
panfrost/midgard: imov workaround

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agopanfrost/midgard: Fix tex propogation
Alyssa Rosenzweig [Sun, 28 Apr 2019 04:38:01 +0000 (04:38 +0000)]
panfrost/midgard: Fix tex propogation

Unbreaks mpv.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agopanfrost/midgard: Fix regressions in -bjellyfish
Alyssa Rosenzweig [Sun, 28 Apr 2019 03:47:57 +0000 (03:47 +0000)]
panfrost/midgard: Fix regressions in -bjellyfish

Two fixes here, one is that we tried to copyprop non-strictly-SSA values
which was bound to fly in our face. The other was peeling back the imov
workaround.. Turns out we still need that. More research is needed
still, but let's not regress real apps.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agopanfrost/midgard: Only copyprop without an outmod
Alyssa Rosenzweig [Sat, 27 Apr 2019 23:49:52 +0000 (23:49 +0000)]
panfrost/midgard: Only copyprop without an outmod

With an outmod, we would need to propagate that through, which is for
future work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agoRevert "panfrost/midgard: Extend copy propagation pass"
Alyssa Rosenzweig [Sat, 27 Apr 2019 23:46:38 +0000 (23:46 +0000)]
Revert "panfrost/midgard: Extend copy propagation pass"

Fixes: commit b53b4573c3f0571253672e44ce7d6310d9f987bf.
Optimization gone wrong. In the future, we should try this again (it's a
net win if implemented right), but at the moment this just regresses.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
5 years agoradv: add missing VEGA20 chip in radv_get_device_name()
Samuel Pitoiset [Sat, 27 Apr 2019 10:07:51 +0000 (12:07 +0200)]
radv: add missing VEGA20 chip in radv_get_device_name()

Otherwise it returns "AMD RADV unknown".

Cc: 19.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoiris: Fix zeroing of transform feedback offsets in strange cases.
Kenneth Graunke [Sat, 27 Apr 2019 07:24:05 +0000 (00:24 -0700)]
iris: Fix zeroing of transform feedback offsets in strange cases.

Some of the dEQP.functional.transform_feedback tests end up doing
the following sequence of operations:

   1. BeginTransformFeedback
   2. PauseTransformFeedback
   3. Draw
   4. ResumeTransformFeedback

At step 1, we'd pack 3DSTATE_SO_BUFFER commands saying to zero the
SO_WRITE_OFFSET registers.  At step 2, we disable streamout, so step 3
doesn't bother emitting those commands.  Then, step 4 re-packs new
3DSTATE_SO_BUFFER commands with offset = 0xFFFFFFFF, saying to continue
appending at the existing offset.  This loads the value from the BO as
the offsets - but we never actually zeroed it.

So, just maintain a flag saying "we actually emitted the commands",
and stomp offset back to zero until we emit some.

5 years agovc4: Fall back to renderonly if the vc4 driver doesn't have v3d.
Eric Anholt [Sat, 27 Oct 2018 01:19:37 +0000 (18:19 -0700)]
vc4: Fall back to renderonly if the vc4 driver doesn't have v3d.

I have a platform with vc4 display but V3D 4.x.  We can fall back on
kmsro's probing to bring up the v3d gallium driver.

Acked-by: Rob Clark <robdclark@chromium.org>
5 years agokmsro: Add support for V3D.
Eric Anholt [Wed, 3 Apr 2019 22:40:22 +0000 (15:40 -0700)]
kmsro: Add support for V3D.

Like vc4, we expect to have SOCs with various displays that have a single
V3D instance for rendering.

v2: Add v3d to the list of drivers that make enabling kmsro valid.

Acked-by: Rob Clark <robdclark@chromium.org>
5 years agoradeonsi: don't ignore PIPE_FLUSH_ASYNC
Marek Olšák [Thu, 25 Apr 2019 23:42:25 +0000 (19:42 -0400)]
radeonsi: don't ignore PIPE_FLUSH_ASYNC

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
5 years agov3d: Fix detection of TMU write sequences in register spilling.
Eric Anholt [Thu, 25 Apr 2019 19:58:12 +0000 (12:58 -0700)]
v3d: Fix detection of TMU write sequences in register spilling.

We can't use the QPU functions to detect this until register allocation is
done and we've moved inst->dst into inst->qpu.

Fixes bad TMU sequences from register spilling in
KHR-GLES31.core.compute_shader.shared-max.

5 years agov3d: Fix detection of the last ldtmu before a new TMU op.
Eric Anholt [Thu, 25 Apr 2019 19:29:55 +0000 (12:29 -0700)]
v3d: Fix detection of the last ldtmu before a new TMU op.

We were looking at the start instruction, instead of scanning through the
list of following instructions to find any more ldtmus.

5 years agov3d: Re-add support for memory_barrier_shared.
Eric Anholt [Thu, 25 Apr 2019 18:30:39 +0000 (11:30 -0700)]
v3d: Re-add support for memory_barrier_shared.

Looks like I lost it in a rebase conflict resolution.  We'd hit the
unknown intrinsic assertion in
KHR-GLES31.core.compute_shader.shared-struct.

Fixes: 6b1c65982509 ("v3d: Add Compute Shader compilation support.")