mesa.git
7 years agoradv: drop pointless struct decl.
Dave Airlie [Fri, 14 Oct 2016 03:41:47 +0000 (13:41 +1000)]
radv: drop pointless struct decl.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: move to using shared vk_alloc inlines.
Dave Airlie [Fri, 14 Oct 2016 03:36:45 +0000 (13:36 +1000)]
radv: move to using shared vk_alloc inlines.

This moves to the shared vk_alloc inlines for vulkan
memory allocations.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoanv: move to using vk_alloc helpers.
Dave Airlie [Fri, 14 Oct 2016 03:31:35 +0000 (13:31 +1000)]
anv: move to using vk_alloc helpers.

This moves all the alloc/free in anv to the generic helpers.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agovulkan: add vk_alloc.h shared allocation inlines.
Dave Airlie [Fri, 14 Oct 2016 03:19:43 +0000 (13:19 +1000)]
vulkan: add vk_alloc.h shared allocation inlines.

vulkan allocation allows for overriding the allocator used,
add some macros for anv/radv to share for this.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoanv: drop local MIN/MAX macros.
Dave Airlie [Fri, 14 Oct 2016 03:12:08 +0000 (13:12 +1000)]
anv: drop local MIN/MAX macros.

Use the ones from mesa, most places already did.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: drop local MIN/MAX macros.
Dave Airlie [Fri, 14 Oct 2016 03:11:20 +0000 (13:11 +1000)]
radv: drop local MIN/MAX macros.

Use the ones in macros.h instead.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoutil: move min/max/clamp macros to util macros.h
Dave Airlie [Fri, 14 Oct 2016 03:10:26 +0000 (13:10 +1000)]
util: move min/max/clamp macros to util macros.h

Although the vulkan drivers include mesa macros.h, for
radv I'd like to move away from that.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: make use of shared vector helper.
Dave Airlie [Fri, 14 Oct 2016 02:59:55 +0000 (12:59 +1000)]
radv: make use of shared vector helper.

This removes the vector code from radv in favour of sharing
code with anv.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoanv: port to using new u_vector shared helper.
Dave Airlie [Fri, 14 Oct 2016 02:57:44 +0000 (12:57 +1000)]
anv: port to using new u_vector shared helper.

This just removes the anv vector code and uses the new helper.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoutil: add vector util code.
Dave Airlie [Fri, 14 Oct 2016 02:55:03 +0000 (12:55 +1000)]
util: add vector util code.

This is ported from anv, both anv and radv can share this.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agosvga: minor code improvements in svga_validate_pipe_sampler_view()
Brian Paul [Tue, 18 Oct 2016 16:20:55 +0000 (10:20 -0600)]
svga: minor code improvements in svga_validate_pipe_sampler_view()

Use the 'texture' local var in more places.
Rename 'pFormat' to 'viewFormat'.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
7 years agointel: genxml: add SAMPLER_BORDER_COLOR_STATE structures
Lionel Landwerlin [Wed, 12 Oct 2016 19:04:26 +0000 (20:04 +0100)]
intel: genxml: add SAMPLER_BORDER_COLOR_STATE structures

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agost/va: force to flush the last p frame in idr period
Boyuan Zhang [Mon, 17 Oct 2016 20:11:48 +0000 (16:11 -0400)]
st/va: force to flush the last p frame in idr period

During dual instance encoding submission, if the second encode task and first
encode task have no reference dependency, e.g. p following with idr-frame,
there is a chance the second task will use for its reconstructed picture
buffer the same buffer used by first task for its reference/reconstructed
picture. In this case, buffer corruption may occur depending on encoding
speed. Fix is to force flush these two tasks separately to avoid race condition

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98005
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
7 years agoegl/surfaceless: Fix segfault in eglSwapBuffers
Chad Versace [Tue, 18 Oct 2016 16:39:49 +0000 (09:39 -0700)]
egl/surfaceless: Fix segfault in eglSwapBuffers

Since commit 63c5d5c6c46c8472ee7a8241a0f80f13d79cb8cd, the surfaceless
platform has allowed creation of pbuffer surfaces. But the vtable entry
for eglSwapBuffers has remained NULL.

