mesa.git
8 years agonvc0: fix exposing of metric-issue_slots for SM21/SM30
Samuel Pitoiset [Mon, 2 May 2016 20:12:41 +0000 (22:12 +0200)]
nvc0: fix exposing of metric-issue_slots for SM21/SM30

This is most likely a copy-paste error when I reworked this area few
weeks ago. For SM20, metric-issue_slots is equal to inst_issued because
there is only one pipeline, so the metric is not exposed there.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reported-by: Karol Herbst <nouveau@karolherbst.de>
8 years agomesa/objectlabel: handle NULL src string
Mark Janes [Tue, 3 May 2016 20:50:49 +0000 (13:50 -0700)]
mesa/objectlabel: handle NULL src string

This prevents a crash when a NULL src is passed with a non-NULL length.

fixes: dEQP-GLES31.functional.debug.object_labels.query_length_only
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95252

Signed-off-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agoglsl: subroutine types cannot be used in constructors.
Dave Airlie [Tue, 3 May 2016 04:33:16 +0000 (14:33 +1000)]
glsl: subroutine types cannot be used in constructors.

This fixes two of the cases in
GL43-CTS.shader_subroutine.subroutines_not_allowed_as_variables_constructors_and_argument_or_return_types

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoglsl: resource is a reserved keyword in GLSL 4.20 as well
Dave Airlie [Tue, 3 May 2016 06:44:20 +0000 (16:44 +1000)]
glsl: resource is a reserved keyword in GLSL 4.20 as well

resource just appears in GLSL 4.20 without any fanfare.

Fixes GL43-CTX.CommonBugs.CommonBug_ReservedNames

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agogallium,utils: Fix trivial sign compare warnings
Jan Vesely [Fri, 29 Apr 2016 19:46:06 +0000 (15:46 -0400)]
gallium,utils: Fix trivial sign compare warnings

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
8 years agoanv: fix hang during generation of dev_icd.json.
Knut Andre Tidemann [Tue, 3 May 2016 10:30:56 +0000 (12:30 +0200)]
anv: fix hang during generation of dev_icd.json.

