Commit Graph

93734 Commits

Author SHA1 Message Date
Juan A. Suarez Romero 5355107034 automake: include git_sha1_gen.sh into EXTRA_DIST
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-30 16:15:54 +02:00
Nicolai Hähnle 7fd08177a6 Update Khronos-supplied headers
Taken from commit 676834dd529d620ee25090e738d2607dfde003d8
of https://github.com/KhronosGroup/OpenGL-Registry.git

v2:
- keep the BUILDING_MESA bits (Matt)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-30 15:29:50 +02:00
Johnson Lin 165e704719 i965/i915: Add UYVY as the supported format
Trigger the correct sampler options for it. Similar with YUYV

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2017-06-30 10:16:26 +01:00
Johnson Lin 8ff4be44b7 nir: Add a lowering pass for UYVY textures
Similar with support for YUYV but with byte order difference in sampler

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2017-06-30 10:16:26 +01:00
Johnson Lin 194205cd00 dri: Add UYVY as available format
UYVY is diffrent with YUYV in byte order.
YUYV is already declared in dri_interface.h,
this CL add the difinitions for UYVY.
Drivers can add UYVY as supported format

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2017-06-30 10:16:26 +01:00
Rob Herring 6335652899 gbm: add XBGR8888 support for dumb buffers
Add GBM_FORMAT_XBGR8888 format support which is needed for Android.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-30 08:44:19 +01:00
Rob Herring cceb2d5c41 gallium: os_process fixes for Android
The function getprogname() is available on Android, since it reuses
various BSD solutions C runtime.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-30 08:44:19 +01:00
Tomeu Vizoso 2ecdedb8d4 etnaviv: Add unreachable statement to etna_amode to fix compilation warnings
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-30 08:44:16 +01:00
Bruce Cherniak 277621bbb7 swr: Remove need to allocate vertex buffer scratch space all in one go
Deferred deletion (via "fence_work") has obsoleted the need to allocate
all client vertex buffer scratch space in a single chunk.  Scratch
allocations are now valid until the referenced fence is complete.

Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
2017-06-29 13:23:33 -05:00
Bruce Cherniak 2b27dcd075 swr: conditionally validate vertex buffer state
Vertex buffer state doesn't need to be validated on every call,
only on dirty _NEW_VERTEX or indexed draws.

Unconditional validation was introduced as part of patch 330d0607ed,
"remove pipe_index_buffer and set_index_buffer", with the expectation
we'd optimize later.

Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
2017-06-29 13:23:33 -05:00
Tim Rowley 867e111769 swr: set dynamic vertex size
Reduces the memory footprint of the frontend processing by packing
vertices.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-06-29 13:23:33 -05:00
Eric Engestrom 9f6110ad32 scons: wait on subprocess' completion
Windows doesn't allow you to move a file that's opened, and Popen()
doesn't wait on its subprocess' completion before returning, which leads
to broken Windows build.

Fixes: 3fd425aed7 "build systems: uniformize git_sha1.h generation"
Suggested-by: Scott D Phillips <scott.d.phillips@intel.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-29 17:38:26 +01:00
Eric Engestrom 3fd425aed7 build systems: uniformize git_sha1.h generation
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-29 16:24:58 +01:00
Marek Olšák ccfac28835 radeonsi: set COMPUTE_DISPATCH_INITIATOR.ORDER_MODE = 1
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-29 16:19:35 +02:00
Marek Olšák af52e61935 radeonsi: use the DISPATCH packets to force COMPUTE_START_X/Y/Z = 0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-29 16:19:35 +02:00
Rob Herring a3d98ca62f Android: use symlinks for driver loading
Instead of having special driver loading logic for Android, create
symlinks to gallium_dri.so so we can use the standard loading logic.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-06-29 09:09:49 -05:00
Rob Herring 4aaa21d12e Android: i965: remove libdrm_intel dependency
Commit 7dd20bc3ee ("anv/i965: drop libdrm_intel dependency completely")
removed the libdrm_intel dependency for automake, but Android builds still
depended on it. Now the build requires a newer version of i915_drm.h and
fails on Android builds:

src/mesa/drivers/dri/i965/brw_performance_query.c:616:9: error: use of undeclared identifier 'I915_OA_FORMAT_A32u40_A4u32_B8_C8'
   case I915_OA_FORMAT_A32u40_A4u32_B8_C8:
        ^