Discovered by running a little pbuffer test.

Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoradeonsi: rename prefixes from radeon to si
Marek Olšák [Mon, 17 Oct 2016 10:51:27 +0000 (12:51 +0200)]
radeonsi: rename prefixes from radeon to si

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agoradeonsi: merge radeon_llvm_context and si_shader_context
Marek Olšák [Mon, 17 Oct 2016 10:42:12 +0000 (12:42 +0200)]
radeonsi: merge radeon_llvm_context and si_shader_context

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agoradeonsi: import all TGSI->LLVM code from gallium/radeon
Marek Olšák [Mon, 17 Oct 2016 10:30:42 +0000 (12:30 +0200)]
radeonsi: import all TGSI->LLVM code from gallium/radeon

Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agogallium/radeon: simplify initialization of 64-bit gallivm builders
Marek Olšák [Sun, 16 Oct 2016 23:51:53 +0000 (01:51 +0200)]
gallium/radeon: simplify initialization of 64-bit gallivm builders

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agogallium/radeon: remove unused radeon_llvm_reg_index_soa
Marek Olšák [Sun, 16 Oct 2016 23:39:21 +0000 (01:39 +0200)]
gallium/radeon: remove unused radeon_llvm_reg_index_soa

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agoradeonsi: move LLVM ALU codegen into radeonsi
Marek Olšák [Sun, 16 Oct 2016 23:36:58 +0000 (01:36 +0200)]
radeonsi: move LLVM ALU codegen into radeonsi

Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agogenxml: add generated headers to EXTRA_DIST
Jonathan Gray [Sun, 16 Oct 2016 12:08:42 +0000 (23:08 +1100)]
genxml: add generated headers to EXTRA_DIST

Building the Mesa 12.0.3 distfile failed on a system without python
as generated files were not included in the distfile.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agomesa: automake: include mesa_glinterop.h in distfile
Jonathan Gray [Sun, 16 Oct 2016 12:16:19 +0000 (23:16 +1100)]
mesa: automake: include mesa_glinterop.h in distfile

Add mesa_glinterop.h to the list of headers that will get included
in the distfile as it is required to build Mesa itself.

Corrects a regression introduced in a89faa2022fd995af2019c886b152b49a01f9392.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl: remove docs directory from EXTRA_DIST
Jonathan Gray [Sun, 16 Oct 2016 10:06:25 +0000 (21:06 +1100)]
egl: remove docs directory from EXTRA_DIST

The egl docs directory no longer exists as of
88b5c36fe1a1546bf633ee161a6715efc593acbd.

Remove it from EXTRA_DIST to unbreak 'make dist'

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agogenxml: avoid using a GNU make pattern rule
Jonathan Gray [Sun, 16 Oct 2016 05:41:55 +0000 (16:41 +1100)]
genxml: avoid using a GNU make pattern rule

% pattern rules are a GNU extension.  Convert the use of one to a
inference rule to allow this to build on OpenBSD.

This is a related change to the one made in
e3d43dc5eae5271e2c87bab702aa7409d3dd0b23

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoconfigure.ac: use a single require_libdrm helper
Emil Velikov [Mon, 12 Sep 2016 17:47:54 +0000 (18:47 +0100)]
configure.ac: use a single require_libdrm helper

Rather than having 4-5 places which do the explicit check/message just
polish the gallium helper and use it everywhere.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoconfigure.ac: remove no longer needed *_pci_id logic
Emil Velikov [Fri, 9 Sep 2016 14:42:31 +0000 (15:42 +0100)]
configure.ac: remove no longer needed *_pci_id logic

Previously it was used to differentiate between the different codepaths
in the loader. Although strictly speaking the (core) of the loader is
only used when a hardware device is available. The latter of which in
itself requires libdrm (one of the codepaths available).

That said, all the configure toggles which relate to enabling/using hw
device should attribute and require libdrm, so there's no need to keep
this code around.

With this gallium_require_drm_loader becomes an empty stub, so nuke that
one as well.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoloader: cleanup copyright section
Emil Velikov [Fri, 9 Sep 2016 15:28:40 +0000 (16:28 +0100)]
loader: cleanup copyright section

With previous patches nearly all the original code (as seen in the
various loaders) is gone.

Update the copyright/license section to reflect that.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoloader: remove loader_get_driver_for_fd() driver_type
Emil Velikov [Mon, 12 Sep 2016 16:48:18 +0000 (17:48 +0100)]
loader: remove loader_get_driver_for_fd() driver_type

Reminiscent from the pre-loader days, were we had multiple instances of
the loader logic in separate places and one could build a "GALLIUM_ONLY"
version.

