Commit Graph

95932 Commits

Author SHA1 Message Date
Bas Nieuwenhuizen 25ea385279 radv: Add VK_KHR_bind_memory2 support.
Nothing too exciting, just adding the possibility for a pNext pointer,
and batch binding. Our binding is pretty much trivial.

It also adds VK_IMAGE_CREATE_ALIAS_BIT_KHR, but since we store no
state in radv_image, I don't think we have to do anything there.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-09-20 21:48:35 +02:00
Roland Scheidegger 886626960b llvmpipe, gallivm: implement lod queries (LODQ opcode)
This uses all the existing code to calculate lod values for mip linear
filtering. Though we'll have to disable the simplifications (if we know some
parts of the lod calculation won't actually matter for filtering purposes due
to mip clamps etc.). For better or worse, we'll also disable lod calculation
hacks (mostly should make a difference for cube maps) always - the issue with
per-pixel lod being difficult is mostly because we then have different mipmaps
needed for the actual texel fetch, which isn't a problem with lodq.
We still use approximation for the log2 - for that reason I believe the float
part of the lod is only accurate to about 4-5 bits (and one bit less with 1d
textures actually) which is hopefully good enough (though d3d10 technically
requires 6 bits - could use quadratic interpolation instead of linear to get
8 bits or so).
Since lodq requires unclamped lod, we also have to move some sampler key
calculations to texture sampling code - even if we know we're going to access
mipmap 0 we still have to calculate lod and apply lod_bias for lodq.

Passes piglit ARB_texture_query_lod tests (after having fixed the test).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-20 21:18:54 +02:00
Louis-Francis Ratté-Boulianne 4b41361894 i965: Fix duplication of DRI images
Some DRI image properties weren't properly duplicated in the
new image. Some properties are still missing, but I'm not
certain if there was a good reason to let them out in the first
place.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-09-20 07:07:05 -07:00
Nicolai Hähnle 704ddbcdf6 radeonsi: set MIP_POINT_PRECLAMP to 0
This fixes a bug with nearest ("point") mip selection when the fractional
part of max_lod is in (0.5,1). In this case, the spec mandates that
we still select the mip level ceil(max_lod) in the clamping case. However,
MIP_POINT_PRECLAMP will clamp before the mip selection, which is wrong.

Supposedly this setting was originally copied from the closed Vulkan
driver, but as far as I can tell, closed Vulkan was actually changed back
recently :)

Fixes dEQP-GLES3.functional.texture.mipmap.2d.max_lod.{nearest,linear}_nearest

Fixes: f7420ef5b4 ("radeonsi: enable some sampler fields to match the closed driver")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 15:43:13 +02:00
Nicolai Hähnle 87f7c7bd65 radeonsi: fix array textures layer coordinate
Like for cube map (array) gather, we need to round to nearest on <= VI.

Fixes tests in dEQP-GLES3.functional.shaders.texture_functions.texture.*

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-20 15:42:58 +02:00
Nicolai Hähnle 15cae12804 glsl/linker: fix output variable overlap check
Prevent an overflow caused by too many output variables. To limit the
scope of the issue, write to the assigned array only for the non-ES
fragment shader path, which is the only place where it's needed.

