mesa.git
8 years agost/mesa: change st_pbo_create_upload_fs to st_pbo_get_upload_fs
Nicolai Hähnle [Mon, 7 Nov 2016 16:55:56 +0000 (17:55 +0100)]
st/mesa: change st_pbo_create_upload_fs to st_pbo_get_upload_fs

For consistency with st_pbo_get_download_fs.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
8 years agost/mesa: fix ReadPixels into packed formats with PBO
Nicolai Hähnle [Mon, 7 Nov 2016 16:49:24 +0000 (17:49 +0100)]
st/mesa: fix ReadPixels into packed formats with PBO

When using the GPU download path, we bind the PBO as a buffer texture,
so call is_format_supported accordingly. On radeonsi, this means that
GPU downloads aren't used for UNSIGNED_SHORT_5_6_5 destinations, for
example.

Fixes parts of GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pbo.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
8 years agoutil/blitter: add clamping during SINT <-> UINT blits
Nicolai Hähnle [Mon, 7 Nov 2016 14:55:52 +0000 (15:55 +0100)]
util/blitter: add clamping during SINT <-> UINT blits

Even though glBlitFramebuffer cannot be used for SINT <-> UINT blits, we
still need to handle this type of blit here because it can happen as part
of texture uploads / downloads, e.g. uploading a GL_RGBA8I texture from
GL_UNSIGNED_INT data.

Fixes parts of GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
8 years agoutil/blitter: index texfetch_col shaders by type
Nicolai Hähnle [Mon, 7 Nov 2016 14:36:18 +0000 (15:36 +0100)]
util/blitter: index texfetch_col shaders by type

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
8 years agoi965: miptree: prevent potential NULL pointer access
Lionel Landwerlin [Wed, 9 Nov 2016 16:33:51 +0000 (16:33 +0000)]
i965: miptree: prevent potential NULL pointer access

If the mcs buffer allocation fails we might get a NULL pointer. This
was reported by Coverity and should only happen if we run out of
memory.

v2: return failure at the point of allocation (Chris)

CID: 1394290
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
8 years agointel/blorp: Use designated initializers in surf_convert_to_single_slice
Jordan Justen [Tue, 15 Nov 2016 10:21:00 +0000 (02:21 -0800)]
intel/blorp: Use designated initializers in surf_convert_to_single_slice

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoEGL/android: pbuffer implementation
Liu Zhiquan [Wed, 16 Nov 2016 02:11:28 +0000 (10:11 +0800)]
EGL/android: pbuffer implementation

Android path didn't support pbuffer, so add pbuffer support to fix
most failing dEQP and CTS pbuffer test cases.

Patch adds a single buffer config to support pbuffer, and creates
image in getBuffers for pbuffer when surface type is front surface.

The EGL 1.5 spec states that pbuffers have a back buffer but no front
buffer, single-buffered surfaces with no front buffer confuse Mesa;
so we deviate from the spec, following the precedent of Mesa's EGL
X11 platform.

V3: update commit message and code review changes.

Signed-off-by: Liu Zhiquan <zhiquan.liu@intel.com>
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoegl: add missing error-checking to eglReleaseTexImage()
Eric Engestrom [Fri, 30 Sep 2016 23:23:26 +0000 (00:23 +0100)]
egl: add missing error-checking to eglReleaseTexImage()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
8 years agoi965: Fix KBL typo in string
Ben Widawsky [Thu, 10 Nov 2016 18:20:13 +0000 (10:20 -0800)]
i965: Fix KBL typo in string

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965: Consolidate GEN9 LP definition
Ben Widawsky [Thu, 10 Nov 2016 18:20:12 +0000 (10:20 -0800)]
i965: Consolidate GEN9 LP definition

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965/glk: Add basic Geminilake support
Ben Widawsky [Thu, 10 Nov 2016 18:20:11 +0000 (10:20 -0800)]
i965/glk: Add basic Geminilake support

v2: s/bdw/gen; Add the 2x6 config
v3: Add min_ds_entries

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoutil: Fix Clang trivial destructor check.
Vinson Lee [Mon, 14 Nov 2016 06:53:54 +0000 (22:53 -0800)]
util: Fix Clang trivial destructor check.

Check for Clang before GCC.

Clang defines __GNUC__ == 4 and __GNUC_MINOR__ == 2 and matches the GCC
check but not the GCC version for trivial destructor.