Since that is no longer the case and the loaders (glx/egl/gbm) do not
(and should not) require to know any classic/gallium specific we can
drop the argument and the related code.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoloader: remove final sysfs codepath in loader_get_device_name_for_fd()
Emil Velikov [Fri, 9 Sep 2016 14:20:23 +0000 (15:20 +0100)]
loader: remove final sysfs codepath in loader_get_device_name_for_fd()

Effectively everyone with actual hardware and/or requesting the
"device_name" requires a working libdrm. Thus they could/should already
be using the (now only) codepath.

Apart from the code simplification, we can slim down our configure.ac
even further. But that will be done in separate patch(es).

Cc: Gary Wong <gtw@gnu.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agotravis: remove no longer needed libudev-dev dependency
Emil Velikov [Wed, 7 Sep 2016 18:06:25 +0000 (19:06 +0100)]
travis: remove no longer needed libudev-dev dependency

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoscons: remove all libudev references
Emil Velikov [Wed, 7 Sep 2016 18:04:55 +0000 (19:04 +0100)]
scons: remove all libudev references

Analogous to previous automake/autoconf commit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoscons: loader: use libdrm when available
Emil Velikov [Wed, 7 Sep 2016 18:03:29 +0000 (19:03 +0100)]
scons: loader: use libdrm when available

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogbm: remove superfluous/incorrect udev comment
Emil Velikov [Wed, 7 Sep 2016 17:59:08 +0000 (18:59 +0100)]
gbm: remove superfluous/incorrect udev comment

The gbm_device_get_backend_name() provides an (somewhat) internal name
of the implementation/backend used. Is has nothing to do with the udev,
one cannot and should not attempt to derive the name from it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoautomake: remove all the libudev references
Emil Velikov [Wed, 7 Sep 2016 17:56:36 +0000 (18:56 +0100)]
automake: remove all the libudev references

As of last commit nothing in mesa depends on libudev.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoloader: remove libudev_get_device_name_for_fd and related code
Emil Velikov [Wed, 7 Sep 2016 17:44:47 +0000 (18:44 +0100)]
loader: remove libudev_get_device_name_for_fd and related code

With this all the libudev related code is now gone.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoloader: reimplement loader_get_user_preferred_fd via libdrm
Emil Velikov [Wed, 7 Sep 2016 17:30:48 +0000 (18:30 +0100)]
loader: reimplement loader_get_user_preferred_fd via libdrm

Currently not everyone has libudev and with follow-up patches we'll
completely remove the divergent codepaths.

Use the libdrm drm device API to construct the required ID_PATH_TAG-like
string, to preserve the current functionality for libudev users and
allow others to benefit from it as well.

v2: Drop ranty comments, pick the correct device
v3: \n -> \0 in PCI_ID_PATH_TAG_LENGTH comment (Axel).
v4: Use snprintf (Nicolai)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
7 years agoloader: annotate __driConfigOptionsLoader as static
Emil Velikov [Wed, 7 Sep 2016 15:38:44 +0000 (16:38 +0100)]
loader: annotate __driConfigOptionsLoader as static

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoloader: separate USE_DRICONF code into separate function
Emil Velikov [Wed, 7 Sep 2016 15:36:51 +0000 (16:36 +0100)]
loader: separate USE_DRICONF code into separate function

Improves readability and allows us to do further cleanups a lot easier.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoloader: slim down loader_get_pci_id_for_fd implementation(s)
Emil Velikov [Wed, 7 Sep 2016 15:04:42 +0000 (16:04 +0100)]
loader: slim down loader_get_pci_id_for_fd implementation(s)

Currently mesa has three code paths in the loader - libudev, manual
sysfs and drm ioctl one.

Considering the issues we had with libudev - strip those down in favour
of the libdrm drm device API. The latter can be implemented in any way
depending on the platform and can be reused by others.

v2: Use correct message on drmGetDevice failure. (Nicolai)

Cc: Jonathan Gray <jsg@jsg.id.au>
Cc: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
7 years agoconfigure.ac: mark libdrm as have_pci_id provider
Emil Velikov [Wed, 7 Sep 2016 17:49:12 +0000 (18:49 +0100)]
configure.ac: mark libdrm as have_pci_id provider