Fixes: b370ec7c76d ("anv: tweak the %.json rule")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoswrast: Add texfetch_funcs entries for astc 3d formats
Anuj Phogat [Thu, 11 Feb 2016 20:33:27 +0000 (12:33 -0800)]
swrast: Add texfetch_funcs entries for astc 3d formats

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Enable translation between astc 3d gl formats and mesa formats
Anuj Phogat [Thu, 11 Feb 2016 20:29:53 +0000 (12:29 -0800)]
mesa: Enable translation between astc 3d gl formats and mesa formats

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Handle astc 3d formats in _mesa_get_compressed_formats()
Anuj Phogat [Thu, 11 Feb 2016 20:28:31 +0000 (12:28 -0800)]
mesa: Handle astc 3d formats in _mesa_get_compressed_formats()

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Handle astc 3d formats in _mesa_base_tex_format()
Anuj Phogat [Thu, 11 Feb 2016 20:10:52 +0000 (12:10 -0800)]
mesa: Handle astc 3d formats in _mesa_base_tex_format()

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Account for astc 3d formats in _mesa_is_astc_format()
Anuj Phogat [Thu, 11 Feb 2016 20:09:51 +0000 (12:09 -0800)]
mesa: Account for astc 3d formats in _mesa_is_astc_format()

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add a helper function is_astc_3d_format()
Anuj Phogat [Thu, 11 Feb 2016 20:08:50 +0000 (12:08 -0800)]
mesa: Add a helper function is_astc_3d_format()

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add the missing defines for GL_OES_texture_compression_astc
Anuj Phogat [Thu, 11 Feb 2016 20:12:48 +0000 (12:12 -0800)]
mesa: Add the missing defines for GL_OES_texture_compression_astc

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Align the values of #define's in glheader.h
Anuj Phogat [Thu, 11 Feb 2016 19:44:21 +0000 (11:44 -0800)]
mesa: Align the values of #define's in glheader.h

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add OES_texture_compression_astc to extension table and gl_extensions
Anuj Phogat [Thu, 11 Feb 2016 19:27:01 +0000 (11:27 -0800)]
mesa: Add OES_texture_compression_astc to extension table and gl_extensions

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add entries for astc 3d formats initializing struct gl_format_info
Anuj Phogat [Thu, 11 Feb 2016 18:51:03 +0000 (10:51 -0800)]
mesa: Add entries for astc 3d formats initializing struct gl_format_info

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add mesa formats for astc 3d formats
Anuj Phogat [Thu, 11 Feb 2016 18:37:22 +0000 (10:37 -0800)]
mesa: Add mesa formats for astc 3d formats

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agoglapi: Update dispatch XML files for OES_texture_compression_astc.xml
Anuj Phogat [Fri, 12 Feb 2016 19:10:29 +0000 (11:10 -0800)]
glapi: Update dispatch XML files for OES_texture_compression_astc.xml

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Account for block depth in _mesa_format_image_size()
Anuj Phogat [Thu, 11 Feb 2016 18:08:49 +0000 (10:08 -0800)]
mesa: Account for block depth in _mesa_format_image_size()

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Handle 3d block sizes in _mesa_compute_compressed_pixelstore
Anuj Phogat [Fri, 11 Mar 2016 23:05:38 +0000 (15:05 -0800)]
mesa: Handle 3d block sizes in _mesa_compute_compressed_pixelstore

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Handle 3d block sizes in teximage error checks
Anuj Phogat [Thu, 11 Feb 2016 18:06:13 +0000 (10:06 -0800)]
mesa: Handle 3d block sizes in teximage error checks

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Handle 3d block sizes in getteximage error checks
Anuj Phogat [Thu, 10 Mar 2016 00:39:34 +0000 (16:39 -0800)]
mesa: Handle 3d block sizes in getteximage error checks

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add an assert for BlockDepth in _mesa_get_format_block_size()
Anuj Phogat [Wed, 9 Mar 2016 19:47:07 +0000 (11:47 -0800)]
mesa: Add an assert for BlockDepth in _mesa_get_format_block_size()

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add a helper function to query 3D block sizes
Anuj Phogat [Wed, 9 Mar 2016 19:38:54 +0000 (11:38 -0800)]
mesa: Add a helper function to query 3D block sizes

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Add block depth field in struct gl_format_info
Anuj Phogat [Thu, 11 Feb 2016 00:41:23 +0000 (16:41 -0800)]
mesa: Add block depth field in struct gl_format_info

This will be later required for 3D ASTC formats.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa/copyimage: make sure number of samples match.
Dave Airlie [Tue, 3 May 2016 06:09:38 +0000 (16:09 +1000)]
mesa/copyimage: make sure number of samples match.

This fixes
GL43-CTS.copy_image.samples_missmatch
which otherwise asserts in the radeonsi driver.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agomesa/objectlabel: don't do memcpy if bufSize is 0 (v2)
Dave Airlie [Tue, 3 May 2016 07:32:28 +0000 (17:32 +1000)]
mesa/objectlabel: don't do memcpy if bufSize is 0 (v2)

This prevents GL43-CTS.khr_debug.labels_non_debug from
memcpying all over the stack and crashing.

v2: actually fix the test.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agomesa/textureview: move error checks up higher
Dave Airlie [Tue, 3 May 2016 05:20:48 +0000 (15:20 +1000)]
mesa/textureview: move error checks up higher

GL43-CTS.texture_view.errors checks for GL_INVALID_VALUE
here but we catch these problems in the dimensionsOK check
and return the wrong error value.

This fixes:
GL43-CTS.texture_view.errors.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agogallium/radeon: remove stencil_tile_split from metadata
Marek Olšák [Sun, 1 May 2016 13:47:30 +0000 (15:47 +0200)]
gallium/radeon: remove stencil_tile_split from metadata

this is a leftover from the days when depth-stencil buffers were
allocated by the DDX

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agogallium/radeon: remove tile_mode_array_valid flags
Marek Olšák [Sun, 1 May 2016 12:11:16 +0000 (14:11 +0200)]
gallium/radeon: remove tile_mode_array_valid flags

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agowinsys/amdgpu: pass PIPE_CONFIG to addrlib on texture import
Marek Olšák [Sun, 1 May 2016 11:56:01 +0000 (13:56 +0200)]
winsys/amdgpu: pass PIPE_CONFIG to addrlib on texture import

