Commit Graph

109866 Commits

Author SHA1 Message Date
Jason Ekstrand 83b46ad6d8 anv: Use gen_mi_builder for CmdDrawIndirectByteCount
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-11 18:04:09 +00:00
Jason Ekstrand 8b8deeca78 intel/common: Add unit tests for gen_mi_builder
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-11 18:04:09 +00:00
Jason Ekstrand 2f7fcd103e intel/common: Add a MI command builder
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-11 18:04:09 +00:00
Eric Anholt 8f065596d2 v3d: Add an optimization pass for redundant flags updates.
Our exec masking introduces lots of redundant flags updates, and even
without that there will be cases where NIR comparisons on the same sources
for different reasons may generate the same comparison instruction before
the selection.

total instructions in shared programs: 6492930 -> 6460934 (-0.49%)
total uniforms in shared programs: 2117460 -> 2115106 (-0.11%)
total spills in shared programs: 4983 -> 4987 (0.08%)
total fills in shared programs: 6408 -> 6416 (0.12%)
2019-04-11 09:24:02 -07:00
Lubomir Rintel 3dd2001993 kmsro: Extend to include armada-drm
This allows using the Marvell Armada display controllers (with the
armada drm modesetting driver) along with the render-only drivers,
such as Etnaviv on an OLPC XO-1.75 laptop.

v2:
- Add to Android.mk too

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-04-11 15:53:29 +00:00
Icenowy Zheng a155c26a66 lima: implement blit with util_blitter
As we have already prepared for using util_blitter, use it to implement
lima_blit.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 13:45:51 +00:00
Icenowy Zheng 318ccbe7b2 lima: make lima_context_framebuffer subtype of pipe_framebuffer_state
Currently the lima driver saves the framebuffer state in its
from-scratch struct lima_context_framebuffer. However, util_blitter
requires to save framebuffer with standard struct
pipe_framebuffer_state.

Make the lima_context_framebuffer a subtype of the standard
pipe_framebuffer_state, thus the standard part can be used for
util_blitter framebuffer state saving.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 13:45:51 +00:00
Icenowy Zheng 8d27bc351f lima: add dummy set_sample_mask function
The set_sample_mask function is required in util_blitter.

Add a dummy one to make util_blitter work.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 13:45:51 +00:00
Eric Engestrom 8c780e54a3 gitlab-ci: build gallium extra hud
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2019-04-11 13:15:18 +00:00
Eric Engestrom c77acc3ceb meson: remove meson-created megadrivers symlinks
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110356
Fixes: aa7afe324c "meson: strip rpath from megadrivers"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-04-11 12:40:16 +00:00
Timothy Arceri 9e3740c47f nir: initialise some variables in opt_if_loop_last_continue()
Fixes a couple of Coverity warnings CID 1444626.

Fixes: e30804c602 ("nir/radv: remove restrictions on opt_if_loop_last_continue()")

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2019-04-11 20:38:03 +10:00
Juan A. Suarez Romero 83f1b0e95b nir/xfb: do not use bare interface type
In commit 3b3653c4cf we decided not to use bare types; hence do not use
bare type when comparing with interface type to find out if the xfb
variable is an array block.

This fixes dEQP-VK.transform_feedback.* tests.