With follow on work, we'll untangle and simplify all the different
codepaths in loader. Then again, we forget to set have_pci_id when
libdrm is present (one of the codepaths available).

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogm107/ir: fix bit offset of tex lod setting for indirect texturing
Ilia Mirkin [Tue, 18 Oct 2016 04:21:13 +0000 (00:21 -0400)]
gm107/ir: fix bit offset of tex lod setting for indirect texturing

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agogm107/ir: fix texturing with indirect samplers
Ilia Mirkin [Tue, 18 Oct 2016 03:47:48 +0000 (23:47 -0400)]
gm107/ir: fix texturing with indirect samplers

The indirect handle has to come right after the coordinates, so if there
was a sample/bias/depth compare/offset, everything would end up being
shifted by one argument position.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agogallium/tgsi: add missing #include
Marek Olšák [Mon, 17 Oct 2016 10:31:47 +0000 (12:31 +0200)]
gallium/tgsi: add missing #include

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agost/va: set default rt formats when calling vaCreateConfig
Julien Isorce [Mon, 17 Oct 2016 16:33:36 +0000 (17:33 +0100)]
st/va: set default rt formats when calling vaCreateConfig

As specified in va.h, default value should be set on attributes
not present in the input list.

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
7 years agoi965: Fix gl_InvocationID in dual object GS where invocations == 1.
Kenneth Graunke [Sat, 15 Oct 2016 03:08:47 +0000 (20:08 -0700)]
i965: Fix gl_InvocationID in dual object GS where invocations == 1.

dEQP-GLES31.functional.geometry_shading.instanced.geometry_1_invocations
draws using a geometry shader that specifies

   layout(points, invocations = 1) in;

and then uses gl_InvocationID.  According to the Haswell PRM, the
"GS Instance ID 0" (and 1) thread payload fields are undefined in
dual object mode:

   "If 'dispatch mode' is DUAL_OBJECT this field is not valid."

But there's no point in using them - if there's only one invocation,
the ID will be 0.  So just load a constant.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoanv: Get rid of anv_cmd_buffer_emit_state_base_address
Jason Ekstrand [Mon, 17 Oct 2016 17:13:07 +0000 (10:13 -0700)]
anv: Get rid of anv_cmd_buffer_emit_state_base_address

All code that would have once called this can now call the gen-specific
version.  The switching version is no longer needed.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoanv/cmd_buffer: Move descriptor flushing into genX_cmd_buffer.c
Jason Ekstrand [Mon, 17 Oct 2016 17:11:55 +0000 (10:11 -0700)]
anv/cmd_buffer: Move descriptor flushing into genX_cmd_buffer.c

It really should have gone here all along.  We were trying a bit too hard
to make it gen-agnostic just because it didn't have any #if's.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoanv/cmd_buffer: Expose ensure_push_constant_*
Jason Ekstrand [Mon, 17 Oct 2016 17:10:26 +0000 (10:10 -0700)]
anv/cmd_buffer: Expose ensure_push_constant_*

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoanv/cmd_buffer: Unify flush_compute_state across gens
Jason Ekstrand [Mon, 17 Oct 2016 17:03:16 +0000 (10:03 -0700)]
anv/cmd_buffer: Unify flush_compute_state across gens

With one small genxml change, the two versions were basically identical.
The only differences were one #define for HSW+ and a field that is missing
on Haswell but exists everywhere else.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoanv/cmd_buffer: Move Begin/End/Execute to genX_cmd_buffer.c
Jason Ekstrand [Mon, 17 Oct 2016 16:28:46 +0000 (09:28 -0700)]
anv/cmd_buffer: Move Begin/End/Execute to genX_cmd_buffer.c

vkBeginCommandBuffer and vkCmdExecuteCommands both call into the
gen-specific emit_state_base_address function and vkEndCommandBuffer
belongs with begin.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoanv/cmd_buffer: Move state base address re-emit into ExecuteCommands
Jason Ekstrand [Mon, 17 Oct 2016 16:14:48 +0000 (09:14 -0700)]
anv/cmd_buffer: Move state base address re-emit into ExecuteCommands

This has two primary advantages.  First, it means that the batch_chain code
knows less about the actual command buffer contents which is good because
improves separation.  Second, it means that it only gets re-emitted once
after all of the secondaries instead of once after each secondary which is
just wasteful.  It also has the advantage of cleaning the code up a bit.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agodoc/features.txt: factor out radeonsi as GL45 complete
Edward O'Callaghan [Fri, 14 Oct 2016 04:30:50 +0000 (15:30 +1100)]
doc/features.txt: factor out radeonsi as GL45 complete