Since the function will bail with an error when output variables with
overlapping components are found, (max # of FS outputs) * 4 is an upper
limit to the space we need.

Found by address sanitizer.

Fixes dEQP-GLES3.functional.attribute_location.bind_aliasing.*

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-09-20 15:35:57 +02:00
Christian Gmeiner 62a8ca22cd etnaviv: move sw query defines to etnaviv_query_sw.h
Also add new define ETNA_SW_QUERY_BASE.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-09-20 14:25:41 +02:00
Christian Gmeiner a3d79946e5 etnaviv: move sw get_driver_query_info(..)
This change makes etna_get_driver_query_info(..) more generic
and puts the knowledge of supported queries directly besides
the implementation.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-09-20 14:25:13 +02:00
Józef Kucia 65a09f98ad anv: Fix descriptors copying
Trivial.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-09-20 13:14:49 +02:00
Samuel Pitoiset dcf46e995d radv: do not update the number of scissors in vkCmdSetScissor()
The Vulkan spec (1.0.61) says:

   "The number of scissors used by a pipeline is still specified
    by the scissorCount member of VkPipelinescissorStateCreateInfo."

So, the number of scissors is defined at pipeline creation
time and shouldn't be updated when they are set dynamically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 10:27:32 +02:00
Samuel Pitoiset 60878dd00c radv: do not update the number of viewports in vkCmdSetViewport()
The Vulkan spec (1.0.61) says:

   "The number of viewports used by a pipeline is still specified
   by the viewportCount member of VkPipelineViewportStateCreateInfo."

So, the number of viewports is defined at pipeline creation
time and shouldn't be updated when they are set dynamically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 10:27:32 +02:00
Samuel Pitoiset 505c2fea3a radv: add some assertions in vkCmdSetScissor()
To check some valid usage requirements.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 10:27:32 +02:00
Samuel Pitoiset 2ad1f20cd0 radv: add some assertions in vkCmdSetViewport()
To check some valid usage requirements.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 10:27:32 +02:00
Samuel Pitoiset e5b6cdbf45 radv: inline radv_flush_compute_state() into radv_dispatch()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 10:27:32 +02:00
Samuel Pitoiset 8c1ccb5394 radv: add radv_dispatch() helper
To share common dispatch compute code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 10:27:32 +02:00
Samuel Pitoiset 98f7e658a4 radv: add radv_emit_dispatch_packets() helper
To share common dispatch compute code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-20 10:27:32 +02:00
Dave Airlie c4ac522511 ac/surface: handle S8 on gfx9
If we don't have a depth piece, we don't get a correct
swizzle mode and we hit an assert in addrlib.

In case of no depth get the preferrred swizzle mode for
stencil alone.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-09-20 15:32:05 +10:00
Krzysztof Sobiecki 39d539e321 egl: fix build fallouts from 1d0be5b3fe
Fixes: 1d0be5b3fe ("wayland-drm: constify the callbacks struct")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-19 21:27:01 +01:00
Jason Ekstrand 9ec51aa0fe anv: Advertise support VK_FORMAT_R8_SRGB
Unreal Engine 4 seems to really like this format for some reason.  We
don't technically have the hardware format but we do have L8_SRGB.  It's
easy enough to fake with that and a swizzle.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-09-19 12:06:30 -07:00
Jason Ekstrand a8ba57d356 intel/blorp: Support clearing L8_UNORM_SRGB surfaces
Vulkan needs to be able to clear any texture you can create.  We want to
add support for VK_FORMAT_R8_SRGB and we need to use L8_UNORM_SRGB to do
that so we need to be able to clear it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-09-19 12:06:26 -07:00
Emil Velikov 4df0d50857 egl: use switch statements over if/else chain
Shorter, explicit and consistent with the rest of the co debase.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-19 19:08:41 +01:00
Emil Velikov caf7fb627d egl: remove unneeded braces around since line if statements
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-19 19:08:34 +01:00
Emil Velikov b94344f1c7 egl: simplify _eglDebugReport* API
Instead of having three, almost identical but not quite,
_eglDebugReport* functions, simply fold them into one.

While doing so drop the unnecessary arguments 'command' and
'objectLabel'. Former is identical to funcName, while the latter is
already stored (yet unused) in _EGLThreadInfo::CurrentObjectLabel.

Cc: Kyle Brenneman <kbrenneman@nvidia.com>
Cc: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)
2017-09-19 19:07:16 +01:00
Emil Velikov 5af2673479 egl: use _eglError's 'msg' as an actual message in EGL_KHR_debug
Seemingly, the original intent behind _eglError's 'msg' was aimed to
provide a function name.

At some point, people started using it the way EGL_KHR_debug's
callback() message is meant to be used. Aka providing meaningful
information to the developer/user.

Swap the funcName/msg argument order in the _eglDebugReport() call.
The 'funcName' variable is implicitly set, props to the
_eglSetFuncName() call at the start of each public entrypoint.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-19 19:07:12 +01:00
Emil Velikov 191402c0af automake: adjust wayland-drm comment
Vulkan does not depend on the library or any of the objects
created in the process.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Emil Velikov 2785090a2a configure.ac: split the wayland client/server confusion
At the moment wayland-clients, such as the Vulkan drivers were
over-linking against libwayland-server.so.

That went unnoticed, since both client and server code uses the
wl*interface symbols, which are present in both libwayland-client.so and
libwayland-server.so.

I've looked at correcting that, although that's orthogonal to this fix.

Note: wayland-egl does _not_ depend on wayland-client, although it does
need wayland-egl.h. There's no distinct package that provides it (I have
a WIP on the topic) so current solution will do for now.

