Commit Graph

89348 Commits

Author SHA1 Message Date
Bas Nieuwenhuizen 43d833ae97 radv: Use correct size for availability flag.
Per spec, VK_QUERY_RESULT_64_BIT specifies the integer size and the
availability flag is an integer. We apparently handled this correctly
already for the copy to buffer case.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
2017-02-27 01:33:10 +01:00
Bas Nieuwenhuizen 8ea34a98c0 radv: Only use PKT3_OCCLUSION_QUERY when it doesn't hang.
PKT3_OCCLUSION_QUERY hangs when used in a nested IB. This only
calls it when in a primary command buffer and we change
GetQueryPoolResults to not need it. CmdCopyQueryPoolResults
still needs it so we break that behavior for secondary command buffers.
However, that would hang already and using an unitialized value is
better than a hang.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
2017-02-27 01:33:10 +01:00
Bas Nieuwenhuizen bb878db7eb radv: Reset emitted compute pipeline when calling secondary cmd buffer.
Otherwise if the new compute pipeline is the same as the last used
pipeline before the call, we don't emit it again.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
2017-02-27 01:33:10 +01:00
Dave Airlie 15f47027ad radv: add support for NV_dedicated_allocation
This adds initial support for NV_dedicated_allocation, then
uses it for the wsi image/memory allocation paths internally
in the driver.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-27 00:22:51 +00:00
Andres Rodriguez 35189d3279 radv/winsys: fix freeing imported memory.
This bo->fd wasn't setting some stuff correctly that could
lead to crashes for anything using this path later.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-27 00:22:39 +00:00
Dave Airlie f695735ed6 vulkan/wsi/radv: add initial prime support (v1.1)
This is a complete rewrite of my previous rfc patches.

This adds the ability to present to a different GPU that rendering
using a driver side operation that can copy from the tiled to
linear shared image.

This does prime support completely in the swapchain present code,
and each queue has a precreated command buffer for each image
and for the each queue family. This means presenting should work
on graphics and compute queues and transfer in the future.

v1.1: initialise needs_linear_copy in swapchain.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-27 05:42:16 +10:00
Bas Nieuwenhuizen 336b05c49a radv/ac: Add integer->integer casts.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-02-26 19:59:27 +01:00
Eric Engestrom 5b5ffb795f check: add support for running test as standalone
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2017-02-26 13:39:45 +00:00
Eric Engestrom cd35a119ad check: make any failure fatal
Previously, only the last error code was returned.
Using `set -e` makes the script quit on any unhandled error.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2017-02-26 13:39:43 +00:00
Eric Engestrom a1e5e55989 check: mark two tests are requiring bash
Requirement was removed just before pushing, but it's actually needed
for heredocs (`<<<`).

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2017-02-26 13:39:12 +00:00
Mike Lothian 47c49f6190 st/nine: Drop USER_INDEX_BUFFERS check
This fixes 4a883966c1 where the
PIPE_CAP was removed.

Now USER_INDEX_BUFFERS are always enabled remove the check and only
check for cmst_active directly.

v2: Axel pointed out the code was still needed when cmst was inactive,
    Rebase on master too
v3: Drop struct member user_ibufs also && fixup shortlog (Edward).
v4: Fix negation
v5: Use the right variable name csmt != cmst

Fixes: 4a883966c1 ("gallium: remove PIPE_CAP_USER_INDEX_BUFFERS")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99953
Reported-and-tested-by: Vinson Lee <vlee@freedesktop.org> (v1)
Cc: Marek Olšák <marek.olsak@amd.com>
Cc: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-02-25 23:20:18 +11:00
Constantine Charlamov abb1c645c4 st/nine: make use of common uploaders v4
Make use of common uploaders that landed recently to Mesa

v2: fixed formatting, broken due to thunderbird configuration

v3: per Axel comment: added a comment into NineDevice9_DrawPrimitiveUP

v4: per Axel comment: changed style of the comment
2017-02-25 09:31:10 +01:00
Timothy Arceri 6b4bb24acf compiler: style clean-ups in blob.h
Reviewed-by: Elie Tournier <tournier.elie@gmail.com>
2017-02-25 13:30:28 +11:00
Brian Paul fcf466383a svga: fix MSVC build error after PIPE_CAP_USER_INDEX_BUFFERS removal
Need to specify the zero for the struct initializer.  My earlier test
of the patch series was with MinGW, not MSVC.

