mesa.git
7 years agoi965: drop brw->is_baytrail in favor of devinfo->is_baytrail
Lionel Landwerlin [Wed, 30 Aug 2017 08:12:49 +0000 (09:12 +0100)]
i965: drop brw->is_baytrail in favor of devinfo->is_baytrail

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->is_g4x in favor of devinfo->is_g4x
Lionel Landwerlin [Wed, 30 Aug 2017 08:09:13 +0000 (09:09 +0100)]
i965: drop brw->is_g4x in favor of devinfo->is_g4x

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->gt in favor of devinfo->gt
Lionel Landwerlin [Wed, 30 Aug 2017 08:07:10 +0000 (09:07 +0100)]
i965: drop brw->gt in favor of devinfo->gt

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->gen in favor of devinfo->gen
Lionel Landwerlin [Wed, 30 Aug 2017 07:44:37 +0000 (08:44 +0100)]
i965: drop brw->gen in favor of devinfo->gen

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoanv: use device->info instead of brw->is_*
Lionel Landwerlin [Wed, 30 Aug 2017 06:53:34 +0000 (07:53 +0100)]
anv: use device->info instead of brw->is_*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoRevert "egl: Allow creation of per surface out fence"
Mark Janes [Wed, 30 Aug 2017 15:45:36 +0000 (08:45 -0700)]
Revert "egl: Allow creation of per surface out fence"

This reverts commit 13c23b19d0b3b965d666498eb759e63fc4a625d9.

Mesa CI was brought down by this commit, with:

mesa/drivers/dri/i965/brw_sync.c:491: brw_dri_create_fence_fd:
Assertion `brw->screen->has_exec_fence' failed.

7 years agoi965: add 2xMSAA 16xMSAA modes to DRI configs.
Kevin Rogovin [Wed, 30 Aug 2017 10:57:48 +0000 (13:57 +0300)]
i965: add 2xMSAA 16xMSAA modes to DRI configs.

For Gen8, add 2xMSAA. For Gen9, add 2xMSAA and 16xMSAA.
Special thanks to Eero Tamminen for reporting rasterizer
numbers being twice what it should be for 2xMSAA under
a benchmark.

V2: Make pointer name less ugly + add 2xMSAA for Gen8

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoRevert "i965: add 2xMSAA and 16xMSAA to DRI configs for Gen9."
Kenneth Graunke [Wed, 30 Aug 2017 15:16:06 +0000 (08:16 -0700)]
Revert "i965: add 2xMSAA and 16xMSAA to DRI configs for Gen9."

This reverts commit f6d38785e8b28a6dd303884798b823e289817741.

Kevin's original patch accidentally didn't add 2x for Gen8; he sent
a v2 with a bunch of style fixes shortly after I pushed the original
patch, not knowing it was coming.  Let's just revert this one, apply
v2, and move on.

7 years agomesa/st: remove unwanted backup file
Eric Engestrom [Wed, 30 Aug 2017 13:10:06 +0000 (14:10 +0100)]
mesa/st: remove unwanted backup file

Fixes: 0ac78dc92582a59d4319 "util: move string_to_uint_map to glsl"
Cc: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl/dri2: only destroy created objects
Michael Olbrich [Tue, 29 Aug 2017 09:51:20 +0000 (11:51 +0200)]
egl/dri2: only destroy created objects

dri2_display_destroy may be called by dri2_initialize_wayland_drm() if
initialization fails. In this case, these objects may not be initialized.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl: Allow creation of per surface out fence
Zhongmin Wu [Wed, 23 Aug 2017 18:05:25 +0000 (23:35 +0530)]
egl: Allow creation of per surface out fence

Add plumbing to allow creation of per display surface out fence.

Currently enabled only on android, since the system expects a valid
fd in ANativeWindow::{queue,cancel}Buffer. We pass a fd of -1 with
which native applications such as flatland fail. The patch enables
explicit sync on android and fixes one of the functional issue for
apps or buffer consumers which depend upon fence and its timestamp.

v2: a) Also implement the fence in cancelBuffer.
    b) The last sync fence is stored in drawable object
       rather than brw context.
    c) format clear.

v3: a) Save the last fence fd in DRI Context object.
    b) Return the last fence if the batch buffer is empty and
       nothing to be flushed when _intel_batchbuffer_flush_fence
    c) Add the new interface in vbtl to set the retrieve fence

v3.1 a) close fd in the new vbtl interface on none Android platform

v4: a) The last fence is saved in brw context.
    b) The retrieve fd is for all the platform but not just Android
    c) Add a uniform dri2 interface to initialize the surface.

v4.1: a) make some changes of variable name.
      b) the patch is broken into two patches.

v4.2: a) Add a deinit interface for surface to clear the out fence

v5: a) Add enable_out_fence to init, platform sets it true or
       false
    b) Change get fd to update fd and check for fence
    c) Commit description updated

v6: a) Heading and commit description updated
    b) enable_out_fence is set only if fence is supported
    c) Review comments on function names
    d) Test with standalone patch, resolves the bug

v6.1: Check for old display fence reverted

v6.2: enable_out_fence initialized to false by default,
      dri2_surf_update_fence_fd updated, deinit changed to fini

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>
7 years agowinsys/amdgpu: add BO to the global list only when RADEON_ALL_BOS is set
Samuel Pitoiset [Tue, 29 Aug 2017 14:24:45 +0000 (16:24 +0200)]
winsys/amdgpu: add BO to the global list only when RADEON_ALL_BOS is set

Only useful when that debug option is enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: update dirty_level_mask before dispatching
Samuel Pitoiset [Tue, 29 Aug 2017 15:37:14 +0000 (17:37 +0200)]
radeonsi: update dirty_level_mask before dispatching

This fixes a rendering issue with Hitman when bindless textures
are enabled.

Fixes: 2263610827 ("radeonsi: flush DB caches only when transitioning from DB to texturing")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoanv: set right datatypes in anv_pipeline_binding
Juan A. Suarez Romero [Fri, 25 Aug 2017 15:31:14 +0000 (17:31 +0200)]
anv: set right datatypes in anv_pipeline_binding

This structure contains two fields, binding and index, that store the
binding in the descriptor set and the index inside the binding.

These structures are defined as uint8_t, but the types in Vulkan
specification are uint32_t, so big values are clamp.

This fixes dEQP-VK.binding_model.shader_access.*.multiple_arbitrary_descriptors.*

v2: use UINT32_MAX for index when having no render targets (Tapani)

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
7 years agollvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR
Brian Paul [Mon, 28 Aug 2017 20:17:26 +0000 (14:17 -0600)]
llvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR

If llvmpipe_set_scissor_states() is never called, we still need to be sure
that derived scissor/clip state is updated.  As of commit 743ad599a97d09b1
that function might not be called.

Fixes regressed Piglit gl-1.0-scissor-offscreen -fbo -auto test.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101709
Fixes: 743ad599a97 ("st/mesa: don't set 16 scissors and 16 viewports
if they're unused")
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
7 years agoi965: Bump the initial program cache size from 4kB to 16kB.
Kenneth Graunke [Sat, 19 Aug 2017 07:19:34 +0000 (00:19 -0700)]
i965: Bump the initial program cache size from 4kB to 16kB.

Our initial size of 4kB is way too small to do anything useful, so we
end up growing it at least a few times.  We may as well start it larger.

Some data points:

- Dinoshade (from Mesa Demos): hit 8kB.
- Chromium 60: hit 16kB after browsing a few things in Google Docs.
- GFXBench4 TRex/Manhattan 3.1: hit 128kB
- Unigine Valley 1.0: hit 512kB

It might make sense to start it even larger.

Acked-by: Matt Turner <mattst88@gmail.com>
7 years agoi965: Issue performance warnings when growing the program cache
Kenneth Graunke [Fri, 18 Aug 2017 04:23:25 +0000 (21:23 -0700)]
i965: Issue performance warnings when growing the program cache

This involves a bunch of unnecessary copying, a batch flush, and
state re-emission.

Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agoi965: add 2xMSAA and 16xMSAA to DRI configs for Gen9.
Kevin Rogovin [Thu, 24 Aug 2017 11:16:38 +0000 (14:16 +0300)]
i965: add 2xMSAA and 16xMSAA to DRI configs for Gen9.

Special thanks to Eero Tamminen for reporting rasterizer
numbers being twice what it should be for 2xMSAA under
a benchmark.

Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoglsl: define YY_NO_INPUT to prevent unused symbol warnings
Matt Turner [Mon, 28 Aug 2017 18:11:17 +0000 (11:11 -0700)]
glsl: define YY_NO_INPUT to prevent unused symbol warnings

Otherwise clang warns:

glsl/glsl_lexer.cpp:3507:16: warning: function 'yyinput' is not needed
and will not be emitted [-Wunneeded-internal-declaration]
    static int yyinput (yyscan_t yyscanner)
               ^

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoblorp: Explicitly cast between different enums
Matt Turner [Sat, 26 Aug 2017 03:08:23 +0000 (20:08 -0700)]
blorp: Explicitly cast between different enums

Fixes warnings like

warning: implicit conversion from enumeration type 'enum isl_format' to
different enumeration type 'enum GEN10_SURFACE_FORMAT'
[-Wenum-conversion]
         .SourceElementFormat = ISL_FORMAT_R32_UINT,
                                ^~~~~~~~~~~~~~~~~~~

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agointel/isl: Mark functions used conditionally as UNUSED
Matt Turner [Sat, 26 Aug 2017 03:39:12 +0000 (20:39 -0700)]
intel/isl: Mark functions used conditionally as UNUSED

The functions we're marking as UNUSED in isl_surface_state.c are used
only when compiling for particular generations.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agointel/isl: Explicitly cast between different enums
Matt Turner [Sat, 26 Aug 2017 03:08:43 +0000 (20:08 -0700)]
intel/isl: Explicitly cast between different enums

Fixes warnings like

warning: implicit conversion from enumeration type 'enum isl_format' to
different enumeration type 'enum GEN10_SURFACE_FORMAT'
[-Wenum-conversion]
         .SourceElementFormat = ISL_FORMAT_R32_UINT,
                                ^~~~~~~~~~~~~~~~~~~

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agointel/isl: Remove 'inline' keywords
Matt Turner [Fri, 7 Jul 2017 04:19:18 +0000 (21:19 -0700)]
intel/isl: Remove 'inline' keywords

Unless you have data, the compiler knows better than you whether a
function should be inlined.

Unlike all other cases in this series, the removal of the inline keyword
from isl_format_has_channel_type actually changes the resulting binary
with gcc-6.3.0:

   text    data     bss     dec     hex filename
7831116  346384  420648 8598148  833284 i965_dri.so before
7830716  346384  420648 8597748  8330f4 i965_dri.so after

I think this is likely an improvement. No difference in the resulting
binary with clang-4.0.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoanv: Mark functions used conditionally as UNUSED
Matt Turner [Sat, 26 Aug 2017 03:40:01 +0000 (20:40 -0700)]
anv: Mark functions used conditionally as UNUSED

The functions we're marking as UNUSED in genX_pipeline.c are used only
when compiling for particular generations.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoanv: Explicitly cast between different enums
Matt Turner [Sat, 26 Aug 2017 03:08:58 +0000 (20:08 -0700)]
anv: Explicitly cast between different enums

Fixes warnings like

warning: implicit conversion from enumeration type 'enum isl_format' to
different enumeration type 'enum GEN10_SURFACE_FORMAT'
[-Wenum-conversion]
         .SourceElementFormat = ISL_FORMAT_R32_UINT,
                                ^~~~~~~~~~~~~~~~~~~

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoanv: Remove 'inline' keywords
Matt Turner [Fri, 7 Jul 2017 04:18:03 +0000 (21:18 -0700)]
anv: Remove 'inline' keywords

Unless you have data, the compiler knows better than you whether a
function should be inlined.

No difference in the resulting binary with gcc-6.3.0 or clang-4.0.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoanv: Use GNU C empty brace initializer
Matt Turner [Sat, 26 Aug 2017 03:22:11 +0000 (20:22 -0700)]
anv: Use GNU C empty brace initializer

Avoids Clang's warning about the current code:

   warning: suggest braces around initialization of subobject

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoi965: Add $(WNO_OVERRIDE_INIT) to AM_CFLAGS
Matt Turner [Mon, 28 Aug 2017 20:53:22 +0000 (13:53 -0700)]
i965: Add $(WNO_OVERRIDE_INIT) to AM_CFLAGS

brw_surface_formats.c and genX_blorp_exec.c do this a lot, causing lots
of warnings from clang.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoi965: Mark functions used conditionally as UNUSED
Matt Turner [Sat, 26 Aug 2017 03:40:13 +0000 (20:40 -0700)]
i965: Mark functions used conditionally as UNUSED

The functions we're marking as UNUSED in genX_state_upload.c are used
only when compiling for particular generations.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoi965: Explicitly cast between different enums
Matt Turner [Sat, 26 Aug 2017 03:09:10 +0000 (20:09 -0700)]
i965: Explicitly cast between different enums

Fixes warnings like

warning: implicit conversion from enumeration type 'enum isl_format' to
different enumeration type 'enum GEN10_SURFACE_FORMAT'
[-Wenum-conversion]
         .SourceElementFormat = ISL_FORMAT_R32_UINT,
                                ^~~~~~~~~~~~~~~~~~~

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoi965: Drop unnecessary conditional
Matt Turner [Sat, 26 Aug 2017 02:22:51 +0000 (19:22 -0700)]
i965: Drop unnecessary conditional

Clang doesn't realize that 0 and 1 are the only possibilities, a thinks
lots of variables might be uninitialized.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoi965: Remove some 'inline' keywords
Matt Turner [Fri, 7 Jul 2017 04:28:10 +0000 (21:28 -0700)]
i965: Remove some 'inline' keywords

brw_texture_view_sane() is only used by an assert()...

No difference in the resulting binary with gcc-6.3.0 or clang-4.0.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agonir: Remove series of unnecessary conversions
Matt Turner [Sat, 26 Aug 2017 03:15:24 +0000 (20:15 -0700)]
nir: Remove series of unnecessary conversions

Clang warns:

warning: absolute value function 'fabsf' given an argument of type
'const float64_t' (aka 'const double') but has parameter of type 'float'
which may cause truncation of value [-Wabsolute-value]

            float64_t dst = bit_size == 64 ? fabs(src0) : fabsf(src0);

The type of the ternary expression will be the common type of fabs() and
fabsf(): double. So fabsf(src0) will be implicitly converted to double.
We may as well just convert src0 to double before a call to fabs() and
remove the needless complexity, à la

            float64_t dst = fabs(src0);

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agonir/spirv: Use unreachable("...") rather than assert(!"...")
Matt Turner [Fri, 7 Jul 2017 01:43:28 +0000 (18:43 -0700)]
nir/spirv: Use unreachable("...") rather than assert(!"...")

Quiets a number of uninitialized variable warnings in clang.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agocompiler: Add $(WNO_OVERRIDE_INIT) to AM_CFLAGS
Matt Turner [Mon, 28 Aug 2017 20:52:12 +0000 (13:52 -0700)]
compiler: Add $(WNO_OVERRIDE_INIT) to AM_CFLAGS

nir_intrinsics.h does this a lot, causing lots of warnings from clang.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoconfigure: Test for -Wno-initializer-overrides
Matt Turner [Fri, 7 Jul 2017 05:19:15 +0000 (22:19 -0700)]
configure: Test for -Wno-initializer-overrides

Clang has "-Wno-initializer-overrides", while gcc has
"-Wno-override-init". Quiets a lot of warnings with clang.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoconfigure: Add and use AX_CHECK_COMPILE_FLAG
Matt Turner [Fri, 7 Jul 2017 04:49:05 +0000 (21:49 -0700)]
configure: Add and use AX_CHECK_COMPILE_FLAG

This makes it a lot clearer what's happening (at least I think so), and
will make future additions much simpler.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoradv: Add trace ids for secondary buffers.
Bas Nieuwenhuizen [Sat, 18 Mar 2017 01:12:59 +0000 (02:12 +0100)]
radv: Add trace ids for secondary buffers.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoac/debug: Support multiple trace ids for nested IBs.
Bas Nieuwenhuizen [Fri, 17 Mar 2017 00:25:00 +0000 (01:25 +0100)]
ac/debug: Support multiple trace ids for nested IBs.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/amdgpu: Enable dumping of all IBs with RADV_DEBUG=allbos.
Bas Nieuwenhuizen [Fri, 17 Mar 2017 00:04:03 +0000 (01:04 +0100)]
radv/amdgpu: Enable dumping of all IBs with RADV_DEBUG=allbos.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoegl/wayland: make sure HAS_$FORMAT is set for wl_dmabuf
Emil Velikov [Sun, 27 Aug 2017 10:20:35 +0000 (11:20 +0100)]
egl/wayland: make sure HAS_$FORMAT is set for wl_dmabuf

Otherwise eglCreateWaylandBufferFromImageWL will fail, since we
have no "supported" format.

Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoegl/wayland: group wl_win specific code together
Emil Velikov [Sun, 27 Aug 2017 10:20:34 +0000 (11:20 +0100)]
egl/wayland: group wl_win specific code together

Make the code a bit easier to follow. There should be no functional
change since none of the bits set are accessible until the
eglCreateWindowSurface call is complete.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoegl/wayland: remove dri2_surf width/height double init.
Emil Velikov [Sun, 27 Aug 2017 10:20:33 +0000 (11:20 +0100)]
egl/wayland: remove dri2_surf width/height double init.

The dimensions are already set [to 0 or the value provided by the
attributes list] by the _eglInitSurface() call further up.

The values are updated, as the DRI driver calls the DRI2/IMAGE_LOADER'
get_buffers, shortly before making use of the values.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
7 years agoegl/wayland: set correct format with wl_dmabuf as wl_drm is missing
Emil Velikov [Sun, 27 Aug 2017 10:20:32 +0000 (11:20 +0100)]
egl/wayland: set correct format with wl_dmabuf as wl_drm is missing

For most/all cases today, we have wl_drm available alongside wl_dmabuf.
Yet in the long run, we want to make sure the latter can operate without
any traces of the former.

Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoegl/wayland: update comment to reflect wl_dmabuf presence
Emil Velikov [Sun, 27 Aug 2017 10:20:30 +0000 (11:20 +0100)]
egl/wayland: update comment to reflect wl_dmabuf presence

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoegl/wayland: polish object teardown in dri2_wl_destroy_surface
Emil Velikov [Sun, 27 Aug 2017 10:20:28 +0000 (11:20 +0100)]
egl/wayland: polish object teardown in dri2_wl_destroy_surface

The wl_drm wrapper is created before the wl display/surface ones.
Thus make sure we destroy it after them. In reality it should not make
any difference either way.

Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoegl/wayland: plug leaks in dri2_wl_create_window_surface() error path
Emil Velikov [Sun, 27 Aug 2017 10:20:27 +0000 (11:20 +0100)]
egl/wayland: plug leaks in dri2_wl_create_window_surface() error path

We forgot to teardown the wl display/surface wrappers.

Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoegl: simplify refcounting after screen creation
Emil Velikov [Sun, 27 Aug 2017 10:20:26 +0000 (11:20 +0100)]
egl: simplify refcounting after screen creation

If the specific initialize was successfull, dri2_egl_display() will
return a non NULL pointer. Thus we can drop the check and flatten the
codeflow.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
7 years agoutil: move string_to_uint_map to glsl
Emil Velikov [Sat, 26 Aug 2017 01:37:11 +0000 (02:37 +0100)]
util: move string_to_uint_map to glsl

The functionality is used by glsl and mesa. With the latter already
depending on the former.

With this in place the src/util/ static library libmesautil.la no longer
has a C++ dependency. Thus objects which use it (like libEGL) don't need
the C++ link.

Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101851
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Tested-by: James Harvey <lothmordor@gmail.com>
7 years agost/mesa: fix XPD lowering - don't read dst
Marek Olšák [Mon, 28 Aug 2017 21:28:33 +0000 (23:28 +0200)]
st/mesa: fix XPD lowering - don't read dst

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

Reviewed-by: Brian Paul <brianp@vmware.com>
7 years agoanv: Add support for the SYNC_FD handle type for fences
Jason Ekstrand [Tue, 8 Aug 2017 22:17:31 +0000 (15:17 -0700)]
anv: Add support for the SYNC_FD handle type for fences

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv: Implement VK_KHR_external_fence
Jason Ekstrand [Tue, 8 Aug 2017 19:25:38 +0000 (12:25 -0700)]
anv: Implement VK_KHR_external_fence

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv: Use DRM sync objects to back fences whenever possible
Jason Ekstrand [Fri, 4 Aug 2017 20:08:35 +0000 (13:08 -0700)]
anv: Use DRM sync objects to back fences whenever possible

In order to implement VK_KHR_external_fence, we need to back our fences
with something that's shareable.  Since the kernel wait interface for
sync objects already supports waiting for multiple fences in one go, it
makes anv_WaitForFences much simpler if we only have one type of fence.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv/gem: Add support for syncobj wait and reset
Jason Ekstrand [Tue, 8 Aug 2017 19:23:37 +0000 (12:23 -0700)]
anv/gem: Add support for syncobj wait and reset

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv/gem: Add a flags parameter to syncobj_create
Jason Ekstrand [Fri, 25 Aug 2017 18:35:27 +0000 (11:35 -0700)]
anv/gem: Add a flags parameter to syncobj_create

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agodrm-uapi: Update headers from drm-next
Jason Ekstrand [Fri, 4 Aug 2017 19:52:46 +0000 (12:52 -0700)]
drm-uapi: Update headers from drm-next

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agovulkan/util: Add a vk_zalloc helper
Jason Ekstrand [Tue, 8 Aug 2017 19:25:26 +0000 (12:25 -0700)]
vulkan/util: Add a vk_zalloc helper

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv: Rename anv_fence_state to anv_bo_fence_state
Jason Ekstrand [Fri, 4 Aug 2017 19:59:45 +0000 (12:59 -0700)]
anv: Rename anv_fence_state to anv_bo_fence_state

It only applies to legacy BO fences.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv: Pull the guts of anv_fence into anv_fence_impl
Jason Ekstrand [Thu, 3 Aug 2017 21:19:44 +0000 (14:19 -0700)]
anv: Pull the guts of anv_fence into anv_fence_impl

This is just a refactor, similar to what we did for semaphores, in
preparation for handling VK_KHR_external_fence.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv/wsi: Use QueueSubmit to trigger the fence in AcquireNextImage
Jason Ekstrand [Thu, 3 Aug 2017 21:18:19 +0000 (14:18 -0700)]
anv/wsi: Use QueueSubmit to trigger the fence in AcquireNextImage

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv: Rework fences to work more like BO semaphores
Jason Ekstrand [Thu, 3 Aug 2017 18:46:09 +0000 (11:46 -0700)]
anv: Rework fences to work more like BO semaphores

This commit changes fences to work a bit more like BO semaphores.
Instead of the fence being a batch, it's simply a BO that gets added
to the validation list for the last execbuf call in the QueueSubmit
operation.  It's a bit annoying finding the last submit in the execbuf
but this allows us to avoid the dummy execbuf.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoanv/queue: Allow temporary import of SYNC_FD semaphores
Jason Ekstrand [Fri, 25 Aug 2017 18:27:15 +0000 (11:27 -0700)]
anv/queue: Allow temporary import of SYNC_FD semaphores

We didn't allow them before because it didn't look like the spec allowed
it.  It certainly doesn't make much sense.  However, there are CTS tests
that apparently hit this.  What the spec actually says is:

    "Importing a payload using handle types with copy transference
    creates a duplicate copy of the payload at the time of import, but
    makes no further reference to it. Fence signaling, waiting, and
    resetting operations performed on the target of copy imports must
    not affect any other fence or payload."

A SYNC_FD has copy transference but the import may be temporary or
permanent.  If you do a permanent import of something with copy
transference, I guess it's supposed to work and end up resetting the
permanent state.  In any case, there seems to be no real harm in
allowing it, so why not.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoi965: Fix whitespace issues in intel_buffer_objects.c.
Kenneth Graunke [Tue, 29 Aug 2017 00:07:57 +0000 (17:07 -0700)]
i965: Fix whitespace issues in intel_buffer_objects.c.

Convert tabs to spaces and rewrap one long line.

7 years agoradeonsi: stop leaking nir
Timothy Arceri [Mon, 28 Aug 2017 05:02:49 +0000 (15:02 +1000)]
radeonsi: stop leaking nir

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoac/nir: remove misleading condition
Grazvydas Ignotas [Mon, 28 Aug 2017 22:36:57 +0000 (01:36 +0300)]
ac/nir: remove misleading condition

location is never set to INTERP_SAMPLE, and Nicolai comments:
"... that part is misleading. location refers to the base location, not
the final location of the sample, and it can never be INTERP_SAMPLE."

Suggested-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
7 years agoac/nir: silence maybe-uninitialized warnings
Grazvydas Ignotas [Sun, 27 Aug 2017 19:54:56 +0000 (22:54 +0300)]
ac/nir: silence maybe-uninitialized warnings

These are likely false positives, but are also annoying because they
show up on every "make install", which causes ac_nir_to_llvm to be
rebuilt here. Initializing those variables to NULL should be harmless
even when unnecessary.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradv: clear dynamic_shader_stages on create
Grazvydas Ignotas [Sun, 27 Aug 2017 23:01:21 +0000 (02:01 +0300)]
radv: clear dynamic_shader_stages on create

Valgrind reports it's being used uninitialized.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoamd: add .editorconfig
Grazvydas Ignotas [Sun, 27 Aug 2017 21:21:41 +0000 (00:21 +0300)]
amd: add .editorconfig

amd/common/ and amd/vulkan/ are using tabs for indent, which doesn't
match the settings in root .editorconfig, so let's override.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: rewrite late alloc VS limit computation
Marek Olšák [Thu, 24 Aug 2017 23:48:50 +0000 (01:48 +0200)]
radeonsi: rewrite late alloc VS limit computation

This is still very simple, but it's better than before.

Loosely ported from Vulkan.

7 years agogallium/radeon: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmation
Marek Olšák [Thu, 24 Aug 2017 21:46:46 +0000 (23:46 +0200)]
gallium/radeon: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmation

Ported from Vulkan.
Not sure what this is good for.. maybe write confirmation from L2 flushes?

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogallium/u_threaded: rename IGNORE_VALID_RANGE -> NO_INFER_UNSYNCHRONIZED
Marek Olšák [Fri, 25 Aug 2017 13:39:52 +0000 (15:39 +0200)]
gallium/u_threaded: rename IGNORE_VALID_RANGE -> NO_INFER_UNSYNCHRONIZED

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogallium/u_threaded: disallow discard_range if map_buffer is unsynchronized
Marek Olšák [Fri, 25 Aug 2017 13:34:17 +0000 (15:34 +0200)]
gallium/u_threaded: disallow discard_range if map_buffer is unsynchronized

The discard range codepath takes precedence, so if we get both
unsynchronized and discard_range, choose unsynchronized.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agonir: Fix system_value_from_intrinsic for subgroups
Jason Ekstrand [Mon, 21 Aug 2017 23:05:20 +0000 (16:05 -0700)]
nir: Fix system_value_from_intrinsic for subgroups

A couple of the cases were backwards

Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agonir: Fix some whatespace
Jason Ekstrand [Mon, 21 Aug 2017 23:04:53 +0000 (16:04 -0700)]
nir: Fix some whatespace

Somehow tabs got in there...

Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agoradeonsi: correct maximum wave count per SIMD
Marek Olšák [Wed, 23 Aug 2017 11:47:13 +0000 (13:47 +0200)]
radeonsi: correct maximum wave count per SIMD

v2: don't special-case Tonga and Iceland.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agodocs: update calendar, add news item and link release notes for 17.1.8
Andres Gomez [Mon, 28 Aug 2017 13:31:13 +0000 (16:31 +0300)]
docs: update calendar, add news item and link release notes for 17.1.8

Signed-off-by: Andres Gomez <agomez@igalia.com>
7 years agodocs: add sha256 checksums for 17.1.8
Andres Gomez [Mon, 28 Aug 2017 13:27:22 +0000 (16:27 +0300)]
docs: add sha256 checksums for 17.1.8

Signed-off-by: Andres Gomez <agomez@igalia.com>
(cherry picked from commit 44e008e85efe141087d8ebe52e273e0020029481)

7 years agodocs: add release notes for 17.1.8
Andres Gomez [Mon, 28 Aug 2017 13:17:02 +0000 (16:17 +0300)]
docs: add release notes for 17.1.8

Signed-off-by: Andres Gomez <agomez@igalia.com>
(cherry picked from commit e644f9996b36598e4b24a359343096886b2333d0)

7 years agost/mesa: fix handling of vertex array double inputs
Ilia Mirkin [Sun, 27 Aug 2017 04:41:05 +0000 (00:41 -0400)]
st/mesa: fix handling of vertex array double inputs

The is_double_vertex_input needs to be set for arrays of doubles as
well.

Fixes KHR-GL45.enhanced_layouts.varying_array_locations

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
7 years agoglsl: fix counting of vertex shader output slots used by explicit vars
Ilia Mirkin [Sun, 27 Aug 2017 04:09:31 +0000 (00:09 -0400)]
glsl: fix counting of vertex shader output slots used by explicit vars

The argument to count_attribute_slots should only be set to true for
vertex inputs, not for all vertex shader varyings.

Fixes KHR-GL45.enhanced_layouts.varying_locations

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agointel/compiler: Cast reg types explicitly
Topi Pohjolainen [Fri, 25 Aug 2017 18:32:27 +0000 (21:32 +0300)]
intel/compiler: Cast reg types explicitly

Makes coverity happier.

CID: 1416799
Fixes: c1ac1a3d25 (i965: Add a brw_hw_type_to_reg_type() function)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agogallium/docs: Fix an inequality sign of TGSI_SEMANTIC_SUBGROUP_LT_MASK
Gwan-gyeong Mun [Wed, 23 Aug 2017 16:54:18 +0000 (01:54 +0900)]
gallium/docs: Fix an inequality sign of TGSI_SEMANTIC_SUBGROUP_LT_MASK

A previous expression presents same as TGSI_SEMANTIC_SUBGROUP_GT_MASK.
It fixes a direction of an inequality for TGSI_SEMANTIC_SUBGROUP_LT_MASK.

before:
  bit index > TGSI_SEMANTIC_SUBGROUP_INVOCATION

after:
  bit index < TGSI_SEMANTIC_SUBGROUP_INVOCATION

Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradv: propagate VK_ERROR_OUT_OF_HOST_MEMORY to vk{Begin,End}CommandBuffer()
Samuel Pitoiset [Fri, 25 Aug 2017 14:29:48 +0000 (16:29 +0200)]
radv: propagate VK_ERROR_OUT_OF_HOST_MEMORY to vk{Begin,End}CommandBuffer()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: rename record_fail to record_result and use VkResult
Samuel Pitoiset [Fri, 25 Aug 2017 14:10:30 +0000 (16:10 +0200)]
radv: rename record_fail to record_result and use VkResult

This will allow to propagate VK_ERROR_OUT_OF_HOST_MEMORY to
vkEndCommandBuffer() when necessary.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agogallium/docs: fix a typo
Gwan-gyeong Mun [Sat, 26 Aug 2017 08:39:04 +0000 (17:39 +0900)]
gallium/docs: fix a typo

Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoi915g: Remove a few unused variables
Eduardo Lima Mitev [Fri, 25 Aug 2017 06:55:04 +0000 (08:55 +0200)]
i915g: Remove a few unused variables

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agodisk_cache: assert if a cache entries keys don't match mesa
Timothy Arceri [Fri, 25 Aug 2017 04:04:19 +0000 (14:04 +1000)]
disk_cache: assert if a cache entries keys don't match mesa

In ef42423e7be9 I enabled the check for release builds however we
still want to assert in debug builds in case of collisions or
just general bugs with the key building/compare code. Otherwise
it will just fail silently effectively disabling the cache.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
7 years agoRevert "radeonsi: get the raster config from AMDGPU on SI"
Marek Olšák [Sun, 27 Aug 2017 20:27:01 +0000 (22:27 +0200)]
Revert "radeonsi: get the raster config from AMDGPU on SI"

This reverts commit fc99cb3c9edee3af773700cf7ebdc60dc02fcaba.

"The performance went down from 64.7 to 51.4 fps in Valley and from 30.8 to
25.1 fps in Heaven on Radeon HD 7970. Other games seem to have also a 10-25%
performance decrease."

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

It looks like we can't use the raster config values from the kernel.

7 years agoradv/wsi: Compute correct row_pitch for GFX9.
Dave Airlie [Tue, 15 Aug 2017 05:35:52 +0000 (15:35 +1000)]
radv/wsi: Compute correct row_pitch for GFX9.

(commit split out by Bas Nieuwenhuizen)

Fixes: 65477bae9cf "radv: enable GFX9 on radv"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoetnaviv: use correct param for etna_compatible_rs_format(..)
Christian Gmeiner [Fri, 25 Aug 2017 11:39:05 +0000 (13:39 +0200)]
etnaviv: use correct param for etna_compatible_rs_format(..)

Found by code inspection.

Fixes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoegl: don't NULL deref the .get_capabilities function pointer
Emil Velikov [Mon, 7 Aug 2017 16:23:19 +0000 (17:23 +0100)]
egl: don't NULL deref the .get_capabilities function pointer

One could easily introduce version 3 of the DRI2fenceExtension,
extending the struct, while not implementing the above function.

Thus we'll end up with NULL pointer, and dereferencing it won't fare
too well.

Fixes: 0201f01dc4e ("egl: add EGL_ANDROID_native_fence_sync")
Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
7 years agomapi/gen: remove shebang from the marshal generator scripts
Emil Velikov [Tue, 22 Aug 2017 10:39:37 +0000 (11:39 +0100)]
mapi/gen: remove shebang from the marshal generator scripts

The scripts are invoked with the correct version of python and are
missing the execute bit.

Follow the rest of Mesa and drop the shebang line.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agodri_interface.h: add missing stdint.h include
Emil Velikov [Tue, 22 Aug 2017 10:39:36 +0000 (11:39 +0100)]
dri_interface.h: add missing stdint.h include

Required for uint32_t and friends.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoxmlconfig: use the portable __VA_ARGS__
Emil Velikov [Tue, 22 Aug 2017 10:39:35 +0000 (11:39 +0100)]
xmlconfig: use the portable __VA_ARGS__

Follow the example used through mesa and use "..." + "__VA_ARGS__".
The former tends to be more common and portable.

v2: use ##__VA_ARGS__ (Eric)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogallium/vbuf: fix buffer reference bugs
Brian Paul [Thu, 24 Aug 2017 16:40:28 +0000 (10:40 -0600)]
gallium/vbuf: fix buffer reference bugs

In two places we called pipe_resource_reference() to remove a reference
to a vertex buffer resource.  But we neglected to check if the buffer was
a user buffer and not a pipe_resource.  This caused us to pass an invalid
pipe_resource pointer to pipe_resource_reference().

Instead of calling pipe_resource_reference(&vbuf->resource, NULL), use
pipe_vertex_buffer_unreference(&vbuf) which checks the is_user_buffer
field and does the right thing.

Also, explicity set the is_user_buffer field to false after setting the
vbuf->resource pointer to out_buffer.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102377
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agodocs: add an additional final cycle for 17.1
Andres Gomez [Fri, 25 Aug 2017 11:40:26 +0000 (14:40 +0300)]
docs: add an additional final cycle for 17.1

Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
7 years agodocs: remove released and extend the calendar until the end of 2017
Andres Gomez [Fri, 25 Aug 2017 11:40:25 +0000 (14:40 +0300)]
docs: remove released and extend the calendar until the end of 2017

Completed the 17.2 cycle and added the beginning of the 17.3 one.

v2: Add 17.2-rc6 as tentative final version to be promoted to 17.2.0
    final (Eric).

Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
7 years agoradv: Fix sparse BO mapping merging.
Bas Nieuwenhuizen [Fri, 25 Aug 2017 20:18:24 +0000 (22:18 +0200)]
radv: Fix sparse BO mapping merging.

If we merge a mapping with the mapping before it, we also need
to not only change the offset, but also the bo offset.

Fixes: 715df30a4e2 "radv/amdgpu: Add winsys implementation of virtual buffers."
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Fix off by one in MAX_VBS assert.
Bas Nieuwenhuizen [Fri, 25 Aug 2017 12:14:12 +0000 (14:14 +0200)]
radv: Fix off by one in MAX_VBS assert.

e.g. 0 + 32 <= 32 should be valid.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Don't set a new subpass on compute resolve.
Bas Nieuwenhuizen [Thu, 24 Aug 2017 22:29:03 +0000 (00:29 +0200)]
radv: Don't set a new subpass on compute resolve.

We don't use the render path so totally unneeded.

Fixes: 19be95f71e6 "radv: add subpass resolve compute path"
Reviewed-by: Dave Airlie <airlied@redhat.com>