platform/upstream/mesa.git
5 years agoradv: add radv_cmd_buffer_begin_subpass() helper
Samuel Pitoiset [Tue, 29 Jan 2019 21:18:49 +0000 (22:18 +0100)]
radv: add radv_cmd_buffer_begin_subpass() helper

To unify some code in BeginRenderPass() and NextSubpass().
Based on Intel ANV driver.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv: remove useless MAYBE_UNUSED in CmdBeginRenderPass()
Samuel Pitoiset [Tue, 29 Jan 2019 21:18:48 +0000 (22:18 +0100)]
radv: remove useless MAYBE_UNUSED in CmdBeginRenderPass()

Trivial.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv: remove unused radv_render_pass_attachment::view_mask
Samuel Pitoiset [Tue, 29 Jan 2019 21:18:47 +0000 (22:18 +0100)]
radv: remove unused radv_render_pass_attachment::view_mask

Trivial.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv: bail out when no image transitions will be performed
Samuel Pitoiset [Tue, 29 Jan 2019 21:18:46 +0000 (22:18 +0100)]
radv: bail out when no image transitions will be performed

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agomeson: drop the xcb-xrandr version requirement
Marek Olšák [Thu, 24 Jan 2019 00:48:26 +0000 (19:48 -0500)]
meson: drop the xcb-xrandr version requirement

autotools doesn't have any requirement. This fixes meson on Ubuntu 16.04.

Cc: 18.3 19.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
5 years agowsi/display: add comment
Eric Engestrom [Sun, 16 Sep 2018 14:22:29 +0000 (15:22 +0100)]
wsi/display: add comment

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
5 years agorelnotes: Add VK_EXT_buffer_device_address
Jason Ekstrand [Sat, 2 Feb 2019 14:41:19 +0000 (08:41 -0600)]
relnotes: Add VK_EXT_buffer_device_address

5 years agoanv: Implement VK_EXT_buffer_device_address
Jason Ekstrand [Sat, 19 Jan 2019 14:54:32 +0000 (08:54 -0600)]
anv: Implement VK_EXT_buffer_device_address

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agointel/fs: Implement nir_intrinsic_global_atomic_*
Jason Ekstrand [Mon, 26 Nov 2018 21:15:04 +0000 (15:15 -0600)]
intel/fs: Implement nir_intrinsic_global_atomic_*

eviewed-by: Kenneth Graunke <kenneth@whitecape.org>

5 years agointel/fs: Use SENDS for A64 writes on gen9+
Jason Ekstrand [Fri, 16 Nov 2018 16:13:51 +0000 (10:13 -0600)]
intel/fs: Use SENDS for A64 writes on gen9+

eviewed-by: Kenneth Graunke <kenneth@whitecape.org>

5 years agointel/fs: Implement load/store_global with A64 untyped messages
Jason Ekstrand [Wed, 14 Nov 2018 23:13:57 +0000 (17:13 -0600)]
intel/fs: Implement load/store_global with A64 untyped messages

eviewed-by: Kenneth Graunke <kenneth@whitecape.org>

5 years agointel/fs: Do the grf127 hack on SIMD8 instructions in SIMD16 mode
Jason Ekstrand [Tue, 15 Jan 2019 16:53:44 +0000 (10:53 -0600)]
intel/fs: Do the grf127 hack on SIMD8 instructions in SIMD16 mode

Previously, we only applied the fix to shaders with a dispatch mode of
SIMD8 but the code it relies on for SIMD16 mode only applies to SIMD16
instructions.  If you have a SIMD8 instruction in a SIMD16 shader,
neither would trigger and the restriction could still be hit.

Fixes: 232ed8980217dd "i965/fs: Register allocator shoudn't use grf127..."
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/fs: Properly handle 64-bit types in LOAD_PAYLOAD
Jason Ekstrand [Thu, 15 Nov 2018 04:38:23 +0000 (22:38 -0600)]
intel/fs: Properly handle 64-bit types in LOAD_PAYLOAD

By just assigning dst.type to src[i].type, we ensure that the offset at
the end of the loop actually offsets it by the right number of
registers.  Otherwise, we'll get into a case where we copy with a Q type
and then offset with a D type and things get out of sync.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/fs/cse: Split create_copy_instr into three cases
Jason Ekstrand [Tue, 15 Jan 2019 04:21:48 +0000 (22:21 -0600)]
intel/fs/cse: Split create_copy_instr into three cases

