platform/upstream/mesa.git
7 years agoRevert "egl: drop EGL driver `name`"
Marek Olšák [Wed, 18 Oct 2017 18:22:58 +0000 (20:22 +0200)]
Revert "egl: drop EGL driver `name`"

This reverts commit 6414d6bd8d2897f4ba643357fe3037f3acd60879.

This is needed to apply the next revert.

7 years agost/mesa: set dimension for constants in ATI_fragment_shader
Miklós Máté [Sun, 15 Oct 2017 17:46:03 +0000 (19:46 +0200)]
st/mesa: set dimension for constants in ATI_fragment_shader

This fixes an assertion failure introduced by 30a2f0dfd46de.

Fixes: 30a2f0dfd46 ("radeonsi: add an assertion that only

Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
7 years agost/osmesa: include u_inlines.h for pipe_resource_reference
Michel Dänzer [Wed, 18 Oct 2017 16:44:58 +0000 (18:44 +0200)]
st/osmesa: include u_inlines.h for pipe_resource_reference

Fixes build failure due to unresolved symbol.

Fixes: 7561da367bae "st/mesa: Initialize textures array in
                     st_framebuffer_validate"

Trivial.

7 years agost/mesa: Initialize textures array in st_framebuffer_validate
Michel Dänzer [Mon, 16 Oct 2017 14:35:18 +0000 (16:35 +0200)]
st/mesa: Initialize textures array in st_framebuffer_validate

And just reference pipe_resources to it in the validate callbacks.

Avoids pipe_resource leaks when st_framebuffer_validate ends up calling
the validate callback multiple times, e.g. when a window is resized.

v2:
* Use generic stable tag instead of Fixes: tag, since the problem could
  already happen before the commit referenced in v1 (Thomas Hellstrom)
* Use memset to initialize the array on the stack instead of allocating
  the array with os_calloc.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
7 years agoegl: set UseFallback if LIBGL_ALWAYS_SOFTWARE is set
Eric Engestrom [Wed, 18 Oct 2017 16:04:27 +0000 (17:04 +0100)]
egl: set UseFallback if LIBGL_ALWAYS_SOFTWARE is set

Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoegl: drop EGL driver `name`
Eric Engestrom [Wed, 18 Oct 2017 15:32:33 +0000 (16:32 +0100)]
egl: drop EGL driver `name`

The "DRI2" name was reported as confusing when printing EGL infos (one
user reported thinking DRI3 was not working on his X server), and the
only alternative is Haiku, which can only be used on a Haiku machine.

The name therefore doesn't add any information that the user wouldn't
know already, so let's just drop it.

Cc: Kai Wasserbäch <kai@dev.carbon-project.org>
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Related-to: b174a1ae720cb404738c ("egl: Simplify the "driver" interface")
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoegl: drop always-false TestOnly option
Eric Engestrom [Wed, 18 Oct 2017 15:31:23 +0000 (16:31 +0100)]
egl: drop always-false TestOnly option

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoFix the xf86vm meson dependency
Nicholas Miell [Wed, 18 Oct 2017 01:04:16 +0000 (18:04 -0700)]
Fix the xf86vm meson dependency

The pkg-config file is called xxf86vm.

Signed-off-by: Nicholas Miell <nmiell@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoegl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku}
Eric Engestrom [Mon, 25 Sep 2017 21:35:24 +0000 (22:35 +0100)]
egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku}

Note: dropping the EGL_BAD_ALLOC in egl_haiku because it's
overwritten by the EGL_NOT_INITIALIZED in eglInitialize().

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl_dri2: drop dri2_egl_driver struct
Eric Engestrom [Tue, 26 Sep 2017 12:49:05 +0000 (13:49 +0100)]
egl_dri2: drop dri2_egl_driver struct

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl_dri2: move glFlush out of struct dri2_egl_driver
Eric Engestrom [Tue, 26 Sep 2017 11:16:33 +0000 (12:16 +0100)]
egl_dri2: move glFlush out of struct dri2_egl_driver

There's no reason to store this there, it doesn't depend on the driver.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agollvmpipe: handle shader sample mask output
Roland Scheidegger [Tue, 17 Oct 2017 19:55:03 +0000 (21:55 +0200)]
llvmpipe: handle shader sample mask output

This probably isn't all that useful for GL, but there are apis where
sample_mask is a valid output even without msaa.
Just discard the pixel if the sample_mask doesn't include the bit for
sample 0.

Reviewed-by: Brian Paul <brianp@vmware.com>
7 years agoanv: Fix instance typos.
Vinson Lee [Wed, 18 Oct 2017 08:12:27 +0000 (08:12 +0000)]
anv: Fix instance typos.

Fix build error.

  CC       vulkan/vulkan_libvulkan_common_la-anv_device.lo