This hasn't been needed, but I think we should set it.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agowinsys/amdgpu: read NUM_BANKS from buffer metadata
Marek Olšák [Sun, 1 May 2016 11:47:47 +0000 (13:47 +0200)]
winsys/amdgpu: read NUM_BANKS from buffer metadata

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeonsi: remove unused tile mode getters
Marek Olšák [Sun, 1 May 2016 11:38:32 +0000 (13:38 +0200)]
radeonsi: remove unused tile mode getters

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeonsi: just read tile mode arrays in SDMA setup
Marek Olšák [Sun, 1 May 2016 11:32:33 +0000 (13:32 +0200)]
radeonsi: just read tile mode arrays in SDMA setup

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeonsi: just read tile mode arrays in SI DMA setup
Marek Olšák [Sun, 1 May 2016 11:24:49 +0000 (13:24 +0200)]
radeonsi: just read tile mode arrays in SI DMA setup

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeonsi: just read tile mode arrays in DB setup
Marek Olšák [Sun, 1 May 2016 10:56:57 +0000 (12:56 +0200)]
radeonsi: just read tile mode arrays in DB setup

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agogallium/radeon: add radeon_surf::macro_tile_index
Marek Olšák [Tue, 26 Apr 2016 16:30:07 +0000 (18:30 +0200)]
gallium/radeon: add radeon_surf::macro_tile_index

for indexing cik_macrotile_mode_array

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agowinsys/radeon: drop support for kernels lacking tile mode array queries
Marek Olšák [Thu, 28 Apr 2016 13:05:29 +0000 (15:05 +0200)]
winsys/radeon: drop support for kernels lacking tile mode array queries

This will allow us to simplify a lot of code around tiling.

Kernel 3.10 is required for SI support.
Kernel 3.13 is required for CIK support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agost/mesa: fix blit-based GetTexImage for non-finalized textures
Marek Olšák [Sun, 1 May 2016 13:29:52 +0000 (15:29 +0200)]
st/mesa: fix blit-based GetTexImage for non-finalized textures

This fixes getteximage-depth piglit failures on radeonsi.

Cc: 11.1 11.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agowinsys/radeon: count buffer size only once
Marek Olšák [Thu, 28 Apr 2016 15:30:24 +0000 (17:30 +0200)]
winsys/radeon: count buffer size only once

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agowinsys/amdgpu: count buffer size only once
Marek Olšák [Thu, 28 Apr 2016 15:30:16 +0000 (17:30 +0200)]
winsys/amdgpu: count buffer size only once

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agowinsys/amdgpu: loosen up requirements for how much memory IBs can use
Marek Olšák [Thu, 28 Apr 2016 14:33:54 +0000 (16:33 +0200)]
winsys/amdgpu: loosen up requirements for how much memory IBs can use

ported from winsys/radeon.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: when parsing dmesg, skip empty lines
Marek Olšák [Fri, 29 Apr 2016 20:27:09 +0000 (22:27 +0200)]
radeonsi: when parsing dmesg, skip empty lines

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: use the hw MSAA resolving if formats are compatible
Marek Olšák [Sat, 30 Apr 2016 19:44:41 +0000 (21:44 +0200)]
radeonsi: use the hw MSAA resolving if formats are compatible

This allows resolving RGBA into RGBX.
This should improve HL2 Lost Coast performance.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agonv50,nvc0: re-bind old compute state after reading MP perf counters
Samuel Pitoiset [Mon, 2 May 2016 20:25:59 +0000 (22:25 +0200)]
nv50,nvc0: re-bind old compute state after reading MP perf counters

This might be useful to avoid breaking the current compute state when
monitoring MP perf counters because we use a compute kernel to read out
those counters. This has been initially suggested by Ilia Mirkin.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
8 years agonir: make lower_clamp_color pass work after lower i/o
Rob Clark [Sun, 1 May 2016 12:06:34 +0000 (08:06 -0400)]
nir: make lower_clamp_color pass work after lower i/o

Kinda important to work with tgsi_to_nir, which generates nir which
already has i/o lowered.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agovc4: Use NIR lowering for sRGB decode.
Eric Anholt [Fri, 22 Apr 2016 18:51:55 +0000 (11:51 -0700)]
vc4: Use NIR lowering for sRGB decode.