Fixes: 98ab905af0e0 ("mesa: Define introspection macro to determine
whether a type is trivially destructible.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98526
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
8 years agoswr: mark color clamping as unsupported
Ilia Mirkin [Sun, 13 Nov 2016 14:20:03 +0000 (09:20 -0500)]
swr: mark color clamping as unsupported

There is no functionality in swr to clamp either vertex or frag colors.
This could be added in swr_shader, at which point these could be
re-enabled.

Fixes arb_color_buffer_float-render

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: always enable adding start/base vertex to gl_VertexId
Ilia Mirkin [Sun, 13 Nov 2016 02:02:20 +0000 (21:02 -0500)]
swr: always enable adding start/base vertex to gl_VertexId

Fixes gl-3.2-basevertex-vertexid

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: add support for upper-left fragcoord position
Ilia Mirkin [Sat, 12 Nov 2016 23:58:46 +0000 (18:58 -0500)]
swr: add support for upper-left fragcoord position

Fixes glsl-arb-fragment-coord-conventions.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: make sure that all rendering is finished on shader destroy
Ilia Mirkin [Sat, 12 Nov 2016 19:20:53 +0000 (14:20 -0500)]
swr: make sure that all rendering is finished on shader destroy

Rendering could still be ongoing (or have yet to start) when the shader
is deleted. There's no refcounting on the shader text, so insert a
pipeline stall unconditionally when this happens.

[Note, we should instead introduce a way to attach work to
fences, so that the freeing can be done in the current fence.]

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: disable blending for integer formats
Ilia Mirkin [Sat, 12 Nov 2016 18:27:28 +0000 (13:27 -0500)]
swr: disable blending for integer formats

The EXT_texture_integer test says that blending and alphatest should
all be disabled. st/mesa takes care of alphatest already.

Fixes the ext_texture_integer-fbo-blending piglit test.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: mark rgb9_e5 as unrenderable
Ilia Mirkin [Sat, 12 Nov 2016 08:24:17 +0000 (03:24 -0500)]
swr: mark rgb9_e5 as unrenderable

The support in swr requires shaders to output the components as UINTs.
This is not how GL or Gallium work, and since this is not a
required-renderable format, just leave it out.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: no support for shader stencil export
Ilia Mirkin [Sat, 12 Nov 2016 07:30:51 +0000 (02:30 -0500)]
swr: no support for shader stencil export

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: mark both frag and vert textures read, don't forget about cbs
Ilia Mirkin [Thu, 10 Nov 2016 03:08:24 +0000 (22:08 -0500)]
swr: mark both frag and vert textures read, don't forget about cbs

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: fix texture layout for compressed formats
Ilia Mirkin [Wed, 9 Nov 2016 21:41:16 +0000 (16:41 -0500)]
swr: fix texture layout for compressed formats

Fixes the texsubimage piglit and lets the copyteximage one get further.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: add archrast generated files to gitignore
Ilia Mirkin [Wed, 9 Nov 2016 23:04:46 +0000 (18:04 -0500)]
swr: add archrast generated files to gitignore

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer jitter] don't bother quantizing unused channels
Ilia Mirkin [Sat, 12 Nov 2016 18:17:27 +0000 (13:17 -0500)]
swr: [rasterizer jitter] don't bother quantizing unused channels

In a BGR10X2 or BGR5X1 situation, there's no need to try to quantize the
X channel - the default will have the proper quantization required.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer memory] fix store tile for 128-bit ymajor tiling
Ilia Mirkin [Sat, 12 Nov 2016 08:30:38 +0000 (03:30 -0500)]
swr: [rasterizer memory] fix store tile for 128-bit ymajor tiling

Noticed by inspection.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer memory] add support for R32_FLOAT_X8X24 formats
Ilia Mirkin [Wed, 9 Nov 2016 22:17:19 +0000 (17:17 -0500)]
swr: [rasterizer memory] add support for R32_FLOAT_X8X24 formats

This is the format used for the primary surface of a
PIPE_FORMAT_Z32_FLOAT_S8X24_UINT resource.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoac/nir/llvm: fix channel in texture gather lowering code.
Dave Airlie [Tue, 15 Nov 2016 07:30:09 +0000 (07:30 +0000)]
ac/nir/llvm: fix channel in texture gather lowering code.

This fixes a number of CTS tests like:
dEQP-VK.glsl.texture_gather.basic.2d.rgba8ui.size_npot.clamp_to_edge_repeat

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoradv: don't crash on null swapchain destroy.
Dave Airlie [Tue, 15 Nov 2016 20:11:51 +0000 (20:11 +0000)]
radv: don't crash on null swapchain destroy.

Just return if the passed in swapchain is NULL.

Fixes: dEQP-VK.wsi.xlib.swapchain.destroy.null_handle
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agowsi: fix VK_INCOMPLETE for vkGetSwapchainImagesKHR
Dave Airlie [Tue, 15 Nov 2016 21:18:50 +0000 (21:18 +0000)]
wsi: fix VK_INCOMPLETE for vkGetSwapchainImagesKHR

This fixes the x11 and wayland backends to not assert:
dEQP-VK.wsi.xcb.swapchain.get_images.incomplete

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoisl: Fix height calculation in isl_msaa_interleaved_scale_px_to_sa
Jordan Justen [Tue, 15 Nov 2016 10:18:25 +0000 (02:18 -0800)]
isl: Fix height calculation in isl_msaa_interleaved_scale_px_to_sa

