OSDN Git Service
Dave Airlie [Thu, 15 Sep 2016 03:58:33 +0000 (13:58 +1000)]
Revert "st/vdpau: use linear layout for output surfaces"
This reverts commit
d180de35320eafa3df3d76f0e82b332656530126.
This is a radeon specific hack that causes problems on nouveau
when combined with the SHARED flag later. If radeonsi needs a fix
for this, please fix it in the driver.
[chk]
Using linear surfaces for this makes sense because tilling isn't
beneficial and the surfaces can potentially be shared with other GPUs
using the VDPAU OpenGL interop.
[airlied]
I think we need a flag that isn't SHARED/LINEAR that is more
SHARED_OTHER_GPU.
[mareko]
Does radeonsi need PIPE_BIND_VIDEO_DECODE_OUTPUT that it would translate
into linear ?
[mareko]
My only concern is decoding performance. If the decoder works in 64x1
blocks, tiling will hurt. That's the theory. I don't know how the
decoder works.
Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> (I+A)
(cherry picked from commit
d0d5f7600c2e8ab8d0c153787185f7a534753edd)
Marek Olšák [Thu, 3 Nov 2016 18:16:51 +0000 (19:16 +0100)]
radeonsi: fix an assertion failure in si_decompress_sampler_color_textures
This fixes a crash in Deus Ex: Mankind Divided. Release builds were
unaffected, so it's not too serious.
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
00baaa4752ab7e721218a2840cf0952d8c7c6eca)
Marek Olšák [Wed, 2 Nov 2016 17:59:22 +0000 (18:59 +0100)]
glx: make interop ABI visible again
This was broken when the GLAPI use was removed from mesa_glinterop.h.
Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
64c2593a5c33a98d880d141793360b44d07d1366)
Marek Olšák [Wed, 2 Nov 2016 17:59:22 +0000 (18:59 +0100)]
egl: make interop ABI visible again
This was broken when the GLAPI use was removed from mesa_glinterop.h.
Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
ee39d4456e7551b257343551d59e7c6a3388fdc0)
Marek Olšák [Wed, 2 Nov 2016 17:56:39 +0000 (18:56 +0100)]
egl: use util/macros.h
I need the definition of PUBLIC.
Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
bf51b45313c7cc5ca792401f0cc29574aa9122cf)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
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)
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)
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)
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)
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)
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)
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)
Mauro Rossi [Tue, 1 Nov 2016 13:22:54 +0000 (14:22 +0100)]
HACK: i915: enable image external sampling
This hack is the alternative way of enabling GL_OES_EGL_image_external
as opposed to defining mesa environment variable in init.rc
As a reference this hack works on i915 also because of commit
"android: a workaround for GL_INVALID_OPERATION (0x502) error"
which allows for external image being mapped despited not being dma-buf
Mauro Rossi [Tue, 1 Nov 2016 00:03:52 +0000 (01:03 +0100)]
i915: add mock implementation of GL_OES_EGL_image_external (v2)
This is similar to commit
7420c9dab4aaf87e6b840410226c296c4668a48f
but for the i915 driver, as neeeded in android-x86.
In version v2, as per i965 implementation,
the extension GL_OES_EGL_image_external is not enabled by default.
The by-the-book way to enable the extension is mesa environment variable
MESA_EXTENSION_OVERRIDE="+GL_OES_EGL_image_external" to be set in init.rc
Mauro Rossi [Sun, 9 Oct 2016 09:40:42 +0000 (11:40 +0200)]
android: intel/genxml: generate aubinator xml headers (v2)
New generated headers were introduced by commit
63a366a
"intel: aubinator: generate a standalone binary"
The new aubinator generated files are listed in Makefile.sources variable,
rules are added to Android build system for future use.
New macro xml-header-gen is basically a copy&paste of automake rules,
but xxd is invoked directly, as Android build systems stops and shows the error
in case of xxd missing.
Existing macro header-gen is renamed to pack-header-gen as a refinement.
Xu, Randy [Tue, 16 Aug 2016 03:34:23 +0000 (11:34 +0800)]
Add the RGBA8888 and RGBX8888 back to Intel screen config
Otherwise the OGLES native app may cause primary screen format mismatch
Signed-off-by: Xu, Randy <randy.xu@intel.com>
Mauro Rossi [Tue, 1 Nov 2016 00:04:27 +0000 (01:04 +0100)]
st/dri: remove trailing whitespace
Mauro Rossi [Tue, 1 Nov 2016 13:06:04 +0000 (14:06 +0100)]
android: st/mesa: fix building error in libmesa_st_mesa
Fixes building error due to dependency on nir generated headers
Mauro Rossi [Sun, 16 Oct 2016 11:41:24 +0000 (13:41 +0200)]
egl/android: update swrast loader and extensions storage
Changes are applied to swrast loader and extensions storage
in the same way as per commit
6a8fe32
"egl/android: don't populate dri2_dpy->dri2_loader_extension"
and commit
f871946
"egl/dri2: rework dri2_egl_display::extensions storage"
For simplification, primitives in droid_swrast_loader_extensions are listed
in the same order as per commit
2dbe14a
"egl/wayland: don't populate dri2_dpy->swrast_loader_extension"
Chih-Wei Huang [Fri, 2 Sep 2016 06:55:57 +0000 (14:55 +0800)]
android: disable asm temporarily
It causes 32-bit libglapi.so has text relocations issue. The linker
of Android 7.0 refuses to load it so all 32-bit apps can't run.
Disable it until we come out a proper solution.
Chih-Wei Huang [Tue, 23 Aug 2016 06:36:29 +0000 (14:36 +0800)]
android: fix building errors on Android 7.0
Chih-Wei Huang [Tue, 23 Aug 2016 06:35:21 +0000 (14:35 +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.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Ilia Mirkin [Wed, 22 Jun 2016 02:59:50 +0000 (22:59 -0400)]
nv30 locking fixes
Ilia Mirkin [Tue, 7 Jun 2016 00:30:48 +0000 (20:30 -0400)]
nouveau: more locking - make sure that fence work is always done with
the push mutex acquired
Ilia Mirkin [Sat, 4 Jun 2016 23:26:26 +0000 (19:26 -0400)]
WIP nouveau: add locking
Paulo Sergio Travaglia [Mon, 20 Jun 2016 08:27:24 +0000 (05:27 -0300)]
android: avoid using fallback function
When a target different than EGL_NATIVE_BUFFER_ANDROID
is used with eglCreateImageKHR on sw rendering,
a fallback funcion is used.
As this returns NULL, EGL_NO_IMAGE_KHR is returned,
which crashes many apps
Using a function implemented for EGL/DRI2 in this cases
allows eglCreateImageKHR usage for other targets
(like EGL_GL_TEXTURE_2D_KHR)
Chih-Wei Huang [Mon, 20 Jun 2016 09:34:10 +0000 (17:34 +0800)]
android: more fixes for llvmpipe software rendering
* add dri2_create_from_texture to driswImageExtension
* add dri2FenceExtension to drisw_screen_extensions
WuZhen [Thu, 2 Jun 2016 08:21:51 +0000 (16:21 +0800)]
android: add a fast path for swrast
Observed increased antutu score on 1024x768, should see more
with larger resolution
NO_REF_TASK
Tested: local run
Change-Id: Ia05e0551a65ae7678561b167c1f5e75509ea4e84
Chih-Wei Huang [Sat, 28 May 2016 04:04:54 +0000 (12:04 +0800)]
virgl: fix null pointer exceptions
WuZhen [Sat, 18 Jun 2016 13:57:23 +0000 (21:57 +0800)]
android: support swrast
System boots up with gles_mesa/softpipe/llvmpipe.
NO_REF_TASK
Tested: local run
Change-Id: I629ed0ca9fad12e32270eb8e8bfa9f7681b68474
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
WuZhen [Wed, 24 Feb 2016 13:36:10 +0000 (21:36 +0800)]
android: enable x86 asm and sse4 for x86 and x86_64
Support multilib compilation use runtime feature selection.
NO_REF_TASK
Tested: local run
Change-Id: Iee7961effdecde09cfbdaf09455bfb0912699ae3
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
WuZhen [Wed, 20 Jan 2016 07:52:29 +0000 (15:52 +0800)]
android: print debug info to logcat
Redirect logs printed to stderr to logcat.
NO_REF_TASK
Tested: local run
Change-Id: I58e3966a608af361b86c54b4c95a92561b711968
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
WuZhen [Sat, 16 Jan 2016 14:53:29 +0000 (22:53 +0800)]
st/dri: fix double free of dri_drawable
In the callchain destroy_surface->destroyDrawable->dri_put_drawable->
dri_put_drawable->DestroyBuffer
By the semantic of it, dri_destroy_buffer should not free drawable struct,
all vendor specific and legacy swrast version of the function do not.
wonder why no body else ran into this.
NO_REF_TASK
Tested: local run
Change-Id: Ibe82d82d2e34b162e64bf0b8805f8a4553d362d5
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Chih-Wei Huang [Fri, 18 Mar 2016 09:29:13 +0000 (17:29 +0800)]
android: change some PIPE to SVGA3D format mappings
This is a try-and-error patch which fixes the Android-x86 black screen
issue of VMware on Linux host. Tested OK on VMware Workstation 12 Player.
But the red and blue colors are exchanged.
Note it doesn't affect VMware on Windows host.
Chih-Wei Huang [Thu, 10 Mar 2016 08:47:50 +0000 (16:47 +0800)]
gallium/radeon: define some prototypes of LLVMInitialize functions
Chih-Wei Huang [Tue, 16 Feb 2016 21:05:51 +0000 (05:05 +0800)]
android: clean gallium_dri_intermediates
Since BOARD_GPU_DRIVERS is updated, clean up gallium_dri to ensure
it is rebuilt correctly.
Chih-Wei Huang [Tue, 16 Feb 2016 18:07:42 +0000 (02:07 +0800)]
android: re-generate git_sha1.h if git HEAD updated
The git_sha1.h has to depend on the git HEAD
otherwise it will never be updated.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Rob Herring [Wed, 10 Feb 2016 18:09:14 +0000 (12:09 -0600)]
Android: enable texture-float
This is required by freedreno at least for GLES3 support.
See docs/patents.txt for information about turning this on for s/w
renderers.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Mon, 25 Jan 2016 17:54:01 +0000 (11:54 -0600)]
egl/android: fix missing gralloc_drm_get_gem_handle dependency
gralloc_drm_get_gem_handle has been removed from AOSP drm_gralloc.
Remove the dependency on it and just access the struct
gralloc_drm_handle_t directly. Maybe there's a better way than accessing
the gralloc private data.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Fri, 8 Jan 2016 15:25:37 +0000 (09:25 -0600)]
HACK: glsl: disable error on non-constant array indexing
DRM HWC has a shader program that hits this error. Work-around it by
ignoring the error.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Wed, 10 Feb 2016 22:56:56 +0000 (16:56 -0600)]
gallium: introduce load_pipe_screen()
Introduce load_pipe_screen() public entry point for other code which
dlopen()'s gralloc_dri.so for purposes of loading a pipe_screen. This way
drm_gralloc can avoid static linking of each gallium winsys and driver,
and avoid duplicated logic to figure out which pipe driver to load.
This is based on Rob Clark's work. I moved it into pipe_loader which seems
to be a better spot.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Thu, 17 Dec 2015 14:18:33 +0000 (08:18 -0600)]
Android: Export gallium_dri include files
This doesn't work yet because the exported include files can't be picked
up by the android build system unless the library has a 'lib' prefix.
Signed-off-by: Rob Herring <robh@kernel.org>
Mauro Rossi [Fri, 15 Jan 2016 21:14:01 +0000 (22:14 +0100)]
android: always define __STDC_CONSTANT_MACROS
Android porting of commit
647d8e95d17b32100995d806b9b2a26a35541042
"configure.ac: always define __STDC_CONSTANT_MACROS"
Mauro Rossi [Tue, 22 Dec 2015 12:26:51 +0000 (13:26 +0100)]
android: add support for LLVM 3.7.0 for marshmallow
The changes add support for LLVM 3.7.0 for marshmallow,
while keeping support for LLVM 3.5.0 with lollipop.
MESA_LLVM_VERSION_PATCH=0 is compatible with radeonsi build in lollipop-x86,
since mesa 11.0 and newer do not check anymore for LLVM 3.5.2
This changes, combined with specific R600 patches for external/llvm,
enable building gallium radeonsi driver in marshmallow-x86.
The patch is applicable to 11.2.0devel, 11.1 and 11.0 branches.
Mauro Rossi [Sat, 22 Aug 2015 09:07:34 +0000 (11:07 +0200)]
android: build with c++11 on android lollipop
lollipop-x86 needs -std=c++11 (build with libcxx),
while kitkat-x86 cannot use -std=c++11
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Chih-Wei Huang [Fri, 23 Jan 2015 19:53:48 +0000 (03:53 +0800)]
android: a workaround for GL_INVALID_OPERATION (0x502) error
Inspired by the nice work of Paulo Sergio (pstglia):
"Bypass a check for external target enabled only for images
created with EGL_EXT_image_dma_buf_import - this makes
Android graphical components receive a GL_INVALID_OPERATION (0x502)."
Sean V Kelley [Mon, 10 Sep 2012 18:52:35 +0000 (11:52 -0700)]
i915: Support Android RGBX8888 format for EGL generated images
Enabled MESA_FORMAT_R8G8B8X8_UNORM (formerly MESA_FORMAT_RGBX8888_REV)
for RGBX with i915. Android software requires RGBX8888 format to be
supported for software rendering.
Previously had done so for i965 but have requests for i915 support.
Change-Id: I87c3a8e3f206d75d58b63182ed94851749740762
Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
Mauro Rossi [Mon, 4 Jan 2016 16:40:44 +0000 (17:40 +0100)]
i915: enable GL_APPLE_texture_2D_limited_npot in mesa 11.1
This is the port of Chia-I Wu commit 79ac0e to mesa 11.1 branch,
where the extensions went to a dedicated file extensions_table.h
Original commit message:
"Enable GL_ARB_texture_non_power_of_two for GLESv1 to advertise
GL_APPLE_texture_2D_limited_npo. The former is actually a superset of
the latter, but we really want to enable NPOT support in some way."
Mauro Rossi [Mon, 4 Jan 2016 16:37:39 +0000 (17:37 +0100)]
android: advertise GL_ARB_texture_non_power_of_two in mesa 11.1
This is the port of Chia-I Wu commit 62873a to mesa 11.1 branch,
where the extensions went to a dedicated file extensions_table.h
Original commit message:
"It maps to DisplayHardware::NPOT_EXTENSION in SurfaceFlinger. Does not
seem to matter when EGL_ANDROID_image_native_buffer is available."
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>
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>
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>
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)
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)
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)
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)
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)
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)
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)
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
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)
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)
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)
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>
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)
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>
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>
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)