Trivial.
2017-02-24 19:07:10 -07:00
Eric Anholt 292c24ddac vc4: Lazily emit our FS/VS input loads.
This reduces register pressure in both types of shaders, by reordering the
input loads from the var->data.driver_location order to whatever order
they appear first in the NIR shader.  These instructions aren't
reorderable at our QIR scheduling level because the FS takes two in
lockstep to do an interpolation, and the VS takes multiple read
instructions in a row to get a whole vec4-level attribute read.

shader-db impact:
total instructions in shared programs: 76666 -> 76590 (-0.10%)
instructions in affected programs:     42945 -> 42869 (-0.18%)
total max temps in shared programs: 9395 -> 9208 (-1.99%)
max temps in affected programs:     2951 -> 2764 (-6.34%)

Some programs get their max temps hurt, depending on the order that the
load_input intrinsics appear, because we end up being unable to copy
propagate an older VPM read into its only use.
2017-02-24 17:01:29 -08:00
Eric Anholt f06915d7b7 vc4: Refactor the load_input code out of the intrinsic code.
It's going gain most of ntq_setup_inputs(), so simplify it first.
2017-02-24 16:31:54 -08:00
Eric Anholt 84a304eb96 vc4: Track the last block we emitted at the top level.
This will be used for delaying our VPM reads (which must be unconditional)
until just before they're used.
2017-02-24 16:31:54 -08:00
Eric Anholt 99d4203ad5 vc4: Emit max number of temps in the shader-db output.
We need to be paying attention to optimization's impact on this -- even if
we reduce instruction count, increasing max temps in general is likely to
cause us to fail to register allocate on some shaders, which means that
those won't run at all.
2017-02-24 16:31:54 -08:00
Vinson Lee 30a4b25efe util/disk_cache: Use backward compatible st_mtime.
Fix Mac OS X build error.

  CC       libmesautil_la-disk_cache.lo
In file included from disk_cache.c:46:
./disk_cache.h:57:20: error: no member named 'st_mtim' in 'struct stat'
   *timestamp = st.st_mtim.tv_sec;
                ~~ ^

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99918
Fixes: 207e3a6e4b ("util/radv: move *_get_function_timestamp() to utils")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-24 16:06:40 -08:00
Vinson Lee c3f9540a0c glsl: Fix missing-braces warning.
CXX    glsl/ast_to_hir.lo
glsl/ast_to_hir.cpp: In member function 'virtual ir_rvalue* ast_declarator_list::hir(exec_list*, _mesa_glsl_parse_state*)':
glsl/ast_to_hir.cpp:4846:42: warning: missing braces around initializer for 'unsigned int [16]' [-Wmissing-braces]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Andres Gomez <agomez@igalia.com>
2017-02-24 16:04:06 -08:00
Marek Olšák c7878b0167 ac: silence a warning
trivial
2017-02-25 00:16:38 +01:00
Marek Olšák 35915af6c9 radeonsi: fix broken tessellation on Carrizo and Stoney
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99850

Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-02-25 00:03:09 +01:00
Marek Olšák e027935a79 st/mesa: don't update unrelated states in non-draw calls such as Clear
If a VAO isn't bound and u_vbuf isn't enabled because of the Core profile,
we'll get user vertex buffers in drivers if we update vertex buffers
in glClear. So don't do that.

This fixes a regression since disabling u_vbuf for Core profiles.

Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-25 00:03:09 +01:00
Marek Olšák cc2f92b09f st/mesa: set blend state for PBO readbacks
v2: restore the state

Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-25 00:03:09 +01:00
Marek Olšák a40b76143d st/mesa: reset sample_mask, min_sample, and render_condition for PBO ops
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-25 00:03:09 +01:00
Marek Olšák 1a36bea445 st/mesa: don't check st->vp in update_clip
The clip state is updated before VS, so it can be NULL for the first draw
call. Just remove the unnecessary dependency on st->vp.

Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-25 00:03:09 +01:00
Marek Olšák d17b8d08a3 trace: remove pipe_resource wrapping
Not needed. ddebug does the same thing. The limitation is that drivers
can only use pipe_resource::screen through pipe_resource_reference.