This should get us the same decode code generated, but with a lot less
custom code in the driver.

8 years agovc4: Just use NIR lowering for texture projection.
Eric Anholt [Thu, 28 Apr 2016 02:17:03 +0000 (19:17 -0700)]
vc4: Just use NIR lowering for texture projection.

This means doing Newton-Raphson on the RCP, but it's probably actually a
good thing to be accurate on.

8 years agovc4: Scalarize phi nodes as well.
Eric Anholt [Fri, 22 Apr 2016 23:03:07 +0000 (16:03 -0700)]
vc4: Scalarize phi nodes as well.

This makes fewer programs with loops assertion fail, replacing them with
the rendering failure warning.

8 years agovc4: Add whitespace after each program stage dump.
Eric Anholt [Wed, 27 Apr 2016 23:10:59 +0000 (16:10 -0700)]
vc4: Add whitespace after each program stage dump.

In particular it's been hard to find the point where we switch from
dumping pre-optimization QIR and post-optimization QIR.

8 years agovc4: Remove the CSE pass.
Eric Anholt [Thu, 28 Apr 2016 01:59:31 +0000 (18:59 -0700)]
vc4: Remove the CSE pass.

It's not doing anything according to shader-db now that we're using NIR.
It would have had to be reworked significantly anyway, to handle control
flow.

8 years agovc4: Emit only one FRAG_Z or FRAG_W QIR opcode.
Eric Anholt [Thu, 28 Apr 2016 01:49:59 +0000 (18:49 -0700)]
vc4: Emit only one FRAG_Z or FRAG_W QIR opcode.

We were generating piles of FRAG_W for interpolation, only to CSE them
away immediately.  Since this is the only thing that CSE is doing for us
any more, just avoid making the CSE work necessary.

8 years agovc4: Use the NIR cubemap normalization instead of our own.
Eric Anholt [Thu, 28 Apr 2016 02:09:01 +0000 (19:09 -0700)]
vc4: Use the NIR cubemap normalization instead of our own.

This is one of two uses of the current QIR CSE pass according to
shader-db.  The NIR pass means that we'll end up doing Newton-Raphson on
our RCP, which we weren't doing before, but that's probably actually a
good thing.

8 years agovc4: Drop the support for DCE of texture instructions.
Eric Anholt [Wed, 27 Apr 2016 23:48:17 +0000 (16:48 -0700)]
vc4: Drop the support for DCE of texture instructions.

Now that we're using NIR for our optimization, there's no need for this
tricky code.

8 years agoradeonsi: fix PIPE_FORMAT_R11G11B10_FLOAT handling
Nicolai Hähnle [Fri, 29 Apr 2016 21:18:27 +0000 (16:18 -0500)]
radeonsi: fix PIPE_FORMAT_R11G11B10_FLOAT handling

That format has first_non_void < 0. This fixes a regression in piglit
arb_shader_image_load_store-semantics that was introduced by commit 76b8c5cc602,
while hopefully still shutting Coverity up (and failing in a more obvious way
if a similar error should re-appear).

Reviewed-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agoradeonsi: correct NULL-pointer check in si_upload_const_buffer
Nicolai Hähnle [Sat, 23 Apr 2016 02:57:51 +0000 (21:57 -0500)]
radeonsi: correct NULL-pointer check in si_upload_const_buffer

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agosoftpipe: bump 3D texture limit to 2048
Dave Airlie [Tue, 26 Apr 2016 22:00:46 +0000 (08:00 +1000)]
softpipe: bump 3D texture limit to 2048

The GL4.1 spec bumps this to 2048, so we should do so.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agosoftpipe: allow r32 xchg on shader images.
Dave Airlie [Tue, 26 Apr 2016 21:55:20 +0000 (07:55 +1000)]
softpipe: allow r32 xchg on shader images.

This is part of OES_shader_image_atomic.txt.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agosoftpipe: avoid leaking local_mem on machines alloc failure
Ilia Mirkin [Sun, 1 May 2016 02:31:26 +0000 (22:31 -0400)]
softpipe: avoid leaking local_mem on machines alloc failure

