Commit Graph

95861 Commits

Author SHA1 Message Date
Samuel Pitoiset 3c61c99ed5 radv: add a comment that describes the trace BO layout
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-09-14 10:37:57 +02:00
Samuel Pitoiset 4224b31bf3 radv: initialize the trace BO to 0
To avoid random initial values.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-09-14 10:37:57 +02:00
Eric Engestrom 396d2dbce4 swr: use ARRAY_SIZE macro
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-14 09:36:01 +01:00
Jeremy Huddleston Sequoia e7ef901650 mesa: Deal with size differences between GLuint and GLhandleARB in GetAttachedObjectsARB
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-09-13 19:48:58 -07:00
Denis Pauk 74d2456491 gallium/{r600, radeonsi}: Fix segfault with color format (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102552

v2: Patch cleanup proposed by Nicolai Hähnle.
    * deleted changes in si_translate_texformat.

Cc: Nicolai Hähnle <nhaehnle@gmail.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-09-14 00:59:24 +02:00
Kenneth Graunke edfd8d42a9 i965: Add an INTEL_DEBUG=submit option for printing batch statistics.
When a batch is submitted, INTEL_DEBUG=bat prints a message indicating
which part of the code triggered the flush, and some statistics about
the batch/state buffer utilization.

It also decodes the batchbuffer in debug builds...which is so much
output that it drowns out the utilization messages, if that's all you
care about.

INTEL_DEBUG=submit now just does the utilization messages.
INTEL_DEBUG=bat continues to do both (as the message is a good indicator
that we're starting decode of a new batch).

v2: Rename from "flush" to "submit" (suggested by Chris) because we
    might want "flush" for PIPE_CONTROL debugging someday.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-13 13:52:38 -07:00
Dave Airlie 64d9bd149a radv/nir: call opt_remove_phis after trivial continues.
With the shaders in the ssao demo, the nir_opt_if wasn't
working properly without this, after this the if gets optimised
so that loop unrolling gets called.

(loop unrolling fails due to instruction count, but at least
it gets to do that.)

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-09-13 21:13:03 +01:00
Chad Versace f9412a4e75 util/build_id: Include <dlfcn.h>
Fix the build for Android Nougat.

The dladdr(3) manpage says that <dlfcn.h> is required. On Linux, the
build succeeded without it because build_id.c includes <link.h> which
includes <dlfcn.h>. On Android, we must include <dlfcn.h> directly.

Fixes: 5c98d382 "util: Query build-id by symbol address, not library name"
Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-09-13 12:43:42 -07:00
Chad Versace 5c98d3825c util: Query build-id by symbol address, not library name
This patch renames build_id_find_nhdr() to
build_id_find_nhdr_for_addr(), and changes it to never examine the
library name.

Tested on Fedora by confirming that build_id_get_data() returns the same
build-id as the file(1) tool. For BSD, I confirmed that the API used
(dladdr() and struct Dl_info) is documented in FreeBSD's manpages.

This solves two problems:

    - We can now the query the build-id without knowing the installed library's
      filename.

      This matters because Android requires specific filenames for HAL
      modules, such as "/vendor/lib/hw/vulkan.${board}.so". The HAL
      filenames do not follow the Unix convention of "libfoo.so".  In
      other words, the same query code will now work on Linux and Android.

    - Querying the build-id now works correctly when the process
      contains multiple shared objects with the same basename.
      (Admittedly, this is a highly unlikely scenario).

Cc: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-13 09:49:27 -07:00
Nicolai Hähnle c8db134e4d st/glsl_to_tgsi: remove unused code in temprename
Reviewed-By: Gert Wollny <gw.fossdev@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-09-13 18:28:29 +02:00
Nicolai Hähnle 55ca12be9d st/glsl_to_tgsi: be precise about merging scopes
enclosing_scope already contains enclosing_scope_first_read.
What we really want to check here -- not for correctness, but
for speed -- is whether last_read_scope already contains
enclosing_scope.

Reviewed-By: Gert Wollny <gw.fossdev@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-09-13 18:28:11 +02:00
Nicolai Hähnle cffc0ae0d9 ac/surface: match Z and stencil tile config
Fixes various piglit tests on Stoney, see the comment.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:27:01 +02:00
Nicolai Hähnle 481df8032b ac/surface: sanity-check that we got a TC-compatible HTILE if requested
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:26:59 +02:00
Nicolai Hähnle b2b0702868 ac/addrlib: enable assertions in debug builds
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:26:56 +02:00
Nicolai Hähnle 113ecc2bfa ac/addrlib: relax an assertion
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:26:54 +02:00
Nicolai Hähnle b0ee0e0860 ac/addrlib: relax an assertion
This assertion is triggered on Stoney in Piglit
./bin/framebuffer-blit-levels {draw,read} stencil -auto -fbo
and similar tests. It should be harmless -- just relax it until
we can get internal clarification.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:26:51 +02:00
Nicolai Hähnle e4af4433fc radeonsi: hard-code pixel center for interpolateAtSample without multisample buffers
The GLSL rules for interpolateAtSample are unfortunate:

   "Returns the value of the input interpolant variable at
    the location of sample number sample. If
    multisample buffers are not available, the input
    variable will be evaluated at the center of the pixel.
    If sample sample does not exist, the position used to
    interpolate the input variable is undefined."

This fix will fallback to monolithic shader compilation when
interpolateAtSample is used without multisampling.

One alternative would be to always upload 16 sample positions,
filling the buffer up with repetition when the actual number of
samples is less, and then ANDing the sample ID with 0xf. However,
that punishes all well-behaving users of interpolateAtSample,
when in reality, only conformance tests should be affected by
the issue.

Fixes
dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.non_multisample_buffer.*

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:25:45 +02:00
Nicolai Hähnle 92c4277990 radeonsi: apply a mask to gl_SampleMaskIn in the PS prolog
gl_SampleMaskIn is supposed to contain set bits only for the samples that
are covered by the current fragment shader invocation, but the VGPR
initialization hardware loads the set of all bits that are covered at the
current pixel.

Fixes various tests in
dEQP-GLES31.functional.shaders.sample_variables.sample_mask_in.*

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:25:41 +02:00
Nicolai Hähnle 792724a337 radeonsi: remove SET_PREDICATION workaround on newer firmware
We need to keep the workaround for older firmware, though.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:25:08 +02:00
Nicolai Hähnle b8c6e88848 amd/common: get ME/PFP/CE firmware feature versions as well
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:25:06 +02:00
Nicolai Hähnle 8d8f1ef573 radeonsi: rename variable to clarify its meaning
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:24:18 +02:00
Nicolai Hähnle 48b3364b5b radeonsi: make si_init_shader_selector_async static
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:24:18 +02:00
Nicolai Hähnle 7e4344151f radeonsi: fix segfault in descriptor dumping
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:24:18 +02:00
Nicolai Hähnle 81f398dcb1 ddebug: write out final driver log messages with GALLIUM_DDEBUG=always
If the last operation happens to be a non-draw, such as a
transfer_map that triggers a decompress blit, there may be
interesting messages left in the driver log.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-09-13 18:24:18 +02:00
Tim Rowley 000e2958f5 swr/rast: Fetch compile state changes
Add InstanceStrideEnable field and rename InstanceDataStepRate to
InstanceAdvancementState in INPUT_ELEMENT_DESC structure.

Add stubs for handling InstanceStrideEnable in FetchJit::JitLoadVertices()
and FetchJit::JitGatherVertices() and assert if they are triggered.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:54 -05:00
Tim Rowley ead0dfe31e swr/rast: adjust linux cpu topology identification code
Make more robust to handle strange strange configurations like a vmware
exported 4-way numa X 1-core configuration.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:47 -05:00
Tim Rowley 1ccf9ad280 swr/rast: Missed conversion to SIMD_T
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:41 -05:00
Tim Rowley c0ce5c4422 swr/rast: whitespace changes
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:35 -05:00
Tim Rowley 6b9e801832 swr/rast: add graph write to jit debug putput
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:30 -05:00
Tim Rowley 6f0fcec07a swr/rast: Migrate memory pointers to gfxptr_t type
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:24 -05:00
Tim Rowley ae2412dbbd swr/rast: Remove hardcoded clip/cull slot from clipper
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:18 -05:00
Tim Rowley 5471f65976 swr/rast: Start to remove hardcoded clipcull_dist vertex attrib slot
Add new field in SWR_BACKEND_STATE::vertexClipCullOffset to specify the
start of the clip/cull section of the vertex header.  Removed use of
hardcoded slot from binner.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:11 -05:00
Tim Rowley 9669972692 swr/rast: Move clip/cull enables in API
Moved from from SWR_RASTSTATE to SWR_BACKEND_STATE.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:09:04 -05:00
Tim Rowley f5031fb952 swr/rast: Add new API SwrStallBE
SwrStallBE stalls the backend threads until all work submitted before
the stall has finished.  The frontend threads can continue to make
forward progress.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-09-13 10:08:46 -05:00
Eric Engestrom 2f6ffab1ce glsl: compile unused function out
The function is only called from one place, which is hidden behind
the same `#ifdef DEBUG`.

Fixes: ca73c3358c "glsl: Mark functions static"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-09-13 11:22:27 +01:00
Eric Engestrom c0b81af0dc radv: compile out unused code
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-13 11:19:30 +01:00
Samuel Pitoiset 375c4868ef radv: clear push_constant_stages when resetting a command buffer
Per the spec:

   "Resetting a command buffer is an operation that discards any
   previously recorded commands and puts a command buffer in the
   initial state."

As far I'm concerned, that flag can be changed by calling
VkCmdPushConstants() (or any other functions which update it),
so it should be cleared as well.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-09-13 09:47:45 +02:00
Samuel Pitoiset ef197ead75 radv: add more radv_emit_XXX() helpers for the dynamic state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-09-13 09:47:43 +02:00
Samuel Pitoiset ce218c31eb radv: remove useless 'cmd_buffer' param from radv_buffer_view_init()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-09-13 09:47:41 +02:00
Dave Airlie 3633bae36b radv/gfx9: fix image resource handling.
GFX9 changes how images are layed out, so this needs updating.

Fixes: dEQP-VK.query_pool.statistics_query.*

Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-09-13 17:17:07 +10:00
Dave Airlie aba441be44 radv/ac: bump params array for image atomic comp swap
For the comp_swap case this was overflowing and crashing
sometimes.

Fixes:
dEQP-VK.image.atomic_operations.compare_exchange.*

Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-09-13 17:17:02 +10:00
Dave Airlie ebd2a5354d radv/gfx9: set mip0-depth correctly for 2d arrays/3d images
This field covers the whole resource.

Fixes:
dEQP-VK.pipeline.image.suballocation.sampling_type.combined.view_type.3d.format.*
dEQP-VK.texture.filtering.3d.combinations.*

Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-09-13 17:16:52 +10:00
Dave Airlie 1bcb953e16 radv: handle GFX9 1D textures
As GFX9 can't handle 1D depth textures, radeonsi and
apparantly pro just update all 1D textures to 2D,
and work around it.

This ports the workarounds from radeonsi.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-09-13 08:40:41 +10:00
Dave Airlie 2f5b4490b5 radv: don't use iview for meta image width/height.
Work out the width/height from the level manually, as on GFX9
we won't minify the iview width/height.

This fixes:
dEQP-VK.api.image_clearing.core.clear_color_image* on gfx9

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-09-13 08:40:18 +10:00
Jason Ekstrand d496780fb2 intel/eu/validate: Look up types on demand in execution_type()
We are looking up the execution type prior to checking how many sources
we have.  This leads to looking for a type for src1 on MOV instructions
which is bogus.  On BDW+, the src1 register type overlaps with the
64-bit immediate and causes us problems.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
2017-09-12 15:01:00 -07:00
Marek Olšák 4ba20c9473 Revert "winsys/amdgpu: disable local BOs on Raven"
This reverts commit 1cda9a2fee.

It works now.
2017-09-12 22:44:02 +02:00
Bas Nieuwenhuizen 1a172fb113 radv: Don't allocate CMASK for linear images.
We can't use it anyway in fast clears, and on GFX9 it seems to
actually hange the card if we specify it.

Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
2017-09-12 22:06:55 +02:00
Bas Nieuwenhuizen bee83b2661 radv: Disable multilayer & multilevel DCC.
The current DCC init routine doesn't account for initializing a
single layer or level. Multilayer seems hard for small textures on
pre-GFX9 as tre metadata for the layers can be interleaved. For
GFX9 multilevel textures are a problem for similar reasons.

So just disable this for now, until we handle the texture modes
correctly.

Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
2017-09-12 22:06:24 +02:00
Kenneth Graunke e9cf458fa8 docs: Document shader capturing environment variables.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2017-09-12 09:27:09 -07:00
Eric Engestrom 85b66d2096 docs/egl: remove reference to EGL_DRIVERS_PATH
Support for external egl drivers was dropped a few years ago.

Fixes: 209360bbb9 "egl/main: drop support for external egl drivers"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-12 16:14:04 +01:00