v2: Rebase with the "...inline wayland_drm_buffer_get" patch removed.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Emil Velikov 1d0be5b3fe wayland-drm: constify the callbacks struct
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Emil Velikov 0007195d81 wayland-drm: add wl_display/wl_resource forward declarations
... making the header self-contained.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Emil Velikov fa6b9be22c configure.ac: define WL_HIDE_DEPRECATED at global scale
Due to GCC feature described in previous commit, the expected
deprecation warnings may be missing.

Set the WL_HIDE_DEPRECATED macro which will omit the deprecated
functionality, resulting in more distinct build issues.

That is safe since the symbols guarded within the macro is static.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Micah Fedke be52bd17eb wayland-drm: avoid deprecated use of struct wl_resource
Wayland v1.2 with commit 1488c96a5db ("Add accessor functions for
wl_resource and deprecate wl_client_add_resource") paves the way towards
making wl_resource opaque.

Namely, new helpers were introduced and the struct was annotated as
deprecated.

Since wayland headers are normally installed in /usr/include, which is
in -isystem, GCC did not generate warnings as documented in the manual.
  "Warnings from system headers are normally suppressed..."

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Emil Velikov: add commit message]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Emil Velikov 15a6ebdfbb wayland-drm: remove unused wayland_drm_buffer_get_{format,buffer}
Unused anywhere throughout the codebase. We could start using it,
although that contradicts to an evil plan* of mine.

* Only wayland servers will make use of the static library, providing
actual distinction between server vs client.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Emil Velikov 2f0342330c wayland-drm: remove hardcoded enum wl_drm_format
The exact same copy is generated in the client/server protocol header.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-19 19:02:34 +01:00
Eric Anholt 58cd67655c broadcom/genxml: Set up enums for VC5 blending, depth, stencil, and prims.
These will be used in tables in the Vulkan driver, and give us pretty CLIF
dump output.
2017-09-19 10:40:55 -07:00
Eric Anholt af3c521528 broadcom/genxml: Add support for enum-typed fields.
This basically comes from the intel genxml script.  This will help improve
gdb and CLIF output once we convert fields over.
2017-09-19 10:40:55 -07:00
Juan A. Suarez Romero d3a773611c intel: automake: add isl_genX_priv.h in the source list
Fixes:

 CC       isl/isl_format_layout.lo
In file included from
../../../../src/intel/isl/isl_storage_image.c:24:0:
../../../../src/intel/isl/isl_priv.h:170:29: fatal error:
isl_genX_priv.h: No such file or directory
compilation terminated.
Makefile:2936: recipe for target 'isl/isl_storage_image.lo' failed
make[5]: *** [isl/isl_storage_image.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from ../../../../src/intel/isl/isl.c:36:0:
../../../../src/intel/isl/isl_priv.h:170:29: fatal error:
isl_genX_priv.h: No such file or directory
compilation terminated.
make[5]: *** [isl/isl.lo] Error 1
Makefile:2936: recipe for target 'isl/isl.lo' failed
make[4]: *** [all] Error 2

when running `make distcheck`.

v2: Fix commit title (Emil)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-19 19:23:46 +02:00
Juan A. Suarez Romero 88bf3b7715 vulkan: automake: add vk_android_native_buffer.h in the source list
Fixes:

  CCLD     libvulkan_wsi.la
ar: `u' modifier ignored since `D' is the default (see `U')
../../../../src/vulkan/util/vk_enum_to_str.c:26:45: fatal error:
vulkan/vk_android_native_buffer.h: No such file or directory
compilation terminated.
make[5]: *** [util/vk_enum_to_str.lo] Error 1

When running `make distcheck`.