In file included from vulkan/anv_device.c:33:0:
vulkan/anv_device.c: In function ‘anv_AllocateMemory’:
vulkan/anv_device.c:1562:37: error: ‘struct anv_device’ has no member named ‘instace’; did you mean ‘instance’?
          result = vk_errorf(device->instace, device,
                                     ^
vulkan/anv_private.h:317:17: note: in definition of macro ‘vk_errorf’
     __vk_errorf(instance, obj, REPORT_OBJECT_TYPE(obj), error,\
                 ^~~~~~~~

Fixes: 9775894f1025 ("anv: Move size check from anv_bo_cache_import() to caller (v2)")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agomesa: fix trivial typo in _mesa_PixelMapusv() error string
Brian Paul [Wed, 18 Oct 2017 15:44:13 +0000 (09:44 -0600)]
mesa: fix trivial typo in _mesa_PixelMapusv() error string

Signed-off-by: Brian Paul <brianp@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103323

7 years agomeson: move expat dependency where it's needed
Eric Engestrom [Wed, 18 Oct 2017 11:06:16 +0000 (12:06 +0100)]
meson: move expat dependency where it's needed

Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoautomake: intel: move expat handling where it's used
Hongxu Jia [Wed, 18 Oct 2017 01:47:05 +0000 (09:47 +0800)]
automake: intel: move expat handling where it's used

Linking libvulkan_intel.so can fail, due to unresolved references to
libexpat.so.

EXPAT_CFLAGS should be moved as well.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoradv: don't create dummy fs when compiling compute stage
Timothy Arceri [Wed, 18 Oct 2017 02:58:36 +0000 (13:58 +1100)]
radv: don't create dummy fs when compiling compute stage

Fixes: d1c9f30d7ff7 "radv: add radv_create_shaders() helper"

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: use the dispatch initiator for indirect dispatches
Samuel Pitoiset [Tue, 17 Oct 2017 10:02:00 +0000 (12:02 +0200)]
radv: use the dispatch initiator for indirect dispatches

Missed that when I allowed waves to be launched out-of-order.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: remove XtoY_temps structs
Samuel Pitoiset [Tue, 17 Oct 2017 09:04:36 +0000 (11:04 +0200)]
radv: remove XtoY_temps structs

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoanv: Install as Vulkan HAL module in Android.mk build
Tapani Pälli [Thu, 14 Sep 2017 06:57:40 +0000 (09:57 +0300)]
anv: Install as Vulkan HAL module in Android.mk build

Now that anvil fully implements the Vulkan HAL interface, we can install
it as the vendor HAL module at /vendor/lib/hw/vulkan.${board}.so. To do
so:

  - Rename LOCAL_MODULE to vulkan.$(TARGET_BOARD_PLATFORM).
  - Use LOCAL_PROPRIETARY_MODULE to install under vendor path.

Tested by running different Sascha Williams demos on Android-IA.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
[chadv: Extract this hunk from Tapani's patch, and embed it as
 stand-alone patch in my arc-vulkan series].
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Implement VK_ANDROID_native_buffer (v9)
Chad Versace [Tue, 15 Nov 2016 00:13:51 +0000 (16:13 -0800)]
anv: Implement VK_ANDROID_native_buffer (v9)

This implementation is correct (afaict), but takes two shortcuts
regarding the import/export of Android sync fds.

  Shortcut 1. When Android calls vkAcquireImageANDROID to import a sync
  fd into a VkSemaphore or VkFence, the driver instead simply blocks on
  the sync fd, then puts the VkSemaphore or VkFence into the signalled
  state. Thanks to implicit sync, this produces correct behavior (with
  extra latency overhead, perhaps) despite its ugliness.

  Shortcut 2. When Android calls vkQueueSignalReleaseImageANDROID to export
  a collection of wait semaphores as a sync fd, the driver instead
  submits the semaphores to the queue, then returns sync fd -1, which
  informs the caller that no additional synchronization is needed.
  Again, thanks to implicit sync, this produces correct behavior (with
  extra batch submission overhead) despite its ugliness.

I chose to take the shortcuts instead of properly importing/exporting
the sync fds for two reasons:

  Reason 1. I've already tested this patch with dEQP and with demos
  apps. It works. I wanted to get the tested patches into the tree now,
  and polish the implementation afterwards.

  Reason 2. I want to run this on a 3.18 kernel (gasp!). In 3.18, i915
  supports neither Android's sync_fence, nor upstream's sync_file, nor
  drm_syncobj. Again, I tested these patches on Android with a 3.18
  kernel and they work.

I plan to quickly follow-up with patches that remove the shortcuts and
properly import/export the sync fds.

Non-Testing
===========
I did not test at all using the Android.mk buildsystem. I may have broke
it. Please test and review that.

Testing
=======
I tested with 64-bit ARC++ on a Skylake Chromebook and a 3.18 kernel.
The following pass (as of patchset v9):

  - a little spinning cube demo APK
  - several Sascha demos
  - dEQP-VK.info.*
  - dEQP-VK.api.wsi.android.*
      (except dEQP-VK.api.wsi.android.swapchain.*.image_usage, because
      dEQP wants to create swapchains with VK_IMAGE_USAGE_STORAGE_BIT)
  - dEQP-VK.api.smoke.*
  - dEQP-VK.api.info.instance.*
  - dEQP-VK.api.info.device.*

v2:
  - Reject VkNativeBufferANDROID if the dma-buf's size is too small for
    the VkImage.
  - Stop abusing VkNativeBufferANDROID by passing it to vkAllocateMemory
    during vkCreateImage. Instead, directly import its dma-buf during
    vkCreateImage with anv_bo_cache_import(). [for jekstrand]
  - Rebase onto Tapani's VK_EXT_debug_report changes.
  - Drop `CPPFLAGS += $(top_srcdir)/include/android`. The dir does not
    exist.

v3:
  - Delete duplicate #include "anv_private.h". [per Tapani]
  - Try to fix the Android-IA build in Android.vulkan.mk by following
    Tapani's example.

v4:
  - Unset EXEC_OBJECT_ASYNC and set EXEC_OBJECT_WRITE on the imported
    gralloc buffer, just as we do for all other winsys buffers in
    anv_wsi.c. [found by Tapani]

v5:
  - Really fix the Android-IA build by ensuring that Android.vulkan.mk
    uses Mesa' vulkan.h and not Android's.  Insert -I$(MESA_TOP)/include
    before -Iframeworks/native/vulkan/include. [for Tapani]
  - In vkAcquireImageANDROID, submit signal operations to the
    VkSemaphore and VkFence. [for zhou]

v6:
  - Drop copy-paste duplication in vkGetSwapchainGrallocUsageANDROID().
    [found by zhou]
  - Improve comments in vkGetSwapchainGrallocUsageANDROID().

v7:
  - Fix vkGetSwapchainGrallocUsageANDROID() to inspect its
    VkImageUsageFlags parameter. [for tfiga]
  - This fix regresses dEQP-VK.api.wsi.android.swapchain.*.image_usage
    because dEQP wants to create swapchains with
    VK_IMAGE_USAGE_STORAGE_BIT.

v8:
  - Drop unneeded goto in vkAcquireImageANDROID. [for tfiga]

v8.1: (minor changes)
  - Drop errant hunks added by rerere in anv_device.c.
  - Drop explicit mention of VK_ANDROID_native_buffer in
    anv_entrypoints_gen.py. [for jekstrand]

v9:
  - Isolate as much Android code as possible, moving it from anv_image.c
    to anv_android.c. Connect the files with anv_image_from_gralloc().
    Remove VkNativeBufferANDROID params from all anv_image.c
    funcs. [for krh]
  - Replace some intel_loge() with vk_errorf() in anv_android.c.
  - Use © in copyright line. [for krh]

Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v5)
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> (v9)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v9)
Cc: zhoucm1 <david1.zhou@amd.com>
Cc: Tomasz Figa <tfiga@chromium.org>
7 years agoanv: Move size check from anv_bo_cache_import() to caller (v2)
Chad Versace [Tue, 12 Sep 2017 21:05:08 +0000 (14:05 -0700)]
anv: Move size check from anv_bo_cache_import() to caller (v2)

