Marek Olšák [Sat, 16 Apr 2016 00:09:55 +0000 (02:09 +0200)]
gallium/util: fix undefined shift to the last bit in u_bit_scan
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Fri, 15 Apr 2016 20:08:57 +0000 (22:08 +0200)]
gallium/util: fix u_bit_scan_consecutive_range for mask == 0xffffffff
The second ffs returns 0, yielding count == -1.
v2: change 1 to 1u
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Fri, 15 Apr 2016 22:29:05 +0000 (00:29 +0200)]
gallium/radeon: fix Nine with its slightly shifted viewports
just need to do the calculation in floating-point and then round things
properly
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Erik Faye-Lund [Mon, 18 Apr 2016 15:26:33 +0000 (17:26 +0200)]
docs: correct name for GL_OES_primitive_bounding_box
When this extension was added, an underscore were mistakenly replaced
by a space. Let's correct this, so it's a tad easier to grep for this
extension.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Kenneth Graunke [Tue, 12 Apr 2016 17:19:09 +0000 (10:19 -0700)]
meta: Don't botch color masks when changing drawbuffers.
Color clears should respect each drawbuffer's color mask state.
Previously, we tried to leave the color mask untouched. However,
_mesa_meta_drawbuffers_from_bitfield() ended up rebinding all the
color drawbuffers in a different order, so we ended up pairing
drawbuffers with the wrong color mask state.
The new _mesa_meta_drawbuffers_and_colormask() function does the
same job as the old _mesa_meta_drawbuffers_from_bitfield(), but
also rearranges the color mask state to match the new drawbuffer
configuration.
This code was largely ripped off from Gallium's st_Clear code.
This fixes ES31-CTS.draw_buffers_indexed.color_masks, which binds
up to 8 drawbuffers, sets color masks for each, and then calls
glClearBufferfv to clear each buffer individually. ClearBuffer
causes us to rebind only one drawbuffer, at which point we used
ctx->Color.ColorMask[0] (draw buffer 0's state) for everything.
We could probably delete _mesa_meta_drawbuffers_from_bitfield(),
but I'd rather not think about the i965 fast clear code. Topi is
rewriting a bunch of that soon anyway, so let's delete it then.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94847
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Tue, 12 Apr 2016 19:09:41 +0000 (12:09 -0700)]
meta: Don't smash ColorMask when using MESA_META_COLOR_MASK save bit.
This allows meta operations to inspect the existing color mask, and
then do their own smashing.
BlitFramebuffer and Clear already override the color mask, so this
was also redundant.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Eric Anholt [Fri, 15 Apr 2016 22:07:49 +0000 (15:07 -0700)]
vc4: Add support for rendering to cube map surfaces.
We need to fix up the offset to point at the face of the cube. Fixes
piglit fbo-cubemap, copyteximage CUBE, and glean's fbo test.
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Eric Anholt [Fri, 15 Apr 2016 21:27:34 +0000 (14:27 -0700)]
vc4: Don't flush on read-only access of buffers read by the CL.
Fixes piglit mixed-immediate-and-vbo, and may significantly improve
performance of applications that store a 4-byte IB in the same VBO as
vertex data.
Eric Anholt [Fri, 15 Apr 2016 20:43:14 +0000 (13:43 -0700)]
vc4: Sanity check that flushes don't happen between state emit and draw.
Catches the cause of failure in
arb_vertex_buffer_object-mixed-immediate-and-vbo, I've had this class of
failure before, and it probably won't be the last time.
Eric Anholt [Fri, 15 Apr 2016 20:17:26 +0000 (13:17 -0700)]
vc4: Sanity check strides for imported BOs.
If we're going to sample from or render to them at some particular size,
we'd better make sure that they actually are that size. Causes some tests
under simulation to generate appropriate error messages instead of
failures.
Pierre Moreau [Thu, 14 Apr 2016 18:43:00 +0000 (20:43 +0200)]
math: Import isinf and others to global namespace
Starting from C++11, several math functions, like isinf, moved into the std
namespace. Since cmath undefines those functions before redefining them inside
the namespace, and glibc 2.23 defines the C variants as macros, the C variants
in global namespace are not accessible any longer.
v2: Move the fix outside of Nouveau, as suggested by Jose Fonseca, since anyone
might need it when GCC switches to C++14 by default with GCC 6.0.
v3:
* Put the code directly inside c99_math.h rather than creating a new header
file, as asked by Jose Fonseca;
* Guard the code behind glibc version checks, as only glibc > =2.23 defines
isinf & co. as functions, as suggested by Jose Fonseca.
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
Oded Gabbay [Sun, 6 Mar 2016 15:58:59 +0000 (17:58 +0200)]
r600g: Move R600_BIG_ENDIAN to r600_pipe_common.h
I need to do this so I could use R600_BIG_ENDIAN in files which include
r600_pipe_common.h but not r600_pipe.h
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Oded Gabbay [Mon, 7 Mar 2016 13:27:26 +0000 (15:27 +0200)]
r600g: fix code indentation
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Emil Velikov [Sun, 17 Apr 2016 22:24:41 +0000 (23:24 +0100)]
docs: add news item and link release notes for 11.1.3
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Sun, 17 Apr 2016 22:18:04 +0000 (23:18 +0100)]
docs: add sha256 checksums for 11.1.3
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
596c6504b3dcab318dc93ec42517c9a0fde1b255)
Emil Velikov [Sun, 17 Apr 2016 17:43:30 +0000 (18:43 +0100)]
docs: add release notes for 11.1.3
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
ca2fbf6f8fe5e1853064c81fd3334a8172d65689)
Roland Scheidegger [Sat, 16 Apr 2016 21:26:46 +0000 (23:26 +0200)]
gallivm: don't use vector selects with llvm 3.7
llvm 3.7 sometimes simply miscompiles vector selects.
See https://bugs.freedesktop.org/show_bug.cgi?id=94972
This was fixed in llvm r249669
(https://llvm.org/bugs/show_bug.cgi?id=24532).
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Dave Airlie [Sun, 17 Apr 2016 20:56:06 +0000 (06:56 +1000)]
nir: only dereference undef after NULL check. (v2)
Pointed out by coverity.
v2: nuke line, Jason pointed out the constructor does it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Emil Velikov [Sun, 17 Apr 2016 18:29:49 +0000 (19:29 +0100)]
docs: update the sha256 checksums for 11.2.1
Turns out the previous tarballs got corrupted during upload which I
carelessly forgot to check prior to deleting the local ones.
Lesson learned - double check before removing the local ones.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
79b0e13913b5189bb8629e80439fea746f99fe79)
Emil Velikov [Sun, 17 Apr 2016 17:35:21 +0000 (18:35 +0100)]
docs: add news item and link release notes for 11.2.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Sun, 17 Apr 2016 17:32:11 +0000 (18:32 +0100)]
docs: add sha256 checksums for 11.2.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
c65835d81230fbdc1544600c0a24f90647a4e75a)
Emil Velikov [Sun, 17 Apr 2016 15:03:34 +0000 (16:03 +0100)]
docs: add release notes for 11.2.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
21e6440e82808364a6c2cc38ea92651c99b69aad)
Jason Ekstrand [Fri, 15 Apr 2016 01:36:05 +0000 (18:36 -0700)]
i965/fs: Don't allow OOB array access of images
We have had a guard against OOB array access of images on IVB for a long
time, but it can actually cause hangs on any GPU generation. This can
happen due to getting an untyped SURFACE_STATE for a typed message. We
didn't used to hit this with the piglit test on anything other than IVB
because the OOB in the test would cause us to go past the top of the pull
constant UBO and we would get a surface index of 0 which is was always a
valid surface. Now that we're pushing small arrays, we can end up grabbing
garbage from the GRF and going to some random index which causes a hang.
The solution is to just do the bounds check on all hardware.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94944
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Jason Ekstrand [Fri, 15 Apr 2016 23:39:17 +0000 (16:39 -0700)]
anv/device: Images are only enabled in scalar stages
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Marek Olšák [Wed, 13 Apr 2016 15:28:30 +0000 (17:28 +0200)]
gallium/radeon: handle vertex shaders that disable clipping & viewport
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Nanley Chery [Tue, 12 Apr 2016 21:27:42 +0000 (14:27 -0700)]
mesa/texstore: Use Driver.CompressedTexSubImage in the default CompressedTexImage
Enable drivers to use their own implementation of this method instead of
the mesa default. Since the drivers that currently overwrite
dd_function_table::CompressedTexSubImage also overwrite
::CompressedTexImage, there should be no behavioral change.
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Jason Ekstrand [Fri, 15 Apr 2016 21:53:16 +0000 (14:53 -0700)]
anv: Advertise vertexPipelineStoresAndAtomics based on scalar stages
Previously, we just looked at the hardware generation but this meant that
if you did INTEL_DEBUG=vec4 on BDW or SKL, you would have advertised but
non-working features.
Jason Ekstrand [Tue, 5 Apr 2016 22:55:35 +0000 (15:55 -0700)]
i965/vec4: Support full std140 layout for push constants
Up until now, we have been able to assume that all push constants are
vec4-aligned because this is what the GL driver gives us. In Vulkan, we
need to be able to support full std140 because we get the layout from the
client.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 5 Apr 2016 22:43:48 +0000 (15:43 -0700)]
i965/vec4: Handle MOV_INDIRECT in pack_uniform_registers
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 05:39:15 +0000 (21:39 -0800)]
i965/vec4: Add support for SHADER_OPCODE_MOV_INDIRECT
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 5 Apr 2016 21:10:04 +0000 (14:10 -0700)]
i965/vec4: Use can_do_writemask in can_reswizzle
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 5 Apr 2016 21:06:10 +0000 (14:06 -0700)]
i965/vec4: Move can_do_writemask to vec4_instruction
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Fri, 15 Apr 2016 19:33:41 +0000 (12:33 -0700)]
util: Fix warning of invalid return value
_mesa_libgcrypt_init() returns NULL, but its return type is void.
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
Jason Ekstrand [Fri, 15 Apr 2016 20:52:34 +0000 (13:52 -0700)]
Merge branch 'vulkan'
Roland Scheidegger [Fri, 15 Apr 2016 19:11:52 +0000 (21:11 +0200)]
llvmpipe: (trivial) initialize src1_alpha var to NULL
The blend code would do a conditional assignment based on it, causing valgrind
to complain. Since that variable was actually unused in this case, this
doesn't fix anything but the warning.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94955
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Jason Ekstrand [Fri, 15 Apr 2016 20:34:04 +0000 (13:34 -0700)]
Merge remote-tracking branch 'public/master' into vulkan
Jason Ekstrand [Thu, 14 Apr 2016 20:04:22 +0000 (13:04 -0700)]
configure: Add support for the Intel Vulkan driver
This adds a --with-vulkan-drivers option with one driver, "intel". In the
future, we may add more drivers to this list.
v2: Don't enable any drivers by default. This should prevent this patch
from breaking anyone's build.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Thu, 14 Apr 2016 17:45:24 +0000 (10:45 -0700)]
i965/surface_formats: Update some formats for more recent gens
The surface format table hasn't entirely been kept up-to-date. This commit
marks a couple more compressed formats as sampleable on gen8+ and adds the
A4B4G4R4 format as renderable on gen9.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Thu, 30 Jul 2015 18:28:22 +0000 (11:28 -0700)]
util/list: Add list splicing functions
This adds functions for splicing one list into another. These have
more-or-less the same API as the kernel list splicing functions. The
implementation, however, was stolen from the Wayland list implementation.
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Jason Ekstrand [Fri, 15 Apr 2016 20:17:08 +0000 (13:17 -0700)]
Remove the Intel Vulkan readme
Tim Rowley [Thu, 14 Apr 2016 23:23:33 +0000 (18:23 -0500)]
gallium/swr: confine c++11 flag to swr driver
On the philosophy that a driver shouldn't change the compile flags
for the entire tree, take the clove approach of moving the c++11 flag
to the swr driver directory.
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Tim Rowley [Fri, 15 Apr 2016 17:38:25 +0000 (12:38 -0500)]
gallium/swr: allow swr use as a swrast dri driver
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Eric Anholt [Fri, 15 Apr 2016 18:43:00 +0000 (11:43 -0700)]
vc4: Fix subimage accesses to LT textures.
This code started out like the T case, iterating over utile offsets, but I
had partially switched it to iterating over pixel offsets. I hadn't
caught this before because it's unusual to do piecemeal uploads to small
textures.
Fixes bad text rendering in QT5 apps, which use a 256x16 glyph cache.
Also fixes 6 piglit tests related to glTexSubImage() and
glGetTexSubImage().
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Mark Janes [Tue, 12 Apr 2016 18:52:53 +0000 (11:52 -0700)]
util: Fix race condition on libgcrypt initialization
Fixes intermittent Vulkan CTS failures within the test groups:
dEQP-VK.api.object_management.multithreaded_per_thread_device
dEQP-VK.api.object_management.multithreaded_per_thread_resources
dEQP-VK.api.object_management.multithreaded_shared_resources
Signed-off-by: Mark Janes <mark.a.janes@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94904
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Fri, 15 Apr 2016 16:54:42 +0000 (09:54 -0700)]
i965: Default to scalar GS
Jason Ekstrand [Fri, 15 Apr 2016 16:48:56 +0000 (09:48 -0700)]
i965/surface_formats: Mark A4B4G4R4_UNORM as SKL+ only
This is what is indicated by the bspec.
Jason Ekstrand [Fri, 15 Apr 2016 16:45:55 +0000 (09:45 -0700)]
Revert "i965/fs: Properly write-mask spills"
This reverts commit
9c0109a1f6e0c9c8dd81fc215f8c0c5976e05790.
Jason Ekstrand [Fri, 15 Apr 2016 16:53:42 +0000 (09:53 -0700)]
Revert "i965/fs: Feel free to spill partial reads/writes"
This reverts commit
2434ceabf41e66f2a3627ea8591e5ca427a78cce.
Jason Ekstrand [Thu, 14 Apr 2016 20:02:48 +0000 (13:02 -0700)]
configure: Add support for detecting valgrind headers
We have several places where the Vulkan driver explicitly hooks into
valgrind when it's available. We need to be able to detect it.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eduardo Lima Mitev [Fri, 15 Apr 2016 08:00:05 +0000 (10:00 +0200)]
nir/print: Fix printing variable mode
nir_variable_mode is currently a bitflag enum, while
nir_print::print_var_decl() assumes is still a numbered list.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
John Sheu [Fri, 1 Apr 2016 23:52:22 +0000 (16:52 -0700)]
xlib: remove MESA_GLX_VISUAL_HACK
This removes a hack introduced in 1999 in the first version of
fakeglx.c, with the comment:
/* XXX revisit this after 3.0 is finished. */
Mesa 4.0 was released in 2001. It is now 2016, and Mesa 11.0 was
released last year.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
John Sheu [Fri, 1 Apr 2016 23:52:21 +0000 (16:52 -0700)]
xlib: fix leaks of returned values from XGetVisualInfo
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
John Sheu [Fri, 1 Apr 2016 23:52:20 +0000 (16:52 -0700)]
xlib: fix memory leak of and remove vishandle from XMesaVisualInfo
The vishandle member of XMesaVisualInfo is used to support the
comparison of XVisualInfo instances by pointer value, in
find_glx_visual(). The comparison however will always be false, as in
every case the comparison is made, the VisualInfo instance being
compared to is a new allocation passed in through a GLX API call.
In addition, the XVisualInfo instance pointed to by vishandle is itself
never freed, causing a memory leak. Since vishandle is essentially
useless, we just remove it and thereby also fix the leak.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
John Sheu [Wed, 13 Apr 2016 20:57:42 +0000 (13:57 -0700)]
xlib: do not cache return value of glXChooseVisual/glXGetVisualFromFBConfig
The returned XVisualInfo from glXChooseVisual/glXGetVisualFromFBConfig
is being cached in XMesaVisual.vishandle (and unconditionally
overwritten on subsequent calls). However, these entry points are
specified to return XVisualInfo instances to be owned by the caller and
freed with XFree(), so the return values should not be retained.
With this change, XMesaVisual.vishandle is essentially unused and will
be removed in a subsequent change.
v2: update commit message
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Jason Ekstrand [Fri, 15 Apr 2016 01:30:52 +0000 (18:30 -0700)]
Merge remote-tracking branch 'public/master' into vulkan
Jason Ekstrand [Fri, 15 Apr 2016 01:23:59 +0000 (18:23 -0700)]
main/mtypes: Remove the "set" parameter from gl_uniform_block
This is a left-over from the early days of the Vulkan driver
Jason Ekstrand [Fri, 15 Apr 2016 01:22:08 +0000 (18:22 -0700)]
Revert "i965/vec4: Add support for SHADER_OPCODE_MOV_INDIRECT"
This reverts commit
4115648a6be2e846660a35a0e260ae53b809b7e0. This commit
was half-baked and probably never should have been committed. We'll add
this back in properly later when we need it.
Jason Ekstrand [Thu, 14 Apr 2016 17:42:29 +0000 (10:42 -0700)]
i965: Expose the surface format table
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Thu, 14 Apr 2016 17:31:27 +0000 (10:31 -0700)]
nir/lower_io: Add UBOs and SSBOs to get_io_offset_src
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Fri, 25 Mar 2016 17:17:28 +0000 (10:17 -0700)]
nir/intrinsics: Add a vulkan_resource_index intrinsic
This is used to facilitate the Vulkan binding model where each resource is
described by a (descriptor set, binding, array index) tuple.
Reviewed-by: Rob Clark <robdclark@gmail.com>
Jason Ekstrand [Fri, 25 Mar 2016 17:16:23 +0000 (10:16 -0700)]
nir: Add a descriptor_set field to nir_variable
This is needed for supporting the Vulkan binding model
Reviewed-by: Rob Clark <robdclark@gmail.com>
Chad Versace [Mon, 11 Apr 2016 22:12:15 +0000 (15:12 -0700)]
dri: Fix robust context creation via EGL attribute
driCreateContextAttribs() emits an error if bit
__DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS is set for an ES context. But,
EGL_EXT_create_context_robustness and EGL 1.5 both allow creation of
robust ES contexts. One requests a robust ES context by setting the
EGL_CONTEXT_OPENGL_ROBUST_ACCESS *attribute*, which Mesa's EGL layer
translates into the __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS *bit*.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Jason Ekstrand [Fri, 15 Apr 2016 00:14:28 +0000 (17:14 -0700)]
Merge remote-tracking branch 'public/master' into vulkan
Leo Liu [Tue, 12 Apr 2016 19:19:31 +0000 (15:19 -0400)]
radeon/uvd: fix tonga feedback buffer size
This only applies to tonga
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Tue, 5 Apr 2016 23:22:26 +0000 (16:22 -0700)]
i965: Push everything if pull_param == NULL
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 9 Dec 2015 01:34:38 +0000 (17:34 -0800)]
i965/fs: Push small uniform arrays
Unfortunately, this also means that we need to use a slightly different
algorithm for assign_constant_locations. The old algorithm worked based on
the assumption that each read of a uniform value read exactly one float.
If it encountered a MOV_INDIRECT, it would immediately bail and push the
whole thing. Since we can now read ranges using MOV_INDIRECT, we need to
be able to push a series of floats without breaking them up. To do this,
we use an algorithm similar to the on in split_virtual_grfs.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 9 Dec 2015 01:14:49 +0000 (17:14 -0800)]
i965/fs: Rename demote_pull_constants to lower_constant_loads
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 9 Dec 2015 01:02:16 +0000 (17:02 -0800)]
i965/vec4: Get rid of the uniform_size array
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 25 Nov 2015 17:36:34 +0000 (09:36 -0800)]
i965/vec4: Use MOV_INDIRECT instead of reladdr for indirect push constants
This commit moves us to an instruction based model rather than a
register-based model for indirects. This is more accurate anyway as we
have to emit instructions to resolve the reladdr. It's also a lot simpler
because it gets rid of the recursive reladdr problem by design.
One side-effect of this is that we need a whole new algorithm in
move_uniform_array_access_to_pull_constants. This new algorithm is much
more straightforward than the old one and is fairly similar to what we're
already doing in the FS backend.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 25 Nov 2015 01:02:01 +0000 (17:02 -0800)]
i965/fs: Get rid of the param_size array
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 23:16:14 +0000 (15:16 -0800)]
i965/fs: Stop relying on param_size in assign_constant_locations
Now that we have MOV_INDIRECT opcodes, we have all of the size information
we need directly in the opcode. With a little restructuring of the
algorithm used in assign_constant_locations we don't need param_size
anymore. The big thing to watch out for now, however, is that you can have
two ranges overlap where neither contains the other. In order to deal with
this, we make the first pass just flag what needs pulling and handle
assigning pull constant locations until later.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 25 Nov 2015 00:54:41 +0000 (16:54 -0800)]
i965/fs: Get rid of reladdr
We aren't using it anymore.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 23:12:20 +0000 (15:12 -0800)]
i965/fs: Use MOV_INDIRECT for all indirect uniform loads
Instead of using reladdr, this commit changes the FS backend to emit a
MOV_INDIRECT whenever we need an indirect uniform load. We also have to
rework some of the other bits of the backend to handle this new form of
uniform load. The obvious change is that demote_pull_constants now acts
more like a lowering pass when it hits a MOV_INDIRECT.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 21:52:49 +0000 (13:52 -0800)]
nir: Add another index to load_uniform to specify the range read
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 17:01:11 +0000 (09:01 -0800)]
i965/fs: Add support for MOV_INDIRECT on pre-Broadwell hardware
While we're at it, we also add support for the possibility that the
indirect is, in fact, a constant. This shouldn't happen in the common case
(if it does, that means NIR failed to constant-fold something), but it's
possible so we should handle it.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 19:24:57 +0000 (11:24 -0800)]
i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnr
The subnr field is in bytes so we don't need to multiply by type_sz.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 17:03:29 +0000 (09:03 -0800)]
i965/fs: Don't force MASK_DISABLE on INDIRECT_MOV instructions
It should work fine without it and the visitor can set it if it wants.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 24 Nov 2015 02:32:38 +0000 (18:32 -0800)]
i965/fs: Add support for doing MOV_INDIRECT on uniforms
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 30 Mar 2016 17:34:58 +0000 (10:34 -0700)]
anv: Install the installable ICD
Jason Ekstrand [Wed, 30 Mar 2016 17:30:42 +0000 (10:30 -0700)]
anv/intel_icd: Don't provide an absolute path
The driver will be installed to $(libdir)/libvulkan_intel.so and just
providing a driver name is enough for the loader. This also ensures that
multi-arch systems work ok.
Jason Ekstrand [Tue, 29 Mar 2016 19:00:24 +0000 (12:00 -0700)]
configure: Add initial support for enabling Vulkan drivers
Jason Ekstrand [Thu, 14 Apr 2016 22:12:41 +0000 (15:12 -0700)]
anv/pipeline: Use the right mask for lower_indirect_derefs
Ben Widawsky [Mon, 11 Apr 2016 16:49:41 +0000 (09:49 -0700)]
i965: Make intel_get_param return an int
This will fix the spurious error message: "Failed to query GPU properties."
that was unintentionally added in
cc01b63d730.
This patch changes the function to return an int so that the caller is able to
do stuff based on the return value.
The equivalent of this patch was in the original series that fixed up the
warning, but I dropped it at the last moment. It is required to make the desired
behavior of not warning when trying to query GPU properties from the kernel
unless there is something the user can do about it.
v2: Use strerror (Jason)
Make EINVAL check similar in all places (Ian)
NOTE: Broadwell appears to actually have some issue where the kernel returns
ENODEV when it shouldn't be. I will investigate this separately.
Reported-by: Chris Forbes <chrisf@ijw.co.nz>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Brian Paul [Thu, 14 Apr 2016 21:07:53 +0000 (15:07 -0600)]
st/mesa: fix sampler view leak in st_DrawAtlasBitmaps()
I neglected to free the sampler view which was created earlier in the
function. So for each glCallLists() command that used the bitmap atlas
to draw text, we'd leak a sampler view object.
Also, check for st_create_texture_sampler_view() failure and record
GL_OUT_OF_MEMORY.
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Nicolai Hähnle [Wed, 13 Apr 2016 15:55:29 +0000 (10:55 -0500)]
gallium/radeon: handle failure when mapping staging buffer
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Nicolai Hähnle [Wed, 13 Apr 2016 17:17:28 +0000 (12:17 -0500)]
radeonsi: mark ssbo and images descriptor pointers dirty at beginning of CS
Without this, we were getting non-deterministic VM faults under high pressure.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Jason Ekstrand [Fri, 8 Apr 2016 17:49:02 +0000 (10:49 -0700)]
i965/vec4: Use UD rather than D for uniform indirects
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 25 Nov 2015 17:59:03 +0000 (09:59 -0800)]
i965/fs: Use UD type for offsets in VARYING_PULL_CONSTANT_LOAD
Reveiewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Samuel Pitoiset [Thu, 14 Apr 2016 19:47:15 +0000 (21:47 +0200)]
nvc0: do not break the universe on GK110+
I removed that return 0 by mistake. Ooops.
Fixes: 6e23fd4 ("nvc0: allow to use compute support on GM200")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Wed, 13 Apr 2016 22:46:50 +0000 (00:46 +0200)]
nvc0: allow to use compute support on GM200
This works like a charm but please not that NVF0_COMPUTE have to be set
because compute support is still not enabled by default on GK110+. This
will require more testing to make sure it won't break the 3D state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Jason Ekstrand [Thu, 14 Apr 2016 17:39:54 +0000 (10:39 -0700)]
i965: remove pointless diff with the master branch
Jason Ekstrand [Thu, 14 Apr 2016 17:35:37 +0000 (10:35 -0700)]
nir/opt_algebraic: Remove the encoding line
This is an unneeded diff between the vulkan and master branches
Jason Ekstrand [Thu, 14 Apr 2016 17:28:45 +0000 (10:28 -0700)]
spirv: Move to compiler/
While it does rely on NIR, it's not really part of the NIR core. At the
moment, it still builds as part of libnir but that can be changed later if
desired.
Jason Ekstrand [Thu, 14 Apr 2016 17:24:33 +0000 (10:24 -0700)]
nir: Remove some pointless delta between vulkan and master
Jose Fonseca [Wed, 13 Apr 2016 17:19:52 +0000 (18:19 +0100)]
scons: Build NIR.
Emil Velikov:
- Attribute the src/{glsl,compiler}/nir move
- Flesh out to separate SConscript
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jose Fonseca [Wed, 13 Apr 2016 17:19:51 +0000 (18:19 +0100)]
nir: Use _snprintf on Windows.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jose Fonseca [Wed, 13 Apr 2016 17:19:50 +0000 (18:19 +0100)]
nir: Avoid structure initalization expressions.
Not supported by MSVC, and completely unnecessary -- inline functions
work just as well.
NIR_SRC_INIT/NIR_DEST_INIT could and probably should be replaced by the
inline functions.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jose Fonseca [Wed, 13 Apr 2016 17:19:49 +0000 (18:19 +0100)]
nir: Remove unistd.h include.
It doesn't seem needed, and is not available on MSVC.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jose Fonseca [Wed, 13 Apr 2016 17:19:48 +0000 (18:19 +0100)]
nir: Avoid empty {} struct initializer.
Not supported by MSVC and consistent through NIR.
[Emil Velikov: rebase]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Emil Velikov [Wed, 13 Apr 2016 14:38:48 +0000 (15:38 +0100)]
gallium/swr: fold the almost identical Makefiles
Rather than having two almost identical Makefiles, with various VPATH
hacks just fold them, using COMMON_* variables and actually getting
things buildable/shipable.
v2: whitespace fixes, remove Makefile.sources-arch
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>