src/mesa/drivers/dri/i965/brw_performance_query.c:1887:18: error: use of undeclared identifier 'I915_PARAM_SLICE_MASK'
      gp.param = I915_PARAM_SLICE_MASK;
                 ^
src/mesa/drivers/dri/i965/brw_performance_query.c:1893:18: error: use of undeclared identifier 'I915_PARAM_SUBSLICE_MASK'
      gp.param = I915_PARAM_SUBSLICE_MASK;
                 ^

Remove the libdrm_intel dependency for Android builds and add the necessary
include paths for the local copy of i915_drm.h.

Fixes: 7dd20bc ("anv/i965: drop libdrm_intel dependency completely")
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-29 12:33:27 +01:00
Mauro Rossi b693fd8464 android: anv: drop libdrm_intel dependency
In addition to Rob Herring "Android: i965: remove libdrm_intel dependency",
we can drop libdrm_intel dependency in anv for Android.

Please check if libdrm has to stay as shared dependency and drop this comment line.

Fixes: 7dd20bc ("anv/i965: drop libdrm_intel dependency completely")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-29 12:31:00 +01:00
Lucas Stach 4fb9f97047 etnaviv: fix memory leak when BO allocation fails
The resource struct is already allocated at this point and should be
freed properly.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-06-29 11:34:50 +02:00
Lucas Stach b2a87ce34f etnaviv: fill in layer_stride for imported resources
The layer stride information is used in various parts of the driver,
so it needs to be present regardless if the driver allocated the
buffer itself or merely imported it from an external source.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-06-29 11:34:24 +02:00
Lionel Landwerlin d8bf2861ad anv: use devinfo for number of thread/eu
It turns out Gen9LP has fewer threads per EU (6 vs 7).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
2017-06-29 10:07:52 +01:00
Juan A. Suarez Romero 93b8dc4b94 intel: tools: add intel_aub.h as part of aubinator
Include intel_aub.h in the Makefile.tools.am

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-06-29 10:03:40 +02:00
Juan A. Suarez Romero be5fe2153b intel: automake: include Makefile.drm.am
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-06-29 10:03:40 +02:00
Kenneth Graunke 40f842ab57 mesa: Require mipmap completeness for glCopyImageSubData() at times.
This patch makes glCopyImageSubData require mipmap completeness when the
texture object's built-in sampler object has a mipmapping MinFilter.
This is apparently the de facto behavior and mandated by Android's CTS.

One exception is that we ignore format based completeness rules
(specifically integer formats with linear filtering), as this is
also the de facto behavior that until recently was mandated by the
OpenGL 4.5 CTS.

This was discussed with both the OpenGL and OpenGL ES working groups,
and while everyone agrees this behavior is unfortunate and complicated,
it is what it is at this point.  There was little appetite for relaxing
restrictions given that all conformant Android drivers followed the
mipmapping rule, and all conformant GL 4.5 implementations ignored the
integer/linear rule.

Fixes (on i965):
dEQP-GLES31.functional.debug.negative_coverage.*.buffer.copy_image_sub_data

Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-06-28 22:29:41 -07:00
Timothy Arceri 6120fbc444 mesa: tidy up white space in pixelstore.c 2017-06-29 14:14:03 +10:00
Ian Romanick e0acd62536 mesa: Refactor error checking for GL_TEXTURE_BASE_LEVEL vs texture targets
Add a big spec quotation justifying the error generated, which has
changed over the GL versions.

v2: Compact the spec quote based on a Khronos bug and discussion with Jason.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2017-06-28 16:38:05 -07:00
Kenneth Graunke d2c4f714d1 i965: Drop index buffer re-alignment code.
This shouldn't ever happen - GL requires it to be aligned:

   "Clients must align data elements consistent with the requirements
    of the client platform, with an additional base-level requirement
    that an offset within a buffer to a datum comprising N basic
    machine units be a multiple of N."

Mesa should reject unaligned index buffers for us - we shouldn't have
to handle them in the driver.

