OSDN Git Service

android-x86/external-mesa.git
7 years agost/glsl_to_tgsi: fix dvec[34] loads from SSBO
Nicolai Hähnle [Thu, 3 Nov 2016 10:00:36 +0000 (11:00 +0100)]
st/glsl_to_tgsi: fix dvec[34] loads from SSBO

When splitting up loads, we have to add 16 bytes to the offset for
the high components, just like already happens for stores.

Fixes arb_gpu_shader_fp64@shader_storage@layout-std140-fp64-shader.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit e4b378800eff13752dcfe1f5c6b640444208d543)

7 years agonir: Flip gl_SamplePosition in nir_lower_wpos_ytransform().
Francisco Jerez [Tue, 1 Nov 2016 18:56:13 +0000 (11:56 -0700)]
nir: Flip gl_SamplePosition in nir_lower_wpos_ytransform().

Assuming the hardware is set up to use a screen coordinate system
flipped vertically with respect to the GL's window coordinate system,
the SYSTEM_VALUE_SAMPLE_POS vector will also be flipped vertically
with respect to the value expected by the GL, so we need to give it
the same treatment as gl_FragCoord.  Fixes the following CTS tests on
i965:

 ES31-CTS.functional.shaders.multisample_interpolation.interpolate_at_offset.at_sample_position.default_framebuffer
 ES31-CTS.functional.shaders.sample_variables.sample_pos.correctness.default_framebuffer

when run with any multisample configuration, e.g. rgba8888d24s8ms4.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit f3d387867f74ae758b41168f23992671f7dce254)

7 years agoglx/windows: Add wgl.h to the sources list
Andreas Boll [Wed, 2 Nov 2016 11:11:54 +0000 (12:11 +0100)]
glx/windows: Add wgl.h to the sources list

Otherwise it won't be picked in the tarball and the build will fail.

Fixes: 533b3530c12 ("direct-to-native-GL for GLX clients on Cygwin
("Windows-DRI")")
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
(cherry picked from commit f792f0687f60e789fe9e0e2550c4eded95253fa1)

7 years agoglsl: fix lowering of UBO references of named blocks
Nicolai Hähnle [Mon, 31 Oct 2016 13:03:10 +0000 (14:03 +0100)]
glsl: fix lowering of UBO references of named blocks

When a UBO reference has the form block_name.foo where block_name refers
to a block where the first member has a non-zero offset, the base offset
was incorrectly added to the reference.

Fixes an assertion triggered in debug builds by
GL45-CTS.enhanced_layouts.uniform_block_layout_qualifier_conflict. That test
doesn't properly check for correct execution in this case, so I am also
going to send out a piglit test.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 37d646c1b3626ad54ed93a784824af7b5abe8a99)

7 years agoglsl: Update deref types when resizing implicitly sized arrays.
Kenneth Graunke [Wed, 2 Nov 2016 20:35:30 +0000 (13:35 -0700)]
glsl: Update deref types when resizing implicitly sized arrays.

At link time, we resolve the size of implicitly sized arrays.
When doing so, we update the type of the ir_variables.  However,
we neglected to update the type of ir_dereference nodes which
reference those variables.

It turns out array_resize_visitor (for GS/TCS/TES interface array
handling) already did 2/3 of the cases for this, so we can simply
refactor the code and reuse it.

This fixes:
GL45-CTS.shader_storage_buffer_object.basic-syntax
GL45-CTS.shader_storage_buffer_object.basic-syntaxSSO

which have an SSBO containing an implicitly sized array, followed
by some other members.  setup_buffer_access uses the dereference
types to compute offsets to fields, and it had a stale type where
the implicitly sized array's length was still 0 instead of the
actual length.

While we're here, we can also fix update_array_sizes to properly
update deref types as well, fixing a FINISHME from 2010.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 8df4aebc94337983194cc72c817c08ee938117a1)

7 years agomesa/glsl: delete previously linked shaders earlier when linking
Timothy Arceri [Tue, 1 Nov 2016 22:49:58 +0000 (09:49 +1100)]
mesa/glsl: delete previously linked shaders earlier when linking

This moves the delete linked shaders call to
_mesa_clear_shader_program_data() which makes sure we delete them
before returning due to any validation problems.

It also reduces some code duplication.

From the OpenGL 4.5 Core spec:

   "If LinkProgram failed, any information about a previous link of
   that program object is lost. Thus, a failed link does not restore
   the old state of program.

   ...

   If one of these commands is called with a program for which
   LinkProgram failed, no error is generated unless otherwise noted.
   Implementations may return information on variables and interface
   blocks that would have been active had the program been linked
   successfully. In cases where the link failed because the program
   required too many resources, these commands may help applications
   determine why limits were exceeded."

Therefore it's expected that we shouldn't be able to query the
program that failed to link and retrieve information about a
previously successful link.

Before this change the linker was doing validation before freeing
the previously linked shaders and therefore could exit on failure
before they were freed.

This change also fixes an issue in compat profile where a program
with no shaders attached is expect to fall back to fixed function
but was instead trying to relink IR from a previous link.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97715
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d2861d682a235993844989f7742c9539c3e10245)

7 years agoradv: add support for anisotropic filtering on VI+
Fredrik Höglund [Thu, 27 Oct 2016 01:02:14 +0000 (03:02 +0200)]
radv: add support for anisotropic filtering on VI+

Ported from radeonsi.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e7b9c5eb74619dbda3f24928196ab8c8d9408c0b)

7 years agoradv: fix dual source blending
Dave Airlie [Wed, 2 Nov 2016 00:33:33 +0000 (00:33 +0000)]
radv: fix dual source blending

Dolphin tried to use this, but we hadn't had any tests for it properly.

All that is required is the shader output format needs to be set
for 0 and 1 exports.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 73592b92844af3c1298ef5e66e3055793443546d)

7 years agoglx/glvnd: Fix dispatch function names and indices
Adam Jackson [Wed, 14 Sep 2016 18:01:13 +0000 (14:01 -0400)]
glx/glvnd: Fix dispatch function names and indices

As this array was not actually sorted, FindGLXFunction's binary search
would only sometimes work.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 8bca8d89ef3babbecc4f3160cbbcb93d33b7a6ee)

7 years agoglx/glvnd: Don't modify the dummy slot in the dispatch table
Adam Jackson [Wed, 14 Sep 2016 17:56:50 +0000 (13:56 -0400)]
glx/glvnd: Don't modify the dummy slot in the dispatch table

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit deb0eb1660f612862c77d225582e102e7ab717ee)

7 years agoanv/pipeline: Properly cache prog_data::param
Jason Ekstrand [Tue, 1 Nov 2016 22:10:29 +0000 (15:10 -0700)]
anv/pipeline: Properly cache prog_data::param

