Commit Graph

85633 Commits

Author SHA1 Message Date
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
Tom Stellard 30e63fb0e4 radv: Fix incorrect comment
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 04:48:11 +10:00
Dave Airlie 060e6f468a radv: fix identity swizzle handling
The identity swizzle should operate exactly
like an .r = R, .g = G, .b = B, .a = A swizzle.

This fixes a bunch of the 16-bit BGRA blit tests
dEQP-VK.api.copy_and_blit.blit_image.all_formats.b4g4r4a4*

Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 04:45:57 +10:00
Dave Airlie 8980ac0411 anv/wsi: fix apps that acquire multiple images up front
This fix was found in the radv codebase when running dota2,
no idea if anyone has reported it on anv, but the same problem
occurs.

Once an image is acquired we need to mark it busy.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 04:45:11 +10:00
Dave Airlie 8bdac874e6 radv/wsi: fix app that acquire multiple images up front
dota2 does multiple acquires followed by multiple queues,
this bug manifested itself as a hang in the xshmfence code
randomly when dota2 was doing it's menus. It also occured
when running dota2 under phoronix-test-suite.

The fix is once the image is acquired to mark it busy then
so nobody else can acquire. We have to trust vulkan apps
that they will eventually submit it.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 04:45:11 +10:00
Dave Airlie dfe74fd1a9 anv: initialise and increment send_sbc
At least set this to not be uninitialised memory.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-14 04:45:00 +10:00
Marek Olšák 7dddf0b7ab radeonsi: adjust and clean up Z_ORDER and EXEC_ON_x settings
The table was copied from the Vulkan driver. The comment lines are as long
as the table for cosmetic reasons.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-13 19:00:51 +02:00
Marek Olšák e12c1cab5d radeonsi: disable ReZ
This is a serious performance fix. Discovered by luck.

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

Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-13 19:00:51 +02:00
Marek Olšák d4d9ec55c5 radeonsi: implement TC-compatible HTILE
so that decompress blits aren't needed and depth texturing needs less
memory bandwidth.

Z16 and Z24 are promoted to Z32_FLOAT by the driver, because TC-compatible
HTILE only supports Z32_FLOAT. This doubles memory footprint for Z16.
The format promotion is not visible to state trackers.

This is part of TC-compatible renderbuffer compression, which has 3 parts:
DCC, HTILE, FMASK. Only TC-compatible FMASK compression is missing now.

I don't see a measurable increase in performance though.

(I tested Talos Principle and DiRT: Showdown, the latter is improved by
 0.5%, which is almost noise, and it originally used layered Z16,
 so at least we know that Z16 promoted to Z32F isn't slower now)

Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-13 19:00:51 +02:00
Marek Olšák a077185ea9 gallium: add PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY
For performance tuning in drivers. It filters out window system
framebuffers and OpenGL renderbuffers.

radeonsi will use this to guess whether a depth buffer will be read
by a shader. There is no guarantee about what will actually happen.

This is a departure from PIPE_BIND flags which are defined to be strict
but they are useless in practice.

Acked-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-13 19:00:51 +02:00
Nicolai Hähnle 761388a0eb radeonsi: fix regression in image atomics
Caused by a bad rebase when pushing commit 76a940893.
2016-10-13 16:04:16 +02:00
Nicolai Hähnle d413fbb159 st/mesa: fix vertex elements setup for doubles
Whether one or two slots are taken up by one API array depends on the
vertex shader, not on how the array is configured. When an array is
set up with fewer components than the shader expects, the high components
are undefined.

Fixes GL45-CTS.vertex_attrib_binding.basic-inputL-case1.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-10-13 15:41:36 +02:00
Nicolai Hähnle 15fc74905b st/glsl_to_tgsi: remove unnecessary ir_instruction argument from get_opcode
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-10-13 15:41:33 +02:00
Nicolai Hähnle 1d7685e52c st/glsl_to_tgsi: fix textureGatherOffset with indirectly loaded offsets
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-10-13 15:41:29 +02:00
Nicolai Hähnle b234e37765 st/glsl_to_tgsi: simplify translate_tex_offset
This fixes a bug with offsets from uniforms which seems to have only been
noticed as a crash in piglit's
arb_gpu_shader5/compiler/builtin-functions/fs-gatherOffset-uniform-offset.frag
on radeonsi.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-10-13 15:41:11 +02:00
Nicolai Hähnle 76a940893d radeonsi: fix the coordinate overloading of llvm.amdgcn.image.atomic.cmpswap.*
Fixes GL45-CTS.shader_image_load_store.basic-allTargets-atomic*

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-13 10:17:42 +02:00
Nicolas Koch 35e2bfa6d9 radv: Return correct result in EnumeratePhysicalDevices
If pPhysicalDevices is too small for all physical devices,
the driver must return VK_INCOMPLETE. Since only a single
physical device is supported, this is only the case when
pPhysicalDeviceCount == 0 && pPhysicalDevices != NULL.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-13 09:11:13 +10:00
Ilia Mirkin e6a693c447 st/mesa: only flip stipple pattern for winsys fbo's
Gallium is completely oblivious to whether the fbo is flipped or not.
Only flip the stipple pattern when the fbo is flipped as well. Otherwise
the driver has no idea when to unflip the pattern.

Fixes bin/gl-2.1-polygon-stipple-fs -fbo

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-12 17:04:16 -04:00
Emil Velikov a4622305e6 swr: automake: add ar_eventhandlerfile_h.template to the tarball
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-12 18:55:22 +01:00
Emil Velikov 3c419a941a radv: add all headers to the sources list
Otherwise they'll be missing from the tarball and the build will fail.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-12 18:55:20 +01:00
Ilia Mirkin a48a343c29 nvc0/ir: fix textureGather with a single offset
Recent fix for non-const offsets broke the case of a single offset (vs 4
offsets). The later code relies on the offs array to contain null values
to tell whether they should be added onto the srcs list.

Fixes: 5239bd592 ("nvc0/ir: fix overwriting of value backing non-constant gather offset")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
2016-10-12 13:18:14 -04:00