Previously, we tried to combine all cases where the instruction being
CSE'd writes to more than one MOV worth of registers into one case with
a bit of special casing for LOAD_PAYLOAD.  This commit splits things so
that LOAD_PAYLOAD is entirely it's own case.  This makes tweaking the
LOAD_PAYLOAD case simpler in the next commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/nir: Add global support to lower_mem_access_bit_sizes
Jason Ekstrand [Wed, 14 Nov 2018 21:40:43 +0000 (15:40 -0600)]
intel/nir: Add global support to lower_mem_access_bit_sizes

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/fs: Fix memory corruption when compiling a CS
Oscar Blumberg [Sat, 26 Jan 2019 15:47:42 +0000 (16:47 +0100)]
intel/fs: Fix memory corruption when compiling a CS

Missing check for shader stage in the fs_visitor would corrupt the
cs_prog_data.push information and trigger crashes / corruption later
when uploading the CS state.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agospirv: Support LocalSizeId and LocalSizeHintId execution modes
Jason Ekstrand [Tue, 22 Jan 2019 19:55:20 +0000 (13:55 -0600)]
spirv: Support LocalSizeId and LocalSizeHintId execution modes

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agospirv: Handle OpExecutionModeId
Jason Ekstrand [Tue, 22 Jan 2019 19:41:15 +0000 (13:41 -0600)]
spirv: Handle OpExecutionModeId

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agospirv: Handle constants and types before execution modes
Jason Ekstrand [Tue, 22 Jan 2019 19:42:08 +0000 (13:42 -0600)]
spirv: Handle constants and types before execution modes

We already defer handling the actual execution modes until after we've
created the shader.  This just moves it a tiny bit further so we
actually have constants and types and can handle OpExecutionModeId.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agospirv: Rework handling of spec constant workgroup size built-ins
Jason Ekstrand [Wed, 23 Jan 2019 18:49:15 +0000 (12:49 -0600)]
spirv: Rework handling of spec constant workgroup size built-ins

Instead of handling it as part of the handling of constant instructions,
just stash the vtn_value when we see the decoration and handle it
explicitly later.  This will let us re-order handling of constant
instructions without breaking the Vulkan SPIR-V requirement that
decorating a specialization constant as the WorkgroupSize built-in
overrides the workgroup size set as an execution mode.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agospirv: Replace vtn_constant_value with vtn_constant_uint
Jason Ekstrand [Tue, 22 Jan 2019 17:57:48 +0000 (11:57 -0600)]
spirv: Replace vtn_constant_value with vtn_constant_uint

The uint version is less typing, supports different bit sizes, and is
probably a bit more safe because we're actually verifying that the
SPIR-V value is an integer scalar constant.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoradv: fix build
Samuel Pitoiset [Fri, 1 Feb 2019 14:30:31 +0000 (15:30 +0100)]
radv: fix build