Spotted by Coverity

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
8 years agovbo: avoid leaking prim on vbo bind failure
Ilia Mirkin [Sun, 1 May 2016 02:29:17 +0000 (22:29 -0400)]
vbo: avoid leaking prim on vbo bind failure

Spotted by Coverity

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
8 years agomapi/glapi: Fix dup word typo in glapi_getproc.c
Edward O'Callaghan [Sun, 24 Apr 2016 02:40:41 +0000 (12:40 +1000)]
mapi/glapi: Fix dup word typo in glapi_getproc.c

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agoisl: automake: don't explicitly EXTRA_DIST the tests folder
Emil Velikov [Sun, 1 May 2016 13:14:42 +0000 (14:14 +0100)]
isl: automake: don't explicitly EXTRA_DIST  the tests folder

The file(s) within are already picked thanks to the build rule of the
respective test. No need to have the folder in EXTRA_DIST.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agomesa: add LOCATION_COMPONENT support to GetProgramResourceiv
Timothy Arceri [Fri, 27 Nov 2015 22:16:45 +0000 (09:16 +1100)]
mesa: add LOCATION_COMPONENT support to GetProgramResourceiv

From Section 7.3.1.1 (Naming Active Resources) of the OpenGL 4.5 spec:

   "For the property LOCATION_COMPONENT, a single integer indicating the first
   component of the location assigned to an active input or output variable is
   written to params. For input and output variables with a component specified
   by a layout qualifier, the specified component is written. For all other
   input and output variables, the value zero is written."

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoglsl: add component to has_layout() helper
Timothy Arceri [Tue, 12 Jan 2016 01:42:16 +0000 (12:42 +1100)]
glsl: add component to has_layout() helper

I don't think this will do much as it's a compiler error
to use component without location which is already in the
table but its good to be consistent.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
8 years agoglsl: validate linking of intrastage component qualifiers
Timothy Arceri [Fri, 27 Nov 2015 02:43:20 +0000 (13:43 +1100)]
glsl: validate linking of intrastage component qualifiers

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoglsl: update explicit location matching to support component qualifier
Timothy Arceri [Tue, 22 Dec 2015 05:37:40 +0000 (16:37 +1100)]
glsl: update explicit location matching to support component qualifier

This is needed so we don't optimise away the varying when more than
one shares the same location.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl: cross validate varyings with a component qualifier
Timothy Arceri [Thu, 17 Dec 2015 00:34:09 +0000 (11:34 +1100)]
glsl: cross validate varyings with a component qualifier

This change checks for component overlap, including handling overlap of
locations and components by doubles. Previously there was no validation
for assigning explicit locations to a location used by the second half
of a double.

V3: simplify handling of doubles and fix double component aliasing
detection

V2: fix component matching for matricies

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl: validate and store component layout qualifier in GLSL IR
Timothy Arceri [Tue, 10 Nov 2015 19:24:53 +0000 (06:24 +1100)]
glsl: validate and store component layout qualifier in GLSL IR

We make use of the existing IR field location_frac used for tracking
component locations.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl: allow component qualifier on varying inputs
Timothy Arceri [Sat, 5 Mar 2016 08:55:34 +0000 (19:55 +1100)]
glsl: allow component qualifier on varying inputs

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoglsl: parse component layout qualifier
Timothy Arceri [Tue, 10 Nov 2015 01:47:46 +0000 (12:47 +1100)]
glsl: parse component layout qualifier

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoandroid: enable dlopen() on all architectures
WuZhen [Thu, 28 Apr 2016 07:34:58 +0000 (15:34 +0800)]
android: enable dlopen() on all architectures

Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agowinsys/sw/xlib: use correct free function for xlib_dt->data
Jose Fonseca [Sun, 1 May 2016 09:27:06 +0000 (10:27 +0100)]
winsys/sw/xlib: use correct free function for xlib_dt->data

Analogous to previous commit.

Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agowinsys/sw/dri: use correct free function for dri_sw_dt->data
WuZhen [Thu, 28 Apr 2016 07:34:56 +0000 (15:34 +0800)]
winsys/sw/dri: use correct free function for dri_sw_dt->data

