OSDN Git Service
Ian Romanick [Mon, 17 Jul 2017 19:31:06 +0000 (12:31 -0700)]
spirv: Generate spirv_info.c
The old table based spirv_*_to_string functions would return NULL for
any values "inside" the table that didn't have entries. The tables also
needed to be updated by hand each time a new spirv.h was imported.
Generate the file instead.
v2: Make this script work more like src/mesa/main/format_fallback.py.
Suggested by Jason. Remove SCons supports. Suggested by Jason and
Emil. Put all the build work in Makefile.nir.am in lieu of adding a new
Makefile.spirv.am. Suggested by Emil. Add support for Android builds
based on code provided by Emil.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Ian Romanick [Sat, 15 Jul 2017 01:39:02 +0000 (18:39 -0700)]
spirv: Import the lastest 1.0.2 JSON from Khronos
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 13 Jul 2017 19:36:59 +0000 (12:36 -0700)]
spirv: Import the latest 1.2 header from Khronos
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Brian Paul [Mon, 17 Jul 2017 18:31:57 +0000 (12:31 -0600)]
mesa: whitespace fixes in get.c
Remove trailing whitespace.
Replace tabs with spaces.
Trivial.
Brian Paul [Mon, 17 Jul 2017 18:09:42 +0000 (12:09 -0600)]
mesa: fix GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT query
This query is not allowed in GL core profile 3.3 and later (since
GL_QUADS and GL_QUAD_STRIP are disallowed). The query was (mistakenly)
supported in GL 3.2. This fixes the glGet error test accordingly.
Reviewed-by: Neha Bhende<bhenden@vmware.com>
Eric Engestrom [Tue, 18 Jul 2017 10:06:43 +0000 (11:06 +0100)]
vulkan/util: fix typo in comment
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Samuel Pitoiset [Mon, 17 Jul 2017 20:40:49 +0000 (22:40 +0200)]
mapi: add missing no_error tag to glBlitNamedFramebuffer()
Fixes:
6fedb31785 ("mesa: add KHR_no_error support for glBlitNamedFramebuffer()")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Alex Smith [Mon, 17 Jul 2017 10:14:33 +0000 (11:14 +0100)]
radv: Set the RADEON_SURF_OPTIMIZE_FOR_SPACE flag for images
This looks like a regression from
df301237940 ("radv: use
ac_compute_surface"). Before that, the opt4Space addrlib flag was set
to true unless the image has FMASK (ac_compute_surface will similarly
only set that flag for images without FMASK).
This saves multiple gigabytes of VRAM on one of our games, and brings
its VRAM utilisation on RADV in line with AMDGPU-PRO and NVIDIA.
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 12 Jun 2017 19:54:08 +0000 (05:54 +1000)]
radv: don't shadow meta_va.
Coverity warned about dead code below, as meta_va was being shadowed.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kenneth Graunke [Tue, 18 Jul 2017 05:42:50 +0000 (22:42 -0700)]
i965: Delete brw_sf_state.c again
"...and stay dead!"
Rafael deleted this file in
c2b5a26dc25b9c62954a75465e25294c7fd3851a
(i965: Convert SF_STATE to genxml.) but Marek accidentally brought it
back in commit
e7a091936fb6fd578c6ced9baa38b306b638a11b (mesa: replace
ctx->Polygon._FrontBit with a helper function) when resolving conflicts.
It's not actually even compiled, but it's still here trolling people
into thinking it still exists and needs patching.
Connor Abbott [Mon, 26 Jun 2017 22:50:07 +0000 (15:50 -0700)]
ac/nir: rewrite shared variable handling (v2)
Translate the NIR variables directly to LLVM instead of lowering to a
TGSI-style giant array of vec4's and then back to a variable. This
should fix indirect dereferences, make shared variables more tightly
packed, and make LLVM's alias analysis more precise. This should fix an
upcoming Feral title, which has a compute shader that was failing to
compile because the extra padding made us run out of LDS space.
v2: Combine the previous two patches into one, only use this for shared
variables for now until LLVM becomes smarter.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Alex Smith <asmith@feralinteractive.com>
Jason Ekstrand [Sun, 16 Jul 2017 23:54:44 +0000 (16:54 -0700)]
i965: Check if the modifier is supported in select_best_modifier
Otherwise, if a client gave us a list of modifiers that contained a
modifier we understand but which is not supported on the hardware, we
might return that one and then fail to create the image.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Jason Ekstrand [Sun, 16 Jul 2017 23:35:22 +0000 (16:35 -0700)]
i965: Rework the modifier info map
This commit splits the mapping in half. The modifier_infos table now
only contains the modifier and the since_gen field. The tiling bits
have been moved into a table in tiling_to_modifier as that's the only
place it was ever used. The modifier_is_supported function now takes a
devinfo and does the since_gen check.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Jason Ekstrand [Fri, 14 Jul 2017 22:28:21 +0000 (15:28 -0700)]
i965/surface_state: Remove the mcs_buf->offset == 0 restriction
This assert was removed in
b0cc55f29831638069407a4c1a5c809b26902ab6 but
got added back in
1a43d774b613d0b00e26b28cc752d944ce8049aa, probably by
accident.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Jason Ekstrand [Tue, 13 Jun 2017 20:35:15 +0000 (13:35 -0700)]
intel/isl: Add a row_pitch parameter to surf_get_ccs_surf
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Jason Ekstrand [Thu, 13 Jul 2017 00:14:49 +0000 (17:14 -0700)]
i965/miptree: Use BO_ALLOC_ZEROED for CCS_E buffers
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Jason Ekstrand [Thu, 13 Jul 2017 00:06:29 +0000 (17:06 -0700)]
i965/screen: Allocate ZEROED BOs for images
Reviewed-by: Chad Versace <chadversary@chromium.org>
Jason Ekstrand [Wed, 12 Jul 2017 23:48:43 +0000 (16:48 -0700)]
i965/bufmgr: Add a BO_ALLOC_ZEROED flag
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Thu, 13 Jul 2017 02:20:22 +0000 (19:20 -0700)]
i965/miptree: Replace is_lossless_compressed with mt->aux_usage checks
Now that we have an actual aux_usage field, we no longer need the
complex logic of is_lossless_compressed in order to figure out if a
miptree is CCS_E compressed. As a side-effect, there is not longer any
need to overload MSAA_LAYOUT_CMS for CCS_E and we can stop doing so.
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Jason Ekstrand [Wed, 12 Jul 2017 23:29:45 +0000 (16:29 -0700)]
i965/miptree: Allocate HiZ up-front
HiZ, like MCS and CCS_E, can compress more than just clear colors so we
want it turned on whenever the miptree is being used as a depth
attachment. It's theoretically possible for someone to create a depth
texture, upload data with glTexSubImage2D, and texture from it without
ever binding it as a depth target. If this happens, we would end up
wasting a bit of space by allocating a HiZ surface we never use.
However, this is rather unlikely out side of test cases, so we're better
off just allocating it up-front.
Reviewed-by: Chad Versace <chadversary@chromium.org>
Jason Ekstrand [Mon, 17 Jul 2017 15:01:34 +0000 (08:01 -0700)]
i965/miptree: Add an intel_tiling_supports_hiz helper
We need this split for the same reason that we need the split for CCS:
intel_miptree_supports_hiz is called *before* we choose the actual
tiling. Adding a tiling_supports_hiz helper lets choose_aux_usage
more accurately decide whether or not to enable hiz. In particular,
this prevents us from enabling HiZ on linear depth buffers.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Jason Ekstrand [Wed, 12 Jul 2017 23:11:47 +0000 (16:11 -0700)]
i965/miptree: Gather initial aux allocation into a single function
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Charmaine Lee [Wed, 12 Jul 2017 04:55:13 +0000 (21:55 -0700)]
st/mesa: init winsys buffers list only if context creation succeeds
Fixes piglit test crash when context creation fails.
v2: As suggested by Brian, move the init to st_create_context_priv()
Reviewed-by: Brian Paul <brianp@vmware.com>
Sinclair Yeh [Tue, 16 May 2017 15:19:41 +0000 (08:19 -0700)]
winsys/svga/drm: Enable import/export fence FD
Enable the capability if the DRM supports it.
Hook up mechanism to send and receive fence FD from the DRM.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Sinclair Yeh [Tue, 16 May 2017 00:10:38 +0000 (17:10 -0700)]
winsys/svga/drm: Connect winsys-side fence_* functions
Connect fence_get_fd, fence_create_fd, and fence_server_sync.
Implement the required functions in vmw_fence module.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Sinclair Yeh [Mon, 15 May 2017 23:22:53 +0000 (16:22 -0700)]
drivers/svga: Connect driver-side fence_* functions
Connect fence_get_fd, fence_create_fd, and fence_server_sync.
Return PIPE_CAP_NATIVE_FENCE_FD capability based on what the
winsys reports
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Sinclair Yeh [Mon, 17 Jul 2017 16:03:48 +0000 (10:03 -0600)]
winsys/svga/drm: Create winsys interface for Fence FD
The new interfaces will be used to enable
EGL_ANDROID_native_fence_sync.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Sinclair Yeh [Mon, 15 May 2017 22:25:31 +0000 (15:25 -0700)]
winsys/svga/drm: Prepare to support fence fd
Make the fields and flags available.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Sinclair Yeh [Wed, 3 May 2017 18:48:25 +0000 (11:48 -0700)]
drivers/svga, winsys/svga/drm: Thread through timeout for fence_finish
The timeout parameter is required to implement
EGL_ANDROID_native_fence_sync.
v2
* Replaced default timeout from 0 to PIPE_TIMEOUT_INFINITE
* Add more documentation to the new timeout parameter
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Mon, 17 Jul 2017 16:08:40 +0000 (10:08 -0600)]
svga: whitespace clean-up in svga_winsys.h
Trivial.
Brian Paul [Fri, 14 Jul 2017 04:18:04 +0000 (22:18 -0600)]
svga: add some const qualifiers
Trivial.
Brian Paul [Fri, 14 Jul 2017 04:11:46 +0000 (22:11 -0600)]
svga: add comment about 'extra' constant locations
Trivial.
Jason Ekstrand [Tue, 11 Jul 2017 23:28:55 +0000 (16:28 -0700)]
anv/image: Add INPUT_ATTACHMENT to the list of required usages
From the Vulkan 1.0.53 spec VU for vkCreateImageView:
"image must have been created with a usage value containing at least
one of VK_IMAGE_USAGE_SAMPLED_BIT, VK_IMAGE_USAGE_STORAGE_BIT,
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT"
We were missing VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT from out list.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Jason Ekstrand [Tue, 11 Jul 2017 15:13:13 +0000 (08:13 -0700)]
anv: Stop leaking the no_aux sampler surface state
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Jason Ekstrand [Tue, 11 Jul 2017 22:47:36 +0000 (15:47 -0700)]
anv/cmd_buffer: Properly handle render passes with 0 attachments
We were early returning and never created the NULL surface state.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: James Legg <jlegg@feralinteractive.com>
Cc: mesa-stable@lists.freedesktop.org
Marek Olšák [Mon, 10 Jul 2017 21:13:14 +0000 (23:13 +0200)]
radeonsi/gfx9: add VM fault dmesg parser support
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Mon, 10 Jul 2017 20:16:26 +0000 (22:16 +0200)]
radeonsi: automatically resize shader compiler thread queues when they are full
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Mon, 10 Jul 2017 19:59:43 +0000 (21:59 +0200)]
radeonsi: prevent a deadlock in util_queue_add_job with too many GL contexts
If the queue is full, util_queue_add_job will wait while bo_fence_lock is
held.
It pb_slab wants to reuse a buffer, it will lock the pb_slab mutex and
try to check BO fence busyness, but it has to wait for bo_fence_lock to get
released. Both bo_fence_lock and pb_slab mutex are locked now.
When the CS thread unreferences and releases a suballocated buffer,
it will try to lock the pb_slab mutex and has to wait. The CS thread
can't finish its job in order to free a queue slot and unblock
util_queue_add_job ==> deadlock.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Mon, 10 Jul 2017 19:17:04 +0000 (21:17 +0200)]
util/u_queue: add an option to resize the queue when it's full
Consider the following situation:
mtx_lock(mutex);
do_something();
util_queue_add_job(...);
mtx_unlock(mutex);
If the queue is full, util_queue_add_job will wait for a free slot.
If the job which is currently being executed tries to lock the mutex,
it will be stuck forever, because util_queue_add_job is stuck.
The deadlock can be trivially resolved by increasing the queue size
(reallocating the queue) in util_queue_add_job if the queue is full.
Then util_queue_add_job becomes wait-free.
radeonsi will use it.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Mon, 10 Jul 2017 14:06:08 +0000 (16:06 +0200)]
radeonsi: expose ARB_timer_query unconditionally
clock_crystal_freq is always non-zero now.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Mon, 10 Jul 2017 14:01:28 +0000 (16:01 +0200)]
ac/gpu_info: if clock crystal frequency is 0, print an error and set 1
During bring-up, this is often 0. Prevent automatic disablement of
ARB_timer_query and demotion of the OpenGL version to 3.2 by setting
a non-zero frequency. Print an error message instead.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Sun, 9 Jul 2017 23:33:38 +0000 (01:33 +0200)]
radeonsi/gfx9: don't read back non-existent register SRBM_STATUS2
It looks like there is no way to monitor SDMA busyness on GFX9.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Sun, 9 Jul 2017 21:44:57 +0000 (23:44 +0200)]
radeonsi: prevent a crash with DBG_CHECK_VM and u_threaded_context
by setting PIPE_CONTEXT_DEBUG in the caller
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Sat, 8 Jul 2017 18:22:54 +0000 (20:22 +0200)]
ac/surface/gfx9: flags.texture currently refers to TC-compatible HTILE
This should lead to better MSAA performance on GFX9.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Sat, 8 Jul 2017 17:49:05 +0000 (19:49 +0200)]
radeonsi: simplify computation of tessellation offchip buffers
This is overly cautious, but better safe than sorry.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Wed, 5 Jul 2017 21:33:13 +0000 (23:33 +0200)]
radeonsi/gfx9: add workarounds to avoid VGPR indexing completely
For inputs and outputs, indirect indexing is lowered by the GLSL compiler.
For temporaries, use alloca and disable the "promote-alloca" pass.
In the future, we could switch all codepaths to alloca permanently and
just rely on the "promote-alloca" pass.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Jul 2017 22:24:11 +0000 (00:24 +0200)]
radeonsi: emit param exports after position exports
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Sat, 27 May 2017 18:56:33 +0000 (20:56 +0200)]
radeonsi: move building parameter exports into a separate function
Both loops now look simple.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Thu, 1 Jun 2017 20:25:57 +0000 (22:25 +0200)]
radeonsi: don't use info.num_inputs when it's unused
For clarity. It's only used by color interpolation.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Thu, 1 Jun 2017 20:18:58 +0000 (22:18 +0200)]
radeonsi: add si_build_fs_interp helper
This is much simpler.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Jul 2017 20:38:37 +0000 (22:38 +0200)]
radeonsi: merge si_llvm_get_amdgpu_target into ac_get_llvm_target
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Thu, 6 Jul 2017 00:15:35 +0000 (02:15 +0200)]
gallivm: inline gallivm_init_llvm_targets
there is only one user.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Thu, 6 Jul 2017 00:14:53 +0000 (02:14 +0200)]
radeonsi: don't call gallivm_init_llvm_targets
It's for initializing the native (x86) target.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Jul 2017 15:29:46 +0000 (17:29 +0200)]
gallium/radeon: reallocate suballocated buffers when exported
This should fix exports of suballocated buffers.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Jul 2017 15:26:31 +0000 (17:26 +0200)]
gallium/radeon: flush the context after in-place texture realloc before export
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Mark Thompson [Sat, 15 Jul 2017 18:51:56 +0000 (19:51 +0100)]
st/va: Fix scaling list ordering for H.265
Mesa here requires the scaling lists in diagonal scan order, but
VAAPI passes them in raster scan order. Therefore, rearrange the
elements when copying.
v2: Move scan tables to vl_zscan.c.
Fix type in size assertion.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
Emil Velikov [Fri, 14 Jul 2017 15:18:59 +0000 (16:18 +0100)]
radv: advertise v6 of the wayland surface extension
Jason updated the Khronos spec to explicitly state that Wayland surfaces
must support VK_PRESENT_MODE_MAILBOX_KHR.
ANV did so since day one (back in 2015)
Cc: mesa-stable@lists.freedesktop.org
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Emil Velikov [Fri, 14 Jul 2017 15:14:14 +0000 (16:14 +0100)]
anv: advertise v6 of the wayland surface extension
Jason updated the Khronos spec to explicitly state that Wayland surfaces
must support VK_PRESENT_MODE_MAILBOX_KHR.
ANV did so since day one (back in 2015)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Emil Velikov [Thu, 13 Jul 2017 16:43:10 +0000 (17:43 +0100)]
i965: use strtol to convert the integer deviceID override
One can override the deviceID, by setting the INTEL_DEVID_OVERRIDE
variable. A few symbolic names or a numerical value for the actual
device ID is accepted.
At the same time we're using strtod (string to double) to convert the
string to a decimal numeral. A seeming thinko, made by the original
commit that introduces the code in libdrm_intel and got here with the
import.
Fixes:
514db96c117a ("i965: Import libdrm_intel.")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Wed, 12 Jul 2017 19:21:38 +0000 (21:21 +0200)]
gallium/u_blitter: don't use TXF for scaled blits
There seems to be a rounding difference with F2I vs nearest filtering.
The precise problem in the rounding is unknown.
This fixes an incorrect output with OpenMAX encoding.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Lionel Landwerlin [Sun, 16 Jul 2017 14:28:09 +0000 (15:28 +0100)]
anv: ensure device name contains terminating character
v2: Use sizeof() (Chris)
CID:
1415113
Reported-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Lionel Landwerlin [Sun, 16 Jul 2017 14:17:25 +0000 (15:17 +0100)]
i965: miptree: silence coverity warning
This probably can't happen, but we're better off with initialized
variables.
CID:
1415114
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Marek Olšák [Tue, 4 Jul 2017 21:34:09 +0000 (23:34 +0200)]
mesa: flag _NEW_TEXTURE_OBJECT for GL_TEXTURE_LOD_BIAS_EXT
Only the compatibility profile can set it.
It was done incorrectly when we split _NEW_TEXTURE.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Kenneth Graunke [Fri, 14 Jul 2017 03:43:57 +0000 (20:43 -0700)]
meta: Actually initialize ImmutableLevels to 1.
Otherwise, ImmutableLevels is 0, which is an illegal value. Later,
_mesa_meta_setup_sampler will use _mesa_texture_parameteriv to set
texObj->MaxLevel = CLAMP(params[0], texObj->BaseLevel,
texObj->ImmutableLevels - 1);
which turns into a completely bogus CLAMP(value, 0, -1)...where the
upper bound is smaller than the lower bound. This ends up being -1
today due to the way CLAMP is implemented, which is a bogus MaxLevel.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Fri, 14 Jul 2017 21:46:09 +0000 (14:46 -0700)]
dri: Make classic drivers allow __DRI_CTX_FLAG_NO_ERROR.
Grigori recently added EGL_KHR_create_context_no_error support,
which causes EGL to pass a new __DRI_CTX_FLAG_NO_ERROR flag to
drivers when requesting an appropriate context mode.
driContextSetFlags() will already handle it properly for us, but the
classic drivers all have code to explicitly balk at unknown flags. We
need to let it through or they'll fail to create a no_error context.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
Samuel Pitoiset [Fri, 7 Jul 2017 07:52:05 +0000 (09:52 +0200)]
ddebug: fix parsing of the pipelined mode
Trivial.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Dave Airlie [Thu, 2 Mar 2017 21:39:10 +0000 (21:39 +0000)]
radv: predicate cmask eliminate when using DCC.
When using DCC some clear values don't require a cmask eliminate
step. This patch adds support for black and black with alpha 1,
there are other values, but I don't have access to a comprehensive list.
This works by setting the cmask eliminate predicate when doing the
fast clear, and later when doing the cmask elimination making sure
the draws are predicated.
This increases the fps on Sascha Willems deferred.
Tonga: 580fps->670fps on a Tonga PRO card.
Polaris 730->850fps
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 25 Jun 2017 23:52:07 +0000 (00:52 +0100)]
radv/clear: add r32g32b32a32 fast clear support (v2)
We can only fast clear 128-bit images if the r/g/b channels
are the same, and we are using DCC.
For DCC we'll bail out on translate if this isn't true,
and we catch cmask clears explicitly.
v2: remove 64-bit block (Bas), add uint32 as well.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 9 Jul 2017 19:27:48 +0000 (20:27 +0100)]
amd/addrlib: fix typo in api name.
This fixes the misspelling of ALIGNMENTS in addrlib.
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 7 Jul 2017 05:56:57 +0000 (06:56 +0100)]
radv: set cb base tile swizzles for MRT speedups (v4)
This patch uses addrlib to workout the tile swizzles according
to the surface index. It seems to produce the same values as
amdgpu-pro for the deferred test.
v2: don't apply swizzle to CMASK. the eg docs don't mention
it, and we clearly don't align cmask for that.
v3: disable surf index for dedicated images, as these will
most likely be shared, and I don't think the metadata has
space for this info in it yet.
v4: update for shareable images, rename combined_swizzle
to tile_swizzle
This gets the deferred demo from 730->950fps on my rx480.
(dcc cmask elim predication patches get it further)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 11 Jul 2017 02:02:09 +0000 (03:02 +0100)]
radv: allow clear merging for depth/stencil with no care stencil
Some of the Sascha Willems demos pick a D32/S8 format for the depth
buffer, then do a LOAD_OP_CLEAR/LOAD_OP_DONT_CARE on it, which means
we don't get to merge the undefined->depth and clear htile transitions.
This add the stencil aspect to the pending clears if there is a depth
clear pending and the stencil aspect is don't care.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 15 Jul 2017 17:55:47 +0000 (19:55 +0200)]
radv: Remove NV dedicated alloc extension.
To not confuse apps in thinking it might be faster.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Bas Nieuwenhuizen [Sat, 15 Jul 2017 17:54:13 +0000 (19:54 +0200)]
radv: Use the KHR dedicated alloc for the WSI.
NV isn't valid for external images anymore.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Fixes:
6ddc64b93ea "radv: Add support for VK_KHR_dedicated_allocation."
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Jason Ekstrand [Sat, 15 Jul 2017 00:08:01 +0000 (02:08 +0200)]
radv: Implement VK_KHR_external_memory
This effectively reverts commit
43a171878bb4b5aedb36a. Technically,
VK_KHR_get_memory_requirements2 and VK_KHR_dedicated_allocation are
required for the KHR version but this at least restores the removed
functionality. This patch builds but has received zero testing.
Acked-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 15 Jul 2017 00:08:00 +0000 (02:08 +0200)]
radv: Add support for VK_KHR_dedicated_allocation.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 15 Jul 2017 00:07:59 +0000 (02:07 +0200)]
radv: Add support for VK_KHR_get_memory_requirements2.
Fished the SparseImage call out of the headers as the spec missed
the definition.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Dave Airlie <airlied@redhat.com>
Jason Ekstrand [Thu, 13 Jul 2017 19:18:15 +0000 (12:18 -0700)]
anv: Implement VK_KHR_external_memory_*
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 28 Apr 2017 12:17:38 +0000 (05:17 -0700)]
anv: Implement VK_KHR_dedicated_allocation
We always recommend sub-allocation and don't do anything special for
dedicated allocations.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 28 Apr 2017 12:13:08 +0000 (05:13 -0700)]
anv: Implement VK_KHR_get_memory_requirements2
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Thu, 13 Jul 2017 19:28:46 +0000 (12:28 -0700)]
anv: Advertise version 1.0.54
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Thu, 13 Jul 2017 18:57:07 +0000 (11:57 -0700)]
vulkan: Update to the new 1.0.54 spec XML and headers
There is one small ANV change here because we used the
VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX enum in the BO cache and that had
to be updated to have the _KHR suffix.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Sat, 15 Jul 2017 15:58:55 +0000 (08:58 -0700)]
radv: Drop support for VK_KHX_external_semaphore_*
These have been formally deprecated by Khronos never to be shipped
again. The KHR versions should be implemented/used instead.
Acked-by: Dave Airlie <airlied@redhat.com>
Jason Ekstrand [Thu, 13 Jul 2017 18:40:46 +0000 (11:40 -0700)]
anv: Drop support for VK_KHX_external_semaphore_*
These have been formally deprecated by Khronos never to be shipped
again. The KHR versions should be implemented/used instead.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Thu, 13 Jul 2017 18:18:39 +0000 (11:18 -0700)]
anv: Drop support for VK_KHX_external_memory_*
These have been formally deprecated by Khronos never to be shipped
again. The KHR versions should be implemented/used instead.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Matt Turner [Sat, 15 Jul 2017 05:01:11 +0000 (22:01 -0700)]
i965: Compile with -msse2 (instead of -msse2)
Ian noted that were were two Pentium 4 Extreme Edition LGA 775 CPUs, and
they only have SSE2.
Matt Turner [Fri, 7 Jul 2017 04:31:05 +0000 (21:31 -0700)]
i965: Compile with -msse3
All CPUs that can be paired with a GPU supported by i965_dri.so supports
SSE3. This allows us to ensure that some vectorized version of the tiled
memcpy path is enabled on 32-bit systems.
This also ensures that __builtin_ia32_clflush is always usable.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101774
Tested-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Fri, 14 Jul 2017 21:26:42 +0000 (14:26 -0700)]
egl: Fix predecence problem when setting __DRI_CTX_FLAG_NO_ERROR
This accidentally set __DRI_CTX_FLAG_NO_ERROR whenever any flags were
present. Just needs extra parenthesis.
Fixes:
4909519a6655 (egl: Add EGL_KHR_create_context_no_error support)
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Petr Sebor [Tue, 11 Jul 2017 10:08:47 +0000 (12:08 +0200)]
drirc: whitelist glthread for Euro Truck Simulator 2
Petr Sebor [Tue, 11 Jul 2017 10:08:46 +0000 (12:08 +0200)]
drirc: whitelist glthread for American Truck Simulator
Grigori Goronzy [Fri, 14 Jul 2017 21:12:17 +0000 (23:12 +0200)]
mesa/marshal: fix Windows build
This was broken by commit
1ad24faa.
Reported by AppVeyor:
https://ci.appveyor.com/project/mesa3d/mesa/build/4918
Edmondo Tommasina [Mon, 10 Jul 2017 19:12:11 +0000 (21:12 +0200)]
drirc: whitelist glthread for The Witcher 2
Performance delta on AMD Phenom II X3 720 / RX 470
The Witcher 2: +18%
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Edmondo Tommasina [Sun, 9 Jul 2017 19:43:09 +0000 (21:43 +0200)]
drirc: whitelist glthread for Civilization 5
Performance delta on AMD Phenom II X3 720
Civilization 5: +28%
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Tim Rowley [Fri, 14 Jul 2017 20:01:35 +0000 (15:01 -0500)]
swr: JitManager runtime determination of architecture
Fixes performance regression from
f50aa21456d - was forcing internal
code generation to target AVX (no gather, etc).
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
Andres Gomez [Fri, 14 Jul 2017 19:27:26 +0000 (22:27 +0300)]
docs: update calendar, add news item and link release notes for 17.1.5
Signed-off-by: Andres Gomez <agomez@igalia.com>
Andres Gomez [Fri, 14 Jul 2017 19:22:50 +0000 (22:22 +0300)]
docs: add sha256 checksums for 17.1.5
Signed-off-by: Andres Gomez <agomez@igalia.com>
Andres Gomez [Fri, 14 Jul 2017 18:58:05 +0000 (21:58 +0300)]
docs: add release notes for 17.1.5
Signed-off-by: Andres Gomez <agomez@igalia.com>
Grigori Goronzy [Thu, 29 Jun 2017 05:39:55 +0000 (07:39 +0200)]
st/mesa: Add KHR_no_error toggle to driconf
Allows applications to be whitelisted.
v2: Remove misguided DRI common part.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Grigori Goronzy [Thu, 29 Jun 2017 00:44:03 +0000 (02:44 +0200)]
egl: Add EGL_KHR_create_context_no_error support
This only adds the EGL side, needs to be plumbed into Mesa frontend.
v2: Add check for extension availability.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Grigori Goronzy [Thu, 29 Jun 2017 02:39:22 +0000 (04:39 +0200)]
st/mesa: Add support for KHR_no_error flag
Add a new context flag and plumb it through the various layers of the
context creation code to set up dispatch tables for the no-error mode.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Grigori Goronzy [Thu, 29 Jun 2017 01:24:15 +0000 (03:24 +0200)]
dri: Add KHR_no_error DRI extension
This basic extension allows usage of the __DRI_CTX_FLAG_NO_ERROR flag.
This includes support code for classic Mesa drivers to switch on the
no-error mode if the flag is set.
v2: Move to common DRI code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>