Fixes: 9b9ccee4d64 ("radv: take LDS into account for compute shader occupancy stats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agoradv: take LDS into account for compute shader occupancy stats
Timothy Arceri [Fri, 1 Feb 2019 11:04:39 +0000 (22:04 +1100)]
radv: take LDS into account for compute shader occupancy stats

Ported from d205faeb6c96.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoac/radv/radeonsi: add ac_get_num_physical_sgprs() helper
Timothy Arceri [Fri, 1 Feb 2019 10:16:54 +0000 (21:16 +1100)]
ac/radv/radeonsi: add ac_get_num_physical_sgprs() helper

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agodocs: add GL_EXT_texture_compression_s3tc_srgb to release notes
Gurchetan Singh [Thu, 31 Jan 2019 16:47:47 +0000 (08:47 -0800)]
docs: add GL_EXT_texture_compression_s3tc_srgb to release notes

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
5 years agost/mesa: expose EXT_texture_compression_s3tc_srgb
Gurchetan Singh [Wed, 30 Jan 2019 18:48:19 +0000 (10:48 -0800)]
st/mesa: expose EXT_texture_compression_s3tc_srgb

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
5 years agoi965: Set flag for EXT_texture_compression_s3tc_srgb
Gurchetan Singh [Wed, 30 Jan 2019 18:26:50 +0000 (10:26 -0800)]
i965: Set flag for EXT_texture_compression_s3tc_srgb

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
5 years agomesa/main: Expose EXT_texture_compression_s3tc_srgb
Gurchetan Singh [Wed, 30 Jan 2019 02:46:11 +0000 (18:46 -0800)]
mesa/main: Expose EXT_texture_compression_s3tc_srgb

Required for the following test:

bin/compressedteximage GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT

pass when emulating GL on GLES.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
5 years agost/glsl_to_nir: remove dead local variables
Timothy Arceri [Thu, 31 Jan 2019 04:59:18 +0000 (15:59 +1100)]
st/glsl_to_nir: remove dead local variables

Without this we do not end up with a deterministic NIR because
temporary register variables are added in random order. NIR must
be deterministic because we use it to produce a sha for the
radeonsi backends disk cache.

This fixes the shader cache for a bunch of shaders.

Another positive is that this results in a large reduction in the
size of the NIR that the state tracker stores to the disk cache.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agomeson: remove -std=c++11 from intel/tools
Dylan Baker [Tue, 29 Jan 2019 19:25:30 +0000 (11:25 -0800)]
meson: remove -std=c++11 from intel/tools

for meson all C++ code is already compiled as C++11, so it's
unnecessary. It's also the wrong way to do this, if we really needed
this the correct way is to set:

```meson
executable(
  ...
  override_options : ['cpp_std=c++11'],
)
```

Which ensures not only that the correct syntax for the current
compiler is used, but also that meson doesn't create arguments like
`-std=c++14 ... -std=c++11`

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agomeson: fix style in intel/tools
Dylan Baker [Tue, 29 Jan 2019 19:24:14 +0000 (11:24 -0800)]
meson: fix style in intel/tools

The `:` in options should always have one space before and after `foo
: bar`, and lists do not get spaces around the braces: `[foo]` not `[
foo ]`

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agomeson: remove build_by_default : true
Dylan Baker [Tue, 29 Jan 2019 19:22:53 +0000 (11:22 -0800)]
meson: remove build_by_default : true

Which is and has always been the default. This is largely an artifact
of how the building of these tools was controlled when the meson build
was originally created.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agodocs: update calendar, add news item and link release notes for 18.3.3
Emil Velikov [Thu, 31 Jan 2019 21:17:38 +0000 (21:17 +0000)]
docs: update calendar, add news item and link release notes for 18.3.3

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
5 years agodocs: add sha256 checksums for 18.3.3
Emil Velikov [Thu, 31 Jan 2019 21:08:36 +0000 (21:08 +0000)]
docs: add sha256 checksums for 18.3.3

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 7475d7727f172387ac3d069887f3095dcb884649)

5 years agodocs: add release notes for 18.3.3
Emil Velikov [Thu, 31 Jan 2019 20:58:09 +0000 (20:58 +0000)]
docs: add release notes for 18.3.3

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 190a79f462710f04d67eaefe498ef6ae5b7f5b1a)
[Emil: drop VERSION hunk]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
 Conflicts:
VERSION

5 years agost/mesa: Fix topogun-1.06-orc-84k-resize.trace crash
Neha Bhende [Tue, 29 Jan 2019 19:21:00 +0000 (12:21 -0700)]
st/mesa: Fix topogun-1.06-orc-84k-resize.trace crash

We need to initialize all fields in rs->prim explicitly while
creating new rastpos stage.

