Bas Nieuwenhuizen [Tue, 15 Jan 2019 21:18:15 +0000 (22:18 +0100)]
turnip: Add emit functions in a header.
This adds a radv-style check_space functions + emit functions.
Also puts them in a header as a bunch of inlines, so
(1) we can use them from meta code.
(2) they are inline for performance as these are common and small.
Did not put them in tu_private.h as a bunch of inlines only
clutters up that huge headerfile.
Precise error propagation for memory allocation failures is still
todo.
Chia-I Wu [Thu, 10 Jan 2019 22:07:50 +0000 (14:07 -0800)]
turnip: preliminary support for tu_QueueWaitIdle
This creates a new fd on each queue submit. I do not go with
DRM_IOCTL_MSM_WAIT_FENCE solely because the path is marked legacy.
Otherwise, we can use the fence id rather than requesting a fence
fd until external fences are supported and enabled.
Chia-I Wu [Fri, 11 Jan 2019 18:55:15 +0000 (10:55 -0800)]
turnip: constify tu_device in tu_gem_*
Chia-I Wu [Thu, 10 Jan 2019 23:34:44 +0000 (15:34 -0800)]
turnip: add wrappers around DRM_MSM_SUBMITQUEUE_*
Add tu_drm_submitqueue_new and tu_drm_submitqueue_close.
Chia-I Wu [Thu, 10 Jan 2019 23:27:28 +0000 (15:27 -0800)]
turnip: add wrappers around DRM_MSM_GET_PARAM
Add tu_drm_get_gpu_id and tu_drm_get_gmem_size.
Chia-I Wu [Fri, 11 Jan 2019 18:09:53 +0000 (10:09 -0800)]
turnip: remove unnecessary libfreedreno_drm dep
Remove libfreedreno_drm dep and unused fd_device.
Chia-I Wu [Fri, 11 Jan 2019 18:03:51 +0000 (10:03 -0800)]
turnip: use msm_drm.h from inc_freedreno
The recent change to msm_drm.h changed the APIs in an incompatible
way.
Bas Nieuwenhuizen [Thu, 10 Jan 2019 21:07:04 +0000 (22:07 +0100)]
turnip: Shorten primary_cmd_stream name.
It really is too long.
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:39:14 +0000 (21:39 +0100)]
turnip: Fill command buffer
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:25:20 +0000 (21:25 +0100)]
turnip: Implement submission.
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:20:35 +0000 (21:20 +0100)]
turnip: Make bo_list functions not static
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:12:38 +0000 (21:12 +0100)]
turnip: Add msm queue support.
Bas Nieuwenhuizen [Mon, 31 Dec 2018 13:15:30 +0000 (14:15 +0100)]
turnip: Add a command stream.
Bas Nieuwenhuizen [Mon, 31 Dec 2018 10:34:32 +0000 (11:34 +0100)]
turnip: Implement a slow bo list
Bas Nieuwenhuizen [Mon, 31 Dec 2018 10:08:45 +0000 (11:08 +0100)]
turnip: Implement some UUIDs.
Bas Nieuwenhuizen [Fri, 28 Dec 2018 16:27:12 +0000 (17:27 +0100)]
turnip: clean up TODO.
./deqp-vk -n dEQP-VK.info.*
Writing test log into TestResults.qpa
dEQP Core unknown (0xcafebabe) starting..
target implementation = 'Surfaceless'
WARNING: tu is not a conformant vulkan implementation, testing use only.
WARNING: tu is not a conformant vulkan implementation, testing use only.
Test case 'dEQP-VK.info.build'..
Pass (Not validated)
Test case 'dEQP-VK.info.device'..
Pass (Not validated)
Test case 'dEQP-VK.info.platform'..
Pass (Not validated)
Test case 'dEQP-VK.info.memory_limits'..
Pass (Pass)
DONE!
Test run totals:
Passed: 4/4 (100.0%)
Failed: 0/4 (0.0%)
Not supported: 0/4 (0.0%)
Warnings: 0/4 (0.0%)
Bas Nieuwenhuizen [Fri, 28 Dec 2018 16:25:17 +0000 (17:25 +0100)]
turnip: Remove some radv leftovers.
Bas Nieuwenhuizen [Fri, 28 Dec 2018 15:27:24 +0000 (16:27 +0100)]
turnip: Implement some format properties for RGBA8.
Just to get some tests to not skip. This is neither complete
nor completely correct.
Chia-I Wu [Wed, 9 Jan 2019 22:16:01 +0000 (14:16 -0800)]
turnip: add .clang-format
Add and apply .clang-format.
Bas Nieuwenhuizen [Fri, 21 Dec 2018 13:49:30 +0000 (14:49 +0100)]
turnip: Implement pipe-less param query.
Bas Nieuwenhuizen [Fri, 21 Dec 2018 13:12:17 +0000 (14:12 +0100)]
turnip: move tu_gem.c to tu_drm.c
Bas Nieuwenhuizen [Fri, 21 Dec 2018 12:46:06 +0000 (13:46 +0100)]
turnip: Stop hardcoding the msm version check.
Bas Nieuwenhuizen [Fri, 21 Dec 2018 11:50:55 +0000 (12:50 +0100)]
turnip: Add image layout calculations.
Bas Nieuwenhuizen [Thu, 20 Dec 2018 23:54:15 +0000 (00:54 +0100)]
turnip: Fix memory mapping.
Bas Nieuwenhuizen [Thu, 20 Dec 2018 21:57:07 +0000 (22:57 +0100)]
turnip: Fix bo allocation after we stopped using libdrm_freedreno ...
Al this figuring out new errors is why I don't like reinventing the
wheel.
Bas Nieuwenhuizen [Thu, 20 Dec 2018 17:08:49 +0000 (18:08 +0100)]
turnip: Add 630 to the list.
Chad Versace [Mon, 12 Nov 2018 22:45:47 +0000 (14:45 -0800)]
turnip: Don't return from tu_stub funcs
Since the macros are lowercase and look like normal functions, that they
change control flow with a hidden return is surprising.
Chad Versace [Mon, 12 Nov 2018 22:42:36 +0000 (14:42 -0800)]
turnip: Fix 'unused' warnings
Now turnip builds without warnings on my machine.
Chad Versace [Mon, 12 Nov 2018 22:28:58 +0000 (14:28 -0800)]
turnip: Add TODO file
Chad Versace [Wed, 7 Nov 2018 04:26:45 +0000 (21:26 -0700)]
turnip: Replace fd_bo with tu_bo
(olv, after rebase) remove inc_drm_uapi
Chad Versace [Mon, 12 Nov 2018 22:21:45 +0000 (14:21 -0800)]
turnip: Use vk_errorf() for initialization error messages
This small cleanup better prepares turnip for VK_EXT_debug_report.
Chad Versace [Mon, 12 Nov 2018 22:23:42 +0000 (14:23 -0800)]
turnip: Add TODO for Android logging
Chad Versace [Mon, 12 Nov 2018 22:13:13 +0000 (14:13 -0800)]
turnip: Require DRM device version >= 1.3
Because the driver will require support for iova.
Chad Versace [Wed, 7 Nov 2018 05:14:04 +0000 (22:14 -0700)]
turnip: Fix indentation
Chad Versace [Wed, 7 Nov 2018 07:17:30 +0000 (00:17 -0700)]
turnip: Fix a real -Wmaybe-uninitialized
Chad Versace [Wed, 7 Nov 2018 06:51:05 +0000 (23:51 -0700)]
turnip: Use vk_outarray in all relevant public functions
Chad Versace [Wed, 7 Nov 2018 07:01:03 +0000 (00:01 -0700)]
turnip: Fix result of vkEnumerate*ExtensionProperties
Given an unsupported layer name, the functions must return
VK_ERROR_LAYER_NOT_PRESENT.
Chad Versace [Wed, 7 Nov 2018 06:52:57 +0000 (23:52 -0700)]
turnip: Fix result of vkEnumerate*LayerProperties
The functions must not return VK_ERROR_LAYER_NOT_PRESENT. The spec
reserves that error for vkEnumerate*ExtensionProperties.
Chad Versace [Mon, 5 Nov 2018 06:42:55 +0000 (23:42 -0700)]
turnip: Fix indentation in function signatures
Due to s/anv/tu/, in many function signatures the indentation of
parameters was off-by-one.
Bas Nieuwenhuizen [Fri, 17 Aug 2018 12:48:46 +0000 (14:48 +0200)]
turnip: Disable more features.
Bas Nieuwenhuizen [Fri, 17 Aug 2018 12:43:01 +0000 (14:43 +0200)]
turnip: Initialize memory type in requirements.
Bas Nieuwenhuizen [Fri, 17 Aug 2018 12:35:59 +0000 (14:35 +0200)]
turnip: Cargo cult the Intel heap size functionality.
Bas Nieuwenhuizen [Fri, 10 Aug 2018 11:30:08 +0000 (13:30 +0200)]
turnip: Report a memory type and heap.
Bas Nieuwenhuizen [Fri, 10 Aug 2018 11:19:22 +0000 (13:19 +0200)]
turnip: Add buffer allocation & mapping support.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 18:45:49 +0000 (20:45 +0200)]
turnip: Fix newly introduced warning.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 09:14:33 +0000 (11:14 +0200)]
turnip: Remove abort.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 09:09:01 +0000 (11:09 +0200)]
turnip: Gather some device info.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 08:36:06 +0000 (10:36 +0200)]
turnip: Fix up detection of device.
Chad Versace [Mon, 5 Nov 2018 06:27:54 +0000 (22:27 -0800)]
turnip: Drop Makefile.am and Android.mk
The Makefile.am doesn't work. I tried fixing it but gave up because
I don't understand Autotools. I strongly suspect the Android.mk also
doesn't work.
Rather than maintain the broken build files, let's delete them and
re-add working build files if-and-when we need them. (Maybe we'll be
lucky and turnip will never need to support Autotools!).
Bas Nieuwenhuizen [Wed, 8 Aug 2018 22:23:57 +0000 (22:23 +0000)]
turnip: Add driver skeleton (v2)
meson files have been updated, autotools and android still need
updating.
Only build tested.
v2 (chadv):
- Rebase onto master.
- Fix build breakage in Python scripts.
- Drop the WSI code. The internal WSI apis have changed recently, and
will likely change again before the driver goes upstream. To avoid
unnecessary rebase work, let's drop the WSI code and re-add it when
we're ready to really use WSI.
(olv, after rebase) do not enable freedreno by default on ARM
Connor Abbott [Fri, 8 Mar 2019 12:05:53 +0000 (13:05 +0100)]
nir/serialize: Prevent writing uninitialized state_slot data
The nir_state_slot struct had some padding that was never initialized.
Serializing the individual parts of the struct is more robust and avoids
the overhead of zeroing it at creation, so just do that.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tapani Pälli [Mon, 11 Mar 2019 09:30:01 +0000 (11:30 +0200)]
anv: release memory allocated by glsl types during spirv_to_nir
Fixes leaks for each glsl_type generated:
==32470== 384 bytes in 3 blocks are possibly lost in loss record 18 of 18
==32470== at 0x483880B: malloc (vg_replace_malloc.c:309)
==32470== by 0x4C43F4A: ralloc_size (ralloc.c:119)
==32470== by 0x4C44014: rzalloc_size (ralloc.c:151)
==32470== by 0x4C44258: rzalloc_array_size (ralloc.c:215)
==32470== by 0x4D38957: glsl_type::glsl_type(glsl_struct_field const*, unsigned int, char const*) (glsl_types.cpp:114)
==32470== by 0x4D3BEED: glsl_type::get_struct_instance(glsl_struct_field const*, unsigned int, char const*) (glsl_types.cpp:1146)
==32470== by 0x4D42ECC: glsl_struct_type (nir_types.cpp:501)
==32470== by 0x4CDB5A1: vtn_handle_type (spirv_to_nir.c:1269)
==32470== by 0x4CE53DD: vtn_handle_variable_or_type_instruction (spirv_to_nir.c:4018)
==32470== by 0x4CD8CFF: vtn_foreach_instruction (spirv_to_nir.c:365)
==32470== by 0x4CE5E6B: spirv_to_nir (spirv_to_nir.c:4490)
==32470== by 0x497AF10: anv_shader_compile_to_nir (anv_pipeline.c:173)
v2: move release call to vkDestroyInstance
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Eric Engestrom [Sun, 25 Nov 2018 15:15:09 +0000 (15:15 +0000)]
wsi/x11: use WSI_FROM_HANDLE() instead of pointer casts
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Eric Engestrom [Sun, 28 Oct 2018 13:40:12 +0000 (13:40 +0000)]
wsi/wayland: fix pointer casting warning on 32bit
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Eric Engestrom [Sun, 28 Oct 2018 13:39:30 +0000 (13:39 +0000)]
wsi/display: s/#if/#ifdef/ to fix -Wundef
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Eric Engestrom [Sun, 28 Oct 2018 13:37:26 +0000 (13:37 +0000)]
wsi: deduplicate get_current_time() functions between display and x11
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tapani Pälli [Fri, 8 Mar 2019 08:29:26 +0000 (10:29 +0200)]
anv: release memory allocated by bo_heap when descriptor pool is destroyed
Fixes following leak:
==21853== 32 bytes in 1 blocks are definitely lost in loss record 2 of 20
==21853== at 0x483AB1A: calloc (vg_replace_malloc.c:762)
==21853== by 0x4C4DD7F: util_vma_heap_free (vma.c:221)
==21853== by 0x4C4D647: util_vma_heap_init (vma.c:46)
==21853== by 0x4957B9F: anv_CreateDescriptorPool (anv_descriptor_set.c:578)
Fixes: c520f4dec9cb ("anv: Add a concept of a descriptor buffer")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tapani Pälli [Mon, 4 Mar 2019 12:22:36 +0000 (14:22 +0200)]
anv: destroy descriptor sets when pool gets destroyed
Patch maintains a list of sets in the pool and destroys possible
remaining sets when pool is destroyed.
As stated in Vulkan spec:
"When a pool is destroyed, all descriptor sets allocated from
the pool are implicitly freed and become invalid."
This fixes memory leaks spotted with valgrind:
==19622== 96 bytes in 1 blocks are definitely lost in loss record 2 of 3
==19622== at 0x483880B: malloc (vg_replace_malloc.c:309)
==19622== by 0x495B67E: default_alloc_func (anv_device.c:547)
==19622== by 0x4955E05: vk_alloc (vk_alloc.h:36)
==19622== by 0x4956A8F: anv_multialloc_alloc (anv_private.h:538)
==19622== by 0x4956A8F: anv_CreateDescriptorSetLayout (anv_descriptor_set.c:217)
Fixes: 14f6275c92f1 ("anv/descriptor_set: add reference counting for descriptor set layouts")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Timothy Arceri [Mon, 18 Feb 2019 04:40:49 +0000 (15:40 +1100)]
anv: add support for dumping shader info via VK_EXT_debug_report
This information will be used by the vkpipeline-db tool.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Sat, 9 Mar 2019 08:25:30 +0000 (00:25 -0800)]
iris: Fix backface stencil write condition
A bit too much search and replace here.
Alyssa Rosenzweig [Sun, 10 Mar 2019 19:16:56 +0000 (19:16 +0000)]
panfrost/drm: Cast pointer to u64 to fix warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tomeu Vizoso [Fri, 8 Mar 2019 09:27:07 +0000 (10:27 +0100)]
panfrost: Add backend targeting the DRM driver
This backend interacts with the new DRM driver for Midgard GPUs which is
currently in development.
When using this backend, Panfrost has roughly on-par functionality as
when using the non-DRM driver from Arm.
Alyssa Rosenzweig: To do so, we implement additional routines for
runtime GPU version detection and fencing. We cleanup some duplicate
code interfering with the new driver. We fix a long-standing memory leak
which is aggravated on the new driver. Finally, we implement BO
import/export in a way compatible with the new driver. These changes are
squashed to preserve bisectability given the hard-to-track ABI shifts in
the nondrm module
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tomeu Vizoso [Fri, 8 Mar 2019 09:27:06 +0000 (10:27 +0100)]
panfrost: Add gem_handle to panfrost_memory and panfrost_bo
It will be used by the DRM backend to store GEM handles from the kernel.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Rob Clark [Sun, 10 Mar 2019 15:08:10 +0000 (11:08 -0400)]
freedreno/a6xx: more bcolor fixes
Non-zero offset wasn't working, which breaks a bunch of
dEQP-GLES31.functional.texture.border_clamp.formats.* when doing sharded
deqp runs (because order of tests changes, resulting in different
texture state bound.. deqp doesn't really clean up it's gl state between
tests very well)
Previously, if additional textures were bound, due to using too small of
a bcolor_entry size, the last 32bytes of the bcolor_entry would be
overwritten.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Eric Engestrom [Sat, 9 Mar 2019 22:53:27 +0000 (22:53 +0000)]
gitlab-ci: add panfrost to the gallium drivers build
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Sat, 9 Mar 2019 22:27:51 +0000 (22:27 +0000)]
panfrost: move #include to fix compilation
In standalone.h, the struct gl_context type is not declared by #includ'ing
mtypes.h:
In file included from src/gallium/drivers/panfrost/midgard/cmdline.c:24:
src/compiler/glsl/standalone.h:46:14: warning: ‘struct gl_context’ declared inside parameter list will not be visible outside of this definition or declaration
struct gl_context *ctx);
^~~~~~~~~~
This causes the following compilation failure:
src/gallium/drivers/panfrost/midgard/cmdline.c: In function ‘compile_shader’:
src/gallium/drivers/panfrost/midgard/cmdline.c:58:61: error: passing argument 4 of ‘standalone_compile_shader’ from incompatible pointer type [-Werror=incompatible-pointer-types]
prog = standalone_compile_shader(&options, 2, argv, &local_ctx);
^~~~~~~~~~
In file included from src/gallium/drivers/panfrost/midgard/cmdline.c:24:
src/compiler/glsl/standalone.h:43:28: note: expected ‘struct gl_context *’ but argument is of type ‘struct gl_context *’
struct gl_shader_program * standalone_compile_shader(
^~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: e67e0726372ab65f4104 "panfrost: Implement Midgard shader toolchain"
Cc: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Sat, 9 Mar 2019 22:04:21 +0000 (22:04 +0000)]
panfrost: fix tgsi_to_nir() call
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109945
Fixes: 7da251fc721360fc28b9 "panfrost: Check in sources for command stream"
Cc: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Axel Davy [Sat, 9 Mar 2019 13:29:07 +0000 (14:29 +0100)]
Revert "d3dadapter9: Support software renderer on any DRI device"
This reverts commit
0d0847659385e298badd6ef6ca4d0a9e537ae288.
It makes gitlab's travis fail. Revert until patch is fixed.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Axel Davy [Mon, 4 Feb 2019 23:11:46 +0000 (00:11 +0100)]
st/nine: Change a few advertised caps
Most hw on the native platform advertise these
caps this way.
D3DCAPS_READ_SCANLINE: We don't really have hardware
support for that, but many games don't even check the
flag, and expect GetRasterStatus to work, which is
why we emulated it with a timer (like wine). So we
may as well advertise the cap.
D3DCURSORCAPS_LOWRES: I don't know what is the status
of this on X11, but I don't know of any dx9 game
running at height < 400 either.
D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE: The cap should
correspond to what the current generation of hw is doing.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Axel Davy [Mon, 4 Feb 2019 22:42:06 +0000 (23:42 +0100)]
st/nine: Do not advertise CANMANAGERESOURCE
It doesn't seem the main vendors advertise it.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Axel Davy [Mon, 4 Feb 2019 21:32:45 +0000 (22:32 +0100)]
st/nine: Do not advertise support for D15S1 and D24X4S4
The former is supported on Matrox cards but no other hw.
The latter isn't supported anywhere.
It is fine to not advertise them as supported,
and it could prevent apps to trigger weird rendering paths.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Patrick Rudolph [Thu, 28 Feb 2019 17:13:39 +0000 (18:13 +0100)]
d3dadapter9: Support software renderer on any DRI device
If D3D_ALWAYS_SOFTWARE is set for debugging purposes,
run on any DRI enabled platform.
Instead of probing for a compatible gallium driver (which might
fail if there's none) always use the KMS DRI software renderer.
Allows to run nine on i915 when D3D_ALWAYS_SOFTWARE=1.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Axel Davy [Mon, 25 Feb 2019 20:02:14 +0000 (21:02 +0100)]
st/nine: Disable depth write when nothing gets updated
I do not see any perf impact on radeonsi, but it
seems iris needs this.
It seems something sensible to do.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Andre Heider <a.heider@gmail.com>
Elie Tournier [Fri, 15 Feb 2019 16:21:42 +0000 (16:21 +0000)]
virgl: Return an error if we use fp64 on top of GLES
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: <Gurchetan Singh gurchetansingh@chromium.org>
Elie Tournier [Fri, 15 Feb 2019 16:18:25 +0000 (16:18 +0000)]
virgl: Set PIPE_CAP_DOUBLES when running on GLES This is a lie but no known app use fp64.
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: <Gurchetan Singh gurchetansingh@chromium.org>
Elie Tournier [Fri, 15 Feb 2019 16:14:10 +0000 (16:14 +0000)]
virgl: Add a caps to advertise GLES backend
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: <Gurchetan Singh gurchetansingh@chromium.org>
Kenneth Graunke [Sat, 9 Mar 2019 09:39:20 +0000 (01:39 -0800)]
Revert MR 369 (Fix extract_i8 and extract_u8 for 64-bit integers)
This broke piles of image load store tests (179 failures on CI,
mesa_master build #15546, previous build right before this landed
was green). I'd rather not leave the tree on fire over the weekend,
so let's revert for now, and we can figure out what happened next week.
Ian Romanick [Thu, 28 Feb 2019 04:15:32 +0000 (20:15 -0800)]
nir/algebraic: Add missing 16-bit extract_[iu]8 patterns
No shader-db changes on any Intel platform.
v2: Use a loop to generate patterns. Suggested by Jason.
Reviewed-by: Matt Turner <mattst88@gmail.com> [v1]
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Ian Romanick [Thu, 28 Feb 2019 04:12:46 +0000 (20:12 -0800)]
nir/algebraic: Add missing 64-bit extract_[iu]8 patterns
No shader-db changes on any Intel platform.
v2: Use a loop to generate patterns. Suggested by Jason.
Reviewed-by: Matt Turner <mattst88@gmail.com> [v1]
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Ian Romanick [Thu, 28 Feb 2019 04:08:38 +0000 (20:08 -0800)]
nir/algebraic: Remove redundant extract_[iu]8 patterns
No shader-db changes on any Intel platform.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Ian Romanick [Thu, 28 Feb 2019 03:52:12 +0000 (19:52 -0800)]
nir/algebraic: Fix up extract_[iu]8 after loop unrolling
Skylake, Broadwell, and Haswell had similar results. (Skylake shown)
total instructions in shared programs:
15256840 ->
15256837 (<.01%)
instructions in affected programs: 4713 -> 4710 (-0.06%)
helped: 3
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.06% max: 0.08% x̄: 0.06% x̃: 0.06%
total cycles in shared programs:
372286583 ->
372286583 (0.00%)
cycles in affected programs: 198516 -> 198516 (0.00%)
helped: 1
HURT: 1
helped stats (abs) min: 10 max: 10 x̄: 10.00 x̃: 10
helped stats (rel) min: <.01% max: <.01% x̄: <.01% x̃: <.01%
HURT stats (abs) min: 10 max: 10 x̄: 10.00 x̃: 10
HURT stats (rel) min: 0.01% max: 0.01% x̄: 0.01% x̃: 0.01%
No changes on any other Intel platform.
v2: Use a loop to generate patterns. Suggested by Jason.
Reviewed-by: Matt Turner <mattst88@gmail.com> [v1]
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 10 Jan 2019 19:39:05 +0000 (13:39 -0600)]
anv/pipeline: Move lower_explicit_io much later
Now that nir_opt_copy_prop_vars can properly handle array derefs on
vectors, it's safe to move UBO and SSBO lowering to late in the
pipeline. This should allow NIR to actually start optimizing SSBO
access.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Jason Ekstrand [Sat, 12 Jan 2019 02:19:18 +0000 (20:19 -0600)]
intel/nir: Move lower_mem_access_bit_sizes to postprocess_nir
It doesn't really matter where this pass goes as long as it's after we
call nir_lower_explicit_io and before we go into the back-end. Putting
it brw_postprocess_nir lets us move nir_lower_explicit_io significantly
later in the pipeline.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Rob Clark [Fri, 8 Mar 2019 23:42:22 +0000 (18:42 -0500)]
freedreno/ir3: turn on [iu]mul_high
Which also requires uadd_carry lowering
Until recently this was lowered in glsl ir so it went unnoticed that we
weren't lowering it.
Fixes: 1d8994a63b5 glsl: [u/i]mulExtended optimization for GLSL
Signed-off-by: Rob Clark <robdclark@gmail.com>
Rob Clark [Fri, 8 Mar 2019 22:48:13 +0000 (17:48 -0500)]
freedreno/ir3: fix ir3_cmdline harder
Fixes: 45271702ec9 freedreno: fix ir3_cmdline build
Fixes: 7530d4abfcf glsl/freedreno/panfrost: pass gl_context to the standalone compiler
Signed-off-by: Rob Clark <robdclark@gmail.com>
Eric Anholt [Wed, 6 Mar 2019 19:08:43 +0000 (11:08 -0800)]
st/dri: Set the PIPE_BIND_SHARED flag on create_image_with_modifiers.
With createImage(), the caller was expected to set a SHARED flag if they
needed the ability to get a GEM handle. DRI3, wayland, and gbm all set
it, EGL_MESA_drm_image passes it through, and surfaceless doesn't need it
because there's no way to request a handle.
With the new createImageWithModifiers() DRI method to replace it, the
expectation is that you'll always be able to share the buffer, so the flag
is unnecessary in its arguments. However, we do need to tell gallium
about this expectation.
Without this, kmscube's modifiers path using
gbm_bo_create_with_modifiers(&modifier, 1) instead of
gbm_bo_create(SCANOUT | SHARED) will call the driver's resource_create()
function wtih PIPE_BIND_SHARED unset, so the driver (particularly
renderonly drivers) may allocate in such a way that it can't return an
answer from gbm_bo_get_handle(). I used to have a hack in v3d using
count==1 && modifier==LINEAR to indicate that you wanted SHARED anyway,
but that was dropped recently.
Fixes: 59527a36e975 ("v3d: Restructure RO allocations using
resource_from_handle.")
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Kenneth Graunke [Fri, 21 Dec 2018 11:04:18 +0000 (03:04 -0800)]
iris: Use copy_region and staging resources to avoid transfer stalls
This is similar to intel_miptree_map_blit and intel_buffer_object.c's
temporary blits in i965.
Improves performance of DiRT Rally by 20-25% by eliminating stalls.
Breaks piglit's spec/arb_shader_image_load_store/host-mem-barrier,
by using the GPU to do uploads, exposing a st/mesa issue where it
doesn't give us memory_barrier() calls. This is a pre-existing issue
and will be fixed by a later patch (currently out for review).
Eric Engestrom [Fri, 8 Mar 2019 20:56:38 +0000 (20:56 +0000)]
android: fix missing backspace for line continuation
Reported-by: Clayton Craft <clayton.a.craft@intel.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109944
Fixes: e1d81decf7a093867f05 "build: make passing an incorrect pointer type a hard error"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Karol Herbst [Tue, 26 Feb 2019 10:58:11 +0000 (11:58 +0100)]
prog_to_nir: fix write from vps to FOG
for fragment programs we already treat fog as a single component value,
but for vp we didn't.
Fixes fog related piglit tests with my out of tree Nouveau nir patches.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Sagar Ghuge [Thu, 7 Mar 2019 01:05:23 +0000 (17:05 -0800)]
iris: Track last VS URB entry size
Return immediately if last VS URB entry size is good enough for BLORP
operation
v2: Fix comments (Caio)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Kenneth Graunke<kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Sagar Ghuge [Wed, 6 Mar 2019 21:27:28 +0000 (13:27 -0800)]
iris: Refactor code to share 3DSTATE_URB_* packet
v2: 1) Set IRIS_DIRTY_URB bit (Caio)
2) Get rid of unnecessary function (Caio)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Engestrom [Tue, 5 Mar 2019 11:09:13 +0000 (11:09 +0000)]
glx/meson: use full include path for dri_interface.h
Everything else uses `#include "GL/internal/dri_interface.h"` instead,
and this full path was even already used in other parts of GLX.
While at it, nothing uses `inc_gl_internal` anymore so let's remove it
as well.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Tested-by: Clayton Craft <clayton.a.craft@intel.com>
Eric Engestrom [Tue, 5 Mar 2019 11:07:35 +0000 (11:07 +0000)]
hgl/meson: drop unused include directory
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Tested-by: Clayton Craft <clayton.a.craft@intel.com>
Brian Paul [Fri, 8 Mar 2019 15:50:13 +0000 (08:50 -0700)]
intel/compiler: silence unitialized variable warning in opt_vector_float()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Brian Paul [Fri, 8 Mar 2019 15:49:44 +0000 (08:49 -0700)]
intel/decoders: silence uninitialized variable warnings in gen_print_batch()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Brian Paul [Fri, 8 Mar 2019 17:09:15 +0000 (10:09 -0700)]
st/mesa: init hash keys with memset(), not designated initializers
Since the compiler may not zero-out padding in the object.
Add a couple comments about this to prevent misunderstandings in
the future.
Fixes: 67d96816ff5 ("st/mesa: move, clean-up shader variant key decls/inits")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Eric Engestrom [Fri, 8 Mar 2019 17:02:59 +0000 (17:02 +0000)]
gitlab-ci: fix llvm version (7 doesn't have a ".0")
Fixes: 85ee157283c667372baf "gitlab-ci: autotools needs to be told which llvm version to use"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Tue, 20 Nov 2018 12:32:18 +0000 (12:32 +0000)]
build: make passing an incorrect pointer type a hard error
More or less any of this issue pointed out by the compiler is
a coding error. Make sure we flag it and bail loudly.
v2: - apply the change to autotools and scons as well (Emil)
- C++ doesn't need this, it's already an error and the flag
doesn't exist (Gert)
v3: - drop scons, flags are not checked so until someone adds that
functionality we can't have this.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com> # v1
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> # v1
[Emil: apply the same change to autotools and scons]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Eric Engestrom [Thu, 7 Mar 2019 15:09:42 +0000 (15:09 +0000)]
r600: cast pointer to expected type
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Eric Engestrom [Fri, 8 Mar 2019 16:02:11 +0000 (16:02 +0000)]
gitlab-ci: autotools needs to be told which llvm version to use
Fixes: 45d58cd91567b39f51af "gitlab-ci: only build the default (=latest) and oldest llvm versions"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>