align_malloc() is used to allocate dri_sw_dt->data, thus we should not
be using FREE() but align_free().

Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
[Emil Velikov: tweak commit summary/shortlog]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
8 years agotgsi: initialize stack allocated struct
WuZhen [Thu, 28 Apr 2016 07:34:55 +0000 (15:34 +0800)]
tgsi: initialize stack allocated struct

Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoegl: android: do not feed invalid fourcc/pitch into the dri module
Emil Velikov [Sun, 1 May 2016 08:35:56 +0000 (09:35 +0100)]
egl: android: do not feed invalid fourcc/pitch into the dri module

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoegl: android: add dma-buf fd support
Rob Herring [Sun, 1 May 2016 08:35:28 +0000 (09:35 +0100)]
egl: android: add dma-buf fd support

Add support for creating images from Android native buffers with dma-buf
fd. As dma-buf support also requires DRI image loader extension, add
that as well.

This is based on several originally patches written by Varad Gautam.
I've collapsed them into logical changes and done a bit of reformatting.
Using dma-bufs vs. GEM handles is now a runtime decision similar to the
wayland EGL instead of being compile time selection. The dma-buf support
is also re-written to use common dri2_create_image_dma_buf function in
egl_dri2.c.

Cc: Varad Gautam <varadgautam@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoegl: android: factor out back buffer handling code
Rob Herring [Thu, 28 Apr 2016 20:37:30 +0000 (15:37 -0500)]
egl: android: factor out back buffer handling code

In preparation to use the same code for dma-bufs, factor out the code to a
separate function.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoegl: android: factor out format conversion code to a function
Rob Herring [Thu, 28 Apr 2016 20:37:29 +0000 (15:37 -0500)]
egl: android: factor out format conversion code to a function

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoegl: android: disable __DRI_DRI2_LOADER support on render nodes
Rob Herring [Thu, 28 Apr 2016 20:37:28 +0000 (15:37 -0500)]
egl: android: disable __DRI_DRI2_LOADER support on render nodes

Use of __DRI_DRI2_LOADER extension is only supported for card nodes. In
order to support dmabufs, Android will be moving to using render nodes and
we need to disable the DRI2 loader extension.

This is based on the Wayland EGL code.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoAndroid: fix build ordering of subdirectories
Rob Herring [Thu, 28 Apr 2016 19:02:01 +0000 (14:02 -0500)]
Android: fix build ordering of subdirectories

Different versions of make behave differently in whether $(wildcard) sorts
the results or not. The Android build now explicitly sorts
all-named-subdir-makefiles which breaks the build because src/gallium
must be included after src/mesa/drivers/dri.

The Android build system doesn't support doing "include $(call
all-named-subdir-makefiles,...)" twice, so rework things by generating
the included makefile list and including them in 2 steps.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoglShaderSource must not change compile status.
Jamey Sharp [Tue, 26 Apr 2016 05:06:40 +0000 (22:06 -0700)]
glShaderSource must not change compile status.

OpenGL 4.5 Core Profile section 7.1, in the documentation for
CompileShader, says: "Changing the source code of a shader object with
ShaderSource does not change its compile status or the compiled shader
code."

According to Karol Herbst, the game "Divinity: Original Sin - Enhanced
Edition" depends on this odd quirk of the spec.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agogallium/radeon: nuke the final pre LLVM 3.6 codepath
Emil Velikov [Thu, 21 Apr 2016 13:37:16 +0000 (14:37 +0100)]
gallium/radeon: nuke the final pre LLVM 3.6 codepath

Missed with commit 100796c15c3 "gallium/radeon: drop support for LLVM
3.5"

v2: s/LLVN/LLVM/ in shortlog (Nicolai)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoanv: include the files in the tarball
Emil Velikov [Fri, 29 Apr 2016 18:50:29 +0000 (19:50 +0100)]
anv: include the files in the tarball

Namely the python script, the ICD header and private headers. We could
get the system version of the ICD ones, although there is no .pc file to
easily locate and/or manage them.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoi965: don't forget to ship brw_nir_trig_workarounds.py
Emil Velikov [Fri, 29 Apr 2016 18:28:17 +0000 (19:28 +0100)]
i965: don't forget to ship brw_nir_trig_workarounds.py

Otherwise we won't be able to regenerate the source file(s).

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoisl: include all the files in the tarball
Emil Velikov [Sun, 1 May 2016 07:38:34 +0000 (08:38 +0100)]
isl: include all the files in the tarball