Fixes: bac8534267 ("st/mesa: allow glDrawElements to work with GL_SELECT
feedback")

v2: Initializing all fields in rs->prim as per Ilia.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
5 years agoandroid,autotools,i965: Fix location of float64_glsl.h
Dylan Baker [Wed, 30 Jan 2019 18:02:41 +0000 (10:02 -0800)]
android,autotools,i965: Fix location of float64_glsl.h

Android.mk and autotools disagree about where generated files should
go, which wasn't a problem until we wanted to build a dist
tarball. This corrects the problem by changing the output and include
paths to be the same on android and autotools (meson already has the
correct include path).

Fixes: 7d7b30835cfb9eb89beca9fb8593d0954f79b84d
       ("automake: Fix path to generated source")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
5 years agogallium: allow more PIPE_RESOURCE_ driver flags
Marek Olšák [Wed, 30 Jan 2019 19:20:03 +0000 (14:20 -0500)]
gallium: allow more PIPE_RESOURCE_ driver flags

radeonsi has 8 and will probably have 9 soon.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
5 years agov3d: Fix image_load_store clamping of signed integer stores.
Eric Anholt [Wed, 30 Jan 2019 19:17:35 +0000 (11:17 -0800)]
v3d: Fix image_load_store clamping of signed integer stores.

This was copy-and-paste fail, that oddly showed up in the CTS's
reinterprets of r32f, rgba8, and srgba8 to rgba8i, but not r32ui and r32i
to rgba8i or reinterprets to other signed int formats.

Fixes: 6281f26f064a ("v3d: Add support for shader_image_load_store.")

5 years agomesa: Skip partial InvalidateFramebuffer of packed depth/stencil.
Eric Anholt [Wed, 30 Jan 2019 17:33:53 +0000 (09:33 -0800)]
mesa: Skip partial InvalidateFramebuffer of packed depth/stencil.

One of the CTS cases tries to invalidate just stencil of packed
depth/stencil, and we incorrectly lost the depth contents.

Fixes dEQP-GLES3.functional.fbo.invalidate.whole.unbind_read_stencil
Fixes: 0c42b5f3cb90 ("mesa: wire up InvalidateFramebuffer")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agofreedreno: more fixing release tarball
Rob Clark [Thu, 31 Jan 2019 14:56:19 +0000 (09:56 -0500)]
freedreno: more fixing release tarball

Fixes: aa0fed10d35 freedreno: move ir3 to common location
Signed-off-by: Rob Clark <robdclark@gmail.com>
5 years agofreedreno: fix release tarball
Rob Clark [Thu, 31 Jan 2019 13:03:43 +0000 (08:03 -0500)]
freedreno: fix release tarball

Fixes: b4476138d5a freedreno: move drm to common location
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
5 years agodocs: make bugs.html easier to find
Emmanuel Gil Peyrot [Sun, 27 Jan 2019 20:46:56 +0000 (21:46 +0100)]
docs: make bugs.html easier to find

Thanks to Yann Kervran for the report and suggestions.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agovirgl: ARB_query_buffer_object support
Dave Airlie [Mon, 21 May 2018 23:32:42 +0000 (09:32 +1000)]
virgl: ARB_query_buffer_object support

v1.1: fix size define.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
5 years agovirgl: enable elapsed time queries
Dave Airlie [Tue, 8 Jan 2019 06:50:28 +0000 (16:50 +1000)]
virgl: enable elapsed time queries

GL underneath always has GL_TIME_ELAPSED so always enable these.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
5 years agoautomake: Add --enable-autotools to distcheck flags
Dylan Baker [Wed, 30 Jan 2019 17:44:24 +0000 (09:44 -0800)]
automake: Add --enable-autotools to distcheck flags

Fixes: e68777c87ceed02ab199b32f941778c3cf97c794
       ("autotools: Deprecate the use of autotools")
Reviewed-by: Matt Turner <mattst88@gmail.com>
5 years agoradeonsi: fix a comment typo in si_fine_fence_set
Marek Olšák [Wed, 30 Jan 2019 19:31:48 +0000 (14:31 -0500)]
radeonsi: fix a comment typo in si_fine_fence_set

5 years agor600: add -Wstrict-overflow=0 to meson to silence the warning
Marek Olšák [Wed, 30 Jan 2019 17:49:30 +0000 (12:49 -0500)]
r600: add -Wstrict-overflow=0 to meson to silence the warning

same as radeonsi

5 years agowinsys/amdgpu: remove amdgpu_drm.h definitions
Marek Olšák [Mon, 28 Jan 2019 21:55:11 +0000 (16:55 -0500)]
winsys/amdgpu: remove amdgpu_drm.h definitions

trivial

5 years agoradeonsi: unify error paths in si_texture_create_object
Marek Olšák [Sat, 5 Jan 2019 00:30:48 +0000 (19:30 -0500)]
radeonsi: unify error paths in si_texture_create_object

5 years agoradeonsi: merge & rename texture BO metadata functions
Marek Olšák [Tue, 8 Jan 2019 16:51:22 +0000 (11:51 -0500)]
radeonsi: merge & rename texture BO metadata functions

5 years agoradeonsi: enable dithered alpha-to-coverage for better quality
Marek Olšák [Tue, 15 Jan 2019 02:21:28 +0000 (21:21 -0500)]
radeonsi: enable dithered alpha-to-coverage for better quality

same as AMDVLK.

GL_NV_alpha_to_coverage_dither_control allows controlling this behavior.
The default is implementation-dependent.

5 years agogallium: wrap u_screen in extern "C" for c++
Dylan Baker [Mon, 28 Jan 2019 18:50:31 +0000 (10:50 -0800)]
gallium: wrap u_screen in extern "C" for c++

Some drivers (notabily SWR) are written in C++, and as such they need
access to C headers with extern "C". So lets add that.

5 years agomesa/core: Enable EXT_texture_sRGB_R8 also for desktop GL
Gert Wollny [Thu, 24 Jan 2019 11:38:05 +0000 (12:38 +0100)]
mesa/core: Enable EXT_texture_sRGB_R8 also for desktop GL

As of Nov/30/2018 the extension is also valid for OpenGL >= 1.2, so
enable it accordingly and also add the required view class entry.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradv/winsys: fix hash when adding internal buffers
Samuel Pitoiset [Wed, 30 Jan 2019 11:07:29 +0000 (12:07 +0100)]
radv/winsys: fix hash when adding internal buffers

This fixes serious stuttering in Shadow Of The Tomb Raider.

Fixes: 50fd253bd6e ("radv/winsys: Add priority handling during submit.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agomesa: expose NV_conditional_render on GLES
Erik Faye-Lund [Thu, 1 Nov 2018 12:28:25 +0000 (13:28 +0100)]
mesa: expose NV_conditional_render on GLES

The extension spec has been updated to include GLES 2 support, so let's
enable it there.

v2: fixup ABI-check as well

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
5 years agov3d: Fix leak in resource setup error path
Ernestas Kulik [Thu, 30 Aug 2018 16:02:46 +0000 (19:02 +0300)]
v3d: Fix leak in resource setup error path

Reported by Coverity: in the case of unsupported modifier request, the
code does not jump to the “fail” label to destroy the acquired resource.

CID: 1435704
Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
Fixes: 45bb8f295710 ("broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.")

5 years agovc4: Fix leak in HW queries error path
Ernestas Kulik [Thu, 30 Aug 2018 16:02:47 +0000 (19:02 +0300)]
vc4: Fix leak in HW queries error path

Reported by Coverity: in the case where there exist hardware and
non-hardware queries, the code does not jump to err_free_query and leaks
the query.

CID: 1430194
Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
Fixes: 9ea90ffb98fb ("broadcom/vc4: Add support for HW perfmon")

5 years agov3d: Fix a release build set-but-unused compiler warning.
Eric Anholt [Wed, 30 Jan 2019 00:02:51 +0000 (16:02 -0800)]
v3d: Fix a release build set-but-unused compiler warning.

5 years agov3d: Always enable the NEON utile load/store code.
Eric Anholt [Tue, 29 Jan 2019 01:12:48 +0000 (17:12 -0800)]
v3d: Always enable the NEON utile load/store code.

I can't imagine the new HW block being paired with a v6 CPU, so don't
bother with the CPU detection that vc4 had to do.

Improves 1024x1024 TexImage on my 7278 by 47.3229% +/- 0.679632%

5 years agovc4: Declare the last cpu pointer as being modified in NEON asm.
Emil Velikov [Tue, 29 Jan 2019 17:25:17 +0000 (17:25 +0000)]
vc4: Declare the last cpu pointer as being modified in NEON asm.

Earlier commit addressed 7 of the 8 instances available.

v2: Rebase patch back to master (by anholt)

Cc: Carsten Haitzler (Rasterman) <raster@rasterman.com>
Cc: Eric Anholt <eric@anholt.net>
Fixes: 300d3ae8b14 ("vc4: Declare the cpu pointers as being modified in NEON asm.")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
5 years agodocs: Add relnotes stub for 19.1
Dylan Baker [Tue, 29 Jan 2019 23:32:16 +0000 (15:32 -0800)]
docs: Add relnotes stub for 19.1

5 years agobump version for 19.0 branch
Dylan Baker [Tue, 29 Jan 2019 23:30:25 +0000 (15:30 -0800)]
bump version for 19.0 branch

5 years agoautomake: Add include dir for nir src directory
Dylan Baker [Tue, 29 Jan 2019 22:25:46 +0000 (14:25 -0800)]
automake: Add include dir for nir src directory

Fixes: 6281f26f064ada36b57d45feb68d8e7d783198c9
       ("v3d: Add support for shader_image_load_store.")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
5 years agoautomake: Add float64.glsl to dist tarball
Dylan Baker [Tue, 29 Jan 2019 22:19:00 +0000 (14:19 -0800)]
automake: Add float64.glsl to dist tarball

Fixes: b63a1f8e40b6705d6a1d806fbd38dcd197d4229b
       ("glsl: Create file to contain software fp64 functions")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
5 years agoautomake: Fix path to generated source
Dylan Baker [Tue, 29 Jan 2019 17:52:39 +0000 (09:52 -0800)]
automake: Fix path to generated source

Fixes: b63a1f8e40b6705d6a1d806fbd38dcd197d4229b
       ("glsl: Create file to contain software fp64 functions")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
5 years agonir: Optimize double-precision lower_round_even()
Matt Turner [Sun, 27 Jan 2019 20:38:19 +0000 (12:38 -0800)]
nir: Optimize double-precision lower_round_even()

Use the trick of adding and then subtracting 2**52 (52 is the number of
explicit mantissa bits a double-precision floating-point value has) to
implement round-to-even.

Cuts the number of instructions on SKL of the piglit test
fs-roundEven-double.shader_test from 109 to 21.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
5 years agoac: use the correct LLVM processor name on Raven2
Marek Olšák [Mon, 28 Jan 2019 15:56:11 +0000 (10:56 -0500)]
ac: use the correct LLVM processor name on Raven2

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
5 years agov3d: Fix the autotools build.
Eric Anholt [Tue, 29 Jan 2019 22:00:27 +0000 (14:00 -0800)]
v3d: Fix the autotools build.

Noticed while looking at the gitlab-CI MR.

5 years agofreedreno: fix sysmem rendering being used when clear is used
Jonathan Marek [Wed, 23 Jan 2019 20:07:31 +0000 (15:07 -0500)]
freedreno: fix sysmem rendering being used when clear is used

This batch->cleared value is only used to decide to use sysmem rendering
or not, so it should include any buffers that are affected by a clear.

This is required because the a2xx fast clear doesn't work with sysmem
rendering. The a22x "normal" clear path doesn't work with sysmem either.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
5 years agofreedreno: fix depth usage logic
Jonathan Marek [Mon, 21 Jan 2019 16:04:47 +0000 (11:04 -0500)]
freedreno: fix depth usage logic

Depth can be used even when there is no restore/resolve of depth. This
happens when the depth buffer is invalidated after rendering to avoid
the resolve operation.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
5 years agofreedreno: fix invalidate logic
Jonathan Marek [Mon, 21 Jan 2019 16:32:30 +0000 (11:32 -0500)]
freedreno: fix invalidate logic

Set dirty bits on invalidate to trigger invalidate logic in fd_draw_vbo.

Also, resource_written for color needs to be after the invalidate logic.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
5 years agomesa/st: wire up DiscardFramebuffer
Jonathan Marek [Mon, 21 Jan 2019 16:29:59 +0000 (11:29 -0500)]
mesa/st: wire up DiscardFramebuffer

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agomesa: wire up InvalidateFramebuffer
Rob Clark [Thu, 1 Nov 2018 15:10:46 +0000 (11:10 -0400)]
mesa: wire up InvalidateFramebuffer

And before someone actually starts implementing DiscardFramebuffer()
lets rework the interface to something that is actually usable.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agost/dri: invalidate_resource depth/stencil before flush_resource
Jonathan Marek [Mon, 21 Jan 2019 16:02:11 +0000 (11:02 -0500)]
st/dri: invalidate_resource depth/stencil before flush_resource

This allows freedreno to be aware of the depth invalidate when flushing
batches on flush_resource.

AFAIK, the only other driver which might care about this change is vc4,
where I think it should help by allowing the depth invalidate to work with
GALLIUM_HUD.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agoegl/wayland-drm: Only announce formats via wl_drm which the driver supports.
Mario Kleiner [Wed, 13 Jun 2018 04:04:15 +0000 (06:04 +0200)]
egl/wayland-drm: Only announce formats via wl_drm which the driver supports.

Check if a pixel format is supported by the Wayland servers gpu driver
before exposing it to the client via wl_drm, so we avoid reporting formats
to the client which the server gpu can't handle.

Restrict this reporting to the new color depth 30 formats for now, as the
ARGB/XRGB8888 and RGB565 formats are probably supported by every gpu under
the sun.

Atm. this is mostly useful to allow proper PRIME renderoffload for depth
30 formats on the typical Intel iGPU + NVidia dGPU "NVidia Optimus" laptop
combo.

Tested on Intel, AMD, NVidia with single-gpu setup and on a Intel + NVidia
Optimus setup.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
5 years agoegl/wayland: Allow client->server format conversion for PRIME offload. (v2)
Mario Kleiner [Wed, 13 Jun 2018 04:04:14 +0000 (06:04 +0200)]
egl/wayland: Allow client->server format conversion for PRIME offload. (v2)

Support PRIME render offload between a Wayland server gpu and a Wayland
client gpu with different channel ordering for their color formats,
e.g., between Intel drivers which currently only support ARGB2101010
and XRGB2101010 import/display and nouveau which only supports ABGR2101010
rendering and display on nv-50 and later.

In the wl_visuals table, we also store for each format an alternate
sibling format which stores colors at the same precision, but with
different channel ordering, e.g., ARGB2101010 <-> ABGR2101010.

If a given client-gpu renderable format is not supported by the server
for import, but the alternate format is supported by the server, expose
the client-gpu renderable format as a valid EGLConfig to the client. At
eglSwapBuffers time, during the blitImage() detiling blit from the client
backbuffer to the linear buffer, the client format is converted to the
server supported format. As we have to do a copy for PRIME anyway,
this channel swizzling conversion comes essentially for free.

Note that even if a server gpu in principle does support sampling
from the clients native format, this conversion will be a performance
advantage if it allows to convert to the servers preferred format
for direct scanout, as the Wayland compositor may then be able to
directly page-flip a fullscreen client wl_buffer onto the primary
plane, or onto a hardware overlay plane, avoiding an extra data copy
for desktop composition.

Tested so far under Weston with: nouveau single-gpu, Intel single-gpu,
AMD single-gpu, "Optimus" Intel server iGPU for display + NVidia
client dGPU for rendering.

v2: Implement minor review comments by Eric Engestrom: Add some
    comment and assert, and some style fixes for clarity.
    No functional change.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
5 years agointel/fs: Use split sends for surface writes on gen9+
Jason Ekstrand [Fri, 16 Nov 2018 16:46:27 +0000 (10:46 -0600)]
intel/fs: Use split sends for surface writes on gen9+

Surface reads don't need them because they just have the one address
payload.  With surface writes, on the other hand, we can put the address
and the data in the different halves and avoid building the payload all
together.

The decrease in register pressure and added freedom in register
allocation resulting from this change reduces spilling enough to improve
the performance of one customer benchmark by about 2x.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Add interference between SENDS sources
Jason Ekstrand [Tue, 29 Jan 2019 05:24:24 +0000 (23:24 -0600)]
intel/fs: Add interference between SENDS sources

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Support SENDS in SHADER_OPCODE_SEND
Jason Ekstrand [Fri, 16 Nov 2018 03:05:08 +0000 (21:05 -0600)]
intel/fs: Support SENDS in SHADER_OPCODE_SEND

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/disasm: Properly disassemble split sends
Jason Ekstrand [Fri, 16 Nov 2018 21:17:25 +0000 (15:17 -0600)]
intel/disasm: Properly disassemble split sends

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/eu: Add support for the SENDS[C] messages
Jason Ekstrand [Thu, 15 Nov 2018 21:17:06 +0000 (15:17 -0600)]
intel/eu: Add support for the SENDS[C] messages

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/inst: Indent some code
Jason Ekstrand [Thu, 15 Nov 2018 23:40:32 +0000 (17:40 -0600)]
intel/inst: Indent some code

We're about to add some more if cases so let's have the giant re-indent
in it's own patch to make review easier.

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/inst: Fix the ia16_addr_imm helpers
Jason Ekstrand [Fri, 16 Nov 2018 19:03:31 +0000 (13:03 -0600)]
intel/inst: Fix the ia16_addr_imm helpers

These have clearly never seen any use.... On gen8, the bottom 4 bits are
missing so we need to shift them off before we call set_bits and shift
again when we get the bits.  Found by inspection.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/disasm: Rework SEND decoding to use descriptors
Jason Ekstrand [Fri, 16 Nov 2018 20:49:25 +0000 (14:49 -0600)]
intel/disasm: Rework SEND decoding to use descriptors

Instead of fetching the information out of the instruction directly,
fetch the descriptor and then pluck the information out of the
descriptor.  The current scheme works ok for SEND but with SENDS, it all
falls to pieces because the descriptor is completely shuffled around.

This commit doesn't actually convert everything.  One notable exception
is URB messages which don't even use descriptors in emit_urb_WRITE yet.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/eu: Add more message descriptor helpers
Jason Ekstrand [Sat, 17 Nov 2018 00:45:46 +0000 (18:45 -0600)]
intel/eu: Add more message descriptor helpers

We want to be able to extract data from descriptors as well as unify a
bit of the descriptor construction.

One of the unifications we do is to unify the read/write and dataport
descriptors.  On gen4-5, read/write are substantially different and the
read descriptors change between gen4 and gen4.x.  On gen6, they unified
layouts between read, write, and dataport.  Then, on gen8, they added
one bit to the message type field but left it reserved MBZ for
read/write messages.  This commit chooses to treat that as if they
expanded the field everywhere and just didn't have enough enum values
for read/write to bother with the extra bit.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/eu/validate: SEND restrictions also apply to SENDC
Jason Ekstrand [Fri, 16 Nov 2018 22:25:12 +0000 (16:25 -0600)]
intel/eu/validate: SEND restrictions also apply to SENDC

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/eu: Use GET_BITS in brw_inst_set_send_ex_desc
Jason Ekstrand [Thu, 15 Nov 2018 21:05:57 +0000 (15:05 -0600)]
intel/eu: Use GET_BITS in brw_inst_set_send_ex_desc

It's a bit more readable

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Use SHADER_OPCODE_SEND for varying UBO pulls on gen7+
Jason Ekstrand [Thu, 1 Nov 2018 21:04:01 +0000 (16:04 -0500)]
intel/fs: Use SHADER_OPCODE_SEND for varying UBO pulls on gen7+

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Use SHADER_OPCODE_SEND for texturing on gen7+
Jason Ekstrand [Tue, 30 Oct 2018 20:47:39 +0000 (15:47 -0500)]
intel/fs: Use SHADER_OPCODE_SEND for texturing on gen7+

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Use a logical opcode for IMAGE_SIZE
Jason Ekstrand [Wed, 31 Oct 2018 14:52:33 +0000 (09:52 -0500)]
intel/fs: Use a logical opcode for IMAGE_SIZE

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Use SHADER_OPCODE_SEND for surface messages
Jason Ekstrand [Tue, 30 Oct 2018 17:23:44 +0000 (12:23 -0500)]
intel/fs: Use SHADER_OPCODE_SEND for surface messages

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Add a generic SEND opcode
Jason Ekstrand [Mon, 29 Oct 2018 20:06:14 +0000 (15:06 -0500)]
intel/fs: Add a generic SEND opcode

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/eu: Rework surface descriptor helpers
Jason Ekstrand [Mon, 29 Oct 2018 21:09:30 +0000 (16:09 -0500)]
intel/eu: Rework surface descriptor helpers

This commit pulls the surface descriptor helpers out into brw_eu.h and
makes them no longer depend on the codegen infrastructure.  This should
allow us to use them directly from the IR code instead of the generator.
This change is unfortunately less mechanical than perhaps one would like
but it should be fairly straightforward.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/eu: Add has_simd4x2 bools to surface_write functions
Jason Ekstrand [Thu, 1 Nov 2018 19:15:58 +0000 (14:15 -0500)]
intel/eu: Add has_simd4x2 bools to surface_write functions

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Take an explicit exec size in brw_surface_payload_size()
Jason Ekstrand [Thu, 1 Nov 2018 18:40:31 +0000 (13:40 -0500)]
intel/fs: Take an explicit exec size in brw_surface_payload_size()

Instead of magically falling back to SIMD8 for atomics and typed
messages on Ivy Bridge, explicitly figure out the exec size and pass
that into brw_surface_payload_size.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Handle IMAGE_SIZE in size_read() and is_send_from_grf()
Jason Ekstrand [Wed, 31 Oct 2018 15:18:21 +0000 (10:18 -0500)]
intel/fs: Handle IMAGE_SIZE in size_read() and is_send_from_grf()

Like all the other sends, it's just mlen * REG_SIZE.

Fixes: 3cbc02e4693 "intel: Use TXS for image_size when we have..."
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/defines: Explicitly cast to uint32_t in SET_FIELD and SET_BITS
Jason Ekstrand [Mon, 29 Oct 2018 22:17:43 +0000 (17:17 -0500)]
intel/defines: Explicitly cast to uint32_t in SET_FIELD and SET_BITS

If you pass a bool in as the value to set, the C standard says that it
gets converted to an int prior to shifting.  If you try to set a bool to
bit 31, this lands you in undefined behavior.  It's better just to add
the explicit cast and let the compiler delete it for us.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agointel/fs: Get rid of fs_inst::equals
Jason Ekstrand [Fri, 25 Jan 2019 19:30:36 +0000 (13:30 -0600)]
intel/fs: Get rid of fs_inst::equals

There are piles of fields that it doesn't check so using it is a lie.
The only reason why it's not causing problem is because it has exactly
one user which only uses it for MOV instructions (which aren't very
interesting) and only on Sandy Bridge and earlier hardware.  Just get
rid of it and inline it in the one place that it's actually used.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
5 years agofreedreno: minor cleanups
Rob Clark [Tue, 29 Jan 2019 17:29:16 +0000 (12:29 -0500)]
freedreno: minor cleanups

Signed-off-by: Rob Clark <robdclark@gmail.com>