summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2016-04-15gallium/swr: confine c++11 flag to swr driverTim Rowley1-2/+3
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>
2016-04-15gallium/swr: allow swr use as a swrast dri driverTim Rowley4-7/+36
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-04-15vc4: Fix subimage accesses to LT textures.Eric Anholt1-4/+4
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>
2016-04-15util: Fix race condition on libgcrypt initializationMark Janes1-8/+11
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>
2016-04-15nir/print: Fix printing variable modeEduardo Lima Mitev1-7/+27
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>
2016-04-15xlib: remove MESA_GLX_VISUAL_HACKJohn Sheu1-23/+19
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>
2016-04-15xlib: fix leaks of returned values from XGetVisualInfoJohn Sheu1-8/+21
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2016-04-15xlib: fix memory leak of and remove vishandle from XMesaVisualInfoJohn Sheu2-39/+24
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>
2016-04-15xlib: do not cache return value of glXChooseVisual/glXGetVisualFromFBConfigJohn Sheu1-18/+8
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>
2016-04-14i965: Expose the surface format tableJason Ekstrand3-18/+48
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14nir/lower_io: Add UBOs and SSBOs to get_io_offset_srcJason Ekstrand1-0/+3
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14nir/intrinsics: Add a vulkan_resource_index intrinsicJason Ekstrand3-0/+34
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>
2016-04-14nir: Add a descriptor_set field to nir_variableJason Ekstrand1-0/+5
This is needed for supporting the Vulkan binding model Reviewed-by: Rob Clark <robdclark@gmail.com>
2016-04-14dri: Fix robust context creation via EGL attributeChad Versace1-2/+23
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>
2016-04-14radeon/uvd: fix tonga feedback buffer sizeLeo Liu1-4/+8
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>
2016-04-14i965: Push everything if pull_param == NULLJason Ekstrand2-2/+14
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965/fs: Push small uniform arraysJason Ekstrand1-23/+53
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>
2016-04-14i965/fs: Rename demote_pull_constants to lower_constant_loadsJason Ekstrand2-3/+3
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965/vec4: Get rid of the uniform_size arrayJason Ekstrand6-33/+0
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965/vec4: Use MOV_INDIRECT instead of reladdr for indirect push constantsJason Ekstrand4-51/+50
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>
2016-04-14i965/fs: Get rid of the param_size arrayJason Ekstrand4-15/+0
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965/fs: Stop relying on param_size in assign_constant_locationsJason Ekstrand1-27/+17
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>
2016-04-14i965/fs: Get rid of reladdrJason Ekstrand2-10/+2
We aren't using it anymore. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965/fs: Use MOV_INDIRECT for all indirect uniform loadsJason Ekstrand2-40/+87
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>
2016-04-14nir: Add another index to load_uniform to specify the range readJason Ekstrand4-1/+18
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965/fs: Add support for MOV_INDIRECT on pre-Broadwell hardwareJason Ekstrand2-13/+66
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>
2016-04-14i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnrJason Ekstrand1-1/+1
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>
2016-04-14i965/fs: Don't force MASK_DISABLE on INDIRECT_MOV instructionsJason Ekstrand1-1/+0
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>
2016-04-14i965/fs: Add support for doing MOV_INDIRECT on uniformsJason Ekstrand1-1/+4
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965: Make intel_get_param return an intBen Widawsky1-10/+7
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>
2016-04-14st/mesa: fix sampler view leak in st_DrawAtlasBitmaps()Brian Paul1-0/+6
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>
2016-04-14gallium/radeon: handle failure when mapping staging bufferNicolai Hähnle1-0/+4
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-04-14radeonsi: mark ssbo and images descriptor pointers dirty at beginning of CSNicolai Hähnle1-0/+2
Without this, we were getting non-deterministic VM faults under high pressure. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-04-14i965/vec4: Use UD rather than D for uniform indirectsJason Ekstrand2-6/+6
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14i965/fs: Use UD type for offsets in VARYING_PULL_CONSTANT_LOADJason Ekstrand2-3/+4
Reveiewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-04-14nvc0: do not break the universe on GK110+Samuel Pitoiset1-0/+1
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>
2016-04-14nvc0: allow to use compute support on GM200Samuel Pitoiset3-2/+5
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>
2016-04-14scons: Build NIR.Jose Fonseca2-0/+74
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>
2016-04-14nir: Use _snprintf on Windows.Jose Fonseca1-0/+4
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2016-04-14nir: Avoid structure initalization expressions.Jose Fonseca1-2/+16
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>
2016-04-14nir: Remove unistd.h include.Jose Fonseca1-1/+0
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>
2016-04-14nir: Avoid empty {} struct initializer.Jose Fonseca1-10/+10
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>
2016-04-14gallium/swr: fold the almost identical MakefilesEmil Velikov6-312/+184
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>
2016-04-14radeonsi: don't overwrite the scratch offset in shader prologsMarek Olšák1-3/+4
Prologs only look at num_input_sgprs. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2016-04-14radeonsi: fold num_user_sgprs where it is possibleMarek Olšák1-16/+4
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2016-04-14radeonsi: fix SGPRS calculation once moreMarek Olšák2-55/+23
This fixes GS piglit failures after adding SI_PARAM_SHADER_BUFFERS, which bumped NUM_USER_SGPRS and uncovered this bug on SI. If this was fixed in LLVM, these workarounds wouldn't be needed. LLVM would have to look at the calling convention to know how many SGPR inputs are declared, and add VCC and the scratch wave offset (which is enabled even if we spill SGPRs but not VGPRs, oh well). Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2016-04-14radeonsi: disable hw ETC2 on PolarisMarek Olšák1-1/+1
not supported by hw directly, but it's still fully supported by the driver Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-04-14scons: Add a "check" target to run all unit tests.Jose Fonseca3-17/+8
Except: - u_cache_test -- too long - translate_test -- unreliable (it's probably testing corner cases that translate module doesn't care about.) Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-04-14test/unit: Make translate_test invoke translate_create by default.Jose Fonseca1-3/+4
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-04-14test/unit: Make pipe_barrier_test actually check correct bahavior.Jose Fonseca1-7/+50
So it can run unattended. Also make it silent by default. Reviewed-by: Roland Scheidegger <sroland@vmware.com>