This change prepares for VK_ANDROID_native_buffer. When the user imports
a gralloc hande into a VkImage using VK_ANDROID_native_buffer, the user
provides no size. The driver must infer the size from the internals of
the gralloc buffer.

The patch is essentially a refactor patch, but it does change behavior
in some edge cases, described below. In what follows, the "nominal size"
of the bo refers to anv_bo::size, which may not match the bo's "actual
size" according to the kernel.

Post-patch, the nominal size of the bo returned from
anv_bo_cache_import() is always the size of imported dma-buf according
to lseek(). Pre-patch, the bo's nominal size was difficult to predict.
If the imported dma-buf's gem handle was not resident in the cache, then
the bo's nominal size was align(VkMemoryAllocateInfo::allocationSize,
4096).  If it *was* resident, then the bo's nominal size was whatever
the cache returned. As a consequence, the first cache insert decided the
bo's nominal size, which could be significantly smaller compared to the
dma-buf's actual size, as the nominal size was determined by
VkMemoryAllocationInfo::allocationSize and not lseek().

I believe this patch cleans up that messy behavior. For an imported or
exported VkDeviceMemory, anv_bo::size should now be the true size of the
bo, if I correctly understand the problem (which I possibly don't).

v2:
  - Preserve behavior of aligning size to 4096 before checking. [for
    jekstrand]
  - Check size with < instead of <=, to match behavior of commit c0a4f56
    "anv: bo_cache: allow importing a BO larger than needed". [for
    chadv]

7 years agomeson: turn on pl111 not vc4 when pl111 driver specificed
Dylan Baker [Tue, 17 Oct 2017 21:44:15 +0000 (14:44 -0700)]
meson: turn on pl111 not vc4 when pl111 driver specificed

Reviewed-by: Eric Anholt <eric@anholt.net>
fixes: 1918c9b1627d5403 ("meson: Add support for the pl111 driver.")
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
7 years agoradv: Link shaders.
Bas Nieuwenhuizen [Wed, 8 Feb 2017 23:12:10 +0000 (00:12 +0100)]
radv: Link shaders.

Here we make use of NIR the linking helpers to remove unused
varyings.

Sascha Willems demo results:

computecullandlod 39 -> 41 fps
pipelines ~6100 -> ~6200 fps

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Signed-off-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: reuse the multiple shader store & load functions for gs copy variant
Timothy Arceri [Fri, 13 Oct 2017 01:22:24 +0000 (12:22 +1100)]
radv: reuse the multiple shader store & load functions for gs copy variant

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: remove some now unused shader compile code
Timothy Arceri [Fri, 13 Oct 2017 01:02:18 +0000 (12:02 +1100)]
radv: remove some now unused shader compile code

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: switch to using radv_create_shaders()
Timothy Arceri [Sat, 14 Oct 2017 22:56:01 +0000 (09:56 +1100)]
radv: switch to using radv_create_shaders()

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: add radv_create_shaders() helper
Bas Nieuwenhuizen [Mon, 16 Oct 2017 22:45:06 +0000 (09:45 +1100)]
radv: add radv_create_shaders() helper

This is a combined shader creation helper than will help us to
create the shaders for each stage at once. This will allow us to
do some link time optimisations.

Signed-off-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: add radv_hash_shaders() helper
Bas Nieuwenhuizen [Sat, 14 Oct 2017 01:42:40 +0000 (12:42 +1100)]
radv: add radv_hash_shaders() helper

This will be used to create a hash of the combined shaders in the
pipeline.

Signed-off-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Add multiple shader cache store & load functions.
Bas Nieuwenhuizen [Thu, 1 Dec 2016 22:07:57 +0000 (23:07 +0100)]
radv: Add multiple shader cache store & load functions.

Signed-off-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Change cache datastructures for combined pipelines.
Bas Nieuwenhuizen [Thu, 1 Dec 2016 08:03:50 +0000 (09:03 +0100)]
radv: Change cache datastructures for combined pipelines.

Signed-off-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: reorder init function calls
Timothy Arceri [Sat, 14 Oct 2017 02:14:32 +0000 (13:14 +1100)]
radv: reorder init function calls

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agomeson: Add support for the vc5 driver.
Eric Anholt [Fri, 13 Oct 2017 01:40:16 +0000 (18:40 -0700)]
meson: Add support for the vc5 driver.

v2: Default vc5 to off, since it requires the simulator currently.  Add
    missing dep on the XML generation from libbroadcom_vc5.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (v1)
7 years agomeson: Add support for the pl111 driver.
Eric Anholt [Fri, 13 Oct 2017 01:39:08 +0000 (18:39 -0700)]
meson: Add support for the pl111 driver.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
7 years agomeson: Add support for the vc4 driver.
Eric Anholt [Thu, 12 Oct 2017 20:53:12 +0000 (13:53 -0700)]
meson: Add support for the vc4 driver.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
7 years agoradeonsi: if there's just const buffer 0, set it in place of CONST/SSBO pointer
Marek Olšák [Sun, 8 Oct 2017 01:44:07 +0000 (03:44 +0200)]
radeonsi: if there's just const buffer 0, set it in place of CONST/SSBO pointer

SI_SGPR_CONST_AND_SHADER_BUFFERS now contains the pointer to const buffer 0
if there is no other buffer there.

Benefits:
- there is no constbuf descriptor upload and shader load

It's assumed that all constant addresses are within bounds. Non-constant
addresses are clamped against the last declared CONST variable.
This only works if the state tracker ensures the bound constant buffer
matches what the shader needs.

Once we get 32-bit pointers, we can only do this for user constant buffers
where the driver is in charge of the upload so that it can guarantee a 32-bit
address.

The real performance benefit might not be measurable.

These apps get 100% theoretical benefit in all shaders (except where noted):
- antichamber
- barman arkham origins
- borderlands 2
- borderlands pre-sequel
- brutal legend
- civilization BE
- CS:GO
- deadcore
- dota 2 -- most shaders
- europa universalis
- grid autosport -- most shaders
- left 4 dead 2
- legend of grimrock
- life is strange
- payday 2
- portal
- rocket league
- serious sam 3 bfe
- talos principle
- team fortress 2
- thea
- unigine heaven
- unigine valley -- also sanctuary and tropics
- wasteland 2
- xcom: enemy unknown & enemy within
- tesseract
- unity (engine)

Changed stats only:
    SGPRS: 2059998 -> 2086238 (1.27 %)
    VGPRS: 1626888 -> 1626904 (0.00 %)
    Spilled SGPRs: 7902 -> 7865 (-0.47 %)
    Code Size: 60924520 -> 60982660 (0.10 %) bytes
    Max Waves: 374539 -> 374526 (-0.00 %)

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoac: clean up ac_build_indexed_load function interfaces
Marek Olšák [Sun, 8 Oct 2017 18:05:44 +0000 (20:05 +0200)]
ac: clean up ac_build_indexed_load function interfaces

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: handle 64-bit loads earlier in fetch_constant
Marek Olšák [Sun, 8 Oct 2017 16:20:38 +0000 (18:20 +0200)]
radeonsi: handle 64-bit loads earlier in fetch_constant

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: add si_descriptors::gpu_address and remove buffer_offset
Marek Olšák [Sun, 8 Oct 2017 15:52:57 +0000 (17:52 +0200)]
radeonsi: add si_descriptors::gpu_address and remove buffer_offset

This allows us to change the pointer arbitrarily.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: unify code for extracting a buffer address from a descriptor
Marek Olšák [Sun, 8 Oct 2017 15:50:31 +0000 (17:50 +0200)]
radeonsi: unify code for extracting a buffer address from a descriptor

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: remove atom parameter from si_upload_descriptors
Marek Olšák [Sun, 8 Oct 2017 15:22:20 +0000 (17:22 +0200)]
radeonsi: remove atom parameter from si_upload_descriptors

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: pack si_descriptors better again
Marek Olšák [Sun, 8 Oct 2017 15:10:56 +0000 (17:10 +0200)]
radeonsi: pack si_descriptors better again

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: emit dirty consecutive pointers in one SET_SH_REG packet
Marek Olšák [Sat, 7 Oct 2017 20:23:34 +0000 (22:23 +0200)]
radeonsi: emit dirty consecutive pointers in one SET_SH_REG packet

IB size: -1.6%

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: split si_emit_shader_pointer
Marek Olšák [Sat, 7 Oct 2017 20:16:46 +0000 (22:16 +0200)]
radeonsi: split si_emit_shader_pointer

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: generalize the SI_VS_SHADER_POINTER_MASK macro
Marek Olšák [Sat, 7 Oct 2017 19:53:10 +0000 (21:53 +0200)]
radeonsi: generalize the SI_VS_SHADER_POINTER_MASK macro

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi/gfx9: use SPI_SHADER_USER_DATA_COMMON
Marek Olšák [Sat, 7 Oct 2017 19:34:03 +0000 (21:34 +0200)]
radeonsi/gfx9: use SPI_SHADER_USER_DATA_COMMON

IB size: -0.4%

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi/gfx9: move RW_BUFFERS from s[0:1] to s[8:9] for HS and GS
Marek Olšák [Sat, 7 Oct 2017 19:26:14 +0000 (21:26 +0200)]
radeonsi/gfx9: move RW_BUFFERS from s[0:1] to s[8:9] for HS and GS

Let's use the same user data SGPRs in all stages.
(for SPI_SHADER_USER_DATA_COMMON_0)

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: add GFX-IB-size query to the HUD
Marek Olšák [Sat, 7 Oct 2017 22:35:59 +0000 (00:35 +0200)]
radeonsi: add GFX-IB-size query to the HUD

It shows the sum of all IBs per frame.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agowinsys/amdgpu: disable CPU caching for GFX & SDMA IBs
Marek Olšák [Sun, 8 Oct 2017 22:06:13 +0000 (00:06 +0200)]
winsys/amdgpu: disable CPU caching for GFX & SDMA IBs

This should decrease IB fetch latency.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agowinsys/amdgpu: don't do read-modify-write on command buffers
Marek Olšák [Sun, 8 Oct 2017 21:47:30 +0000 (23:47 +0200)]
winsys/amdgpu: don't do read-modify-write on command buffers

i.e. don't use |=

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agobroadcom/vc4: Fix false-positive for the tiling ioctls on simulator mode.
Eric Anholt [Fri, 13 Oct 2017 19:22:33 +0000 (12:22 -0700)]
broadcom/vc4: Fix false-positive for the tiling ioctls on simulator mode.

If there happened to be an ENOENT laying around, we would try using the
ioctls later and fail out resource allocation.

7 years agobroadcom/vc4: Skip BO labeling when in simulator mode.
Eric Anholt [Fri, 13 Oct 2017 19:16:04 +0000 (12:16 -0700)]
broadcom/vc4: Skip BO labeling when in simulator mode.

It was calling down into i915 trying to label the BO, which is definitely
not the right thing.

7 years agobroadcom/vc5: Don't forget to set the RT format for 1555 textures.
Eric Anholt [Fri, 13 Oct 2017 20:13:36 +0000 (13:13 -0700)]
broadcom/vc5: Don't forget to set the RT format for 1555 textures.

Fixes dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb5_a1

7 years agoanv: Add func anv_gem_get_tiling()
Chad Versace [Tue, 29 Aug 2017 08:34:44 +0000 (01:34 -0700)]
anv: Add func anv_gem_get_tiling()

Will use in VK_ANDROID_native_buffer.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Move close(fd) from anv_bo_cache_import to its callers (v2)
Chad Versace [Mon, 11 Sep 2017 23:41:21 +0000 (16:41 -0700)]
anv: Move close(fd) from anv_bo_cache_import to its callers (v2)

This will allow us to implement VK_ANDROID_native_buffer without dup'ing
the fd. We must close the fd in VK_KHR_external_memory_fd, but we should
not in VK_ANDROID_native_buffer.

v2:
  - Add missing close(fd) for case
    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, subcase
    ANV_SEMAPHORE_TYPE_BO.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Add field anv_image::planes[]::bo_is_owned (v2)
Chad Versace [Tue, 29 Aug 2017 08:36:42 +0000 (01:36 -0700)]
anv: Add field anv_image::planes[]::bo_is_owned (v2)

If this flag is set, then the image and the bo have the same lifetime.
vkDestroyImage will release the bo.

We need this for VK_ANDROID_native_buffer, because that extension
creates the VkImage *and* imports its memory during the same
call, vkCreateImage.

v2: Rebase onto VK_KHR_bind_memory2.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Better support for Android logging (v2)
Chad Versace [Mon, 10 Jul 2017 18:11:40 +0000 (11:11 -0700)]
anv: Better support for Android logging (v2)

In src/intel/vulkan/*, redirect all instances of printf, vk_error,
anv_loge, anv_debug, anv_finishme, anv_perf_warn, anv_assert, and their
many variants to the new intel_log functions. I believe I caught them
all.

The other subdirs of src/intel are left for a future exercise.

v2:
  - Rebase onto Tapani's VK_EXT_debug_report changes.
  - Drop unused #include <cutils/log.h>.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel: Add simple logging façade for Android (v2)
Chad Versace [Fri, 25 Aug 2017 21:14:34 +0000 (14:14 -0700)]
intel: Add simple logging façade for Android (v2)

I'm bringing up Vulkan in the Android container of Chrome OS (ARC++).

On Android, stdio goes to /dev/null. On Android, remote gdb is even more
painful than the usual remote gdb. On Android, nothing works like you
expect and debugging is hell. I need logging.

This patch introduces a small, simple logging API that can easily wrap
Android's API. On non-Android platforms, this logger does nothing fancy.
It follows the time-honored Unix tradition of spewing everything to
stderr with minimal fuss.

My goal here is not perfection. My goal is to make a minimal, clean API,
that people hate merely a little instead of a lot, and that's good
enough to let me bring up Android Vulkan.  And it needs to be fast,
which means it must be small. No one wants to their game to miss frames
while aiming a flaming bow into the jaws of an angry robot t-rex, and
thus become t-rex breakfast, because some fool had too much fun desiging
a bloated, ideal logging API.

If people like it, perhaps we should quickly promote it to src/util.

The API looks like this:

    #define INTEL_LOG_TAG "intel-vulkan"
    #define DEBUG

    intel_logd("try hard thing with foo=%d", foo);

    n = try_foo(...);
    if (n < 0) {
        intel_loge("%s:%d: foo failed bigtime", __FILE__, __LINE__);
        return VK_ERROR_DEVICE_LOST;
    }

And produces this on non-Android:

    intel-vulkan: debug: try hard thing with foo=93
    intel-vulkan: error: anv_device.c:182: foo failed bigtime

v2: Fix meson build. [for dcbaker]

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv/android: Link to libsync, liblog in Android.mk
Tapani Pälli [Thu, 14 Sep 2017 06:57:40 +0000 (09:57 +0300)]
anv/android: Link to libsync, liblog in Android.mk

chadv: I made this patch by extracting the hunk from Tapani's patch in
https://lists.freedesktop.org/archives/mesa-dev/2017-September/169602.html.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv/android: Link to Android libraries in the autotools build
Chad Versace [Mon, 10 Jul 2017 18:15:35 +0000 (11:15 -0700)]
anv/android: Link to Android libraries in the autotools build

A first step to supporting Vulkan on ARC++. Mesa on ARC++ uses
Autotools, not Android.mk.

Doing this now, even before VK_ANDROID_native_buffer is implemented,
allows us to incrementally add Android support to the Autotools build.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agomeson: s/radv_extensions/radv_extensions_c/ to respect var convention
Eric Engestrom [Tue, 17 Oct 2017 17:58:28 +0000 (18:58 +0100)]
meson: s/radv_extensions/radv_extensions_c/ to respect var convention

Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agomeson: track python script dependency
Eric Engestrom [Tue, 17 Oct 2017 15:21:54 +0000 (16:21 +0100)]
meson: track python script dependency

Suggested-by: Andres Gomez <agomez@igalia.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
7 years agovulkan/wsi: Free the event in x11_manage_fifo_queues().
Henri Verbeet [Fri, 13 Oct 2017 15:10:26 +0000 (17:10 +0200)]
vulkan/wsi: Free the event in x11_manage_fifo_queues().

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Fixes: e73d136a023 ("vulkan/wsi/x11: Implement FIFO mode.")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com
7 years agomeson: add missing radv_extensions.c generation for libvulkan_radeon
Eric Engestrom [Tue, 17 Oct 2017 10:59:48 +0000 (11:59 +0100)]
meson: add missing radv_extensions.c generation for libvulkan_radeon

Fixes: 17201a2eb0b1b8538713 "radv: port to using updated anv entrypoint/extension generator."
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
7 years agoanv/apply_pipeline_layout: Use nir_tex_instr_remove_src
Jason Ekstrand [Mon, 16 Oct 2017 15:50:44 +0000 (08:50 -0700)]
anv/apply_pipeline_layout: Use nir_tex_instr_remove_src

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agonir: Add a helper for adding texture instruction sources
Jason Ekstrand [Mon, 16 Oct 2017 15:50:23 +0000 (08:50 -0700)]
nir: Add a helper for adding texture instruction sources

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agost/va: Return correct width and height for encode/decode support
Mark Thompson [Mon, 9 Oct 2017 20:45:03 +0000 (21:45 +0100)]
st/va: Return correct width and height for encode/decode support

Previously this would return the largest possible buffer size, which is
much larger than the codecs themselves support.  This caused confusion
when client applications attempted to decode 8K video thinking it was
supported when it isn't.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
7 years agost/va: Fix config entrypoint handling
Mark Thompson [Tue, 10 Oct 2017 21:21:04 +0000 (22:21 +0100)]
st/va: Fix config entrypoint handling

Consistently use it as a PIPE_VIDEO_ENTRYPOINT.

v2: Return an error if the entrypoint is not set (Christian).

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
7 years agost/va: Disable vaExportSurfaceHandle()
Mark Thompson [Sun, 15 Oct 2017 19:57:21 +0000 (20:57 +0100)]
st/va: Disable vaExportSurfaceHandle()

This is not in libva 2.0, so it shouldn't be enabled yet.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Acked-by: Christian König <christian.koenig@amd.com>
7 years agoradv/image: bump all the offset to uint64_t.
Dave Airlie [Tue, 17 Oct 2017 07:17:12 +0000 (08:17 +0100)]
radv/image: bump all the offset to uint64_t.

So one of the CTS tests tries to allocate a 16384x1 2048 array
texture. This overflows a bunch of calculations when we want it
tiled as the heights goes to 128.

addrlib returns us the correct size (16GB or so), but we mangle
it in the htile calcs due to the 32-bit offset fields, then
userspace gives us the reduced number and we try to allocate
it on a heap and things blow up.

We really need to give the app back the correct size for the
image so we can blow up properly in memory allocation later.

This should fix hangs in
dEQP-VK.pipeline.render_to_image.core.1d_array.huge.width_layers.r8g8b8a8_unorm_d32_sfloat_s8_uint
since
Fixes: ad3d98da9f (radv: enable tc compatible htile for d32s8 also.)

Now there's an open question if we should be enabling tc-compat
htile at all for shallow textures like the above.

This might cause some other wierd side effects in CTS even
without the tc compat so:
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: port to using updated anv entrypoint/extension generator.
Dave Airlie [Tue, 17 Oct 2017 05:18:36 +0000 (15:18 +1000)]
radv: port to using updated anv entrypoint/extension generator.

This ports radv to using the anv entrypoint/extension generator
code.

No differences on enabled extensions list in vulkaninfo.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: enable VK_KHX_multiview always.
Dave Airlie [Tue, 17 Oct 2017 06:47:16 +0000 (16:47 +1000)]
radv: enable VK_KHX_multiview always.

This was in the wrong place.

Fixes: ba51ad2f2 (radv: Expose VK_KHX_multiview.)
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoRevert "mesa: fix texture updates for ATI_fragment_shader"
Marek Olšák [Tue, 17 Oct 2017 01:08:47 +0000 (03:08 +0200)]
Revert "mesa: fix texture updates for ATI_fragment_shader"

This reverts commit 9d54025cd1eee3f42b80c062d1f644904bf2ba41.

It breaks KOTOR.

Cc: 17.1 17.2 <mesa-stable@lists.freedesktop.org>
7 years agomesa: remove redundant NULL check in update_single_program_texture_state
Miklós Máté [Sun, 15 Oct 2017 17:46:05 +0000 (19:46 +0200)]
mesa: remove redundant NULL check in update_single_program_texture_state

update_single_program_texture() never returns NULL.

Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomeson: build mesa test.
Dylan Baker [Fri, 13 Oct 2017 19:07:04 +0000 (12:07 -0700)]
meson: build mesa test.

v2: - add dependency on dispatch.h generator (which this test needs)

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
7 years ago.travis: Don't build gallium drivers in non-gallium test targets
Dylan Baker [Wed, 11 Oct 2017 17:50:33 +0000 (10:50 -0700)]
.travis: Don't build gallium drivers in non-gallium test targets

Simply disable gallium in non-gallium builds. For some reason the
gallium driver wont link on ubuntu 14.04 (it will on 16.04, debian
testing, and arch)

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
7 years agomeson: refactor meson_options
Dylan Baker [Tue, 10 Oct 2017 22:44:14 +0000 (15:44 -0700)]
meson: refactor meson_options

To put one argument on each line. This results in the file being much
longer, but I think much more readable.

Suggested-by: Eero Tamminen <eero.t.tamminen@intel.com>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: build llvmpipe
Dylan Baker [Tue, 10 Oct 2017 21:56:39 +0000 (14:56 -0700)]
meson: build llvmpipe

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: build softpipe
Dylan Baker [Tue, 10 Oct 2017 21:27:19 +0000 (14:27 -0700)]
meson: build softpipe

This doesn't include llvmpipe.

v2: - Fix inconsistent use of with_gallium_swrast and
      with_gallium_softpipe.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: build nouveau (gallium) driver
Dylan Baker [Mon, 9 Oct 2017 21:59:35 +0000 (14:59 -0700)]
meson: build nouveau (gallium) driver

Tested with a GK107.

v2: - Add target for nouveau standalone compiler. This target is not
      built by default.
v3: - Add nouveau to list of drivers built by default

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
7 years agomeson: build radeonsi gallium driver
Dylan Baker [Sat, 30 Sep 2017 21:04:28 +0000 (14:04 -0700)]
meson: build radeonsi gallium driver

This hooks up the bits necessary to build gallium dri drivers, with
radeonSI as the first example driver. This isn't tested yet.

v4: - drop radeonsi generated header from sources.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
7 years agomeson: build gallium winsys for dri, null, and wrapper
Dylan Baker [Sat, 30 Sep 2017 20:48:34 +0000 (13:48 -0700)]
meson: build gallium winsys for dri, null, and wrapper

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
7 years agomeson: build radeonsi
Dylan Baker [Sat, 30 Sep 2017 16:03:51 +0000 (09:03 -0700)]
meson: build radeonsi

This builds the radeonsi (and radeon) window system bits and gallium
driver bits.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
7 years agomeson: Build gallium dri state tracker
Dylan Baker [Tue, 10 Oct 2017 18:57:50 +0000 (11:57 -0700)]
meson: Build gallium dri state tracker

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
7 years agomeson: build gallium helper drivers
Dylan Baker [Sat, 30 Sep 2017 03:21:23 +0000 (20:21 -0700)]
meson: build gallium helper drivers

This builds ddebug, noop, rbug, and trace drivers.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
7 years agomeson: Build gallium pipe-loader
Dylan Baker [Sat, 30 Sep 2017 03:03:20 +0000 (20:03 -0700)]
meson: Build gallium pipe-loader

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
7 years agomeson: split and simplify dependencies
Dylan Baker [Sat, 30 Sep 2017 00:53:01 +0000 (17:53 -0700)]
meson: split and simplify dependencies

Rather than group dependencies in complex groups, use a flatter
structure with split dependencies to avoid checking for the same
dependencies twice.

v2: - Fix building vulkan drivers without gallium or dri drivers
v3: - Drop TODO comment that is done
    - Fix typo in commit message

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: Build gallium auxiliary
Dylan Baker [Fri, 29 Sep 2017 05:25:02 +0000 (22:25 -0700)]
meson: Build gallium auxiliary

v2: - guard gallivm files with "with_llvm" instead of "dep_llvm.found()"

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
7 years agomeson: build libmesa_gallium
Dylan Baker [Fri, 29 Sep 2017 04:03:07 +0000 (21:03 -0700)]
meson: build libmesa_gallium

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: Add option to toggle LLVM
Dylan Baker [Thu, 12 Oct 2017 16:47:30 +0000 (09:47 -0700)]
meson: Add option to toggle LLVM

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: always set GLX_USE_TLS
Dylan Baker [Wed, 11 Oct 2017 19:49:31 +0000 (12:49 -0700)]
meson: always set GLX_USE_TLS

This can be applied to all GLX implementations, and in autotools this is
guarded only by the --enable-glx-tls flag. Since this is on by default
in autotools, and is strictly better than being off, the meson build
doesn't even have a toggle for it.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: Don't try to install dri drivers unless one is built
Dylan Baker [Mon, 9 Oct 2017 23:34:03 +0000 (16:34 -0700)]
meson: Don't try to install dri drivers unless one is built

This confused the with_dri flag which is meant to control Direct
Rendering Infrastructure, not classic drivers

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: Set _GNU_SOURCE
Dylan Baker [Mon, 9 Oct 2017 21:22:07 +0000 (14:22 -0700)]
meson: Set _GNU_SOURCE

When we start adding non-free software platforms support we'll need to
guard this, but for now it should be fine as is.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomeson: add checks for version script and dynamic list
Dylan Baker [Sat, 30 Sep 2017 20:15:52 +0000 (13:15 -0700)]
meson: add checks for version script and dynamic list

These are used by gallium drivers.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agoconfigure: commit test files
Dylan Baker [Sat, 30 Sep 2017 19:14:02 +0000 (12:14 -0700)]
configure: commit test files

These are currently auto-generated, but meson needs the same files, so
lets commit them to reduce duplication.

v3: - Rename .build to build-support

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
7 years agomeson: Add switch for texture float
Dylan Baker [Tue, 10 Oct 2017 22:25:07 +0000 (15:25 -0700)]
meson: Add switch for texture float

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agoRevert "i965/tex_image: Reference the renderbuffer miptree in setTexBuffer2"
Kenneth Graunke [Mon, 16 Oct 2017 22:30:47 +0000 (15:30 -0700)]
Revert "i965/tex_image: Reference the renderbuffer miptree in setTexBuffer2"

This reverts commit d80cbbeaff9329fdc78ae3d97097c1e65dfcdd61.

It turns out that formats do matter - the framebuffer's miptree has an
sRGB format, and the one we created did not.  This broke rendering when
using KWin compositing, GNOME Terminal Fedora (with a transparent
background), and Qt menu rendering in general, to name a few.

It's been a month and this hasn't been fixed, and I'm sick of reverting
this patch or applying NAK'd hacks and restarting various programs at
random times every day, multiple times a day, to keep my desktop
environment functional.

The only benefit of this patch was to prepare the way for modifiers,
which AFAIK aren't finished yet anyway, so there's really no downside
to reverting it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102924

7 years agoAndroid: add libmesa_nir dependency to libmesa_dricore
Rob Herring [Mon, 16 Oct 2017 12:43:36 +0000 (07:43 -0500)]
Android: add libmesa_nir dependency to libmesa_dricore

Commit 32fcced7b479 ("meta: Unset the textures_used_by_txf bitfield.")
added a dependency in libmesa_dricore to NIR headers, but failed to add
libmesa_nir as a dependency resulting in a build error:

In file included from external/mesa3d/src/mesa/drivers/common/meta.c:90:
external/mesa3d/src/compiler/nir/nir.h:48:10: fatal error: 'nir_opcodes.h' file not found

Add libmesa_nir as a static library dependency to libmesa_dricore.

Fixes: 32fcced7b479 ("meta: Unset the textures_used_by_txf bitfield.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoi965: Only put external handles into the handle ht
Chris Wilson [Fri, 13 Oct 2017 09:34:51 +0000 (10:34 +0100)]
i965: Only put external handles into the handle ht

We know that we will only ever need to lookup an external handle and so
can defer adding a bo to the external ht until it is ever exported or
imported, keeping that hashtable compact.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agosvga: format the version string like the rest of mesa
Eric Engestrom [Mon, 16 Oct 2017 16:14:28 +0000 (17:14 +0100)]
svga: format the version string like the rest of mesa

All 4 other version strings do it like this.
((Also, double parentheses just look confusing))

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Brian Paul <brianp@vmware.com>