v2: Fix commit title (Emil)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-19 19:23:45 +02:00
Ian Romanick 9ac8fece63 glsl: Unify ir_constant::const_elements and ::components
There was no reason to treat array types and record types differently.
Unifying them saves a bunch of code and saves a few bytes in every
ir_constant.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
2017-09-19 12:02:43 -05:00
Ian Romanick 0e88153e99 glsl: Rename ir_constant::array_elements to ::const_elements
The next patch will unify ::array_elements and ::components, so the
name ::array_elements wouldn't be appropriate.  A lot of things use
the names array_elements and components, so grepping for either is
pretty useless.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
2017-09-19 12:02:43 -05:00
Ian Romanick e5145e28ea glsl: Silence unused parameter warnings
glsl/ast_type.cpp: In function ‘void merge_bindless_qualifier(YYLTYPE*, _mesa_glsl_parse_state*, const ast_type_qualifier&, const ast_type_qualifier&)’:
glsl/ast_type.cpp:189:35: warning: unused parameter ‘loc’ [-Wunused-parameter]
 merge_bindless_qualifier(YYLTYPE *loc,
                                   ^~~
glsl/ast_type.cpp:191:52: warning: unused parameter ‘qualifier’ [-Wunused-parameter]
                          const ast_type_qualifier &qualifier,
                                                    ^~~~~~~~~
glsl/ast_type.cpp:192:52: warning: unused parameter ‘new_qualifier’ [-Wunused-parameter]
                          const ast_type_qualifier &new_qualifier)
                                                    ^~~~~~~~~~~~~

glsl/ir_constant_expression.cpp: In member function ‘virtual ir_constant* ir_rvalue::constant_expression_value(void*, hash_table*)’:
glsl/ir_constant_expression.cpp:512:44: warning: unused parameter ‘mem_ctx’ [-Wunused-parameter]
 ir_rvalue::constant_expression_value(void *mem_ctx, struct hash_table *)
                                            ^~~~~~~
glsl/ir_constant_expression.cpp: In member function ‘virtual ir_constant* ir_texture::constant_expression_value(void*, hash_table*)’:
glsl/ir_constant_expression.cpp:705:45: warning: unused parameter ‘mem_ctx’ [-Wunused-parameter]
 ir_texture::constant_expression_value(void *mem_ctx, struct hash_table *)
                                             ^~~~~~~
glsl/ir_constant_expression.cpp: In member function ‘virtual ir_constant* ir_assignment::constant_expression_value(void*, hash_table*)’:
glsl/ir_constant_expression.cpp:851:48: warning: unused parameter ‘mem_ctx’ [-Wunused-parameter]
 ir_assignment::constant_expression_value(void *mem_ctx, struct hash_table *)
                                                ^~~~~~~
glsl/ir_constant_expression.cpp: In member function ‘virtual ir_constant* ir_constant::constant_expression_value(void*, hash_table*)’:
glsl/ir_constant_expression.cpp:859:46: warning: unused parameter ‘mem_ctx’ [-Wunused-parameter]
 ir_constant::constant_expression_value(void *mem_ctx, struct hash_table *)
                                              ^~~~~~~

glsl/linker.cpp: In function ‘void link_xfb_stride_layout_qualifiers(gl_context*, gl_shader_program*, gl_linked_shader*, gl_shader**, unsigned int)’:
glsl/linker.cpp:1655:60: warning: unused parameter ‘linked_shader’ [-Wunused-parameter]
                                   struct gl_linked_shader *linked_shader,
                                                            ^~~~~~~~~~~~~
glsl/linker.cpp: In function ‘void link_bindless_layout_qualifiers(gl_shader_program*, gl_program*, gl_shader**, unsigned int)’:
glsl/linker.cpp:1693:52: warning: unused parameter ‘gl_prog’ [-Wunused-parameter]
                                 struct gl_program *gl_prog,
                                                    ^~~~~~~

glsl/lower_distance.cpp: In member function ‘virtual void {anonymous}::lower_distance_visitor_counter::handle_rvalue(ir_rvalue**)’:
glsl/lower_distance.cpp:652:59: warning: unused parameter ‘rv’ [-Wunused-parameter]
 lower_distance_visitor_counter::handle_rvalue(ir_rvalue **rv)
                                                           ^~

glsl/opt_array_splitting.cpp: In member function ‘virtual ir_visitor_status {anonymous}::ir_array_reference_visitor::visit_leave(ir_assignment*)’:
glsl/opt_array_splitting.cpp:198:56: warning: unused parameter ‘ir’ [-Wunused-parameter]
 ir_array_reference_visitor::visit_leave(ir_assignment *ir)
                                                        ^~

