summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-06-30docs: add release notes for 17.1.4mesa-17.1.4Andres Gomez1-0/+219
Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-06-30Update version to 17.1.4Andres Gomez1-1/+1
Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-06-28cherry-ignore: bin/get-fixes-pick-list.sh: better identify multiple "fixes:" ↵Andres Gomez1-1/+4
tags fixes: Genuine false positive. Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-06-28cherry-ignore: 17.1.4 rejected commitsAndres Gomez1-1/+8
stable: rejected commits. Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-06-28Fix khrplatform.h not installed if EGL is disabled.Eric Le Bihan2-3/+3
KHR/khrplatform.h is required by the EGL, GLES and VG headers, but is only installed if Mesa3d is compiled with EGL support. This patch installs this header file unconditionally. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77240 Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 2154defcd698c7f9862bd235925cac75c0d5a520)
2017-06-28Android: major/minor/makedev live in <sys/sysmacros.h>Rob Herring1-0/+1
sysmacros.h was getting implicitly included in types.h until recently in AOSP master. Define MAJOR_IN_SYSMACROS to explicitly include sysmacros.h. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Rob Herring <robh@kernel.org> (cherry picked from commit e8f82bfd520e7f7185d178cdbecbb9b1bf2b2c1c)
2017-06-28radeonsi: include ac_binary.h for struct ac_shader_binaryEmil Velikov1-2/+2
The header embeds the struct so it needs the header inclusion instead of the dummy forward declaration. Cc: Nicolai Hähnle <nicolai.haehnle@amd.com> Cc: Marek Olšák <marek.olsak@amd.com> Cc: Tom Stellard <tstellar@redhat.com> Fixes: 32206c5e560 ("radeonsi: Add radeon_shader_binary member to struct si_shader") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 1f958c1337290b4062a77f79fc101bb9f4bdf515)
2017-06-28nv50/ir: fix combineLd/St to update existing records as necessaryIlia Mirkin1-0/+8
Previously the logic would decide that the record is kept, which translates into keep = false in the caller, which meant that these passes did not run. While it's right that keep = false which means that a new record does not need to be added, we do still have to perform the usual list maintenance. It's easiest to do this pre-merge rather than post. The lowering that clip/cull distance passes produce triggers this bug in TCS (since reading outputs is done differently in other stages), but it should be possible to achieve it with the right sequence of regular reads/writes. Fixes: KHR-GL45.cull_distance.functional Fixes: generated_tests/spec/arb_tessellation_shader/execution/tes-input/tes-input-gl_ClipDistance.shader_test Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 4a79f2be337cef920fc8ea5048fabc106bac492e)
2017-06-28nv50/ir: fetch indirect sources BEFORE the op that uses themIlia Mirkin1-19/+32
All the BuildUtil helpers just insert the operation into the current BB. So we have to take care that any fetchSrc() operations happen before the operation whose setIndirect() it goes into. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 8c02ee4a8b0bea5dda3ced341dce81f340457c95)
2017-06-28i965: update MaxTextureRectSize to match PRMs and comply with OpenGL 4.1+Iago Toral Quiroga1-1/+1
We were exposing 4096, but we can do up to 8192 in Gen4-6 and up to 16384 in gen7+. OpenGL 4.1+ requires at least 16384. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit b72b7c541dd81890e04652373f24840f580123ed)
2017-06-28amd/common: fix off-by-one in sid_tables.pyNicolai Hähnle1-1/+1
The very last entry in the sid_strings_offsets table ended up missing, leading to out-of-bounds reads and potential crashes. Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 67e49a7f6570b8691d9405cb65f263b87817fe71)
2017-06-28egl/display: make platform detection thread-safeEric Engestrom1-7/+12
Imagine there are 2 threads that both call _eglGetNativePlatform() simultaneously: - thread 1 completes the first "if (native_platform == _EGL_INVALID_PLATFORM)" check and is preempted to do something else - thread 2 executes the whole function, does "native_platform = _EGL_NATIVE_PLATFORM" and just before returning it's preempted - thread 1 wakes up and calls _eglGetNativePlatformFromEnv() which returns _EGL_INVALID_PLATFORM because no env vars are set, updates native_platform and then gets preempted again - thread 2 wakes up and returns wrong _EGL_INVALID_PLATFORM Solve this by doing the detection in a local var and only overwriting the global one at the end, if no other thread has updated it since. This means the platform detected in the thread might not be the platform returned by the function, but this is a different issue that will need to be discussed when this becomes possible. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101252 Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 311c09165881111c4a596ca7e7b4bce89b059e0f)
2017-06-28egl/display: only detect the platform onceEric Engestrom1-14/+17
My refactor missed the fact that `native_platform` is static. Add the proper guard around the detection code, as it might not be necessary, and only print the debug message when a detection was actually performed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101252 Fixes: 7adb9b094894a512c019 ("egl/display: remove unnecessary code and make it easier to read") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 4ca9ae587c083b6f03feb65b4ce84929109d5d59)
2017-06-28gallium/util: Break recursion in pipe_resource_referenceMichel Dänzer1-2/+8
It calling itself recursively prevented it from being inlined, resulting in a copy being generated in every compilation unit referencing it. This bloated the text segment of the Gallium mega-driver *_dri.so by ~4%, and might also have impacted performance. Fixes: ecd6fce2611e ("mesa/st: support lowering multi-planar YUV") v2: * Add comment above pipe_resource_next_reference [Samuel Pitoiset] v3: * Use loop to unreference the full chain of resources referenced via the next members [Timothy Arceri] v4: * Stop chasing ->next chain at the first sub-resource which isn't destroyed [Nicolai Hähnle] Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 176e761513f9f9502248c0c8dad133d2d9f28d2d)
2017-06-28i915: Fix wpos_tex vs. -1 comparisonVille Syrjälä3-8/+7
wpos_tex used to be a GLuint so assigning -1 to it and later comparing with -1 worked correctly, but commit c349031c27b7 ("i915: Fix texcoord vs. varying collision in fragment programs") changed wpos_tex to uint8_t and hence broke the comparison. To fix this define a more explicit invalid value for wpos_tex. gcc warns us: i915_fragprog.c:1255:57: warning: comparison is always true due to limited range of data type [-Wtype-limits] if (inputsRead & VARYING_BITS_TEX_ANY || p->wpos_tex != -1) { ^ And clang says: i915_fragprog.c:1255:57: warning: comparison of constant -1 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare] if (inputsRead & VARYING_BITS_TEX_ANY || p->wpos_tex != -1) { ~~~~~~~~~~~ ^ ~~ Cc: Chih-Wei Huang <cwhuang@android-x86.org> Cc: Eric Anholt <eric@anholt.net> Cc: Ian Romanick <ian.d.romanick@intel.com> Cc: mesa-stable@lists.freedesktop.org Fixes: c349031c27b7 ("i915: Fix texcoord vs. varying collision in fragment programs") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit c1eedb43f32f6a3733f26e7918eb028f68bd60a4) Squashed with commit: i915: Always emit W on gen3 Unlike the older gen2 hardware, gen3 performs perspective correct interpolation even for the primary/secondary colors. To do that it naturally needs us to emit W for the vertices. Currently we emit W only when at least one texture coordinate set gets emitted. This means the interpolation of color will change depending on whether texcoords/varyings are used or not. That's probably not what anyone would expect, so let's just always emit W to get consistent behaviour. Trying to avoid emitting W seems like more hassle than it's worth, especially as bspec seems to suggest that the hardware will perform the perspective division anyway. This used to be broken until it was accidentally fixed it in commit c349031c27b7 ("i915: Fix texcoord vs. varying collision in fragment programs") by introducing a bug that made the driver always emit W. After fixing that bug in commit c1eedb43f32f ("i915: Fix wpos_tex vs. -1 comparison") we went back to the old behaviour and caused an apparent regression. Fixes: c1eedb43f32f ("i915: Fix wpos_tex vs. -1 comparison") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101451 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 0eef03a6f2f7fa7968accaa2ab2c3d7431e984b8)
2017-06-28etnaviv: only flush resource to self if no scanout buffer existsLucas Stach1-4/+5
Currently a resource flush may trigger a self resolve, even if a scanout buffer exists, but is up to date. If a scanout buffer exists we only ever want to flush the resource to the scanout buffer. This fixes a performance regression. Fixes: dda956340ce9 (etnaviv: resolve tile status when flushing resource) Cc: mesa-stable@lists.freedesktop.org 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> (cherry picked from commit 28550c787595f04453d2a39f46f570a891368fcf)
2017-06-28egl_dri2: swrastGetDrawableInfo: set *x, *y [v2]Ben Crocker1-1/+3
In swrastGetDrawableInfo, set *x and *y, not just *w and *h; this fixes a crash later in drisw_update_tex_buffer when the (formerly) uninitialized x and y values are used to construct an address in a call to llvmpipe_transfer_map. Fixes crash in Piglit test "spec@egl 1.4@eglcreatepbuffersurface and then glclear" (<piglit dir>/bin/egl-create-pbuffer-surface -auto) that occurred intermittently, e.g. when the uninitialized x and y in drisw_update_tex_buffer just happened to contain absurd non-zero values. v2: Initialize in case if function succeeds or fails, just like *w/*h. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Ben Crocker <bcrocker@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 162c42f8edde4a2c13b1eb5c0f9f0828441ed4c8)
2017-06-28nv50/ir: Properly fold constants in SPLIT operationPierre Moreau1-3/+4
Fixes: b7d9677d ("nv50/ir: constant fold OP_SPLIT") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (cherry picked from commit afb8f2d4a346041adf54d45729963a55a625ac1f)
2017-06-28i965: Clamp clear colors to the representable rangeJason Ekstrand1-0/+40
Starting with Sky Lake, we can clear to arbitrary floats or integers. Unfortunately, the hardware isn't particularly smart when it comes sampling from that clear color. If the clear color is out of range for the surface format, it will happily return whatever we put in the surface state packet unmodified. In order to avoid returning bogus values for surfaces with a limited range, we need to do some clamping. Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Chad Versace <chadversary@chromium.org> (cherry picked from commit f1fa4be871e13c68b50685aaf64dc095b49ed0b5) [Andres Gomez: override_color still a gl_color_union] Signed-off-by: Andres Gomez <agomez@igalia.com> Conflicts: src/mesa/drivers/dri/i965/brw_meta_util.c
2017-06-28gallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()Brian Paul1-1/+15
A common user error is to call glDrawRangeElements() with the 'end' argument being one too large. If we use the vbuf module to translate some vertex attributes this error can cause us to read past the end of the mapped hardware buffer, resulting in a crash. This patch adjusts the vertex count to avoid that issue. Typically, the vertex_count gets decremented by one. This fixes crashes with the Unigine Tropics and Sanctuary demos with older VMware hardware versions. The issue isn't hit with VGPU10 because we don't hit this fallback. No piglit changes. CC: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit d8148ed10ae5faea6f88f2f964797f4b0590c083) [Andres Gomez: pipe_vertex_buffer hadn't shrunk yet] Signed-off-by: Andres Gomez <agomez@igalia.com> Conflicts: src/gallium/auxiliary/util/u_vbuf.c
2017-06-28i965: Fix broxton 2x6 l3 configAnuj Phogat1-0/+16
The new table added in this patch matches with the table in gfxspecs. We were programming the wrong values earlier. V2: Update the comment. Cc: "17.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> (cherry picked from commit 8521559e086a3d56f549962ab8e9f45a6a5989d8) [Andres Gomez: gen 10 was not still there on 17.1] Signed-off-by: Andres Gomez <agomez@igalia.com> Conflicts: src/intel/common/gen_l3_config.c
2017-06-28i965: Add and initialize l3_banks field for gen7+Anuj Phogat2-3/+27
This new field helps simplify l3 way size computations in next patch. V2: Initialize the l3_banks to 0 in macros. Suggested-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> (cherry picked from commit eb23be1d97da290073d76c2510b8999b250f0139)
2017-06-28svga: check return value from svga_set_shader( SVGA3D_SHADERTYPE_GS, NULL)Brian Paul1-0/+2
If the call fails we need to flush the command buffer and retry. In this case, we were failing to unbind the GS which led to subsequent errors. This fixes a bug replaying a Cinebench R15 apitrace in a Linux guest. VMware bug 1894451 cc: mesa-stable@lists.freedesktop.org Reviewed-by: Charmaine Lee <charmainel@vmware.com> (cherry picked from commit 041f8ae9f6bab39361263f6c767ea5294f1aa011)
2017-06-28svga: use the winsys interface to invalidate surfaceCharmaine Lee5-8/+23
Instead of directly sending the InvalidateGBSurface command, this patch uses the invalidate_surface interface. Fixes Linux VM piglit failures including ext_texture_array-gen-mipmap, fbo-generatemipmap-array S3TC_DXT1 Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 019d5d534682145a3d5921b061ea46f8c872d6a0) Squashed with commit: svga: fix pre-mature flushing of the command buffer When surface_invalidate is called to invalidate a newly created surface in svga_validate_surface_view(), it is possible that the command buffer is already full, and in this case, currently, the associated wddm winsys function will flush the command buffer and resend the invalidate surface command. However, this can pre-maturely flush the command buffer if there is still pending image updates to be patched. To fix the problem, this patch will add a return status to the surface_invalidate interface and if it returns FALSE, the caller will call svga_context_flush() to do the proper context flush. Note, we don't call svga_context_flush() if surface_invalidate() fails when flushing the screen surface cache though, because it is already in the process of context flush, all the image updates are already patched, calling svga_context_flush() can trigger a deadlock. So in this case, we call the winsys context flush interface directly to flush the command buffer. Fixes driver errors and graphics corruption running Tropics. VMware bug 1891975. Also tested with MTT glretrace, piglit and various OpenGL apps such as Heaven, CinebenchR15, NobelClinicianViewer, Lightsmark, GoogleEarth. cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 3fbdab8778d3b55ed6053a3781e92aeff85ca174)
2017-06-28egl: properly count configsEric Engestrom5-6/+12
dri2_conf represents another config (which shouldn't be counted) if it doesn't have the requested ID. Reported-by: Liu Zhiquan <zhiquan.liu@intel.com> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit c87f73724efbec493d0149738d3a7ea11bfab222)
2017-06-28egl/android: Change order of EGLConfig generation (v2)Chad Versace1-7/+25
Many Android apps (such as Google's official NDK GLES2 example app), and even portions the core framework code (such as SystemServiceManager in Nougat), incorrectly choose their EGLConfig. They neglect to match the EGLConfig's EGL_NATIVE_VISUAL_ID against the window's native format, and instead choose the first EGLConfig whose channel sizes match those of the native window format while ignoring the channel *ordering*. We can detect such buggy clients in logcat when they call eglCreateSurface, by detecting the mismatch between the EGLConfig's format and the window's format. As a workaround, this patch changes the order of EGLConfig generation such that all EGLConfigs for HAL pixel format i precede those for HAL pixel format i+1. In my (chadversary) testing on Android Nougat, this was good enough to pacify the buggy clients. v2: Rebase to make patch cherry-pickable to stable. Cc: mesa-stable@lists.freedesktop.org Cc: Tomasz Figa <tfiga@chromium.org> Cc: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 5e884353e647261ac815c85724fc108e86dd1d85)
2017-06-28i915: Fix gl_Fragcoord interpolationVille Syrjälä5-16/+21
gl_FragCoord contains the window coordinates so it seems to me that we should not use perspective correct interpolation for it. At least now I get similar output as i965/swrast/llvmpipe produce. This fixes dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_w. dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_xyz was already passing, though I'm not quite sure how it managed to do that. v2: Add definitons for the S3 "wrap shortest" bits as well (Ian) Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (cherry picked from commit 1c409fe4c144f11ce6c6a4548ac5c6ba37980058)
2017-06-28change va max_entrypointsChandu Babu N2-1/+3
As encode support is added along with decode, increase max_entrypoints to two. vaMaxNumEntrypoints was returning incorrect value and causing memory corruption before this commit v2: assert when max_entrypoints needs to be bigger CC: mesa-stable@lists.freedesktop.org Reviewed-by: Christian König <christian.koenig@amd.com> (cherry picked from commit 1d4cbcdf285730d8e692e10c44cb5dc7e683efc1)
2017-06-28st/mesa: fix pipe_rasterizer_state::scissor with multiple viewportsMarek Olšák1-1/+1
Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 2ec1e32d11ed788dfed229a569a238743b9b1f9f)
2017-06-28mesa: flush vertices before updating ctx->_ShaderMarek Olšák1-2/+2
Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit 0b70d6ec568a2c5d7b2ff814e6e26b6d1379c829)
2017-06-28mesa: flush vertices before changing viewportsMarek Olšák1-2/+4
Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit c8363eb0276c863100a457b18fee5ef900cf6f74)
2017-06-28spirv: Work around the Doom shader bugJason Ekstrand2-0/+28
Doom shipped with a broken version of GLSLang which handles samplers as function arguments in a way that isn't spec-compliant. In particular, it creates a temporary local sampler variable and copies the sampler into it. While Dave has had a hack patch out for a while that gets it working, we've never landed it because we've been hoping that a game update would come out with fixed shaders. Unfortunately, no game update appears on to be on the horizon and I've found this issue in yet another application so I think we're stuck working around it. Hopefully, we can delete this code one day. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99467 Cc: "17.1" <mesa-stable@lists.freedesktop.org> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 1bd0acab21c250b263604a52ca6694941a6f02e0)
2017-06-28winsys/amdgpu: fix a deadlock when waiting for submission_in_progressMarek Olšák2-16/+43
First this happens: 1) amdgpu_cs_flush (lock bo_fence_lock) -> amdgpu_add_fence_dependency -> os_wait_until_zero (wait for submission_in_progress) - WAITING 2) amdgpu_bo_create -> pb_cache_reclaim_buffer (lock pb_cache::mutex) -> pb_cache_is_buffer_compat -> amdgpu_bo_wait (lock bo_fence_lock) - WAITING So both bo_fence_lock and pb_cache::mutex are held. amdgpu_bo_create can't continue. amdgpu_cs_flush is waiting for the CS ioctl to finish the job, but the CS ioctl is trying to release a buffer: 3) amdgpu_cs_submit_ib (CS thread - job entrypoint) -> amdgpu_cs_context_cleanup -> pb_reference -> pb_destroy -> amdgpu_bo_destroy_or_cache -> pb_cache_add_buffer (lock pb_cache::mutex) - DEADLOCK The simple solution is not to wait for submission_in_progress, which we need in order to create the list of dependencies for the CS ioctl. Instead of building the list of dependencies as a direct input to the CS ioctl, build the list of dependencies as a list of fences, and make the final list of dependencies in the CS thread itself. Therefore, amdgpu_cs_flush doesn't have to wait and can continue. Then, amdgpu_bo_create can continue and return. And then amdgpu_cs_submit_ib can continue. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101294 Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 58af1f6bb074168669aaec2755c7f369a8b58d62)
2017-06-28anv: Fix L3 cache programming on Bay TrailJonas Kulla1-1/+1
Valid values for URBAllocation start at 32, so substract that before programming the register. This was missed when porting from the GL driver. Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit a52ee32a9a49b48c51a80b8a35aa26bd583cabb7)
2017-06-28i965: Ignore anisotropic filtering in nearest mode.Kenneth Graunke1-2/+4
This fixes both Europa Universalis IV and Stellaris rendering on i965. This was tested on SKL. This fix was discovered by Jakub Szuppe at Stream HPC (https://streamhpc.com/). bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96958 bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95530 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Cc: 17.1 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 6a7c5257cac23cd9767aa4bc8fdab68925b11157)
2017-06-28gallium/radeon/gfx9: fix PBO texture uploads to compressed texturesNicolai Hähnle1-1/+6
st/mesa creates a surface that reinterprets the compressed blocks as RGBA16UI or RGBA32UI. We have to adjust width0 & height0 accordingly to avoid out-of-bounds memory accesses by CB. Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 25e5534734b7de2a2359c42eeff5fd0c3c0507da)
2017-06-28i965/gen4: Set depth offset when there is stencil attachment onlyTopi Pohjolainen1-0/+6
Current version fails to set depthstencil.depth_offset when there is only stencil attachment (it does set the intra tile offsets though). Fixes piglits: g45,g965,ilk: depthstencil-render-miplevels 1024 s=z24_s8 g45,ilk: depthstencil-render-miplevels 273 s=z24_s8 CC: mesa-stable@lists.freedesktop.org Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> (cherry picked from commit 69672859814f36e9b8756b8f1c4655c49b9f6f4f)
2017-06-28radeonsi: add new polaris12 pci idAlex Deucher1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: 17.0 17.1 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 5c603b902bb6cd186e0d1b8f19d7496545bca667)
2017-06-28etnaviv: advertise correct max LOD biasLucas Stach1-1/+3
The maximum LOD bias supported is the same as the max texture level supported. Fixes piglit: ext_texture_lod_bias Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit 5065549e2a75e2a56cd3bc8b0fbb6c9013e86cb4)
2017-06-28etnaviv: mask correct channel for RB swapped rendertargetsLucas Stach3-13/+46
Now that we support RB swapped targets by using a shader variant, we must derive the color mask from both the blend state and the bound framebuffer. Fixes piglit: fbo-colormask-formats Fixes: 7f62ffb68ad ("etnaviv: add support for rb swap") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit 8644b59b5d98cf58deaecc583f68edd8be23bfca)
2017-06-28etnaviv: replace translate_clear_color with util_pack_colorLucas Stach2-48/+12
This replaces the open coded etnaviv version of the color pack with the common util_pack_color. Fixes piglits: arb_color_buffer_float-clear fcc-front-buffer-distraction fbo-clearmipmap Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit d6aa2ba2b293f78d9c28922ed3af9077100f3480)
2017-06-28etnaviv: remove bogus assertLucas Stach1-2/+0
etna_resource_copy_region handles resources with multiple samples by falling back to the software path. There is no need to kill the application there. Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit 6633880e7e0557b3dc4e89e62857bd7b548c93fd)
2017-06-28etnaviv: use padded width/height for resource copiesLucas Stach1-2/+2
When copying a resource fully we can just blit the whole level. This allows to use the RS even for level sizes not aligned to the RS min alignment. This is especially useful, as etna_copy_resource is part of the software fallback paths (used in etna_transfer), that are used for doing unaligned copies. Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit ff490eb8fd3a1edee1b3aec3f8122f7d6f90a80f)
2017-06-28etnaviv: don't try RS blit if blit region is unalignedLucas Stach1-1/+2
If the blit region is not aligned to the RS min alignment don't try to execute the blit, but fall back to the software path. Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit 2a6183d416395ca4659e4b6fed9d0918c74cb469)
2017-06-28configure.ac: add -pthread to PTHREAD_LIBSEmil Velikov1-0/+5
As described inline - follow what's written in the manual and what works for all platforms that Mesa supports. We want to untangle things leaving only -pthread, yet that has a potential of causing regressions. Thus we'll do it as a follow-up patch. As a nice side-effect this resolves issues, where the system lacks libpthread.so, yet the linker does not warn about it and we and up with unresolved symbols. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101071 Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (cherry picked from commit e5aa806e5f01b842d1af4775f8e4c53282908304)
2017-06-28i965: Set step_rate = 0 for interleaved vertex buffersJason Ekstrand1-0/+1
Before, we weren't setting step rate so we got whatever old value happened to be lying around. This can lead to some interesting rendering errors. In particular, if you run the OpenGL ES CTS with dEQP-GLES3.functional.instanced.types.mat2x4 immediately followed by one of the dEQP-GLES3.functional.transform_feedback.* tests, the transform feedback test gets stale instancing data from the other test and fails. The only thing that is causing this to not be a problem today is that we use meta for clears and meta is setting up vertex buffers via the VBO or non-interleaved path and setting step_rate to 0 for us. When blorp depth/stencil clears are enabled, meta is no longer sitting between the two tests and the stale data starts causing noticeable problems. Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (cherry picked from commit f762962f7ffd280ee1fd4280744800f73e133901)
2017-06-28i965: Disable the interleaved vertex optimization when instancingJason Ekstrand1-5/+6
Instance divisor is a property of the vertex buffer and not the vertex element so if we ever see anything other than 0, bail. Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (cherry picked from commit b3569e74451e3b913a2f3b327db430edbcd8f42e)
2017-06-28i965: Do an end-of-pipe sync after flushesJason Ekstrand1-3/+3
According to the docs, a simple CS stall is insufficient to ensure that the memory from the flush is visible and an end-of-pipe sync is needed. Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit d9261275cc1328d6a30e19b92db21df23adf7219)
2017-06-28i965/blorp: Do an end-of-pipe sync around CCS opsJason Ekstrand1-12/+4
Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 314ec7b46ffa1640c0d9448e7752c2d7f6c18734)
2017-06-28i965: Do an end-of-pipe sync prior to STATE_BASE_ADDRESSJason Ekstrand1-6/+12
Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 96e7b7ac54bd2220905656a0304eed2a753fceee)