V2. add i965/hsw+ to list
V3. rebased on master.
V4. 'DONE' -> 'DONE ()'.
V5. remove i965/hsw+ from list :/

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965: Silence unused parameter warnings
Ian Romanick [Tue, 11 Oct 2016 00:11:34 +0000 (17:11 -0700)]
i965: Silence unused parameter warnings

brw_link.cpp:76:44: warning: unused parameter ‘shader_type’ [-Wunused-parameter]
                            gl_shader_stage shader_type,
                                            ^
brw_nir.c: In function ‘brw_nir_lower_vs_inputs’:
brw_nir.c:194:55: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
                         const struct gen_device_info *devinfo,
                                                       ^
brw_vec4_visitor.cpp:914:37: warning: unused parameter ‘sampler’ [-Wunused-parameter]
                            uint32_t sampler,
                                     ^
brw_vec4_visitor.cpp:1146:34: warning: unused parameter ‘stream_id’ [-Wunused-parameter]
 vec4_visitor::gs_emit_vertex(int stream_id)
                                  ^

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
7 years agoglsl: Remove unused function import_prototypes
Ian Romanick [Fri, 14 Oct 2016 17:45:14 +0000 (10:45 -0700)]
glsl: Remove unused function import_prototypes

Once upon a time, this was used to extract prototypes from the shader
containing GLSL built-in functions.  This was removed by f5692f45 in
November 2010 for Mesa 7.10.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
7 years agoglsl: Remove prototypes for nonexistent functions
Ian Romanick [Fri, 14 Oct 2016 17:38:04 +0000 (10:38 -0700)]
glsl: Remove prototypes for nonexistent functions

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
7 years agoglsl: Replace assert with unreachable
Ian Romanick [Fri, 2 Sep 2016 20:15:24 +0000 (13:15 -0700)]
glsl: Replace assert with unreachable

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
7 years agoanv: replace , with ; in anv_batch_emit()
Lionel Landwerlin [Wed, 12 Oct 2016 22:28:03 +0000 (23:28 +0100)]
anv: replace , with ; in anv_batch_emit()

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel: aubinator: use different colors to signal batch start/end
Lionel Landwerlin [Mon, 17 Oct 2016 16:11:04 +0000 (09:11 -0700)]
intel: aubinator: use different colors to signal batch start/end

This makes the stream of commands a bit easier to read.

v2 (Ken): Use bold text on green headers for easier readability;
          swap the green and blue headers so the majority stay blue.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agost/glsl_to_tgsi: fix [ui]vec[34] conversion to double
Nicolai Hähnle [Thu, 13 Oct 2016 14:40:11 +0000 (16:40 +0200)]
st/glsl_to_tgsi: fix [ui]vec[34] conversion to double

The corresponding opcodes for integers need to be treated the same as F2D.

Fixes GL45-CTS.gpu_shader_fp64.conversions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agost/glsl_to_tgsi: fix atomic counter addressing
Nicolai Hähnle [Thu, 13 Oct 2016 10:36:42 +0000 (12:36 +0200)]
st/glsl_to_tgsi: fix atomic counter addressing

When more than one atomic counter buffer is in use, UniformStorage[n].opaque
is set up to contain indices that are contiguous across all used buffers.

This appears to be used by i965 via NIR, but for TGSI we do not treat atomic
counter buffers as opaque, so using the data in the opaque array is incorrect.

Fixes GL45-CTS.compute_shader.resource-atomic-counter.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agost/glsl_to_tgsi: fix a corner case of std140 layout in uniform buffers
Nicolai Hähnle [Thu, 13 Oct 2016 07:54:02 +0000 (09:54 +0200)]
st/glsl_to_tgsi: fix a corner case of std140 layout in uniform buffers

See the comment in the code for an explanation. This fixes
GL45-CTS.buffer_storage.map_persistent_draw.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agost/mesa: fix fragment shader output mapping
Nicolai Hähnle [Thu, 13 Oct 2016 07:49:11 +0000 (09:49 +0200)]
st/mesa: fix fragment shader output mapping

Properly handle the case where there is a gap in the assigned output locations,
e.g. a fragment shader writes to color buffer 2 but not to color buffers 0 & 1.