Before we were caching the prog data but we weren't doing anything with
brw_stage_prog_data::param so anything with push constants wasn't getting
cached properly.  This commit fixes that.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 71cc1e188d52bebe86a1ac72fe90f4e2a7e76778)

7 years agoanv/pipeline: Put actual pointers in anv_shader_bin
Jason Ekstrand [Tue, 1 Nov 2016 23:03:12 +0000 (16:03 -0700)]
anv/pipeline: Put actual pointers in anv_shader_bin

While we can simply calculate offsets to get to things such as the
prog_data and the key, it's much more user-friendly if there are just
pointers.  Also, it's a bit more fool-proof.

While we're at it, we rework the pipeline cache API to use the
brw_stage_prog_data type directly.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ff3185e3ba85b3635a1f645e8e951954f4022afe)

7 years agointel/blorp: Pass a brw_stage_prog_data to upload_shader
Jason Ekstrand [Tue, 1 Nov 2016 21:16:34 +0000 (14:16 -0700)]
intel/blorp: Pass a brw_stage_prog_data to upload_shader

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 4306c10a885bdd833328a2a4eeb0079aa4f4bae3)

7 years agointel/blorp: Use wm_prog_data instead of hand-rolling our own
Jason Ekstrand [Tue, 1 Nov 2016 21:03:43 +0000 (14:03 -0700)]
intel/blorp: Use wm_prog_data instead of hand-rolling our own

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 058304f0819c96fd18eb17911022a410540aa295)
[Emil Velikov: brw_compile_fs() has different signature]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/blorp/blorp.c

7 years agoanv: Better handle return codes from anv_physical_device_init
Jason Ekstrand [Wed, 2 Nov 2016 00:51:56 +0000 (17:51 -0700)]
anv: Better handle return codes from anv_physical_device_init

The case where we just want the loop to continue is INCOMPATIBLE_DRIVER
because that simply means that whatever FD we opened isn't a supported
Intel chip.  Other error codes such as OUT_OF_HOST_MEMORY are actual errors
and we should be returning early in that case.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a5f8ff6ca18c38a7c4b5b37a4d5b14ca01e71b1e)

7 years agovulkan/wsi/x11: Clean up connections in finish_wsi
Jason Ekstrand [Wed, 2 Nov 2016 00:18:30 +0000 (17:18 -0700)]
vulkan/wsi/x11: Clean up connections in finish_wsi

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit daeb21e47845795d0320811db1e202540fba356b)

7 years agovulkan/wsi/x11: Better handle wsi_x11_connection_create failure
Jason Ekstrand [Wed, 2 Nov 2016 00:16:14 +0000 (17:16 -0700)]
vulkan/wsi/x11: Better handle wsi_x11_connection_create failure

Without this fix, the function would still end up returning NULL but it
would put that NULL connection in the hash table which would be bad.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit fc0e9e3e40e4b044ce1b62c1b757941f4ed4c820)

7 years agoandroid: avoid using libdrm with host modules
Chih-Wei Huang [Fri, 28 Oct 2016 09:54:17 +0000 (17:54 +0800)]
android: avoid using libdrm with host modules

Note LOCAL_CFLAGS and LOCAL_SHARED_LIBRARIES in Android.common.mk
are used by both host and target modules. However, commit 112e988
moved libdrm related flags to common. It causes the errors like:

error: 'out/host/linux-x86/obj32/SHARED_LIBRARIES/libdrm_intermediates/export_includes',
needed by 'out/host/linux-x86/obj32/EXECUTABLES/mesa_gen_matypes_intermediates/import_includes',
missing and no known rule to make it

No reason to use libdrm with host modules.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Fixes: 112e988329b ("Android: move libdrm settings to top-level
Android.common.mk")
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit e3e5b1a4884666ec806d4eb0188826578580d666)

7 years agoradeonsi: fix BFE/BFI lowering for GLSL semantics
Nicolai Hähnle [Thu, 27 Oct 2016 08:59:37 +0000 (10:59 +0200)]
radeonsi: fix BFE/BFI lowering for GLSL semantics