No known fixed tests, but it looks like a typo from:

commit 8ac99eabb6570f0f3c5f7d7da1332a99ce636362

    intel/isl: Add a helper for getting the size of an interleaved pixel

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoamd: automake: android: rename sources lists to foo_FILES
Emil Velikov [Tue, 15 Nov 2016 19:36:33 +0000 (19:36 +0000)]
amd: automake: android: rename sources lists to foo_FILES

Autotools goes smart on us warning that foo_SOURCES variable is present
yet a target with name foo is missing. Rename things (like we do
throughout the build) to silence the warnings.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoamd: flatten amd/common makefile structure
Mauro Rossi [Sat, 12 Nov 2016 21:10:44 +0000 (22:10 +0100)]
amd: flatten amd/common makefile structure

This pulls amd/common build rules into upper level makefile,
along with amd/addlib which is already there.

v2: [Emil Velikov]
 - Move NEED_RADEON_LLVM conditional, drop amd/common from SUBDIRS
 - Drop AM_ from common_libamd_common_la*

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoradeonsi: set IF_THRESHOLD to 3
Marek Olšák [Fri, 28 Oct 2016 21:08:50 +0000 (23:08 +0200)]
radeonsi: set IF_THRESHOLD to 3

Piglit regressions (radeonsi or LLVM bugs, they pass on softpipe):
- glsl-1.10/execution/variable-indexing/vs-output-array-vec3-index-wr
- glsl-1.10/execution/variable-indexing/vs-output-array-vec4-index-wr
- glsl-110/execution/variable-indexing/vs-temp-array-mat2-index-col-row-wr
- glsl-110/execution/variable-indexing/vs-temp-array-mat2-index-row-wr

Totals:
SGPRS: 1132185 -> 1168801 (3.23 %)
VGPRS: 907856 -> 906204 (-0.18 %)
Spilled SGPRs: 2011 -> 2425 (20.59 %)
Spilled VGPRs: 368 -> 96 (-73.91 %)
Scratch VGPRs: 1344 -> 1060 (-21.13 %) dwords per thread
Code Size: 35916164 -> 35705372 (-0.59 %) bytes
LDS: 767 -> 767 (0.00 %) blocks
Max Waves: 194010 -> 194921 (0.47 %)
Wait states: 0 -> 0 (0.00 %)

Before:
 VGPR SPILLING APPS   Shaders SpillVGPR ScratchVGPR
 alien_isolation         2938        38        40
 bioshock-infinite       1769       245       732
 dirt-showdown            548        85        72
 f1-2015                  776         0       320
 ue4_lightroom_inter..     74         0       180

After:
 VGPR SPILLING APPS   Shaders SpillVGPR ScratchVGPR
 alien_isolation         2938        38        40
 bioshock-infinite       1769         0       480
 dirt-showdown            548        58        40
 f1-2015                  776         0       320
 ue4_lightroom_inter..     74         0       180

Bioshock and DiRT benefit.

If I set IF_THRESHOLD=4, tesseract starts spilling VGPRs

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoglsl_to_tgsi: lower small branches based on the CAP
Marek Olšák [Fri, 28 Oct 2016 20:37:33 +0000 (22:37 +0200)]
glsl_to_tgsi: lower small branches based on the CAP

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agogallium: add PIPE_SHADER_CAP_LOWER_IF_THRESHOLD
Marek Olšák [Fri, 28 Oct 2016 20:34:20 +0000 (22:34 +0200)]
gallium: add PIPE_SHADER_CAP_LOWER_IF_THRESHOLD

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoglsl/lower_if: conditionally lower if-branches based on their size
Marek Olšák [Sun, 3 Jul 2016 15:11:07 +0000 (17:11 +0200)]
glsl/lower_if: conditionally lower if-branches based on their size

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoglsl/lower_if: don't lower branches touching tess control outputs
Marek Olšák [Sun, 3 Jul 2016 15:01:09 +0000 (17:01 +0200)]
glsl/lower_if: don't lower branches touching tess control outputs

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoglsl/lower_if: check more node types in check_control_flow -> check_ir_node
Marek Olšák [Sun, 3 Jul 2016 13:03:54 +0000 (15:03 +0200)]
glsl/lower_if: check more node types in check_control_flow -> check_ir_node

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoglsl/lower_if: move and rename found_control_flow
Marek Olšák [Sun, 3 Jul 2016 12:57:20 +0000 (14:57 +0200)]
glsl/lower_if: move and rename found_control_flow

I'll want to update more variables in check_control_flow, so using
the visitor is convenient.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoutil/disk_cache: use unambiguous naming
Marek Olšák [Sun, 13 Nov 2016 15:54:38 +0000 (16:54 +0100)]
util/disk_cache: use unambiguous naming

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoutil: import cache.c/h from glsl
Marek Olšák [Sun, 13 Nov 2016 15:38:01 +0000 (16:38 +0100)]
util: import cache.c/h from glsl