Note that Gallium already makes this assumption.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2017-06-28 16:21:44 -07:00
Timothy Arceri c1b1cad586 mesa: add KHR_no_error support for glBlendFunc*()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri f21a764092 mesa: create some glBlendFunc*() helper functions
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri 87bc32166a mesa: add KHR_no_error support for glBindFragDataLocation*()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri aed0fc5efd mesa: add bind_frag_data_location() helper
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri cb209dae99 mesa: add KHR_no_error support for glGetUniformLocation()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri cc88eb97e0 mesa: inline _mesa_finish()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri d8143a4bde mesa: add KHR_no_error support for glDisableVertexA*A*()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri 73e0140acc mesa: move error handling into disable_vertex_array_attrib() callers
This will let us just call disable_vertex_array_attrib() for
KHR_no_error support.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri d731b18933 mesa: add KHR_no_error support for glEnableVertexA*A*()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:11 +10:00
Timothy Arceri 8e77fceedb mesa: add KHR_no_error support for glLogicOp()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:10 +10:00
Timothy Arceri ccbcb3ca17 mesa: add logic_op() helper
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:10 +10:00
Timothy Arceri 774580c8b9 mesa: add KHR_no_error support for glPixelStore*()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:10 +10:00
Timothy Arceri 9853ca6037 mesa: add pixel_storei() helper
Will be used to add KHR_no_error support.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:10 +10:00
Timothy Arceri 7d8937d23c mesa: remove redundant error check
We do the same check in the shared code in the set_tex_parameterf()
call.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29 08:54:10 +10:00
Ian Romanick 2e3f40272e mesa: GL_TEXTURE_BORDER_COLOR exists in OpenGL 1.0, so don't depend on GL_ARB_texture_border_clamp
On NV20 (and probably also on earlier NV GPUs that lack
GL_ARB_texture_border_clamp) fixes the following piglit tests:

    gl-1.0-beginend-coverage gltexparameter[if]{v,}
    push-pop-texture-state
    texwrap 1d
    texwrap 1d proj
    texwrap 2d proj
    texwrap formats

All told, 49 more tests pass on NV20 (10de:0201).

No changes on Intel CI run or RV250 (1002:4c66).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-06-28 14:51:05 -07:00
Ian Romanick 36bd4a5f21 genxml: Silence about a billion unused parameter warnings
v2: Use textwrap.dedent to make the source line a lot shorter.
Shortening (?) the line was requested by Jason.

v3: Simplify the texwrap.dedent usage.  Suggested by Dylan.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-06-28 14:50:14 -07:00
Chad Versace a56f0203c3 mesa: Fix Android build
The format_fallback.py script wants two arguments: 'csv-file' and
'out-file'.

Fixes: 20c99eaece "mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]"
Reported-by: Rob Herring <robh@kernel.org>
2017-06-28 14:41:45 -07:00
Eero Tamminen c35fd58688 i965: Fix anisotropic filtering for mag filter
Commit f8d69beed4 moving sampler
handling to genxml messed up change done by commit
6a7c5257ca.

This broke rendering in SynMark CSDof and TexFilterAniso tests.

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

Thanks to Kevin, who spotted the actual typo!
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-28 13:33:28 -07:00
Lucas Stach ec43605189 etnaviv: fix shader miscompilation with more than 16 labels
The labels array may change its virtual address on a reallocation, so
it is invalid to cache pointers into the array. Rather than using the
pointer directly, remember the array index.

Fixes miscompilation of shaders in glmark2 ideas, leading to GPU hangs.

Fixes: c9e8b49b (etnaviv: gallium driver for Vivante GPUs)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-06-28 22:04:30 +02:00
Dave Airlie ff422500cc ac/nir: remove last remnants of v16i8
llvm doesn't need this workaround anymore.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-28 20:22:30 +01:00
Alex Smith 909184ac9c ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffers
The buffer intrinsics should be used instead of the image ones.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-28 21:05:04 +02:00
James Legg 69a17da037 ac/nir: assert printfs will fit
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-28 21:05:04 +02:00
James Legg 6fc41bb4d5 ac/nir: Make intrinsic_name buffer long enough
When using cmpswap on an image, it was being trunctated to
lvm.amdgcn.image.atomic.cmpswa, with the coords type missing entirely.

v2: Add stable CC

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-28 21:05:04 +02:00