glsl/glsl_parser_extras.cpp: In function ‘void assign_subroutine_indexes(gl_shader*, _mesa_glsl_parse_state*)’:
glsl/glsl_parser_extras.cpp:1869:45: warning: unused parameter ‘sh’ [-Wunused-parameter]
 assign_subroutine_indexes(struct gl_shader *sh,
                                             ^~

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
2017-09-19 12:02:43 -05:00
Juan A. Suarez Romero c408c92d28 glsl: buffer variables can be readonly and writeonly
In GLSL ES 3.10 session 4.9 [Memory Access Qualifiers], it has the
following description:

"A variable could be qualified as both readonly and writeonly,
disallowing both read and write, but still be passed to
imageSize() to have the size queried.".

This is for image variable, but not for buffer variables.

According to https://github.com/KhronosGroup/OpenGL-API/issues/7 Khronos
intent is to allow both readonly and writeonly in buffer variables, and
as such it will update the GLSL specification.

This commit address this issue, and fixes:

KHR-GL{43,44,45}.shader_storage_buffer_object.basic-readonly-writeonly
KHR-GLES31.core.shader_storage_buffer_object.basic-readonly-writeonly

v2: set correctly fields[i] memory flags (Samuel Pitoiset).

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-09-19 18:45:56 +02:00
Jason Ekstrand 1746671a76 Revert "i965: Reset miptree aux state on update_image_buffer"
This reverts commit e97f4b7480.
2017-09-19 06:55:32 -07:00
Zhongmin Wu 7343d27136 egl/android: Use per surface out fence
Use the plumbing introduced with previous patch to interact with the
Android framework.

Namely: currently we use an invalid fd of -1 for our calls to
ANativeWindow::{queue,cancel}Buffer.

At the same time applications (like flatland) may rely on it being
a valid one. Thus as they attempt to query the timestamp of the fence,
they get unexpected results/behaviour.

In the case of flatland - the benchmark hang inside getSignalTime().

Make use of the out fence and pass the correct fd to Android.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101655
Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: split from larger patch]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-19 12:12:29 +01:00
Zhongmin Wu e013ce8d0d egl: Allow creation of per surface out fence
Add plumbing to allow creation of per display surface out fence.

This can be used to implement explicit sync. One user of which is
Android - which will be addressed with next commit.

Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: reorder so there's no intermetent regressions, split]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-19 12:12:25 +01:00
Yogesh Marathe 0b3fc8f305 egl: Wrap dri3 surface primitive around dri2 egl surface
Originally dri3 egl surface was wrapped around _EGLSurface.

With next commit we'll add additional attributes, which will be checked
from generic code. Thus in order to access that we need to use
dri2_egl_surface.

The name of the latter is a misnomer - it should really be dri or
dri_common...

Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
[Emil Velikov: commit message, squash the patches appropriately, add
relevant _eglInitSurface hunk to prevent build breakage]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-19 12:12:25 +01:00
Alexandru-Liviu Prodea c1b0137048 Scons: Add LLVM 5.0 support
1 new required library - LLVMBinaryFormat

Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org=/show_bug.cgi?id=3D102318
Signed-off-by: Alexandru-Liviu Prodea <liviuprodea@yahoo.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-19 12:08:13 +01:00
Eric Engestrom 31237b054e radv: replace conditional compilation with MAYBE_UNUSED
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-09-19 09:46:18 +01:00
Eric Engestrom fc7345415f glsl: replace conditional compilation with MAYBE_UNUSED
Suggested-by: Nicolai Hähnle <nhaehnle@gmail.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-09-19 09:46:08 +01:00
Eric Anholt 3752ad28f2 broadcom/vc4: Fix use-after-free when deleting a program.
By leaving the compiled shader in the context's stage state, the next
compile of a new FS would look in the old compiled FS for figuring out
whether to set various dirty flags for the VS compile.  Clear out the
pointer when deleting the program, and make sure that we always mark the
state as dirty if the previous program had been lost.  Fixes valgrind
warnings on glsl-max-varyings.

Fixes: 2350569a78 ("vc4: Avoid VS shader recompiles by keeping a set of FS inputs seen so far.")
2017-09-18 20:17:25 -07:00
Kenneth Graunke b339d63f0d i965: Fix batch map failure check in INTEL_DEBUG=bat handling.
I originally wrote the code to call the maps 'batch' and 'state',
until I remembered that 'batch' is the intel_batchbuffer struct pointer.
The NULL check was still using the wrong variable.

Caught by Coverity.

CID: 1418109
2017-09-18 18:51:26 -07:00
Eric Anholt 4db9ad9893 broadcom/vc4: Fix crashes since the gallium blitter reworks.
Even if we're not clearing color, the blitter has started dereferencing
the color value.
2017-09-18 16:16:00 -07:00