It's not dependent on GLSL and it can be useful for shader caches that don't
deal with GLSL.

v2: address review comments
v3: keep the other 3 lines in configure.ac

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agogallivm: limit use of setFastMathFlags to LLVM 3.8 and later
Marek Olšák [Tue, 15 Nov 2016 18:56:03 +0000 (19:56 +0100)]
gallivm: limit use of setFastMathFlags to LLVM 3.8 and later

Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agointel: Set min_ds_entries on Broxton.
Kenneth Graunke [Tue, 15 Nov 2016 08:15:02 +0000 (00:15 -0800)]
intel: Set min_ds_entries on Broxton.

This was missing.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
8 years agodri: make use of loader_get_extensions_name(..) helper
Christian Gmeiner [Wed, 9 Nov 2016 14:50:06 +0000 (15:50 +0100)]
dri: make use of loader_get_extensions_name(..) helper

Changes since v1:
 - removed not needed includes
 - use the loader version of the helper

v2 [Emil Velikov]
 - Keep the includes - they are required.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoRevert "dri: make use of dri_get_extensions_name(..) helper"
Emil Velikov [Tue, 15 Nov 2016 18:01:20 +0000 (18:01 +0000)]
Revert "dri: make use of dri_get_extensions_name(..) helper"

This reverts commit 1a21d21580965eff751414d140b3c176eeee2eb3.

Pushed the wrong version of the patch.

8 years agoradeonsi: set unsafe fpmath on FP instructions when allowed by R600_DEBUG
Marek Olšák [Sat, 12 Nov 2016 22:10:23 +0000 (23:10 +0100)]
radeonsi: set unsafe fpmath on FP instructions when allowed by R600_DEBUG

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agogallivm: add lp_create_builder with an unsafe_fpmath option
Marek Olšák [Sat, 12 Nov 2016 22:08:51 +0000 (23:08 +0100)]
gallivm: add lp_create_builder with an unsafe_fpmath option

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: fold some shader context initialization to si_llvm_context_init
Marek Olšák [Sat, 12 Nov 2016 21:51:41 +0000 (22:51 +0100)]
radeonsi: fold some shader context initialization to si_llvm_context_init

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoloader: fixup driver names if needed
Christian Gmeiner [Wed, 9 Nov 2016 14:50:07 +0000 (15:50 +0100)]
loader: fixup driver names if needed

This makes it possible to 'use' the imx-drm driver. Remeber that it
is not possible to have sysmbol names in C/C++ with a '-' in it.

Changes since v1:
 - move the fix to loader.c

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodri: make use of dri_get_extensions_name(..) helper
Christian Gmeiner [Thu, 3 Nov 2016 14:25:21 +0000 (15:25 +0100)]
dri: make use of dri_get_extensions_name(..) helper

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoloader: add loader_get_extensions_name(..) helper
Christian Gmeiner [Wed, 9 Nov 2016 14:50:05 +0000 (15:50 +0100)]
loader: add loader_get_extensions_name(..) helper

Changes since v1:
 - renamed function to loader_get_extensions_name
 - moved function into loader

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
V2: [Emil Velikov]
 - Use local define.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoegl: Use pkg-config for Android NDK build
Gurchetan Singh [Thu, 10 Nov 2016 20:14:47 +0000 (12:14 -0800)]
egl: Use pkg-config for Android NDK build

It's possible to build Mesa for Android using the traditional
autotools workflow [1]. ChromiumOS fetches Android prebuilts and
puts them in a sysroot. We now want to use pkg-config to specify
the location of system headers and libraries [2].

To enable this, let's add the required pkg-config checks and link
against them.

[1] https://developer.android.com/ndk/guides/standalone_toolchain.html
[2] https://chromium-review.googlesource.com/#/c/403237/

v2: Bundle pkg-config checks together (Emil)
v3: Provide further context on standalone NDK Mesa build (Emil)
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoconfigure.ac: Don't look for pthreads in Android platform
Gurchetan Singh [Thu, 27 Oct 2016 16:06:42 +0000 (09:06 -0700)]
configure.ac: Don't look for pthreads in Android platform

In Android, the pthreads libs are in bionic.  When building
Mesa for Android with the autotools workflow, we shouldn't
set -lpthread or -pthread.

[Emil Velikov]
Other platforms could use a similar fix, although that is left as
separate exercise.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agometa/GetTexSubImage: Account for GL_PACK_SKIP_IMAGES on compressed textures
Eduardo Lima Mitev [Mon, 14 Nov 2016 23:25:14 +0000 (15:25 -0800)]
meta/GetTexSubImage: Account for GL_PACK_SKIP_IMAGES on compressed textures

This option was being ignored when packing compressed 3D and cube textures.

Fixes CTS test (on gen8+):
* GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pixelstore