This unbreaks trace, because pipe_context uploaders aren't wrapped,
so trace doesn't understand buffers returned by them.

Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-25 00:03:09 +01:00
Marek Olšák 4a883966c1 gallium: remove PIPE_CAP_USER_INDEX_BUFFERS
all drivers support it

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>  (VMware driver only)
2017-02-25 00:03:09 +01:00
Marek Olšák 4700f409fb st/mesa: assume all drivers support user index buffers
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>  (VMware driver only)
2017-02-25 00:03:09 +01:00
Marek Olšák e78ccee933 svga: implement user index buffers
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>  (VMware driver only)
2017-02-25 00:03:09 +01:00
Marek Olšák 7fff5b77f1 freedreno: add support for user index buffers
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-25 00:03:09 +01:00
Marek Olšák 19c51e072b etnaviv: add support for user index buffers
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-25 00:03:09 +01:00
Marek Olšák f139b6fb4f gallium/util: add new helpers for user index buffer uploading
v3: split from the etnaviv patch; fix new_ib.buffer leak

Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>  (VMware driver only)
2017-02-25 00:03:09 +01:00
Elie TOURNIER b10197e3a4 nir: delete magic number
Signed-off-by: Elie Tournier <tournier.elie@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-02-24 13:02:24 -08:00
Roland Scheidegger c3a94d9195 gallium/util: (trivial) fix util_clear_render_target
the format of the rt can be different than the one of the texture, so must
propagate the format explicitly to the helper. Broken since
3f9c5d6244 (but unused by st/mesa).
2017-02-24 20:39:56 +01:00
Emil Velikov 9833488974 util: automake: add sha1/README to the tarball
Suggested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:38:16 +00:00
Emil Velikov 6854716f37 mapi: remove unused mapi.[ch]
The final user of it was st/vega.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2017-02-24 17:37:02 +00:00
Emil Velikov 93369aa928 blorp: automake: add TODO to the tarball
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2017-02-24 17:37:00 +00:00
Emil Velikov ab6fa871ef anv: automake: add TODO to the tarball
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2017-02-24 17:36:59 +00:00
Emil Velikov aa63b7fa16 vc4: automake: add the kernel/README to the tarball
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2017-02-24 17:36:57 +00:00
Emil Velikov f64a7c74c3 nir: automake: add the README to the tarball
Similar to other accompanying documentation we have in-tree.
For example glsl/README.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2017-02-24 17:36:45 +00:00
Emil Velikov e3ad2d40db radv/entrypoints: Only generate entrypoints for supported features
This changes the way radv_entrypoints_gen.py works from generating a
table containing every single entrypoint in the XML to just the ones
that we actually need.  There's no reason for us to burn entrypoint
table space on a bunch of NV extensions we never plan to implement.

RADV implements VK_AMD_draw_indirect_count, so add that to the list.

Port of 114c281e70
"and/entrypoints: Only generate entrypoints for supported features"

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
2017-02-24 17:36:25 +00:00
Robert Bragg d1bb7895b9 main/performance_query: s/GLboolean/bool/
Ideally would have caught these when adding the interface but this just
switches a few return types for the INTEL_performance_query backend
interface to bool instead of GLboolean.

Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:16:11 +00:00
Eric Engestrom 1534fc6d10 eglapi: replace linear entrypoint search with binary search
Tested with dEQP-EGL.functional.get_proc_address.*

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:00:50 +00:00
Eric Engestrom d25dea0c68 egl: make sure entrypoints list is always sorted
Starting with the next commit, badly sorting this list will break the
eglGetProcAddress().

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:00:50 +00:00
Eric Engestrom 557f3181bf egl: distribute all tests
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:00:50 +00:00
Eric Engestrom f92fd4d7a8 eglapi: move entrypoints list out to its own file
This will allow us to make sure the list is always sorted in the next
commit.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:00:50 +00:00
Eric Engestrom 2b3cd82e18 eglapi: sort entrypoints list
Let's make that comment true.
If will also be necessary in a couple commits (using bsearch).

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:00:50 +00:00
Eric Engestrom 3b69c4a8e8 eglapi: use macro to map entrypoints to functions
As of the last 3 commits, there's a function for each entrypoint.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:00:50 +00:00
Eric Engestrom 66d5ec5f3f eglapi: add entrypoint for eglClientWaitSyncKHR
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-24 17:00:50 +00:00