Fixes spec/arb_gpu_shader5/execution/built-in-functions/*-bitfield{Extract,Insert}

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 5aef14932ac047dc5f1af311a26b7f41b140d79f)

7 years agoradv: expose xlib platform extension
Dave Airlie [Tue, 1 Nov 2016 23:51:43 +0000 (23:51 +0000)]
radv: expose xlib platform extension

I missed this when I added the xlib code, this allows
dolphin emu to start and crash later.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 9f0726f3e509c80c78ddb5e7411fa34f676de71d)

7 years agoanv/device: Return DEVICE_LOST if execbuf2 fails
Jason Ekstrand [Mon, 31 Oct 2016 23:33:43 +0000 (16:33 -0700)]
anv/device: Return DEVICE_LOST if execbuf2 fails

This makes more sense than OUT_OF_HOST_MEMORY.  Technically, you can
recover from a failed execbuf2 but the batch you just submitted didn't
fully execute so things are in an ill-defined state.  The app doesn't want
to continue from that point anyway.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit c41ec1679f02d6705ceda49d9ad966d0d0833824)

7 years agodocs: add sha256 checksums for 13.0.0
Emil Velikov [Tue, 1 Nov 2016 16:05:32 +0000 (16:05 +0000)]
docs: add sha256 checksums for 13.0.0

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: Update 13.0.0 release notes
Emil Velikov [Tue, 1 Nov 2016 15:55:24 +0000 (15:55 +0000)]
docs: Update 13.0.0 release notes

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoUpdate version to 13.0.0(final)
Emil Velikov [Tue, 1 Nov 2016 15:47:33 +0000 (15:47 +0000)]
Update version to 13.0.0(final)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoutil: Include string.h in bitscan.h.
Vinson Lee [Thu, 20 Oct 2016 01:03:12 +0000 (18:03 -0700)]
util: Include string.h in bitscan.h.

Fix build error with clang.

  Compiling src/compiler/glsl/link_varyings.cpp ...
In file included from src/compiler/glsl/link_varyings.cpp:33:
In file included from src/compiler/glsl/glsl_symbol_table.h:34:
In file included from src/compiler/glsl/ir.h:33:
In file included from src/compiler/glsl_types.h:29:
/usr/include/string.h:518:12: error: exception specification in declaration does not match previous declaration
extern int ffs (int __i) __THROW __attribute__ ((__const__));
           ^
src/util/bitscan.h:51:13: note: expanded from macro 'ffs'
            ^
src/util/bitscan.h:96:18: note: previous declaration is here
   const int i = ffs(*mask) - 1;
                 ^
src/util/bitscan.h:51:13: note: expanded from macro 'ffs'
            ^

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97952
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 889ee4da05400687a6c5296a7632dc26f1d61924)

7 years agost/omx/dec: disable tunnel for size different case
Leo Liu [Mon, 24 Oct 2016 18:03:11 +0000 (14:03 -0400)]
st/omx/dec: disable tunnel for size different case

When the video coded size is different from frame size, we need the result
buffers are same as coded size, which are not size compatible with encode
required size, so that simply use no tunnel for this case instead of frame
by frame converting.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 06e3cd6a45ae2ad19f77e0f283c46d5f85112847)

7 years agost/omx/dec: result buffers size should match codec decoder size
Leo Liu [Mon, 24 Oct 2016 18:03:10 +0000 (14:03 -0400)]
st/omx/dec: result buffers size should match codec decoder size

Otherwise fails the check of matching between decoder size and buffers
size in kernel.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d9b2c4048d55011bb04bd9848a3b47af7216389f)

7 years agoi965/fs/generator: Don't use the address immediate for MOV_INDIRECT
Jason Ekstrand [Fri, 28 Oct 2016 21:48:53 +0000 (14:48 -0700)]
i965/fs/generator: Don't use the address immediate for MOV_INDIRECT

The address immediate field is only 9 bits and, since the value is in
bytes, the highest GRF we can point to with it is g15.  This makes it
pretty close to useless for MOV_INDIRECT.  There were already piles of
restrictions preventing us from using it prior to Broadwell, so let's get
rid of the gen8+ code path entirely.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97779
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 2a4a86862c949055c71637429f6d5f2e725d07d8)

7 years agoradeonsi: fix behavior of GLSL findLSB(0)
Marek Olšák [Tue, 25 Oct 2016 23:08:15 +0000 (01:08 +0200)]
radeonsi: fix behavior of GLSL findLSB(0)

12.0 and older need the same fix but elsewhere.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit 4bf45a6079b5cc6b0360b637c0c7baa456b8257d)

7 years agoradeonsi: set VGT_GS_ONCHIP_CNTL on CIK and later
Marek Olšák [Tue, 25 Oct 2016 19:47:52 +0000 (21:47 +0200)]
radeonsi: set VGT_GS_ONCHIP_CNTL on CIK and later

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: 11.2 12.0 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit e24dc4316487eeaa6ee8aa5c709546d814e96f03)

7 years agoglsl: Improve accuracy of alpha scaling in advanced blend lowering.
Kenneth Graunke [Fri, 28 Oct 2016 03:12:56 +0000 (20:12 -0700)]
glsl: Improve accuracy of alpha scaling in advanced blend lowering.

When blending with GL_COLORBURN_KHR and these colors:

   dst = <0.372549027, 0.372549027, 0.372549027, 0.372549027>
   src = <0.09375, 0.046875, 0.0, 0.375>

the normalized dst value became 0.99999994 (due to precision problems
in the floating point divide of rgb by alpha).  This caused the color
burn equation to fail the dst >= 1.0 comparison.  The blue channel would
then fall through to the dst < 1.0 && src >= 0 comparison, which was
true, since src.b == 0.  This produced a factor of 0.0 instead of 1.0.

This is an inherent numerical instability in the color burn and dodge
equations - depending on the precision of alpha scaling, the value can
be either 0.0 or 1.0.  Technically, GLSL floating point division doesn't
even guarantee that 0.372549027 / 0.372549027 = 1.0.  So arguably, the
CTS should allow either value.  I've filed a bug at Khronos for further
discussion (linked below).

In the meantime, this patch improves the precision of alpha scaling by
replacing the division with (rgb == alpha ? 1.0 : rgb / alpha).  We may
not need this long term, but for now, it fixes the following CTS tests:

ES31-CTS.blend_equation_advanced.blend_specific.GL_COLORBURN_KHR
ES31-CTS.blend_equation_advanced.blend_all.GL_COLORBURN_KHR_all_qualifier

Cc: currojerez@riseup.net
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16042
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit e6aeeace6953a7007d98082e3f44bff40a44106d)

7 years agointel/blorp: Rework our usage of ralloc when compiling shaders
Jason Ekstrand [Fri, 21 Oct 2016 19:09:38 +0000 (12:09 -0700)]
intel/blorp: Rework our usage of ralloc when compiling shaders

Previously, we were creating the shader with a NULL ralloc context and then
trusting in blorp_compile_fs to clean it up.  The only problem was that
blorp_compile_fs didn't clean up its context properly so we were leaking.
When I went to fix that, I realized that it couldn't because it has to
return the shader binary which is allocated off of that context and used by
the caller.  The solution is to make blorp_compile_fs take a ralloc
context, allocate the nir_shaders directly off that context, and clean it
all up in whatever function creates the shader and calls blorp_compile_fs.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "12.0, 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 43dadb6edd5e3e3e10b1198184a9f75556edad49)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/blorp/blorp_clear.c

7 years agointel/blorp: Rename compile_nir_shader to compile_fs
Jason Ekstrand [Fri, 21 Oct 2016 19:04:25 +0000 (12:04 -0700)]
intel/blorp: Rename compile_nir_shader to compile_fs

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
(cherry picked from commit ab92480272bc34d943d28506cc36759e141b4371)

7 years agointel/blorp: Fix a couple asserts around image copy rectangles
Jason Ekstrand [Wed, 26 Oct 2016 05:47:21 +0000 (22:47 -0700)]
intel/blorp: Fix a couple asserts around image copy rectangles

With dealing with rectangles in compressed images, you can have a width or
height that isn't a multiple of the corresponding compression block
dimension but only if that edge of your rectangle is on the edge of the
image.  When we call convert_to_single_slice, it creates an 2-D image and a
set of tile offsets into that image.  When detecting the right-edge and
bottom-edge cases, we weren't including the tile offsets so the assert
would misfire.  This caused crashes in a few UE4 demos

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reported-by: "Eero Tamminen" <eero.t.tamminen@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98431
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Tested-by: "Eero Tamminen" <eero.t.tamminen@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 4964a5149b7776ce27aaeab2be0c2ebf41ded740)

7 years agonvc0/ir: fix emission of IMAD with NEG modifiers
Samuel Pitoiset [Wed, 26 Oct 2016 21:10:53 +0000 (23:10 +0200)]
nvc0/ir: fix emission of IMAD with NEG modifiers

The emitter tried to emit sub instead of subr when src0 has
actually a NEG modifier.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 12.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 84e946380b2d5ddc62a107b667be39abf1932704)

7 years agoUpdate version to 13.0.0-rc3
Emil Velikov [Mon, 31 Oct 2016 11:53:03 +0000 (11:53 +0000)]
Update version to 13.0.0-rc3

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglsl: update default precision qualifier when it is set in the shader
Samuel Iglesias Gonsálvez [Fri, 21 Oct 2016 06:23:59 +0000 (08:23 +0200)]
glsl: update default precision qualifier when it is set in the shader

Default precision qualifier for a data type could be set several times
inside a shader. This patch allows to update the default precision
qualifier for the given type that is saved in the symbol table.

If it is not in the symbol table, just add it.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97804
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 0e742926c6895dcaf8bdbe43022c8a0bc74fdd96)

7 years agomesa/program: Add _mesa_symbol_table_replace_symbol()
Samuel Iglesias Gonsálvez [Thu, 20 Oct 2016 07:04:59 +0000 (09:04 +0200)]
mesa/program: Add _mesa_symbol_table_replace_symbol()

This function allows to modify an existing symbol.

v2:
- Remove namespace usage now that it was deleted.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit dfbdb2c0b3559c46d93f10d636a88b9541304fc7)
Nominated-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agoglsl/mesa: remove unused namespace support from the symbol table
Timothy Arceri [Fri, 21 Oct 2016 05:50:52 +0000 (16:50 +1100)]
glsl/mesa: remove unused namespace support from the symbol table

Namespace support seems to have been unused for a very long time.

Previously the hash table entry was never removed and the symbol name
wasn't freed until the symbol table was destroyed.

In theory this could reduced the number of times we need to copy a string
as duplicate names are reused. However in practice there is likely only a
limited number of symbols that are the same and this is likely to cause
other less than optimal behaviour such as the hash_table continuously
growing.

Along with dropping namespace support this change removes entries from
the hash table as they become unused.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
(cherry picked from commit 6dbe8a1b9fd750b4c1bb600a0bb43129d95e6eca)
Nominated-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agoglsl: Size TCS->TES unsized arrays to gl_MaxPatchVertices for queries.
Kenneth Graunke [Tue, 25 Oct 2016 10:38:54 +0000 (03:38 -0700)]
glsl: Size TCS->TES unsized arrays to gl_MaxPatchVertices for queries.

SSO validation and other program interface queries want to see that
unsized (non-patch) TCS output/TES input arrays are implicitly sized
to gl_MaxPatchVertices.

By the time we create the program resource lists, we've sized the arrays
to their actual size.  (We try to create TCS output arrays to match the
output patch size right away, and at this point, we should have shrunk
TES input arrays.)  One option would be to keep them sized to
gl_MaxPatchVertices, and defer shrinking them.  But that's a big change,
and I don't think it's a good idea.

Instead, this patch introduces a new ir_variable flag which indicates
the variable is implicitly to gl_MaxPatchVertices.  Then, the linker
munges the types when creating the resource list, ignoring the size
in the IR's types.  Basically, lie about it for resource queries.
It's ugly, but I think it ought to work.

We probably could use var->data.implicit_sized_array for this, but
I opted for a separate bit to try and avoid convoluting the existing
SSBO handling.  They're similar in concept, but share none of the
same code...

Fixes:
ES31-CTS.core.tessellation_shader.single.xfb_captures_data_from_correct_stage
and the ES32-CTS and ESEXT-CTS variants.

v2: Add a comment (requested by Timothy, written by me).

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 173558445dce26ce641faf260a17696221acf23d)

7 years agoglsl: Pass ctx to program interface query helper functions.
Kenneth Graunke [Tue, 25 Oct 2016 10:46:51 +0000 (03:46 -0700)]
glsl: Pass ctx to program interface query helper functions.

The next commit will use this in add_shader_variable - this just
separates out some of the mechanical changes for easier review.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 34fd2ffed8c7acfe1b19247eb3b98c3e754680b2)

7 years agoegl: set preserved behavior for surface only if config supports it
Tapani Pälli [Wed, 26 Oct 2016 10:54:51 +0000 (13:54 +0300)]
egl: set preserved behavior for surface only if config supports it

Otherwise we can end up with mismatching behavior between config and
surface when client queries surface attributes. As example, configs
for DRI3 do not support preserved behavior but here we were setting
preserved behavior for pixmap and pbuffer.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98326
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Tested-by: Mark Janes <mark.a.janes@intel.com>
(cherry picked from commit 2035930966b05a7c4dd1f6559d66b5a3b41e01a5)

7 years agoradv/ac/llvm: trim texture return values
Dave Airlie [Mon, 24 Oct 2016 20:53:03 +0000 (06:53 +1000)]
radv/ac/llvm: trim texture return values

The intrinsic engine asserts in llvm due to this,
as we put a vec4 into a vec1, and the next instruction
isn't expecting it.

So trim the vector at the end before inserting it.

Reported-by: Christoph Haag <haagch+mesadev@frickel.club>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit d548fa882b865b8e5052954b872e392312c38ab8)

7 years agonvc0/ir: fix emission of SHLADD with NEG modifiers
Samuel Pitoiset [Fri, 21 Oct 2016 15:43:00 +0000 (17:43 +0200)]
nvc0/ir: fix emission of SHLADD with NEG modifiers

This affects GF100:GK110 chipsets, but not GM107+ where the
logic is a bit different. The emitters tried to emit sub
instead of subr when src0 has a NEG modifier.

This fixes the following piglit tests glsl-fs-loop-nested
and glsl-vs-loop-nested.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 1ec7227d44dceae8de7b93f846bbd33d66007909)

7 years agoegl/dri2: swap_buffers_with_damage falls back to swap_buffers
Eric Engestrom [Mon, 24 Oct 2016 22:41:00 +0000 (23:41 +0100)]
egl/dri2: swap_buffers_with_damage falls back to swap_buffers

Since commit 0a606a400fe3 ("egl: add eglSwapBuffersWithDamageKHR"),
Android has been broken because the function eglSwapBuffersWithDamageKHR
is provided regardless of the extension being present. Also, the Android
meta-EGL always advertises the extension regardless of the underlying
EGL implementation. As there doesn't seem to be a simple way
conditionally make the EGL function ptr NULL, just implement a brain
dead version of eglSwapBuffersWithDamage{KHR,EXT}.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
CC: Rob Clark <robdclark@gmail.com>
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Rob Herring <robh@kernel.org>
[Emil Velikov: copy the original commit message from Rob's patch]
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 4fa799ae04c02b77176797c854f9d1b9b4290a2e)

7 years agost/mesa: allow multiple concurrent waiters in ClientWaitSync
Marek Olšák [Tue, 25 Oct 2016 11:10:49 +0000 (13:10 +0200)]
st/mesa: allow multiple concurrent waiters in ClientWaitSync

so->fence can be unreferenced by one thread while another thread is
somewhere in ClientWaitSync and expecting so->fence to be non-NULL.

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

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit b687f766fddb7b39479cd9ee0427984029ea3559)

7 years agost/mesa: unduplicate st_check_sync code
Marek Olšák [Tue, 25 Oct 2016 10:58:03 +0000 (12:58 +0200)]
st/mesa: unduplicate st_check_sync code

It's the same as st_client_wait_sync. Discovered by Michel.
This is needed to make the following fix simpler.

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit f240ad98bc05281ea7013d91973cb5f932ae9434)

7 years agowinsys/amdgpu: fix radeon_surf::macro_tile_index for imported textures
Marek Olšák [Mon, 24 Oct 2016 17:05:10 +0000 (19:05 +0200)]
winsys/amdgpu: fix radeon_surf::macro_tile_index for imported textures

Maybe this is why SDMA has been broken for many amdgpu users?

SDMA is the only block which is used with imported textures and relies
on this variable. DB also uses it, but it doesn't get imported textures,
so it's unaffected.

I do get SDMA failures on Tonga before this patch if R600_DEBUG=testdma
is changed to use imported textures.

Cc: 11.2 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit 6ec3b2a4b1d41b83a4721d06b42c49f55e695cbf)

7 years agogallium/radeon: make sure the address of separate CMASK is aligned properly
Marek Olšák [Mon, 24 Oct 2016 19:16:11 +0000 (21:16 +0200)]
gallium/radeon: make sure the address of separate CMASK is aligned properly

This should fix random GPU hangs on Hawaii and Fiji.

Cc: 11.2 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit dce05b342355eac9296ee7110385b16d6edb059d)

7 years agogallium/radeon: fix incorrect bpe use in si_set_optimal_micro_tile_mode
Marek Olšák [Sun, 23 Oct 2016 13:29:18 +0000 (15:29 +0200)]
gallium/radeon: fix incorrect bpe use in si_set_optimal_micro_tile_mode

Oh my god, I wonder what catastrophic issues this was causing on SI.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit 8a21f52d73936e23a314a288a36782a698c7c1b9)

7 years agovulkan/wsi/wayland: fix ARGB window support
Fredrik Höglund [Fri, 21 Oct 2016 17:07:37 +0000 (19:07 +0200)]
vulkan/wsi/wayland: fix ARGB window support

Use an ARGB format for the DRM buffer when the compositeAlpha field
in VkSwapchainCreateInfoKHR is set to
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 68db0fe0346386c8d231eb81da6340b24b7878b0)

7 years agovulkan/wsi/x11: fix ARGB window support
Fredrik Höglund [Fri, 21 Oct 2016 17:07:36 +0000 (19:07 +0200)]
vulkan/wsi/x11: fix ARGB window support

Pass the correct depth to xcb_dri3_pixmap_from_buffer_checked().
Otherwise xcb_present_pixmap() fails with a BadMatch error.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 972670c2007c1c5a51b4f0876d31476858f79351)

7 years agoradv: mark the fence as submitted and signalled in vkAcquireNextImageKHR
Fredrik Höglund [Tue, 25 Oct 2016 18:31:41 +0000 (20:31 +0200)]
radv: mark the fence as submitted and signalled in vkAcquireNextImageKHR

This stops the debug layers from complaining when fences are used to
throttle image acquisition.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 0a153f4ee472f8f17575bbfe05f1c96fb5ecf1ea)

7 years agoradv: Replace "abi_versions" with correct "api_version".
Matt Turner [Tue, 25 Oct 2016 18:49:33 +0000 (11:49 -0700)]
radv: Replace "abi_versions" with correct "api_version".

git history shows "abi_versions" was used from the outset.

Cc: <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98415
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 14aac061e92fe57d1ee61843c1ccd1b275d8ca76)

7 years agoanv: Replace "abi_versions" with correct "api_version".
Matt Turner [Tue, 25 Oct 2016 18:44:43 +0000 (11:44 -0700)]
anv: Replace "abi_versions" with correct "api_version".

git history shows "abi_versions" was used from the outset.

Cc: <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98415
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 07755237d36754cb44c32e17e32cf1bc551d2373)

7 years agonvc0: use correct bufctx when invalidating CP textures
Samuel Pitoiset [Tue, 25 Oct 2016 11:24:16 +0000 (13:24 +0200)]
nvc0: use correct bufctx when invalidating CP textures

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7b2712c367891e96384226a1fa94679a814235d0)

7 years agomesa: fix error handling in DrawBuffers
Tapani Pälli [Fri, 7 Oct 2016 07:08:21 +0000 (10:08 +0300)]
mesa: fix error handling in DrawBuffers

Patch rearranges error checking so that enum checking provided via
destmask happens before other checks. It needs to be done in this
order because other error checks do not work properly if there were
invalid enums passed.

Patch also refines one existing check and it's documentation to match
GLES 3.0 spec (also in later specs). This was somewhat mysteriously
referring to desktop GL but had a check for gles3.

Fixes following dEQP tests:

   dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.draw_buffers

no CI regressions observed.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98134
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit a1652a059edc5a5f0f4b0836ba310a22e094bd85)

7 years agoegl: add check that eglCreateContext gets a valid config
Tapani Pälli [Thu, 20 Oct 2016 11:11:16 +0000 (14:11 +0300)]
egl: add check that eglCreateContext gets a valid config

Fixes following dEQP test:

   dEQP-EGL.functional.negative_api.create_context

v2: don't break EGL_KHR_no_config_context (Eric Engestrom)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5876f3c85a61d73bb4863331bd641152a40a7b0c)

7 years agoRevert "egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT"
Tapani Pälli [Thu, 20 Oct 2016 16:57:01 +0000 (19:57 +0300)]
Revert "egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT"

This reverts commit b1d636aa007c0c354a217024b4befe15cfb5149f, previous
commit sets these values for all egl configs.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 1ef787339774bc7f1cc9c1615722f944005e070c)

7 years agoegl/dri2: set max values for pbuffer width and height
Tapani Pälli [Thu, 20 Oct 2016 07:33:33 +0000 (10:33 +0300)]
egl/dri2: set max values for pbuffer width and height

While these max values were previously fixed for pbuffer creation, this
change makes also eglGetConfigAttrib() return correct values.

Fixes following dEQP tests:

   dEQP-EGL.functional.create_surface.pbuffer.rgb888_no_depth_no_stencil
   dEQP-EGL.functional.create_surface.pbuffer.rgb888_depth_stencil
   dEQP-EGL.functional.create_surface.pbuffer.rgba8888_no_depth_no_stencil
   dEQP-EGL.functional.create_surface.pbuffer.rgba8888_depth_stencil

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98326
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit b91e1e38e87b372d409469dfe00ace76c8febd34)

7 years agoi965: Drop nir_inputs from fs_visitor.
Kenneth Graunke [Mon, 24 Oct 2016 18:25:25 +0000 (11:25 -0700)]
i965: Drop nir_inputs from fs_visitor.

It's unused.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 41034abfe63012784c9e9e36856d878928cecd99)

7 years agoi965: Don't use nir_assign_var_locations for VS/TES/GS outputs.
Kenneth Graunke [Thu, 13 Oct 2016 05:41:09 +0000 (22:41 -0700)]
i965: Don't use nir_assign_var_locations for VS/TES/GS outputs.

Fixes spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.

v2: Remove nir_outputs field from fs_visitor (caught by Tim and Iago).

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 59864e8e02057cc6fa0448a8af067a3cf53389da)

7 years agoi965: Make split_virtual_grfs() call compact_virtual_grfs().
Kenneth Graunke [Sat, 15 Oct 2016 10:18:36 +0000 (03:18 -0700)]
i965: Make split_virtual_grfs() call compact_virtual_grfs().

Post-splitting, VGRFs have a maximum size (MAX_VGRF_SIZE).  This is
required by the register allocator, as we have to create classes for
each size of VGRF.

We can (and do) allocate virtual registers larger than MAX_VGRF_SIZE,
but we must ensure that they are splittable.  split_virtual_grfs()
asserts that the post-splitting register size is in range.

Unfortunately, these trip for completely dead registers which are too
large - we only set split points for live registers.  So dead ones are
never split, and if they happened to be too large, they'd trip asserts.

To fix this, call compact_virtual_grfs() to eliminate dead registers
before splitting.

v2: Add a comment written by Iago.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 27715c73ff84349466f62df0023863acd477f262)

7 years agoi965: Drop unnecessary switch statement in nir_setup_outputs()
Kenneth Graunke [Thu, 13 Oct 2016 05:30:30 +0000 (22:30 -0700)]
i965: Drop unnecessary switch statement in nir_setup_outputs()

TCS and FS are skipped above.  CS has no output variables.
All remaining cases take the same path.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 3728ee000aecb19793dec56d45aff9d6cfce3e5b)

7 years agost/nine: Fix locking CubeTexture surfaces.
Axel Davy [Sat, 22 Oct 2016 10:00:40 +0000 (12:00 +0200)]
st/nine: Fix locking CubeTexture surfaces.

Only one face of Cubetextures was locked when in DEFAULT Pool.
Fixes:
https://github.com/iXit/Mesa-3D/issues/129

CC: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
(cherry picked from commit eed605a473554575305e1bf10c3641761a85feb9)

7 years agost/nine: Fix mistake in Volume9 UnlockBox
Axel Davy [Sat, 22 Oct 2016 09:59:11 +0000 (11:59 +0200)]
st/nine: Fix mistake in Volume9 UnlockBox

In the format fallback path,
the height was used instead of the depth.

CC: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
(cherry picked from commit fe7bb46134162c9a9a18832f1746991aa78121e8)

7 years agost/nine: Fix leak with integer and boolean constants
Axel Davy [Tue, 18 Oct 2016 21:05:02 +0000 (23:05 +0200)]
st/nine: Fix leak with integer and boolean constants

Leak introduced by:
a83dce01284f220b1bf932774730e13fca6cdd20

The patch also moves the part to
release changed.vs_const_i and changed.vs_const_b
before the if (!cb.buffer_size) check,
to avoid reuploading every draw call if
integer or boolean constants are dirty, but the shaders
use no constants.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
CC: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 25beccb379731b0e6fc728982190779da47aa6fd)

7 years agost/mesa: cleanup and fix primitive restart for indirect draws
Nicolai Hähnle [Thu, 20 Oct 2016 11:02:22 +0000 (13:02 +0200)]
st/mesa: cleanup and fix primitive restart for indirect draws

There are three intended functional changes here:

1. OpenGL 4.5 clarifies that primitive restart should only apply with index
   buffers, so make that change explicit in the indirect draw path.

2. Make PrimitiveRestartFixedIndex work with indirect draws.

3. The change where primitive_restart is only set when the restart index can
   actually have an effect (based on the size of indices) is also applied for
   indirect draws.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 3d6b5dee3a0c9c077d68e5567b95f22b627be07e)

7 years agocherry-ignore: add mapi VISILITY_CFLAGS patch
Emil Velikov [Thu, 27 Oct 2016 09:36:07 +0000 (10:36 +0100)]
cherry-ignore: add mapi VISILITY_CFLAGS patch

Cherry-picked without -x

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoUpdate version to 13.0.0-rc2
Emil Velikov [Mon, 24 Oct 2016 11:09:15 +0000 (12:09 +0100)]
Update version to 13.0.0-rc2

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agomapi: automake: set VISIBILITY_CFLAGS for shared glapi
Jonathan Gray [Sat, 22 Oct 2016 07:19:53 +0000 (18:19 +1100)]
mapi: automake: set VISIBILITY_CFLAGS for shared glapi

shared glapi was previously built without setting CFLAGS for
AM_CFLAGS and VISIBILITY_CFLAGS.

This resulted in symbols being exported that shouldn't be.

The x86 and sparc assembly versions of the dispatch table partially
mitigated this by using .hidden.  Otherwise shared_dispatch_stub_*
were being exported.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "11.2 12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoanv: automake: cleanup the generated json file during make clean
Emil Velikov [Mon, 24 Oct 2016 10:27:44 +0000 (11:27 +0100)]
anv: automake: cleanup the generated json file during make clean

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

Conflicts:
src/intel/vulkan/Makefile.am

7 years agoegl/wayland: add missing destroy_window callback
Stencel, Joanna [Mon, 24 Oct 2016 08:48:11 +0000 (09:48 +0100)]
egl/wayland: add missing destroy_window callback

The original patch by Joanna added the function pointer and callback yet
things got only partially applied - the infra was added, but the
implementation was missing.

Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Fixes: 690ead4a135 ("egl/wayland-egl: Fix for segfault in
dri2_wl_destroy_surface.")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 2e0ab61e29c4b44d349ab433c899b691a9b12f68)

7 years agoautomake: don't forget to pick wglext.h in the tarball
Emil Velikov [Thu, 20 Oct 2016 17:41:22 +0000 (18:41 +0100)]
automake: don't forget to pick wglext.h in the tarball

Earlier commit reworked the header install rules, to ensure that the
correct ones are installed only as needed.

By doing so it dropped a wildcard which was effectively including the
wglext.h header in the tarball.

Add the header to the top-level noinst_HEADERS, since the it is not
meant to be installed (autoconf is not used on Windows plaforms).

Fixes: a89faa2022f ("autoconf: Make header install distinct for various
APIs (v2)")
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Cc: Chuck Atkins <chuck.atkins@kitware.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 3511a86111866f7233a337a24c9c6442b9aa05e6)

7 years agoradv: allow cmask transitions without fast clear
Dave Airlie [Thu, 20 Oct 2016 02:05:44 +0000 (12:05 +1000)]
radv: allow cmask transitions without fast clear

This fixes
dEQP-VK.pipeline.multisample.sampled_image*

These all render to multisampled image, and then
sample from it, so we must transition it correctly,
since we have a cmask and fmask this will cause
the correct transition.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit a969548f59342330badf78ec7721a1ead7599a29)

7 years agoanv: Suffix the intel_icd file with the host CPU
Jason Ekstrand [Thu, 20 Oct 2016 22:46:21 +0000 (15:46 -0700)]
anv: Suffix the intel_icd file with the host CPU

Vulkan has a multi-arch problem... The idea behind the Vulkan loader is
that you have a little json file on your disk that tells the loader where
to find drivers.  The loader looks for these json files in standard
locations, and then goes and loads the my_driver.so's that they specify.
This allows you as a driver implementer to put their driver wherever on the
disk they want so long as the ICD points in the right place.

For a multi-arch system, however, you may have multiple libvulkan_intel.so
files installed that the loader needs to pick depending on architecture.
Since the ICD file format does not specify any architecture information,
you can't tell the loader where to find the 32-bit version vs. the 64-bit
version.  The way that packagers have been dealing with this is to place
libvulkan_intel.so in the top level lib directory and provide just a name
(and no path) to the loader.  It will then use the regular system search
paths and find the correct driver.  While this solution works fine for
distro-installed Vulkan drivers, it doesn't work so well for user-installed
drivers because they may put it in /opt or $HOME/.local or some other more
exotic location.  In this case, you can't use an ICD json file with just a
library name because it doesn't know where to find it; you also have to add
that to your library lookup path via LD_LIBRARY_PATH or similar.

This patch handles both use-cases by taking advantage of the fact that the
loader dlopen()s each of the drivers and, if one dlopen() calls fails, it
silently continues on to open other drivers.  By suffixing the icd file, we
can provide two different json files: intel_icd.x86_64.json and
intel_icd.i686.json with different paths.  Since dlopen() will only succeed
on the libvulkan_intel.so of the right arch, the loader will happily ignore
the others and load that one.  This allows us to properly handle multi-arch
while still providing a full path so user installs will work fine.

I tested this on my Fedora 25 machine with 32 and 64-bit builds of our
Vulkan driver installed and 32 and 64-bit builds of crucible.  It seems to
work just fine.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d96345de989c8f9a0328cdc3588bfe186154c8ea)

Squashed with commit:

anv: Always use the full driver path in the intel_icd.*.json

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7ea4ef8849c5cc158adbdff1187b91f591552196)

Squashed with commit:

configure: Get rid of the --disable-vulkan-icd-full-driver-path flag

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 3f05fc62f924c051bdb883482452fb37650d5768)

7 years agoRevert "Revert "mapi: export all GLES 3.2 functions in libGLESv2.so""
Francisco Jerez [Wed, 19 Oct 2016 03:44:10 +0000 (20:44 -0700)]
Revert "Revert "mapi: export all GLES 3.2 functions in libGLESv2.so""

This reverts commit 85e9bbc14d93fa7166c9ae075ee7ae29a8313e3f.  The
previous commit should help with the scons build failure caused by the
original commit.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit 811eb7f178b8b85ac299121ac09a3180b9b55da2)

7 years agoglapi: Move PrimitiveBoundingBox and BlendBarrier definitions into ES3.2 category.
Francisco Jerez [Tue, 18 Oct 2016 21:53:20 +0000 (14:53 -0700)]
glapi: Move PrimitiveBoundingBox and BlendBarrier definitions into ES3.2 category.

These two GLES 3.2 entry points were being defined in the category of
the ARB_ES3_2_compatibility and KHR_blend_equation_advanced extensions
respectively instead of in the ES3.2 category.  Defining them in the
ES3.2 category makes sure that the gl_procs.py generator emits
declarations in the glprocs.h header file for the unsuffixed GLES-only
entry points that PrimitiveBoundingBoxARB and BlendBarrierKHR
respectively alias.  This should avoid a compilation failure during
scons builds in combination with "mapi: export all GLES 3.2 functions
in libGLESv2.so".

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit 15a084a03998c5c86206137fdaf6f43b5f98485a)

7 years agonvc0: do not break 3D state by pushing MS coordinates on Fermi
Samuel Pitoiset [Wed, 19 Oct 2016 22:41:00 +0000 (00:41 +0200)]
nvc0: do not break 3D state by pushing MS coordinates on Fermi

Long story short, 3D and CP are aliased on Fermi and initializing
compute after pushing the MS sample coordinate offsets seems to
corrupt 3D state for weird reasons.

I still don't have the faintest clue what is going on, but
this seems to only affect Fermi generation. A possible fix
could be to use two different channels, one for 3D and one
for CP.

This fixes a bunch of regressions pinpointed by piglit.

Fixes: "nvc0: fix up image support for allowing multiple samples"
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 42273edf79c2500957f51690499aa3405cc689db)

7 years agoradeonsi: fix 64-bit loads from LDS
Nicolai Hähnle [Tue, 18 Oct 2016 16:40:38 +0000 (18:40 +0200)]
radeonsi: fix 64-bit loads from LDS

Fixes spec/arb_tessellation_shader/execution/dvec[23]-vs-tcs-tes, among
others.

Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 4a2dbfff05f7be271c2aa72e783e24b31906db51)

7 years agost/mesa: only set primitive_restart when the restart index is in range
Nicolai Hähnle [Wed, 19 Oct 2016 16:14:48 +0000 (18:14 +0200)]
st/mesa: only set primitive_restart when the restart index is in range

Even when enabled, primitive restart has no effect when the restart index
is larger than the representable values in the index buffer.

Fixes GL45-CTS.gtf31.GL3Tests.primitive_restart.primitive_restart_upconvert
for radeonsi VI.

v2: add an explanatory comment

Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
(cherry picked from commit bfa50f88cea2ba9f4dc4b825828d2c8f02866fc3)

7 years agost/glsl_to_tgsi: sort input and output decls by TGSI index
Nicolai Hähnle [Tue, 18 Oct 2016 15:35:45 +0000 (17:35 +0200)]
st/glsl_to_tgsi: sort input and output decls by TGSI index

Fixes a regression introduced by commit 777dcf81b.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98307
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 3d9b57e49304f9690c4a2b50afb8cdd4d253a1df)

7 years agost/glsl_to_tgsi: fix block copies of arrays of structs
Nicolai Hähnle [Sun, 16 Oct 2016 15:34:33 +0000 (17:34 +0200)]
st/glsl_to_tgsi: fix block copies of arrays of structs

Use a full writemask in this case. This is relevant e.g. when a function
has an inout argument which is an array of structs.

v2: use C-style comment (Timothy Arceri)

Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
Cc: 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a1895685f8f341e7facf3c5705bdee99860e3082)

7 years agost/glsl_to_tgsi: fix block copies of arrays of doubles
Nicolai Hähnle [Sun, 16 Oct 2016 15:33:51 +0000 (17:33 +0200)]
st/glsl_to_tgsi: fix block copies of arrays of doubles

Set the type of the left-hand side to the same as the right-hand side,
so that when the base type is double, the writemask of the MOV instruction
is properly fixed up.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ca592af880b71feb8ebbf79f704380d0deb47b33)

7 years agonv50/ir: process texture offset sources as regular sources
Ilia Mirkin [Wed, 19 Oct 2016 05:20:03 +0000 (01:20 -0400)]
nv50/ir: process texture offset sources as regular sources

With ARB_gpu_shader5, texture offsets can be any source, including TEMPs
and IN's. Make sure to process them as regular sources so that we pick
up masks, etc.

This should fix some CTS tests that feed offsets directly to
textureGatherOffset, and we were not picking up the input use, thus not
advertising it in the shader header.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit cd45d758ff87305ceecca899fe7325779bb6755b)

7 years agonv50,nvc0: avoid reading out of bounds when getting bogus so info
Ilia Mirkin [Wed, 19 Oct 2016 04:05:26 +0000 (00:05 -0400)]
nv50,nvc0: avoid reading out of bounds when getting bogus so info

The state tracker tries to attach the info to the wrong shader. This is
easy enough to protect against.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 313fba5ee1de9416930e45da8aff63a24763940b)

7 years agowsi/wayland: fix error path
Eric Engestrom [Wed, 19 Oct 2016 23:09:11 +0000 (00:09 +0100)]
wsi/wayland: fix error path

Fixes: 1720bbd353d87412754f ("anv/wsi: split image alloc/free out to separate fns.")
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8bf7717e1f84d180f42fb665772878d3b6d27459)

7 years agoradv: use emit_icmp for samples_identical
Dave Airlie [Thu, 20 Oct 2016 00:42:22 +0000 (01:42 +0100)]
radv: use emit_icmp for samples_identical

On a debug llvm build we'd assert on the next compare
when the return from samples_identical was i1 instead
of i32.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit d842546ad1ebdb4825f0cbca2d68a56139d88e2a)

7 years agoUpdate version to 13.0.0-rc1
Emil Velikov [Wed, 19 Oct 2016 17:40:40 +0000 (18:40 +0100)]
Update version to 13.0.0-rc1

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoRevert Use absolute path in intel_icd.json and related patches.
Emil Velikov [Wed, 19 Oct 2016 16:36:17 +0000 (17:36 +0100)]
Revert Use absolute path in intel_icd.json and related patches.

This commit effectively reverts the following commits:

This reverts commit 0b6837a643bbbf3c57c5cc5030279fb4389b23b7.
This reverts commit 05f36435ef117e48f457b44877d04dd6249b3bb7.
This reverts commit a2ae67aa47df6dd41802462105dac7ce5ab676a2.

While the feature introduced is convinient for development it is not as
useful for distributions. Furthermore it even breaks things as one
wishes to have both 32 and 64 bit package installed on the same system.

Keep the functionality in development branch(es) and drop it from
distribution packages to avoid confusion and misuse.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: rename release notes to 13.0.0
Emil Velikov [Wed, 19 Oct 2016 16:33:38 +0000 (17:33 +0100)]
docs: rename release notes to 13.0.0

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoradeonsi: remove cb0_is_integer handling
Marek Olšák [Fri, 16 Sep 2016 20:42:54 +0000 (22:42 +0200)]
radeonsi: remove cb0_is_integer handling

st/mesa does this for us.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agost/mesa: disable alpha-test, alpha-to-coverage, alpha-to-one for integer FBs
Marek Olšák [Fri, 16 Sep 2016 20:39:15 +0000 (22:39 +0200)]
st/mesa: disable alpha-test, alpha-to-coverage, alpha-to-one for integer FBs

v2: rebased

Reviewed-by: Brian Paul <brianp@vmware.com>
7 years agomesa: remove gl_shader_compiler_options::EmitNoNoise
Marek Olšák [Sun, 16 Oct 2016 22:54:35 +0000 (00:54 +0200)]
mesa: remove gl_shader_compiler_options::EmitNoNoise

it's always true

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoglsl_to_tgsi: remove code for fixing up TGSI labels
Marek Olšák [Sun, 16 Oct 2016 22:47:49 +0000 (00:47 +0200)]
glsl_to_tgsi: remove code for fixing up TGSI labels

I don't know what this was supposed to do, but all TGSI labels were
always 0.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoglsl_to_tgsi: remove subroutine support
Marek Olšák [Sun, 16 Oct 2016 22:38:41 +0000 (00:38 +0200)]
glsl_to_tgsi: remove subroutine support

Never used. The GLSL compiler doesn't even look at EmitNoFunctions.

v2: add back "return" support in "main"

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa_to_tgsi: remove remnants of flow control and subroutine support
Marek Olšák [Sun, 16 Oct 2016 22:11:21 +0000 (00:11 +0200)]
mesa_to_tgsi: remove remnants of flow control and subroutine support

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa_to_tgsi: drop support for instructions that can't occur here
Marek Olšák [Sun, 16 Oct 2016 22:07:01 +0000 (00:07 +0200)]
mesa_to_tgsi: drop support for instructions that can't occur here

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoglsl_to_tgsi: allocate glsl_to_tgsi_instruction::tex_offsets on demand
Marek Olšák [Sun, 16 Oct 2016 20:08:03 +0000 (22:08 +0200)]
glsl_to_tgsi: allocate glsl_to_tgsi_instruction::tex_offsets on demand

sizeof(glsl_to_tgsi_instruction): 384 -> 264

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoglsl_to_tgsi: merge buffer and sampler fields in glsl_to_tgsi_instruction
Marek Olšák [Sun, 16 Oct 2016 20:04:02 +0000 (22:04 +0200)]
glsl_to_tgsi: merge buffer and sampler fields in glsl_to_tgsi_instruction

sizeof(glsl_to_tgsi_instruction): 416 -> 384

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>