v2: Drop API checks.
v3 (Ken): Just apply the existing code in more cases.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoanv/format: handle unsupported formats earlier
Iago Toral Quiroga [Tue, 15 Nov 2016 07:48:46 +0000 (08:48 +0100)]
anv/format: handle unsupported formats earlier

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agomain: return error if asking for GL_TEXTURE_BORDER_COLOR in TEXTURE_2D_MULTISAMPLE...
Samuel Iglesias Gonsálvez [Mon, 7 Nov 2016 10:49:13 +0000 (11:49 +0100)]
main: return error if asking for GL_TEXTURE_BORDER_COLOR in TEXTURE_2D_MULTISAMPLE{_ARRAY} through TexParameter{i,Ii,Iui}v()

OpenGL ES 3.2 says in section 8.10. "TEXTURE PARAMETERS", at the end of
the section:

"An INVALID_ENUM error is generated if target is TEXTURE_2D_-
MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY , and pname is any
sampler state from table 21.12."

GL_TEXTURE_BORDER_COLOR is present in that table.

v2:
- Add check to _mesa_texture_parameteriv() (Kenneth)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98250

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoanv: fix multi level clears with VK_REMAINING_MIP_LEVELS
Lionel Landwerlin [Mon, 14 Nov 2016 17:26:09 +0000 (17:26 +0000)]
anv: fix multi level clears with VK_REMAINING_MIP_LEVELS

A commit from the CTS suite on the 1.0-dev branch started using
VK_REMAINING_MIP_LEVELS, we're not dealing with it properly for clears.

Fixes:
   dEQP-VK.api.image_clearing.clear_color_image.*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
8 years agodir-locals.el: Adds White Space support
Andres Gomez [Wed, 9 Nov 2016 16:32:41 +0000 (18:32 +0200)]
dir-locals.el: Adds White Space support

Trailing white spaces will be now always highlighted, not just in
prog-mode.

Also, the White Space package, which is available since GNU Emacs 22,
is loaded and activated locally in prog-mode.

Additionally, using White Space variables, we set highlighting through
faces on wrong indentation and the maximum length of a coding line.

Notice that:
 - The highlighting for the characters beyond the set length of a
   coding line is not activated by default, only for wrong
   indentations.
 - If the White Space package is not available, errors on loading or
   activation are ignored.
 - If the White Space mode is not activated the set variables would
   not have any effect.

v2: Removed too long lines trail highlighting, as suggested by Ilia
    Mirkin.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
8 years agoanv/format: support VK_FORMAT_R8G8B8_SRGB
Iago Toral Quiroga [Mon, 14 Nov 2016 11:04:28 +0000 (12:04 +0100)]
anv/format: support VK_FORMAT_R8G8B8_SRGB

Fixes dEQP-VK.api.image_clearing.clear_color_image.1d_r8g8b8_srgb

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
8 years agoanv/format: handle unsupported formats properly
Iago Toral Quiroga [Mon, 14 Nov 2016 11:36:57 +0000 (12:36 +0100)]
anv/format: handle unsupported formats properly

According to the spec for vkGetPhysicalDeviceImageFormatProperties:

"If format is not a supported image format, or if the combination of format,
 type, tiling, usage, and flags is not supported for images, then
 vkGetPhysicalDeviceImageFormatProperties returns VK_ERROR_FORMAT_NOT_SUPPORTED."

Makes the following Vulkan CTS tests report 'Not Supported' instead of crashing:

dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_unorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_snorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_uscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_sscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_uint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_sint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_unorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_snorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_uscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_sscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_uint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_sint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_r4g4_unorm_pack8
dEQP-VK.api.image_clearing.clear_color_image.1d_r8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_r8g8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_r8g8b8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_b5g5r5a1_unorm_pack16

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
8 years agoclover: adapt to new error API since LLVM r286752
Vedran Miletić [Mon, 14 Nov 2016 11:17:42 +0000 (12:17 +0100)]
clover: adapt to new error API since LLVM r286752

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
8 years agoswr: [rasterizer core] remove driverType
Tim Rowley [Thu, 10 Nov 2016 00:24:20 +0000 (18:24 -0600)]
swr: [rasterizer core] remove driverType

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer archrast] move to pass by value
Tim Rowley [Wed, 9 Nov 2016 23:29:00 +0000 (17:29 -0600)]
swr: [rasterizer archrast] move to pass by value

Move to pass by value since most events are very small in size.

We can look at pass by reference but will need to create multiple
versions to handle temp objects.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer core] add mode for aux buffer in the SWR_SURFACE_STATE
Tim Rowley [Wed, 9 Nov 2016 19:58:37 +0000 (13:58 -0600)]
swr: [rasterizer core] add mode for aux buffer in the SWR_SURFACE_STATE

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer common] don't bleed NOMINMAX definition after <windows.h>
Tim Rowley [Mon, 7 Nov 2016 22:11:45 +0000 (16:11 -0600)]
swr: [rasterizer common] don't bleed NOMINMAX definition after <windows.h>

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer archrast] add events
Tim Rowley [Mon, 7 Nov 2016 21:53:05 +0000 (15:53 -0600)]
swr: [rasterizer archrast] add events