Add the missing header(s), generation scripts, README ...

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agospirv: automake: add missing headers to the tarball.
Emil Velikov [Fri, 29 Apr 2016 17:53:15 +0000 (18:53 +0100)]
spirv: automake: add missing headers to the tarball.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoautomake: wire up the intel vulkan driver to make distcheck
Emil Velikov [Fri, 29 Apr 2016 16:10:16 +0000 (17:10 +0100)]
automake: wire up the intel vulkan driver to make distcheck

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: update .gitignore
Emil Velikov [Fri, 29 Apr 2016 15:33:48 +0000 (16:33 +0100)]
anv: update .gitignore

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: automake: remove no longer needed include
Emil Velikov [Fri, 29 Apr 2016 15:31:40 +0000 (16:31 +0100)]
anv: automake: remove no longer needed include

Thanks to last commit we can nuke it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: automake: tweak anv_entrypoint.[ch] rule
Emil Velikov [Fri, 29 Apr 2016 15:29:45 +0000 (16:29 +0100)]
anv: automake: tweak anv_entrypoint.[ch] rule

Rather than using cat + cpp feed the file(s) directly into the latter.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: tweak libvulkan_intel.so link libraries
Emil Velikov [Thu, 21 Apr 2016 00:27:17 +0000 (01:27 +0100)]
anv: tweak libvulkan_intel.so link libraries

i.e do not use -lfoo directly.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: cosmetic makefile changes
Emil Velikov [Thu, 21 Apr 2016 00:20:10 +0000 (01:20 +0100)]
anv: cosmetic makefile changes

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: place the builddir includes before the srcdir ones
Emil Velikov [Thu, 21 Apr 2016 00:12:42 +0000 (01:12 +0100)]
anv: place the builddir includes before the srcdir ones

Otherwise we risk picking the possibly outdated file in the source dir
over the fresh one in the builddir.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoautomake: tweak SUBDIR reorder and comment it
Emil Velikov [Wed, 20 Apr 2016 18:44:51 +0000 (19:44 +0100)]
automake: tweak SUBDIR reorder and comment it

It should ease people with all the interaction and platforms and how
they interact (at least from a build POV) with each other.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoconfigure.ac: remove unused HAVE_EGL_PLATFORM_NULL conditional
Emil Velikov [Wed, 20 Apr 2016 18:36:53 +0000 (19:36 +0100)]
configure.ac: remove unused HAVE_EGL_PLATFORM_NULL conditional

Afaict the last user was based on st/egl.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoautomake: drop "EGL_" from HAVE_EGL_PLATFORM_WAYLAND
Emil Velikov [Wed, 20 Apr 2016 19:18:02 +0000 (20:18 +0100)]
automake: drop "EGL_" from HAVE_EGL_PLATFORM_WAYLAND

Analogous to previous commit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoautomake: drop "EGL_" from HAVE_EGL_PLATFORM_X11
Emil Velikov [Wed, 20 Apr 2016 19:17:53 +0000 (20:17 +0100)]
automake: drop "EGL_" from HAVE_EGL_PLATFORM_X11

The variable covers more than just EGL, let's try to untangle the
confusion it brings.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: get rid of VULKAN_ENTRYPOINT_CPPFLAGS variable
Emil Velikov [Wed, 20 Apr 2016 22:34:43 +0000 (23:34 +0100)]
anv: get rid of VULKAN_ENTRYPOINT_CPPFLAGS variable

Add the missing include to AM_CPPFLAGS and use it throughout the
makefile.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: factor out the X11/XCB build
Emil Velikov [Wed, 20 Apr 2016 18:15:18 +0000 (19:15 +0100)]
anv: factor out the X11/XCB build

Similar to earlier commit - move all the common bits into a single
place, thus improving readability and allowing us to see what's missing.

Also don't forget to add the missing bits. This commit should allows us
to build wayland only vulkan ;-)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: kill of custom define HAVE_WAYLAND_PLATFORM
Emil Velikov [Wed, 20 Apr 2016 18:01:00 +0000 (19:01 +0100)]
anv: kill of custom define HAVE_WAYLAND_PLATFORM

Vulkan API already has equivalent, so simplify things as just use it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>