Fixes: 3b3653c4cf ("nir/spirv: don't use bare types, remove assert in
                     split vars for testing")
CC: Dave Airlie <airlied@redhat.com>
CC: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-04-11 11:52:45 +02:00
Michel Dänzer b48e64f903 gitlab-ci: Run CI pipeline for all branches in the main repository
In turn, do not run the pipeline for the master branch in forked
repositories.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-04-11 11:22:41 +02:00
Erik Faye-Lund b60a13d5cb virgl: use debug_printf instead of fprintf
While we're at it, prefix the string with "VIRGL: ", to match similar
code elsewhere in virgl.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-04-11 09:53:25 +02:00
Erik Faye-Lund 7394ef4a72 virgl: do not warn about display-target binding
We never want to display a transfer-temp surface, so let's ignore that
flag when calculating the new binding flags.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-04-11 09:53:22 +02:00
Erik Faye-Lund 27d94a83cd virgl: only warn about unchecked flags
The other flags are already vetted, so there's no point in reporting
them.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-04-11 09:53:15 +02:00
Erik Faye-Lund 8f1a147d68 virgl: unsigned int -> unsigned
We don't usually spell out the int part of unsigned.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-04-11 09:53:10 +02:00
Tapani Pälli ef923088d2 egl: setup fds array correctly when exporting dmabuf
For formats with multiple planes, application will pass a num_planes
sized fds array which should be initialized properly in case fds amount
utilized by the driver is less than the number of planes.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-04-11 10:16:03 +03:00
Dylan Baker 4122f55574 docs: update calendar, and news item and link release notes for 19.0.2 2019-04-10 20:51:58 -07:00
Dylan Baker 9cb011e7c8 docs: Add sha256 sums for 19.0.2 2019-04-10 20:50:41 -07:00
Dylan Baker 9725c59756 docs: Add release notes for 19.0.2 2019-04-10 20:50:39 -07:00
Jan Vesely 6ec9733b9f gallium/aux: Report error if loading of a pipe driver fails.
Skip over non-existent files.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-04-10 22:17:09 -04:00
Rob Herring 2b780fe893 kmsro: Add platform support for exynos and sun4i
v2:
- add Android.mk change

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 09:57:53 +08:00
Rob Herring b1da1946c7 kmsro: Add lima renderonly support
Enable using lima for KMS renderonly. This still needs KMS driver
name mapping to kmsro to be used automatically.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 09:57:53 +08:00
Qiang Yu 92d7ca4b1c gallium: add lima driver
v2:
- use renamed util_dynarray_grow_cap
- use DEBUG_GET_ONCE_FLAGS_OPTION for debug flags
- remove DRM_FORMAT_MOD_ARM_AGTB_MODE0 usage
- compute min/max index in driver

v3:
- fix plbu framebuffer state calculation
- fix color_16pc assemble
- use nir_lower_all_source_mods for lowering neg/abs/sat
- use float arrary for static GPU data
- add disassemble comment for static shader code
- use drm_find_modifier

v4:
- use lima_nir_lower_uniform_to_scalar

v5:
- remove nir_opt_global_to_local when rebase

Cc: Rob Clark <robdclark@gmail.com>
Cc: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Arno Messiaen <arnomessiaen@gmail.com>
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: marmeladema <xademax@gmail.com>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rohan Garg <rohan@garg.io>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 09:57:53 +08:00
Qiang Yu 64eaf60ca7 drm-uapi: add lima_drm.h
Acked-by: Eric Anholt <eric@anholt.net>
Signed-of-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 09:57:53 +08:00
Qiang Yu d26faef2e9 gallium/u_vbuf: export u_vbuf_get_minmax_index
This helper function can be used by driver which
always need min/max index.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
2019-04-11 09:57:53 +08:00
Qiang Yu dc37942c4e u_dynarray: add util_dynarray_grow_cap
This is for the case that user only know a max size
it wants to append to the array and enlarge the array
capacity before writing into it.

v2:
- rename newsize to newcap
- rename util_dynarray_enlarge to util_dynarray_grow_cap

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2019-04-11 09:57:53 +08:00
Qiang Yu 509dd6e20b u_math: add ushort_to_float/float_to_ushort
v2:
- return 0 for NaN too

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-04-11 09:57:53 +08:00
Guido Günther c73fd79cee gallium: trace: Add missing fence related wrappers
Without that kmscube with GALLIUM_TRACE would segfault like:

  #0  0x0000000000000000 in  ()
  #1  0x0000ffff8f311760 in dri2_create_fence_fd (_ctx=0xaaaae266b8b0, fd=10) at ../src/gallium/state_trackers/dri/dri_helpers.c:122
  #2  0x0000ffff90788670 in dri2_create_sync (drv=0xaaaae2667910, disp=0xaaaae26691f0, type=12612, attrib_list=0xaaaae26b9290) at ../src/egl/drivers/dri2/egl_dri2.c:2993
  #3  0x0000ffff90776a9c in _eglCreateSync (disp=0xaaaae26691f0, type=12612, attrib_list=0xaaaae26b9290, orig_is_EGLAttrib=0, invalid_type_error=12292) at ../src/egl/main/eglapi.c:1823
  #4  0x0000ffff90776be4 in eglCreateSyncKHR (dpy=0xaaaae26691f0, type=12612, int_list=0xfffff662e828) at ../src/egl/main/eglapi.c:1848

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2019-04-10 21:31:16 -04:00
Mark Janes eda36feb2b intel/tools: Remove redundant definitions of INTEL_DEBUG
INTEL_DEBUG is declared extern and defined in gen_debug.c

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-10 13:15:33 -07:00
Mark Janes 2393cc7f00 intel/common: move gen_debug to intel/dev
libintel_common depends on libintel_compiler, but it contains debug
functionality that is needed by libintel_compiler.  Break the circular
dependency by moving gen_debug files to libintel_dev.

Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-10 13:15:33 -07:00
Mike Blumenkrantz 03d6d01fe2 iris: support INTEL_NO_HW environment variable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-10 12:59:17 -07:00
Jian-Hong Pan 7295487c6d intel: Fix the description of Coffeelake pci-id 0x3E98
According to Intel website [1], the description of chipset 8086:3E98 is
Intel(R) UHD Graphics 630.  Besides, xserver also mentions it as
"Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)" in commit d3a26bbf
(DRI2: Add another Coffeelake PCI ID) [2].

This patch modifies the description to sync with xserver.

[1]: https://ark.intel.com/content/www/us/en/ark/products/134896/intel-core-i5-9600k-processor-9m-cache-up-to-4-60-ghz.html
[2]: d3a26bbf61

Fixes: commit 44f1dcf9b3 "i965: Add a new CFL PCI ID."
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Anuj Phogat anuj.phogat@gmail.com
2019-04-10 12:31:00 -07:00
Jan Vesely 460846981a Partially revert "gallium: fix autotools build of pipe_msm.la"
This partially reverts commit 356ec7a219.
There are symbols needed by libglsl missing, so we might as well skip
the entire library.

Fixes: 356ec7a219
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Vinson Lee <vlee@freedesktop.org>
2019-04-10 14:52:52 -04:00
Eric Anholt afad1f7d62 vc4: Upload CS/VS UBO uniforms together.
Same as I did for V3D, drop all this code trying to GC the
non-indirectly-loaded uniforms from the UBO that's used for indirect
access of gallium cb[0].  While it does successfully drop some of those,
it came at the cost of uploading the VS's indirect unifroms twice, for the
bin and render versions of the shader.

With the UBO loads simplified, I was also able to easily backport V3D's
change to pack a UBO offset into the uniform_data[] field so that we don't
need to do the add of the uniform base in the shader.

As a bonus, now vc4 doesn't depend on mesa/st type_size functions.

total uniforms in shared programs: 25514 -> 25490 (-0.09%)
total instructions in shared programs: 77019 -> 76836 (-0.24%)
2019-04-10 11:45:30 -07:00
Eric Anholt 0204fb77e0 vc4: Split UBO0 and UBO1 address uniform handling.
I'm going to extend how UBO0 works in a moment.
2019-04-10 11:45:30 -07:00
Eric Anholt 7347d09d6a vc4: Don't forget to set the range when scalarizing our uniforms.
In the next commit, we'll want this for handling UBO access clamping.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-10 11:45:30 -07:00
Eric Anholt 771adffec1 st: Lower uniforms in st in the !PIPE_CAP_PACKED_UNIFORMS case as well.
PIPE_CAP_PACKED_UNIFORMS conflates several things: Lowering uniforms i/o
at the st level instead of the backend, packing uniforms with no padding
at all, and lowering to UBOs.

Requiring backends to lower uniforms i/o for !PIPE_CAP_PACKED_UNIFORMS
leads to the driver needing to either link against the type size function
in mesa/st, or duplicating it in the backend.  Given that all backends
want this lower-io as far as I can tell, just move it to mesa/st to
resolve the link issue and avoid the driver author needing to understand
st's uniforms layout.

Incidentally, fixes uniform layout failures in nouveau in:

dEQP-GLES2.functional.shaders.struct.uniform.sampler_nested_fragment
dEQP-GLES2.functional.shaders.struct.uniform.sampler_nested_vertex
dEQP-GLES2.functional.shaders.struct.uniform.sampler_array_fragment
dEQP-GLES2.functional.shaders.struct.uniform.sampler_array_vertex

and I think in Lima as well.

v2: fix indents

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-10 11:44:20 -07:00
Lionel Landwerlin 3053d5a4f2 anv: don't use default pipeline cache for hits for VK_EXT_pipeline_creation_feedback
If the user didn't provide a pipeline cache and we're using the
default internal pipeline cache, then we shouldn't consider a cache
hit for VK_EXT_pipeline_creation_feedback as the application did not
provide a cache.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6601e5d6fc ("anv: implement VK_EXT_pipeline_creation_feedback")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-04-10 18:45:04 +01:00
Marek Olšák 53f715fafb Revert "glsl: fix shader_storage_blocks_write_access for SSBO block arrays"
This reverts commit b7ca074cc0.

It broke a lot of tests.
2019-04-10 10:48:56 -04:00
Karol Herbst 0c4706563a glsl/standalone: add GLES3.1 and GLES3.2 compatibility
also set some constants for SSBOs.

With that it can compile the shader from:
dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.18

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2019-04-10 16:16:36 +02:00
Erik Faye-Lund 7c05c95d05 virgl: use debug_printf instead of fprintf
While we're at it, prefix the string with "VIRGL: ", to match similar
code elsewhere in virgl.

Fixes: d7b3196976 ("virgl: Return an error if we use fp64 on top of GLES")
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
2019-04-10 14:27:45 +02:00
Gert Wollny 04e672257c virgl: Enable passing arrays as input to fragment shaders
This is needed to properly handle interpolateAt* when the input to be
interpolated is passed as array in the original GLSL.

Currently, the the GLSL compiler would lower selecting the correct input so
that the interpolant parameter to interpolateAt* is a temporary, and this
can not be used to create a valid shader on the host side, because here the
parameter must a shader input.

By allowing the passing the created TGSI allows to create proper GLSL.
This is related to the virglrenderer bug
  https://gitlab.freedesktop.org/virgl/virglrenderer/issues/74

v2: Squash the two patches handling these flags into another

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-04-10 11:09:40 +02:00
Gert Wollny 872519c663 Gallium: Add new CAP that indicated whether IO array definitions can be shriked
PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS is added to indicate whether the TGSI
pass to shrink IO arrays should be skipped to enforce the originally declared array
sizes and locations instead.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-04-10 11:09:40 +02:00
Samuel Pitoiset a182adfd83 wsi: allow to override the present mode with MESA_VK_WSI_PRESENT_MODE
This is common to all Vulkan drivers and all WSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-10 09:10:01 +02:00
Samuel Pitoiset 09b4049be3 radv: enable VK_AMD_gpu_shader_half_float
Should be safe to enable as all instructions seem to support 16-bit.
Unfortunately, there is no CTS test.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-04-10 09:07:17 +02:00
Rhys Perry fd1fc255d9 ac: add 16-bit support to ac_build_ddxy()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-04-10 09:05:58 +02:00
Samuel Pitoiset bc6d486c78 ac/nir: fix nir_op_b2f16
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-04-10 09:05:55 +02:00
Lepton Wu 1f063c0bfb virgl: Set bind when creating temp resource.
virgl render complains about "Illegal resource" when running
dEQP-EGL.functional.color_clears.single_context.gles2.rgb888_window,
the reason is that a zero bind value was given for temp resource.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
2019-04-09 19:25:25 -07:00