Added events for tracking early/late Depth and stencil events,
TE patch info, GS prim info, and FrontEnd/BackEnd DrawEnd events.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer core] fix culling issues
Tim Rowley [Mon, 7 Nov 2016 21:23:09 +0000 (15:23 -0600)]
swr: [rasterizer core] fix culling issues

- Do proper culling of wireframe triangles (including non-culling of
  degenerates)
- Fix degenerate culling of CCW front-facing triangles in wireframe and
  conservative rast

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer core/jitter] fix alpha test bug
Tim Rowley [Thu, 3 Nov 2016 18:33:13 +0000 (13:33 -0500)]
swr: [rasterizer core/jitter] fix alpha test bug

Alpha from render target 0 should always be used for alpha test for all
render targets, according to GL and DX9 specs. Previously we were using
alpha from the current render target.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer core] various code style changes
Tim Rowley [Wed, 2 Nov 2016 21:29:29 +0000 (16:29 -0500)]
swr: [rasterizer core] various code style changes

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer archrast] don't generate empty files
Tim Rowley [Mon, 31 Oct 2016 00:27:07 +0000 (19:27 -0500)]
swr: [rasterizer archrast] don't generate empty files

Don't generate files when no events have been generated outside
the header events.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer archrast] fix open file handle limit issue
Tim Rowley [Sat, 29 Oct 2016 06:08:09 +0000 (01:08 -0500)]
swr: [rasterizer archrast] fix open file handle limit issue

Buffer events ourselves and then when that's full or we're destroying
the context then write the contents to file. Previously, we're relying
ofstream to buffer for us.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer archrast] fix double free issue
Tim Rowley [Fri, 28 Oct 2016 22:21:01 +0000 (17:21 -0500)]
swr: [rasterizer archrast] fix double free issue

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer core] separate frontend/backend stats enables
Tim Rowley [Fri, 28 Oct 2016 21:10:12 +0000 (16:10 -0500)]
swr: [rasterizer core] separate frontend/backend stats enables

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agoswr: [rasterizer core] 16-wide tile store nearly completed
Tim Rowley [Fri, 28 Oct 2016 20:59:18 +0000 (15:59 -0500)]
swr: [rasterizer core] 16-wide tile store nearly completed

* All format combinations coded
* Fully emulated on AVX2 and AVX
* Known issue: the MSAA sample locations need to be adjusted for 8x2

Set ENABLE_AVX512_SIMD16 and USD_8x2_TILE_BACKEND to 1 in knobs.h to enable

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
8 years agodocs: add news item and link release notes for 13.0.1
Emil Velikov [Mon, 14 Nov 2016 11:39:01 +0000 (11:39 +0000)]
docs: add news item and link release notes for 13.0.1

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add sha256 checksums for 13.0.1
Emil Velikov [Mon, 14 Nov 2016 11:37:03 +0000 (11:37 +0000)]
docs: add sha256 checksums for 13.0.1

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit b47ce6ddb8be51d72d40ea0abc3d77b667c8552f)

8 years agodocs: add release notes for 13.0.1
Emil Velikov [Mon, 14 Nov 2016 10:58:11 +0000 (10:58 +0000)]
docs: add release notes for 13.0.1

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit f2f487ebbb808010528edd69000694bfe525f87b)

8 years agoi965/vec4: skip registers already marked as no_spill
Juan A. Suarez Romero [Tue, 8 Nov 2016 10:59:44 +0000 (11:59 +0100)]
i965/vec4: skip registers already marked as no_spill

Do not evaluate spill costs for registers that were already marked as
no_spill.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl: Don't crash on function names with invalid identifiers.
Kenneth Graunke [Sat, 12 Nov 2016 19:55:30 +0000 (11:55 -0800)]
glsl: Don't crash on function names with invalid identifiers.

Karol Herbst's fuzzing efforts noticed that we would segfault on:

   void bug() {
      2(0);
   }

We just need to bail if the function name isn't an identifier.

Based on a bug fix by Karol Herbst.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97422
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoglsl: Fix assert fails when assignment expressions are in array sizes.
Kenneth Graunke [Sat, 12 Nov 2016 19:27:17 +0000 (11:27 -0800)]
glsl: Fix assert fails when assignment expressions are in array sizes.

Karol Herbst's fuzzing efforts discovered that we would hit the
following assert:

   assert(dummy_instructions.is_empty());

when processing an illegal array size expression of

   float[(1=1)?1:1] t;

In do_assignment, we realized we needed an rvalue for (1 = 1), and
generated a temporary variable and assignment from the RHS.  We've
already flagged an error (non-lvalue in assignment), and return a bogus
value as the rvalue.  But process_array_size sees the bogus value, which
happened to be a constant expression, and rightly assumes that
processing a constant expression shouldn't have generated any code.
instructions.

