Commit Graph

85653 Commits

Author SHA1 Message Date
Emil Velikov eac752e54b isl/gen7: remove unneeded ISL_DEV_GEN check
The function gen7_format_needs_valign2 has two callers - the gen7 only
gen7_choose_valign_el() and isl_gen6_filter_tiling(). The latter of
which already guarding the invocation appropriately.

To be extra cautious add a couple of asserts alongside the removal of the
runtime check.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-10-14 11:53:25 +01:00
Emil Velikov 5b1efb65ce isl: prefix non-static API with isl_
The rest of ISL already follows this approach. Be consistent and resolve
the final references.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-10-14 11:53:22 +01:00
Emil Velikov 84f9ef1de4 isl/gen6: correctly check msaa layout samples count
Samples == 1 is a valid value, so returning false is plain wrong.
Seeming copy/paste typo introduced since day 1.

Fixes: afdadec77f ("isl: Implement isl_surf_init() for gen4-gen9")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-10-14 11:53:15 +01:00
Emil Velikov c572360c30 automake: add radv to the `make distcheck' hooks
Will allow us to catch issues (as fixed with previous patches) rather
than release a broken tarball.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2016-10-14 11:09:00 +01:00
Emil Velikov 3fd0cafc1c radv: move AMDGPU_LIBS later in the link chain
At the moment (albeit unlikely) one could get link-time issues, since
libdrm_amdgpu.so is before it's users in the link chain.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2016-10-14 11:09:00 +01:00
Emil Velikov a8a5f0a025 radv: correct variable name VISIBILITY_{, C}FLAGS
The letter C was missing, thus in turn all the internal symbols were
exported.

As a result we hide ~150 symbols and cut ~36K from libvulkan_radeon.so.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2016-10-14 11:09:00 +01:00
Emil Velikov 753a9c989f amd/addrlib: hide private symbols via VISIBILITY_CXXFLAGS
Private/internal symbols should not be exported. Using the CXXFLAGS cuts
~300 exported symbols and ~23K from libvulkan_radeon.so.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-14 11:09:00 +01:00
Emil Velikov 72fa5ca06d intel: automake: replace direct basename $@ invokation with $(@F)
Use the shorthand make variable(s) as elsewhere in the build.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-10-14 11:09:00 +01:00
Emil Velikov 48267b730c gallium: annotate sw_driver_descriptor instance as const data
Already treated and handled as such.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-14 11:09:00 +01:00
Emil Velikov 792148f16a gallium: annotate drm_driver_descriptor instance as const data
Already treated and handled as such.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-14 11:09:00 +01:00
Emil Velikov c079a206ad gallium: rename drm_driver_descriptor::{, driver_}name
Historically we use "device name" for the name of the kernel module and
"driver name" for the dri/other driver.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-14 11:09:00 +01:00
Emil Velikov 9837cf13b1 gallium: remove unused drm_driver_descriptor::driver_name
Likely unused since day 1, although I've only checked back until the
st/dri unification with commit 29ca7d2c94 ("st/dri: merge dri/drm and
dri/sw backends")

Based on the comment, referencing drmOpenByName it's not something we
want to bring back.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-14 11:09:00 +01:00
Emil Velikov 0f031dcf11 gallium: fix drm_driver_descriptor::name comment
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-14 11:09:00 +01:00
Emil Velikov c85b34ffd0 mesa_glinterop: allow building without X and related headers
This commit effectively reverts c10dcb2ce8
and fixes the typedef redefinition which inspired it.

In order to prevent requiring X packages at build time earlier commit
forward declared the required X/GLX typedefs. Since that approach
introduced typedef redefinition (a C11 feature) it was reverted.

To avoid the redefinition while _not_ mandating X and related headers
forward declare the structs and use those through the header.

As anyone uses the mesa interop header they ensure that the X (or others
in terms of EGL) headers are included, which ensures that everything is
resolved within the compilation unit.

Cc: Vinson Lee <vlee@freedesktop.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Tapani Pälli <tapani.palli@intel.com>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Fixes: c10dcb2ce8 ("Revert "mesa_glinterop: remove inclusion of GLX
header"")
Fixes: 8472045b16 ("mesa_glinterop: remove inclusion of GLX header")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2016-10-14 11:08:59 +01:00
Mark Thompson 0b241b7717 st/va: Fix H.264 PicOrderCnt value
TopFieldPicOrderCnt is exactly the PicOrderCnt value for a frame - see
H.264 section 8.2.1.

Reviewed-by: Christian König <christian.koenig@amd.com>
2016-10-14 11:57:52 +02:00
Mark Thompson 1edaa33135 st/va: Baseline profile is not supported
Constrained baseline profile is supported, so use that instead.  This
matches what the encoder already does (constraint_set1_flag is always
set in the output bitstream).

Reviewed-by: Christian König <christian.koenig@amd.com>
2016-10-14 11:57:48 +02:00
Mark Thompson e0604eed9f st/va: Return surface formats depending on config chroma format
This makes the supported format actually match the configuration, and
allows the user to observe that NV12 is supported for video processing
where previously they couldn't (though it did always work if they
blindly tried to use it anyway).

Reviewed-by: Christian König <christian.koenig@amd.com>
2016-10-14 11:57:44 +02:00
Mark Thompson e7c7ef3625 st/va: Save surface chroma format in config
Both YUV420 and RGB32 configurations are supported, so we need to be
able to distinguish which is being used.

Reviewed-by: Christian König <christian.koenig@amd.com>
2016-10-14 11:57:40 +02:00
Mark Thompson 8a931c83ba st/va: Return more useful config attributes
The encoder attributes are needed for a user of the encoder to be
able to configure it sensibly without internal knowledge.

Reviewed-by: Christian König <christian.koenig@amd.com>
2016-10-14 11:57:25 +02:00
Mario Kleiner 0c94ed0987 glx: Perform check for valid fbconfig against proper X-Screen.
Commit cf804b4455
('glx: fix crash with bad fbconfig') introduced a check
in glXCreateNewContext() if the given config is a valid
fbconfig.

Unfortunately the check always checks the given config against
the fbconfigs of the DefaultScreen(dpy), instead of the
actual X-Screen specified in the config config->screen.

This leads to failure whenever a GL context is created
on a non-DefaultScreen(dpy), e.g., on X-Screen 1 of
a multi-x-screen setup, where the default screen is
typically 0.

Fix this by using config->screen instead of DefaultScreen(dpy).

Tested to fix context creation failure on a dual-x-screen setup.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 10:11:25 +01:00
Tim Rowley a42c22fdbf swr: [rasterizer core] don't construct pArContext on non-ar builds
Stops debug directory being created on non-ar builds.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 23:39:14 -05:00
Tim Rowley 29d07480b8 swr: [rasterizer core] remove WorkerWaitForThreadEvent bucket
Cause of bucket stop capture hang, as threads get stuck in level 1.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 23:39:14 -05:00
Tim Rowley ada27b503e swr: [rasterizer core] move binner functionality to separate file
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 23:39:14 -05:00
Tim Rowley f0a66c1da2 swr: [rasterizer scripts] add DEBUG_OUTPUT_DIR knob
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 23:39:14 -05:00
Tim Rowley ffd0224303 swr: [rasterizer core] fix comment typo
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 23:39:14 -05:00
Tim Rowley 4889922210 swr: [rasterizer core/sim] 8x2 backend + 16-wide tile clear/load/store
Work in progress (disabled).

USE_8x2_TILE_BACKEND define in knobs.h enables AVX512 code paths
(emulated on non-AVX512 HW).

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 23:39:14 -05:00
Tim Rowley bf1f46216c swr: [rasterizer archrast] fix event file issue with saving data
Also, tagging stats with draw id to correlate these events with
draw/dispatch events.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 23:39:13 -05:00
Eric Engestrom 827e038062 swr: [rasterizer common] fix assert index
Fixes: b3bd8bb611 ("swr: [rasterizer core] add support
       for "RAW" surface format")
CovID: 1373647
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-10-13 21:37:20 -05:00
Ilia Mirkin 5f885225cf docs: mark GL 4.4/4.5 extension groups as DONE for nvc0
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-13 21:45:21 -04:00
Ilia Mirkin afb6dc53bf nv50: enable ARB_enhanced_layouts
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-13 21:45:21 -04:00
Ilia Mirkin a6d6eff2e6 nvc0/ir: be more careful about preserving modifiers in SHLADD creation
src2 was being given the wrong modifier, and we were not properly
managing the modifier on the SHL source either.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-10-13 21:44:03 -04:00
Brian Paul 3a2869aaca mesa: fix indentation in vertex_attrib_binding()
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul 743a526372 mesa: add sanity check assertion in update_array_format
At most, one of the normalized, integer, doubles bools can be true.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul d6b0002195 mesa: remove needless cast in update_array()
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul 74745dcfa4 mesa: simplify update_array() with a vao local var
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul 0de9265b1f vbo: simplify some code in check_draw_elements_data()
Use the 'vao' local var in more places.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul 15fb88e912 mesa: rename gl_vertex_attrib_array gl_array_attributes
The structure contains the attributes of a vertex array.  The old name
was kind of confusing.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul c89802aeea mesa: rename gl_vertex_attrib_array::VertexBinding
Rename to gl_vertex_attrib_array::BufferBindingIndex because this field
is an index into the array of buffer binding points.  This makes some
code a little easier to follow since there's also a "VertexBinding" field
in gl_vertex_array_object.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul c328268b92 mesa: rename some vars in arrayobj.c
Use 'vao' instead of 'obj' to be consistent with other code.
Plus, add a comment.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2016-10-13 17:38:49 -06:00
Brian Paul b81546d43c tgsi: fix comment typo in tgsi_ureg.c
Trivial.
2016-10-13 17:38:49 -06:00
Brian Paul ff00ab745c mesa: replace gl_framebuffer::_IntegerColor wih _IntegerBuffers
Use a bitmask to indicate which color buffers are integer-valued, rather
than a bool.  Also, the old field was mis-computed.  If an integer buffer
was followed by a non-integer buffer, the _IntegerColor field was wrongly
set to false.

This fixes the new piglit gl-3.1-mixed-int-float-fbo test.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-13 17:38:49 -06:00
Brian Paul a710c21ac2 mesa: remove 'params' parameter from ctx->Driver.TexParameter()
None of the drivers which implement this hook do anything with the
texture parameter value.  Drivers just look at the pname and set a
dirty flag if needed.

We were doing some ugly casting and type conversion to setup the
argument so that all goes away.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-13 17:38:49 -06:00
Eric Anholt 99d790538d vc4: Avoid loading from the texture during non-utile-aligned glTexImage().
Previously, the plan was "if the width/height we have to load/store isn't
the size the user is planning on writing, then we need to load the old
contents out beforehand to prevent writing back undefined".

However, when we're doing glTexImage() we often end up aligning the
width/height into the padding of the texture, and we don't actually
need to read out that padding.

Improves x11perf -aatrapezoid100 performance from ~460/sec to
~700/sec.
2016-10-13 14:27:30 -07:00
Axel Davy 0717cd975d st/nine: Fix possible segfault in surface ctor
Regression introduced by
ba0274c7d6

Check the resource exists before assigning it
a flag (and use This->base.resource instead
of pResource, since the former may have a newly
allocate resource, while the latter would be
NULL).

This should reintroduce the behaviour of previous
code.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-13 21:16:35 +02:00
Axel Davy 98b8ad61c6 st/nine: Remove useless code in nine_shader
Since 1604efa6fd,
lconsti and lconstb don't need to be initialized.

Remove some leftovers from the previous code (which
has now invalid use of ARRAY_SIZE on a pointer instead
of an array).

Reported by Coverity.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-13 21:16:35 +02:00
Axel Davy 197cdd1bbd gallium/os: Use unsigned integers for size computation
Use uint64_t instead of int64_t in the calculation,
as the result is uint64_t.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-13 21:16:35 +02:00
Samuel Pitoiset 4527222169 nvc0: enable ARB_enhanced_layouts
All ARB_enhanced_layouts piglit tests pass without any changes
in our compiler.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-13 21:13:34 +02:00
Dave Airlie 47a7d86fe9 radv: fix the wayland wsi busy bit
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 05:10:02 +10:00
Dave Airlie a3834ebaf9 anv: fix the wayland wsi busy flag setting
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 05:10:02 +10:00
Tom Stellard 5c66d46d6a radv: Use new image load/store intrinsic signatures v2
These were changed in LLVM r284024.

v2:
  - Only use float types for vdata of llvm.amdgcn.image.store.  LLVM doesn't
    support integer types for this intrinsic.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 04:48:11 +10:00