Fixes GL45-CTS.gtf33.GL3Tests.explicit_attrib_location.explicit_attrib_location_pipeline.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoglsl: print non-zero bindings of variables
Nicolai Hähnle [Thu, 13 Oct 2016 13:27:00 +0000 (15:27 +0200)]
glsl: print non-zero bindings of variables

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: unify the constant load paths
Nicolai Hähnle [Thu, 13 Oct 2016 09:26:23 +0000 (11:26 +0200)]
radeonsi: unify the constant load paths

Remove the split between direct and indirect.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: fix indirect loads of 64 bit constants
Nicolai Hähnle [Thu, 13 Oct 2016 09:19:50 +0000 (11:19 +0200)]
radeonsi: fix indirect loads of 64 bit constants

This fixes GL45-CTS.compute_shader.fp64-case3.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agogbm: add a couple missing includes
Eric Engestrom [Mon, 17 Oct 2016 10:39:27 +0000 (11:39 +0100)]
gbm: add a couple missing includes

Needed for memset() and drmIoctl().

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agoglsl: fail compilation of compute shaders when unsupported
Iago Toral Quiroga [Fri, 14 Oct 2016 12:21:18 +0000 (14:21 +0200)]
glsl: fail compilation of compute shaders when unsupported

Generally, we only check for the presence of compute shaders during
parsing when we find any language (like layout qualifiers) that are
specific to compute shaders, however, it is possible to define an
empty compute shader does not use any language specific to compute
shaders at all and we should fail the compilation anyway. dEQP checks
this.

This patch adds a check for compute shader availability after we have
parsed the source code. At this point we know the effective GLSL version
and also extensions enabled in the shader.

Fixes a subcase of the following dEQP tests:
dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader.compile_compute_shader
dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.compile_compute_shader
dEQP-GLES31.functional.debug.negative_coverage.log.shader.compile_compute_shader

The tests still fail because there is one more subcase that fails that needs
another fix.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoegl/android: fix error in droid_add_configs_for_visuals()
Tapani Pälli [Mon, 17 Oct 2016 06:04:56 +0000 (09:04 +0300)]
egl/android: fix error in droid_add_configs_for_visuals()

This was some kind of leftover in commit acd35c8 and format_count
array variable (declared in outer scope) should be used instead.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Fixes: acd35c8758dc73240903 ("egl/android: tweak droid_add_configs_for_visuals()")
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoradeonsi: shorten "shader->selector" to "sel" in si_shader_create
Marek Olšák [Tue, 4 Oct 2016 19:46:00 +0000 (21:46 +0200)]
radeonsi: shorten "shader->selector" to "sel" in si_shader_create

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: clear DB_RENDER_OVERRIDE
Marek Olšák [Wed, 12 Oct 2016 22:20:43 +0000 (00:20 +0200)]
radeonsi: clear DB_RENDER_OVERRIDE

Vulkan doesn't set these fields even though it doesn't use HiS.
HiS is disabled by programming DB_SRESULTS_COMPARE_STATEn to 0.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoglsl: Disable textureOffset(sampler2DArrayShadow, ...) in GLSL ES.
Kenneth Graunke [Sat, 15 Oct 2016 21:47:31 +0000 (14:47 -0700)]
glsl: Disable textureOffset(sampler2DArrayShadow, ...) in GLSL ES.

This has apparently never existed in GLSL ES.

Fixes dEQP-GLES3.functional.shaders.texture_functions.invalid
.textureoffset_sampler2darrayshadow_vec4_ivec2_vertex and
.textureoffset_sampler2darrayshadow_vec4_ivec2_fragment

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98244
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
7 years agost/nine: Fix multisample limit check
Axel Davy [Sun, 16 Oct 2016 09:44:09 +0000 (11:44 +0200)]
st/nine: Fix multisample limit check

Fixes regression introduced by
b5603056872708fdd82f1224854097805a01d4c0

The regression prevents some apps to start.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
7 years agovc4: Fix fast clear color packing for 565.
Eric Anholt [Fri, 14 Oct 2016 23:26:25 +0000 (16:26 -0700)]
vc4: Fix fast clear color packing for 565.

Piglit didn't manage to cover this because fbo-clear-formats uses
scissors, so we don't get fast clearing.

7 years agostate_tracker: Fix check for scissor enabled when < 0.
Eric Anholt [Fri, 14 Oct 2016 22:15:13 +0000 (15:15 -0700)]
state_tracker: Fix check for scissor enabled when < 0.

DEQP's clear tests like to give us x + w < 0 or y + h < 0.  Since we
were comparing to an unsigned, it would get promoted to unsigned and come
out as bignum >= width or height and we would clear the whole fb instead
of none of the fb.