To handle this, make do_assignment not generate any temps or assignments
when it's already raised an error - just return an error value directly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98694
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agovc4: Add simulator kernel validation for multithreaded fragment shaders.
Jonas Pfeil [Fri, 11 Nov 2016 01:52:03 +0000 (17:52 -0800)]
vc4: Add simulator kernel validation for multithreaded fragment shaders.

This is Jonas Pfeil's code from the kernel, brought back to Mesa by
anholt.

8 years agovc4: Mark threaded FSes as non-singlethread in the CL.
Eric Anholt [Fri, 11 Nov 2016 01:50:34 +0000 (17:50 -0800)]
vc4: Mark threaded FSes as non-singlethread in the CL.

8 years agovc4: Flag the last thread switch in the program as the last.
Eric Anholt [Fri, 11 Nov 2016 01:28:20 +0000 (17:28 -0800)]
vc4: Flag the last thread switch in the program as the last.

We don't allow the last thread switch to be inside control flow, to be
sure that we hit the last state exactly once.  If the last texturing was
in control flow, fall back to single threaded.

8 years agovc4: Add THRSW nodes after each tex sample setup in multithreaded mode.
Eric Anholt [Fri, 11 Nov 2016 01:16:04 +0000 (17:16 -0800)]
vc4: Add THRSW nodes after each tex sample setup in multithreaded mode.

This is a suboptimal implementation, but Jonas Pfeil found that it was
still a massive performance gain.

8 years agovc4: Add some spec citations about texture fifo management.
Eric Anholt [Fri, 11 Nov 2016 01:04:21 +0000 (17:04 -0800)]
vc4: Add some spec citations about texture fifo management.

8 years agovc4: Use ra14/rb14 as the spilling registers.
Eric Anholt [Fri, 11 Nov 2016 21:26:00 +0000 (13:26 -0800)]
vc4: Use ra14/rb14 as the spilling registers.

This makes the raddr fixups compatible with FS threading.

8 years agovc4: Add support for register allocation for threaded shaders.
Eric Anholt [Thu, 10 Nov 2016 23:10:15 +0000 (15:10 -0800)]
vc4: Add support for register allocation for threaded shaders.

We have two major requirements: Make sure that only the bottom half of the
physical reg space is used, and make sure that none of our values are live
in an accumulator across a switch.

8 years agovc4: Split register class setup for physical files from accumulators.
Eric Anholt [Thu, 10 Nov 2016 22:55:26 +0000 (14:55 -0800)]
vc4: Split register class setup for physical files from accumulators.

8 years agovc4: Use register allocator CLASS_BIT_R0_R3 to clean up CLASS_B.
Eric Anholt [Thu, 10 Nov 2016 22:37:36 +0000 (14:37 -0800)]
vc4: Use register allocator CLASS_BIT_R0_R3 to clean up CLASS_B.

We have had no reason to separate ability to store in an accumulator from
ability to store in B, but with FS threading, we need to be able to force
values to be stored only in the physical regfiles.

8 years agovc4: Add support for QPU scheduling of thread switch instructions.
Eric Anholt [Fri, 11 Nov 2016 02:02:37 +0000 (18:02 -0800)]
vc4: Add support for QPU scheduling of thread switch instructions.

This is vaguely based off of Jonas Pfeil's thread switch support branch.

8 years agovc4: Add a thread switch QIR instruction.
Eric Anholt [Thu, 10 Nov 2016 23:23:19 +0000 (15:23 -0800)]
vc4: Add a thread switch QIR instruction.

This will eventually be generated at the QIR level, so that
vc4_qir_schedule.c can arrange the separation of tex_strb from tex_result
correctly.  It will also be important so that register allocation set the
register classes appropriately for values that are live across the switch.

8 years agovc4: Add a bit of QPU validation for threaded shaders.
Eric Anholt [Fri, 11 Nov 2016 22:15:55 +0000 (14:15 -0800)]
vc4: Add a bit of QPU validation for threaded shaders.

These are both bugs we've run into along the way writing multithreaded FS
support.

8 years agovc4: Fix register class handling of DDX/DDY arguments.
Eric Anholt [Fri, 11 Nov 2016 22:04:42 +0000 (14:04 -0800)]
vc4: Fix register class handling of DDX/DDY arguments.

I had this exactly backwards, but apparently the piglit tests were all
landing in r0-r3 anyway.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
8 years agoradv/pipeline: Don't dereference NULL dynamic state pointers
Darren Salt [Sun, 16 Oct 2016 19:32:19 +0000 (20:32 +0100)]
radv/pipeline: Don't dereference NULL dynamic state pointers

This is a port of commit a4a59172482d50318a5ae7f99021bcf0125e0f53:

   Add guards to prevent dereferencing NULL dynamic pipeline state. Asserts
   of pCreateInfo members are moved to the earliest points at which they
   should not be NULL.

This fixes a segfault, related to pColorBlendState, seen in Talos Principle
which I've observed after startup is completed and when exiting the menus,
depending on when Vulkan rendering is selected.

