summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-06-29swr: Remove need to allocate vertex buffer scratch space all in one gocros-mesa-17.1.1-r14-vanillachadv/cros-mesa-17.1.1-r14-vanillaBruce Cherniak1-23/+2
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-29swr: conditionally validate vertex buffer stateBruce Cherniak1-4/+5
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 330d0607ed6, "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-29swr: set dynamic vertex sizeTim Rowley1-2/+4
Reduces the memory footprint of the frontend processing by packing vertices. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-06-29scons: wait on subprocess' completionEric Engestrom1-1/+1
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: 3fd425aed764fb771f2f "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-29build systems: uniformize git_sha1.h generationEric Engestrom4-38/+22
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-29radeonsi: set COMPUTE_DISPATCH_INITIATOR.ORDER_MODE = 1Marek Olšák1-1/+4
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-29radeonsi: use the DISPATCH packets to force COMPUTE_START_X/Y/Z = 0Marek Olšák1-7/+6
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-29Android: use symlinks for driver loadingRob Herring14-18/+21
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-29Android: i965: remove libdrm_intel dependencyRob Herring1-6/+6
Commit 7dd20bc3ee8f ("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-29android: anv: drop libdrm_intel dependencyMauro Rossi1-1/+2
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-29etnaviv: fix memory leak when BO allocation failsLucas Stach1-1/+5
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-29etnaviv: fill in layer_stride for imported resourcesLucas Stach1-0/+2
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-29anv: use devinfo for number of thread/euLionel Landwerlin1-2/+3
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-29intel: tools: add intel_aub.h as part of aubinatorJuan A. Suarez Romero1-1/+2
Include intel_aub.h in the Makefile.tools.am Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-06-29intel: automake: include Makefile.drm.amJuan A. Suarez Romero1-0/+1
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-06-28mesa: Require mipmap completeness for glCopyImageSubData() at times.Kenneth Graunke1-2/+57
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-29mesa: tidy up white space in pixelstore.cTimothy Arceri1-6/+6
2017-06-28mesa: Refactor error checking for GL_TEXTURE_BASE_LEVEL vs texture targetsIan Romanick1-7/+19
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-28i965: Drop index buffer re-alignment code.Kenneth Graunke1-30/+8
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-29mesa: add KHR_no_error support for glBlendFunc*()Timothy Arceri3-2/+32
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: create some glBlendFunc*() helper functionsTimothy Arceri1-50/+81
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add KHR_no_error support for glBindFragDataLocation*()Timothy Arceri4-2/+40
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add bind_frag_data_location() helperTimothy Arceri1-11/+19
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add KHR_no_error support for glGetUniformLocation()Timothy Arceri3-1/+14
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: inline _mesa_finish()Timothy Arceri2-19/+8
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add KHR_no_error support for glDisableVertexA*A*()Timothy Arceri4-2/+25
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: move error handling into disable_vertex_array_attrib() callersTimothy Arceri1-10/+14
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-29mesa: add KHR_no_error support for glEnableVertexA*A*()Timothy Arceri4-2/+27
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add KHR_no_error support for glLogicOp()Timothy Arceri3-1/+13
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add logic_op() helperTimothy Arceri1-9/+16
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add KHR_no_error support for glPixelStore*()Timothy Arceri3-2/+23
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: add pixel_storei() helperTimothy Arceri1-46/+57
Will be used to add KHR_no_error support. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-29mesa: remove redundant error checkTimothy Arceri1-4/+0
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-28mesa: GL_TEXTURE_BORDER_COLOR exists in OpenGL 1.0, so don't depend on ↵Ian Romanick1-1/+9
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-28genxml: Silence about a billion unused parameter warningsIan Romanick1-2/+7
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-28mesa: Fix Android buildChad Versace1-1/+1
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-28i965: Fix anisotropic filtering for mag filterEero Tamminen1-1/+1
Commit f8d69beed49c64f883bb8ffb28d4960306baf575 moving sampler handling to genxml messed up change done by commit 6a7c5257cac23cd9767aa4bc8fdab68925b11157. 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-28etnaviv: fix shader miscompilation with more than 16 labelsLucas Stach1-28/+32
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-28ac/nir: remove last remnants of v16i8Dave Airlie3-9/+3
llvm doesn't need this workaround anymore. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-28ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffersAlex Smith1-29/+34
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-28ac/nir: assert printfs will fitJames Legg1-5/+12
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-28ac/nir: Make intrinsic_name buffer long enoughJames Legg1-1/+1
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-28i965/dri: Support R8G8B8A8 and R8G8B8X8 configsChad Versace2-3/+43
The Android framework requires support for EGLConfigs with HAL_PIXEL_FORMAT_RGBX_8888 and HAL_PIXEL_FORMAT_RGBA_8888. Even though all RGBX formats are disabled on gen9 by brw_surface_formats.c, the new configs work correctly on Broxton thanks to _mesa_format_fallback_rgbx_to_rgba(). On GLX, this creates no new configs, and therefore breaks no existing apps. See in-patch comments for explanation. I tested with glxinfo and glxgears on Skylake. On Wayland, this also creates no new configs, and therfore breaks no existing apps. (I tested with mesa-demos' eglinfo and es2gears_wayland on Skylake). The reason differs from GLX, though. In dri2_wl_add_configs_for_visual(), the format table contains only B8G8R8X8, B8G8R8A8, and B5G6B5; and dri2_add_config() correctly matches EGLConfig to format by inspecting channel masks. On Android, in Chrome OS, I tested this on a Broxton device. I confirmed that the Google Play Store's EGLSurface used HAL_PIXEL_FORMAT_RGBA_8888, and that an Asteroid game's EGLSurface used HAL_PIXEL_FORMAT_RGBX_8888. Both apps worked well. (Disclaimer: I didn't test this patch on Android with Mesa master. I backported this patch series to an older Android branch). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-28mesa: do not use format string as literal stringJuan A. Suarez Romero1-2/+2
This fixes a couple of errors when building in Android: external/mesa3d/src/mesa/main/shaderapi.c:293:49: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] _mesa_error(ctx, GL_INVALID_OPERATION, caller); ^~~~~~ external/mesa3d/src/mesa/main/shaderapi.c:293:49: note: treat the string as an argument to avoid this _mesa_error(ctx, GL_INVALID_OPERATION, caller); ^ Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2017-06-28scons: add code to generate format_fallback.c fileBrian Paul1-0/+7
Fixes: a1983223d8839a0c9 "mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]" Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-28mesa: add KHR_no_error support for glClear()Samuel Pitoiset3-1/+11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add clear() helperSamuel Pitoiset1-23/+31
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glBindAttribLocation()Samuel Pitoiset3-1/+15
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add bind_attrib_location() helperSamuel Pitoiset1-19/+29
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for gl*ReadBuffer()Samuel Pitoiset4-2/+40
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>