Fixes 10 tests under deqp-gles2/functional/color_clear.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoegl/surfaceless: Fix comparison between pointer and integer
Chad Versace [Fri, 14 Oct 2016 22:05:19 +0000 (15:05 -0700)]
egl/surfaceless: Fix comparison between pointer and integer

Fixes GCC warning:
  drivers/dri2/platform_surfaceless.c:196:18: warning: comparison
      between pointer and integer

Fixes: 4b8a55809eb ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()")
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
7 years agoegl/surfaceless: use correct index when accesing the visual
Emil Velikov [Fri, 14 Oct 2016 20:42:00 +0000 (21:42 +0100)]
egl/surfaceless: use correct index when accesing the visual

i is used for the driver_configs, while j is for the visuals.

Fixes: 4b8a55809eb ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()")
Reported-by: Chad Versace <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
7 years agoradv/winsys: Fail early on overgrown cs.
Gustaw Smolarczyk [Thu, 13 Oct 2016 20:54:12 +0000 (22:54 +0200)]
radv/winsys: Fail early on overgrown cs.

When !use_ib_bos, we can't easily chain ibs one to another. If the
required cs size grows over 1Mi - 8 dwords just fail the cs so that we
won't assert-fail in radv_amdgpu_winsys_cs_submit later on.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoglsl: Drop the ES requirement that VS outputs must be flat qualified.
Kenneth Graunke [Wed, 5 Oct 2016 23:09:54 +0000 (16:09 -0700)]
glsl: Drop the ES requirement that VS outputs must be flat qualified.

Several conformance tests violate this requirement:

ES31-CTS.core.tessellation_shader.max_patch_vertices
ES31-CTS.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through

I submitted a merge request to fix the conformance tests, but Khronos
opted to drop this GLSL ES specific requirement in favor of making flat
qualification of VS outputs optional, matching modern desktop GL.