v2: moved the NULL check in radv_pipeline_init_blend_state to after the
declarations.
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
8 years agofreedreno/ir3: fixup ralloc fallout
Rob Clark [Thu, 10 Nov 2016 21:08:39 +0000 (16:08 -0500)]
freedreno/ir3: fixup ralloc fallout

Fixes fallout from acc23b04 ("ralloc: remove memset from ralloc_size").
We were still depending on zero'd allocations in a couple of places.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agoFix races during _mesa_HashWalk().
Steinar H. Gunderson [Sat, 5 Nov 2016 14:28:37 +0000 (15:28 +0100)]
Fix races during _mesa_HashWalk().

There is currently no protection against walking a hash (using
_mesa_HashWalk()) and modifying it at the same time, for instance by inserting
or deleting elements. This leads to segfaults in multithreaded code if e.g.
someone calls glTexImage2D (which may have to walk the list of FBOs) while
another thread is calling glDeleteFramebuffers on another thread with the two
contexts sharing lists.

The reason for this is that _mesa_HashWalk() doesn't actually take the mutex
that normally protects the hash; it takes an entirely different mutex.
Thus, walks are only protected against other walks, and there is also no
outer lock taking this. There is an old comment saying that this is to fix
problems with deadlock if the callback needs to take a mutex; we solve this
by changing the mutex to be recursive.

A demonstration Helgrind hit from a real application:

==13412== Possible data race during write of size 8 at 0x3498C6A8 by thread #1
==13412== Locks held: 2, at addresses 0x1AF09530 0x2B3DF400
==13412==    at 0x1F040C99: _mesa_hash_table_remove (hash_table.c:395)
==13412==    by 0x1EE98174: _mesa_HashRemove_unlocked (hash.c:350)
==13412==    by 0x1EE98174: _mesa_HashRemove (hash.c:365)
==13412==    by 0x1EE2372D: _mesa_DeleteFramebuffers (fbobject.c:2669)
==13412==    by 0x6105AA4: movit::ResourcePool::cleanup_unlinked_fbos(void*) (resource_pool.cpp:473)
==13412==    by 0x610615B: movit::ResourcePool::release_fbo(unsigned int) (resource_pool.cpp:442)
[...]
==13412== This conflicts with a previous read of size 8 by thread #20
==13412== Locks held: 2, at addresses 0x1AF09558 0x1AF73318
==13412==    at 0x1F040CD9: _mesa_hash_table_next_entry (hash_table.c:415)
==13412==    by 0x1EE982A8: _mesa_HashWalk (hash.c:426)
==13412==    by 0x1EED6DFD: _mesa_update_fbo_texture.part.33 (teximage.c:2683)
==13412==    by 0x1EED9410: _mesa_update_fbo_texture (teximage.c:3043)
==13412==    by 0x1EED9410: teximage (teximage.c:3073)
==13412==    by 0x1EEDA28F: _mesa_TexImage2D (teximage.c:3105)
==13412==    by 0x166A68: operator() (mixer.cpp:454)

There are many more interactions than just these two possible.

Cc: 11.2 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Steinar H. Gunderson <steinar+mesa@gunderson.no>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoi965: Drop tabs in brw_state.h.
Kenneth Graunke [Sat, 12 Nov 2016 01:12:13 +0000 (17:12 -0800)]
i965: Drop tabs in brw_state.h.

8 years agoac/nir/llvm: Fix setting function attributes for intrinsics
Daniel Scharrer [Fri, 11 Nov 2016 20:36:36 +0000 (21:36 +0100)]
ac/nir/llvm: Fix setting function attributes for intrinsics

This fixes a NULL pointer dereference for intrinsics with more than
one function attribute introduced in commit 2fdaf38.
The fix is ported from the lp_build_intrinsic changes in commit 8bdd52c.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
8 years agoi965: Update a comment: s/brw_state_cache/brw_program_cache/g
Kenneth Graunke [Fri, 11 Nov 2016 21:18:51 +0000 (13:18 -0800)]
i965: Update a comment: s/brw_state_cache/brw_program_cache/g

Tim renamed this recently - stop referring to it by the old name.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoclover: fix building since llvm r286566
Laurent Carlier [Fri, 11 Nov 2016 13:00:26 +0000 (14:00 +0100)]
clover: fix building since llvm r286566

pretty trivial fix

8 years agoegl/wayland: fix return value in dri2_wl_swrast_commit_backbuffer
Emil Velikov [Fri, 11 Nov 2016 16:27:59 +0000 (16:27 +0000)]
egl/wayland: fix return value in dri2_wl_swrast_commit_backbuffer

The function returns "void" rather than int. We could rework that, yet
again there will be no benefit since all the callers have no use of it.

Fixes: 9ca6711faa0 ("Revert "wayland: Block for the frame callback in
get_back_bo not dri2_swap_buffers"")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>