Note that there were 7 Piglit tests which enforce this rule:
tests/spec/glsl-es-3.00/compiler/interpolation/qualifiers/*nonflat*
but these were deleted in Piglit commit acc0a2fabbd714bc704c16f1675e7c0.

Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15465#c7
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agointel/genxml: Make some PIPE_CONTROL fields booleans
Jason Ekstrand [Sat, 15 Oct 2016 06:09:38 +0000 (23:09 -0700)]
intel/genxml: Make some PIPE_CONTROL fields booleans

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml: Make "Predication enable" a boolean
Jason Ekstrand [Sat, 15 Oct 2016 05:58:06 +0000 (22:58 -0700)]
intel/genxml: Make "Predication enable" a boolean

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml; Make "Use Global GTT a boolean
Jason Ekstrand [Sat, 15 Oct 2016 05:55:21 +0000 (22:55 -0700)]
intel/genxml; Make "Use Global GTT a boolean

We also remove the redundant zero defaults since everything without an
explicit default gets zeroed automatically.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml; Make "Tiled Surface" a boolean
Jason Ekstrand [Sat, 15 Oct 2016 05:50:02 +0000 (22:50 -0700)]
intel/genxml; Make "Tiled Surface" a boolean

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml: Make "SO Buffer Enable" fields boolean
Jason Ekstrand [Sat, 15 Oct 2016 05:46:50 +0000 (22:46 -0700)]
intel/genxml: Make "SO Buffer Enable" fields boolean

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml: Make "Stencil Buffer Enable" a boolean
Jason Ekstrand [Sat, 15 Oct 2016 05:37:40 +0000 (22:37 -0700)]
intel/genxml: Make "Stencil Buffer Enable" a boolean

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml: Make a couple of STREAMOUT fields booleans
Jason Ekstrand [Sat, 15 Oct 2016 05:35:36 +0000 (22:35 -0700)]
intel/genxml: Make a couple of STREAMOUT fields booleans

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml: Make "Include Vertex Handles" and "Include Primitive ID" booleans
Jason Ekstrand [Sat, 15 Oct 2016 05:31:48 +0000 (22:31 -0700)]
intel/genxml: Make "Include Vertex Handles" and "Include Primitive ID" booleans

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml: Make "Vector Mask Enable" a boolean
Jason Ekstrand [Sat, 15 Oct 2016 05:28:24 +0000 (22:28 -0700)]
intel/genxml: Make "Vector Mask Enable" a boolean

We also get rid of the "(VME)" a few places

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel/genxml: Make "Single Program Flow" a boolean
Jason Ekstrand [Sat, 15 Oct 2016 05:23:16 +0000 (22:23 -0700)]
intel/genxml: Make "Single Program Flow" a boolean

We also get rid of the "(SPF)" a few places.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agonv50/ir: constant fold OP_SPLIT
Tobias Klausmann [Fri, 30 Sep 2016 21:50:15 +0000 (23:50 +0200)]
nv50/ir: constant fold OP_SPLIT

Split the source immediate value into new values and move them into the
original defs set by the split. Since we can only have up to 64-bit
immediates, this is largely beneficial for F64 (and, in the future, U64)
operations.

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
[imirkin: always use U32, set newi for foldCount tracking]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
7 years agoi965: Enable OpenGL 4.5.
Kenneth Graunke [Fri, 14 Oct 2016 23:33:19 +0000 (16:33 -0700)]
i965: Enable OpenGL 4.5.

Everything is in place.  There are still conformance issues to sort out,
but we may as well turn it on in master.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv/pipeline: Remove a meta hack from emit_ds_state
Jason Ekstrand [Sat, 8 Oct 2016 05:29:44 +0000 (22:29 -0700)]
anv/pipeline: Remove a meta hack from emit_ds_state

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv/image: Create views directly in VkCreate*View
Jason Ekstrand [Sat, 8 Oct 2016 05:14:03 +0000 (22:14 -0700)]
anv/image: Create views directly in VkCreate*View

Without meta, we no longer need the _init helpers and the ability to back
an image view with surface states allocated out of the command buffer.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv/image: Get rid of the usage hacks for meta
Jason Ekstrand [Sat, 8 Oct 2016 05:07:04 +0000 (22:07 -0700)]
anv/image: Get rid of the usage hacks for meta

Now that meta is gone and we're using blorp, we don't need all of the usage
hacks.  Instead, the usage provided by the app is exactly the usage that we
want because the app is the only thing creating image views.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Move Create*Pipelines into genX_cmd_buffer.c
Jason Ekstrand [Sat, 8 Oct 2016 04:55:34 +0000 (21:55 -0700)]
anv: Move Create*Pipelines into genX_cmd_buffer.c

Now that we don't have meta, we have no need for a gen-agnostic pipeline
create path.  We can, instead, just generate one Create*Pipelines function
per gen and be done with it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv/pipeline: Remove support for direct-from-nir shaders
Jason Ekstrand [Sat, 8 Oct 2016 04:50:31 +0000 (21:50 -0700)]
anv/pipeline: Remove support for direct-from-nir shaders

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Make entrypoint resolution take a gen_device_info
Jason Ekstrand [Fri, 7 Oct 2016 22:47:45 +0000 (15:47 -0700)]
anv: Make entrypoint resolution take a gen_device_info

In order for things such as the ANV_CALL and the ifuncs to work, we used to
have a singleton gen_device_info structure that got assigned the first time
you create a device.  Given that the driver will never be used
simultaneously on two different generations of hardware, this was fairly
safe to do.  However, it has caused a few hickups and isn't, in general, a
good plan.  Now that the two primary reasons for this singleton are gone,
we can get rid of it and make things quite a bit safer.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Get rid of the ANV_CALL macro
Jason Ekstrand [Fri, 7 Oct 2016 22:41:17 +0000 (15:41 -0700)]
anv: Get rid of the ANV_CALL macro

This macro was needed by meta in order to make gen-specific calls from
gen-agnostic code.  Now that we don't have meta, the remaining two uses are
fairly trivial to get rid of.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: Get rid of graphics_pipeline_create_info_extra
Jason Ekstrand [Fri, 7 Oct 2016 22:29:47 +0000 (15:29 -0700)]
anv: Get rid of graphics_pipeline_create_info_extra

Now that we no longer have meta, all pipelines get created via the normal
Vulkan pipeline creation mechanics.  There is no more need for this bit of
extra magic data that we've been passing around.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoanv: Get rid of meta
Jason Ekstrand [Fri, 7 Oct 2016 22:06:47 +0000 (15:06 -0700)]
anv: Get rid of meta

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoanv: Use blorp for subpass clears
Jason Ekstrand [Sat, 8 Oct 2016 00:29:36 +0000 (17:29 -0700)]
anv: Use blorp for subpass clears

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>