mesa.git
7 years agoi965: Make BLORP properly avoid batch wrapping.
Kenneth Graunke [Tue, 5 Sep 2017 22:57:41 +0000 (15:57 -0700)]
i965: Make BLORP properly avoid batch wrapping.

We need to set brw->no_batch_wrap to actually avoid flushing in the
middle of our BLORP operation, and instead grow the batchbuffer.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Grow the batch/state buffers if we need space and can't flush.
Kenneth Graunke [Fri, 1 Sep 2017 23:42:56 +0000 (16:42 -0700)]
i965: Grow the batch/state buffers if we need space and can't flush.

Previously, we would just assert fail and die in this case.  The only
safeguard is the "estimated max prim size" checks when starting a draw
(or compute dispatch or BLORP operation)...which are woefully broken.

Growing is fairly straightforward:

1. Allocate a new larger BO.
2. memcpy the existing contents over to the new buffer
3. Set the new BO to the same GTT offset as the old BO.  When emitting
   relocations, we write the presumed GTT offset of the target BO.  If
   we changed it, we'd have to update all the existing values (by
   walking the relocation list and looking at offsets), which is more
   expensive.  With the old BO freed, ideally the kernel could simply
   place the new BO at that offset anyway.
4. Update the validation list to contain the new BO.
5. Update the relocation list to have the GEM handle for the new BO
   (which we can skip if using I915_EXEC_HANDLE_LUT).

v2: Update to handle malloc'd shadow buffers.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Use a separate state buffer, but avoid changing flushing behavior.
Kenneth Graunke [Wed, 30 Aug 2017 08:37:24 +0000 (01:37 -0700)]
i965: Use a separate state buffer, but avoid changing flushing behavior.

Previously, we emitted GPU commands and indirect state into the same
buffer, using a stack/heap like system where we filled in commands from
the start of the buffer, and state from the end of the buffer.  We then
flushed before the two met in the middle.

Meeting in the middle is fatal, so you have to be certain that you
reserve the correct amount of space before emitting commands or state
for a draw.  Currently, we will assert !no_batch_wrap and die if the
estimate is ever too small.  This has been mercifully obscure, but has
happened on a number of occasions, and could in theory happen to any
application that issues a large draw at just the wrong time.

Estimating the amount of batch space required is painful - it's hard to
get right, and getting it right involves a lot of code that would burn
CPU time, and also be painful to maintain.  Rolling back to a saved
state and retrying is also painful - failing to save/restore all the
required state will break things, and redoing state emission burns a
lot of CPU.  memcpy'ing to a new batch and continuing is painful,
because commands we issue for a draw depend on earlier commands as well
(such as STATE_BASE_ADDRESS, or the GPU being in a pirtacular state).

The best plan is to never run out of space, which is totally doable but
pretty wasteful - a pessimal draw requires a huge amount of space, and
rarely occurs.  Instead, we'd like to grow the batch buffer if we need
more space and can't safely flush.

We can't grow with a meet in the middle approach - we'd have to move the
state to the end, which would mean updating every offset from dynamic
state base address.  Using separate batch and state buffers, where both
fill starting at the beginning, makes it easy to grow either as needed.

This patch separates the two concepts.  We create a separate state
buffer, with a second relocation list, and use that for brw_state_batch.

However, this patch tries to retain the original flushing behavior - it
adds the amount of batch and state space together, as if they were still
co-existing in a single buffer.  The hope is to flush at the same time
as before.  This is necessary to avoid provoking bugs caused by broken
batch wrap handling (which we'll fix shortly).  It also avoids suddenly
increasing the size of the batch (due to state not taking up space),
which could have a significant performance impact.  We'll tune it later.

v2:
- Mark the statebuffer with EXEC_OBJECT_CAPTURE when supported (caught
  by Chris).  Unfortunately, we lose the ability to capture state data
  on older kernels.
- Continue to support the malloc'd shadow buffers.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Pass screen to intel_batchbuffer_reset().
Kenneth Graunke [Fri, 8 Sep 2017 06:43:46 +0000 (23:43 -0700)]
i965: Pass screen to intel_batchbuffer_reset().

This will let us access screen->kernel_features in the next patch.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Prepare INTEL_DEBUG=bat decoding for a separate statebuffer.
Kenneth Graunke [Wed, 30 Aug 2017 08:37:24 +0000 (01:37 -0700)]
i965: Prepare INTEL_DEBUG=bat decoding for a separate statebuffer.

We'll need to read from both buffers when decoding state.

This also drops the "failed to map" fallback - it's completely useless
on LLC systems where we write directly to the mapped BO.  It's not that
useful on non-LLC systems either.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Split brw_emit_reloc into brw_batch_reloc and brw_state_reloc.
Kenneth Graunke [Thu, 31 Aug 2017 20:10:19 +0000 (13:10 -0700)]
i965: Split brw_emit_reloc into brw_batch_reloc and brw_state_reloc.

brw_batch_reloc emits a relocation from the batchbuffer to elsewhere.
brw_state_reloc emits a relocation from the statebuffer to elsewhere.

For now, they do the same thing, but when we actually split the two
buffers, we'll change brw_state_reloc to use the state buffer.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Refactor relocs into a brw_reloc_list structure.
Kenneth Graunke [Thu, 31 Aug 2017 18:57:01 +0000 (11:57 -0700)]
i965: Refactor relocs into a brw_reloc_list structure.

I'm planning on splitting batch and state into separate buffers, at
which point we'll need two relocation lists.  In preparation for that,
this patch refactors the relocation stuff into a structure we can
replicate...which looks a lot like anv_reloc_list.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agoi965: Move brw_state_batch code to intel_batchbuffer.c
Kenneth Graunke [Wed, 30 Aug 2017 08:40:00 +0000 (01:40 -0700)]
i965: Move brw_state_batch code to intel_batchbuffer.c

The batch buffer and state buffer code is fairly tied together,
and having it in one .c file will make refactoring easier.

Also, drop some commentary above brw_state_batch.  The "aperture
checking performance hacks" are long since gone, so that paragraph
makes little sense at this point.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Drop a useless ret == 0 check.
Kenneth Graunke [Wed, 30 Aug 2017 07:47:03 +0000 (00:47 -0700)]
i965: Drop a useless ret == 0 check.

Prior to the previous patch, we would pwrite the batchbuffer contents,
and wanted to skip the execbuffer if that failed.  Now that we memcpy,
we don't set ret != 0 on failure anymore, so it will always be 0.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Use a WC map and memcpy for the batch instead of pwrite.
Kenneth Graunke [Fri, 8 Sep 2017 22:00:14 +0000 (15:00 -0700)]
i965: Use a WC map and memcpy for the batch instead of pwrite.

We'd like to eliminate the malloc'd shadow copy eventually, but there
are still unresolved performance problems.  In the meantime, let's at
least get rid of pwrite.

On Apollolake, improves Synmark OglBatch6 performance by:
1.53581% +/- 0.269589% (n=108).

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Use batch->bo->size in brw_emit_reloc assertion.
Kenneth Graunke [Wed, 30 Aug 2017 08:04:48 +0000 (01:04 -0700)]
i965: Use batch->bo->size in brw_emit_reloc assertion.

This makes the assertion safe against batchbuffers growing.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Delete a batch size assertion that isn't very useful.
Kenneth Graunke [Wed, 30 Aug 2017 07:54:40 +0000 (00:54 -0700)]
i965: Delete a batch size assertion that isn't very useful.

This assertion prevents you from doing intel_batchbuffer_require_space
with a size so huge it won't fit in the batchbuffer.  This doesn't seem
like a common mistake, and I've never seen the assert to be useful.

Soon, I hope to have batches grow, at which point this won't make sense.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965/screen: Implement queryDmaBufFormatModifierAttirbs
Jason Ekstrand [Wed, 16 Aug 2017 19:09:16 +0000 (12:09 -0700)]
i965/screen: Implement queryDmaBufFormatModifierAttirbs

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoi965/screen: Report the correct number of image planes
Jason Ekstrand [Wed, 16 Aug 2017 19:01:15 +0000 (12:01 -0700)]
i965/screen: Report the correct number of image planes

For non-CCS images, we were reporting just one plane even though they
may have multiple in the case of YUV.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agogbm: Add a gbm_device_get_format_modifier_plane_count function
Jason Ekstrand [Wed, 16 Aug 2017 18:54:11 +0000 (11:54 -0700)]
gbm: Add a gbm_device_get_format_modifier_plane_count function

This allows the user to query the number of planes required by a given
format+modifier combination without having to create a bo or surface.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agodri/image: Add a format modifier attributes query
Jason Ekstrand [Wed, 16 Aug 2017 18:53:38 +0000 (11:53 -0700)]
dri/image: Add a format modifier attributes query

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agodrirc: enable glthread for more games (Civ5, CivBE, Dreamfall, Hitman, SR3)
Christoph Berliner [Thu, 14 Sep 2017 19:01:04 +0000 (21:01 +0200)]
drirc: enable glthread for more games (Civ5, CivBE, Dreamfall, Hitman, SR3)

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
7 years agoglsl: avoid accessing invalid memory after get_variable_being_redeclared()
Iago Toral Quiroga [Wed, 13 Sep 2017 07:34:38 +0000 (09:34 +0200)]
glsl: avoid accessing invalid memory after get_variable_being_redeclared()

After get_variable_being_redeclared() has been called, it is no longer
safe to access the original variable pointer, since its memory might have
been freed.

Since callers of this function should only be accessing the variable pointer
returned by the function, avoid potential bugs by re-assigning the
original variable pointer to the result of the function call,
making it impossible for the remaining code to access an invalid variable
pointer.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoglsl: make the redeclared variable NULL if it is deleted
Iago Toral Quiroga [Wed, 13 Sep 2017 07:08:01 +0000 (09:08 +0200)]
glsl: make the redeclared variable NULL if it is deleted

get_variable_being_redeclared() can delete the original variable
in a specific scenario. The code sets it to NULL after this so other
code in that same function doesn't try to access trashed memory after
the fact, however, the copy of that variable in the caller code
won't see any of this making it very easy to overlook.

Make the function a bit safer by taking a pointer to the original
variable so we can also make NULL the caller's pointer to the variable
if this function deletes it.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoglsl: use 'declared_var' instead of 'var' after checking redeclarations
Iago Toral Quiroga [Wed, 13 Sep 2017 06:59:18 +0000 (08:59 +0200)]
glsl: use 'declared_var' instead of 'var' after checking redeclarations

Since the original 'var' might have been deleted from this point forward.

Bugzila: https://bugs.freedesktop.org/show_bug.cgi?id=102685
Fixes: 51bf007d2c27fba (glsl: Disallow unsized array of atomic_uint)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agodri/radeon: use ARRAY_SIZE macro
Eric Engestrom [Mon, 4 Sep 2017 12:54:52 +0000 (13:54 +0100)]
dri/radeon: use ARRAY_SIZE macro

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agoradv: dump the list of enabled options when a hang occured
Samuel Pitoiset [Mon, 11 Sep 2017 20:28:42 +0000 (22:28 +0200)]
radv: dump the list of enabled options when a hang occured

Useful to know which debug/perftest options were enabled when
a hang report is generated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: dump last 60 lines of dmesg when a hang occured
Samuel Pitoiset [Mon, 11 Sep 2017 20:02:54 +0000 (22:02 +0200)]
radv: dump last 60 lines of dmesg when a hang occured

Copied from dd_dump_dmesg().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: dump descriptors when a hang occured
Samuel Pitoiset [Mon, 11 Sep 2017 14:13:05 +0000 (16:13 +0200)]
radv: dump descriptors when a hang occured

Might be useful for checking if all descriptors are sets by
the application.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: save all descriptor pointers into the trace BO
Samuel Pitoiset [Mon, 11 Sep 2017 14:12:15 +0000 (16:12 +0200)]
radv: save all descriptor pointers into the trace BO

To dump them when a hang is detected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: dump annotated shaders using UMR
Samuel Pitoiset [Mon, 11 Sep 2017 11:44:20 +0000 (13:44 +0200)]
radv: dump annotated shaders using UMR

This might be very useful in order to figure out where a shader
is stucked. This uses UMR to detect which instruction is executing
bad things.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradeonsi: move si_get_wave_info() to AMD common code
Samuel Pitoiset [Thu, 7 Sep 2017 09:05:29 +0000 (11:05 +0200)]
radeonsi: move si_get_wave_info() to AMD common code

This will allow us to use it from radv.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: dump some status MMIO registers when a hang occured
Samuel Pitoiset [Wed, 6 Sep 2017 07:47:21 +0000 (09:47 +0200)]
radv: dump some status MMIO registers when a hang occured

Might report some useful information to help figuring out where
does the hang happened.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv/winsys: add a read_registers() callback
Samuel Pitoiset [Wed, 6 Sep 2017 07:38:19 +0000 (09:38 +0200)]
radv/winsys: add a read_registers() callback

To dump some status MMIO registers when a hang is detected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: dump shader stats when a hang occured
Samuel Pitoiset [Tue, 5 Sep 2017 13:36:59 +0000 (15:36 +0200)]
radv: dump shader stats when a hang occured

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: add radv_shader_dump_stats() helper
Samuel Pitoiset [Tue, 5 Sep 2017 13:34:07 +0000 (15:34 +0200)]
radv: add radv_shader_dump_stats() helper

To dump the shader stats when a hang is detected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: dump the active shaders when a hang occured
Samuel Pitoiset [Tue, 5 Sep 2017 19:07:57 +0000 (21:07 +0200)]
radv: dump the active shaders when a hang occured

Only the disassembly is currently dumped.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: add debug flags for syncing shaders after every draw call
Samuel Pitoiset [Mon, 11 Sep 2017 13:00:41 +0000 (15:00 +0200)]
radv: add debug flags for syncing shaders after every draw call

To improve GPU hangs detection when shaders are stucked.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: add radv_cmd_buffer_after_draw() helper function
Samuel Pitoiset [Mon, 11 Sep 2017 12:50:12 +0000 (14:50 +0200)]
radv: add radv_cmd_buffer_after_draw() helper function

To share common code after every draw/compute calls.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: save the bound pipeline pointers into the trace BO
Samuel Pitoiset [Tue, 5 Sep 2017 19:02:14 +0000 (21:02 +0200)]
radv: save the bound pipeline pointers into the trace BO

When a GPU hang is detected in radv_gpu_hang_occured() we know
which command buffer is faulty but the bound pipelines might
have been updated during the execution.

The pointers to the radv_pipeline objects are emitted just
after the second trace ID, that way it would be easy to dump
the active shaders at the moment of the hang.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: add a comment that describes the trace BO layout
Samuel Pitoiset [Mon, 11 Sep 2017 13:12:25 +0000 (15:12 +0200)]
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>
7 years agoradv: initialize the trace BO to 0
Samuel Pitoiset [Wed, 13 Sep 2017 09:13:03 +0000 (11:13 +0200)]
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>
7 years agoswr: use ARRAY_SIZE macro
Eric Engestrom [Wed, 6 Sep 2017 10:21:32 +0000 (11:21 +0100)]
swr: use ARRAY_SIZE macro

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agomesa: Deal with size differences between GLuint and GLhandleARB in GetAttachedObjectsARB
Jeremy Huddleston Sequoia [Sun, 8 May 2016 07:47:10 +0000 (00:47 -0700)]
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>
7 years agogallium/{r600, radeonsi}: Fix segfault with color format (v2)
Denis Pauk [Tue, 12 Sep 2017 20:38:45 +0000 (23:38 +0300)]
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>
7 years agoi965: Add an INTEL_DEBUG=submit option for printing batch statistics.
Kenneth Graunke [Tue, 5 Sep 2017 22:46:30 +0000 (15:46 -0700)]
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>
7 years agoradv/nir: call opt_remove_phis after trivial continues.
Dave Airlie [Wed, 13 Sep 2017 02:49:31 +0000 (03:49 +0100)]
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>
7 years agoutil/build_id: Include <dlfcn.h>
Chad Versace [Wed, 13 Sep 2017 18:51:04 +0000 (11:51 -0700)]
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>
7 years agoutil: Query build-id by symbol address, not library name
Chad Versace [Tue, 12 Sep 2017 22:52:03 +0000 (15:52 -0700)]
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>
7 years agost/glsl_to_tgsi: remove unused code in temprename
Nicolai Hähnle [Wed, 6 Sep 2017 09:49:12 +0000 (11:49 +0200)]
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>
7 years agost/glsl_to_tgsi: be precise about merging scopes
Nicolai Hähnle [Wed, 6 Sep 2017 09:43:06 +0000 (11:43 +0200)]
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>
7 years agoac/surface: match Z and stencil tile config
Nicolai Hähnle [Tue, 5 Sep 2017 14:16:29 +0000 (16:16 +0200)]
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>
7 years agoac/surface: sanity-check that we got a TC-compatible HTILE if requested
Nicolai Hähnle [Thu, 7 Sep 2017 11:20:25 +0000 (13:20 +0200)]
ac/surface: sanity-check that we got a TC-compatible HTILE if requested

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoac/addrlib: enable assertions in debug builds
Nicolai Hähnle [Thu, 7 Sep 2017 10:16:14 +0000 (12:16 +0200)]
ac/addrlib: enable assertions in debug builds

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoac/addrlib: relax an assertion
Nicolai Hähnle [Mon, 11 Sep 2017 13:20:41 +0000 (15:20 +0200)]
ac/addrlib: relax an assertion

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoac/addrlib: relax an assertion
Nicolai Hähnle [Thu, 7 Sep 2017 10:16:36 +0000 (12:16 +0200)]
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>
7 years agoradeonsi: hard-code pixel center for interpolateAtSample without multisample buffers
Nicolai Hähnle [Sun, 10 Sep 2017 17:46:31 +0000 (19:46 +0200)]
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>
7 years agoradeonsi: apply a mask to gl_SampleMaskIn in the PS prolog
Nicolai HÃ\83¤hnle [Sun, 10 Sep 2017 17:19:40 +0000 (19:19 +0200)]
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>
7 years agoradeonsi: remove SET_PREDICATION workaround on newer firmware
Nicolai Hähnle [Fri, 25 Aug 2017 23:11:14 +0000 (01:11 +0200)]
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>
7 years agoamd/common: get ME/PFP/CE firmware feature versions as well
Nicolai Hähnle [Fri, 25 Aug 2017 22:33:14 +0000 (00:33 +0200)]
amd/common: get ME/PFP/CE firmware feature versions as well

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: rename variable to clarify its meaning
Nicolai Hähnle [Fri, 8 Sep 2017 16:51:16 +0000 (18:51 +0200)]
radeonsi: rename variable to clarify its meaning

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: make si_init_shader_selector_async static
Nicolai Hähnle [Sat, 26 Aug 2017 22:43:13 +0000 (00:43 +0200)]
radeonsi: make si_init_shader_selector_async static

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: fix segfault in descriptor dumping
Nicolai Hähnle [Sat, 9 Sep 2017 15:36:07 +0000 (17:36 +0200)]
radeonsi: fix segfault in descriptor dumping

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoddebug: write out final driver log messages with GALLIUM_DDEBUG=always
Nicolai Hähnle [Wed, 6 Sep 2017 08:11:40 +0000 (10:11 +0200)]
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>
7 years agoswr/rast: Fetch compile state changes
Tim Rowley [Thu, 7 Sep 2017 23:53:03 +0000 (18:53 -0500)]
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>
7 years agoswr/rast: adjust linux cpu topology identification code
Tim Rowley [Wed, 6 Sep 2017 19:59:33 +0000 (14:59 -0500)]
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>
7 years agoswr/rast: Missed conversion to SIMD_T
Tim Rowley [Wed, 30 Aug 2017 16:02:16 +0000 (11:02 -0500)]
swr/rast: Missed conversion to SIMD_T

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoswr/rast: whitespace changes
Tim Rowley [Thu, 7 Sep 2017 20:18:35 +0000 (15:18 -0500)]
swr/rast: whitespace changes

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoswr/rast: add graph write to jit debug putput
Tim Rowley [Thu, 7 Sep 2017 20:18:08 +0000 (15:18 -0500)]
swr/rast: add graph write to jit debug putput

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoswr/rast: Migrate memory pointers to gfxptr_t type
Tim Rowley [Thu, 7 Sep 2017 20:17:23 +0000 (15:17 -0500)]
swr/rast: Migrate memory pointers to gfxptr_t type

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoswr/rast: Remove hardcoded clip/cull slot from clipper
Tim Rowley [Tue, 22 Aug 2017 22:46:14 +0000 (17:46 -0500)]
swr/rast: Remove hardcoded clip/cull slot from clipper

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoswr/rast: Start to remove hardcoded clipcull_dist vertex attrib slot
Tim Rowley [Tue, 22 Aug 2017 21:42:57 +0000 (16:42 -0500)]
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>
7 years agoswr/rast: Move clip/cull enables in API
Tim Rowley [Mon, 21 Aug 2017 22:11:34 +0000 (17:11 -0500)]
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>
7 years agoswr/rast: Add new API SwrStallBE
Tim Rowley [Fri, 18 Aug 2017 17:34:48 +0000 (12:34 -0500)]
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>
7 years agoglsl: compile unused function out
Eric Engestrom [Tue, 12 Sep 2017 14:58:28 +0000 (15:58 +0100)]
glsl: compile unused function out

The function is only called from one place, which is hidden behind
the same `#ifdef DEBUG`.

Fixes: ca73c3358c91434e68ab "glsl: Mark functions static"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agoradv: compile out unused code
Eric Engestrom [Thu, 24 Aug 2017 15:22:42 +0000 (16:22 +0100)]
radv: compile out unused code

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoradv: clear push_constant_stages when resetting a command buffer
Samuel Pitoiset [Tue, 12 Sep 2017 17:08:47 +0000 (19:08 +0200)]
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>
7 years agoradv: add more radv_emit_XXX() helpers for the dynamic state
Samuel Pitoiset [Tue, 12 Sep 2017 17:08:46 +0000 (19:08 +0200)]
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>
7 years agoradv: remove useless 'cmd_buffer' param from radv_buffer_view_init()
Samuel Pitoiset [Tue, 12 Sep 2017 17:08:45 +0000 (19:08 +0200)]
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>
7 years agoradv/gfx9: fix image resource handling.
Dave Airlie [Tue, 15 Aug 2017 05:35:52 +0000 (15:35 +1000)]
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>
7 years agoradv/ac: bump params array for image atomic comp swap
Dave Airlie [Wed, 13 Sep 2017 05:15:11 +0000 (22:15 -0700)]
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>
7 years agoradv/gfx9: set mip0-depth correctly for 2d arrays/3d images
Dave Airlie [Mon, 21 Aug 2017 20:02:03 +0000 (21:02 +0100)]
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>
7 years agoradv: handle GFX9 1D textures
Dave Airlie [Wed, 16 Aug 2017 05:20:29 +0000 (06:20 +0100)]
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>
7 years agoradv: don't use iview for meta image width/height.
Dave Airlie [Tue, 22 Aug 2017 03:35:53 +0000 (13:35 +1000)]
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>
7 years agointel/eu/validate: Look up types on demand in execution_type()
Jason Ekstrand [Thu, 31 Aug 2017 22:41:43 +0000 (15:41 -0700)]
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
7 years agoRevert "winsys/amdgpu: disable local BOs on Raven"
Marek Olšák [Fri, 8 Sep 2017 15:34:59 +0000 (17:34 +0200)]
Revert "winsys/amdgpu: disable local BOs on Raven"

This reverts commit 1cda9a2fee05effd9c64bd773bc6005281593662.

It works now.

7 years agoradv: Don't allocate CMASK for linear images.
Bas Nieuwenhuizen [Sun, 27 Aug 2017 22:18:44 +0000 (00:18 +0200)]
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: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
7 years agoradv: Disable multilayer & multilevel DCC.
Bas Nieuwenhuizen [Tue, 29 Aug 2017 22:58:03 +0000 (00:58 +0200)]
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: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
7 years agodocs: Document shader capturing environment variables.
Kenneth Graunke [Mon, 11 Sep 2017 22:47:55 +0000 (15:47 -0700)]
docs: Document shader capturing environment variables.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
7 years agodocs/egl: remove reference to EGL_DRIVERS_PATH
Eric Engestrom [Tue, 12 Sep 2017 14:35:54 +0000 (15:35 +0100)]
docs/egl: remove reference to EGL_DRIVERS_PATH

Support for external egl drivers was dropped a few years ago.

Fixes: 209360bbb91bb10346eb "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>
7 years agoutil/disk_cache: turn MESA_GLSL_CACHE_DISABLE into a boolean
Eric Engestrom [Fri, 8 Sep 2017 09:49:45 +0000 (10:49 +0100)]
util/disk_cache: turn MESA_GLSL_CACHE_DISABLE into a boolean

Instead of setting based on set/unset, allow users to use boolean values.
In the docs and tests, use `DISABLE=true` instead of `DISABLE=1` as it's
clearer IMO.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglx: turn LIBGL_NO_DRAWARRAYS into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:57:26 +0000 (11:57 +0100)]
glx: turn LIBGL_NO_DRAWARRAYS into a boolean

Instead of setting based on set/unset, allow users to use boolean values.
In the docs, use `NO_DRAWARRAYS=true` instead of `NO_DRAWARRAYS=1` as it's
clearer IMO.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglx: turn LIBGL_PROFILE_CORE into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:56:38 +0000 (11:56 +0100)]
glx: turn LIBGL_PROFILE_CORE into a boolean

Instead of setting based on set/unset, allow users to use boolean values.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglx: turn LIBGL_DUMP_VISUALID into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:56:02 +0000 (11:56 +0100)]
glx: turn LIBGL_DUMP_VISUALID into a boolean

Instead of setting based on set/unset, allow users to use boolean values.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl+glx: turn LIBGL_DRI3_DISABLE into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:55:14 +0000 (11:55 +0100)]
egl+glx: turn LIBGL_DRI3_DISABLE into a boolean

Instead of setting based on set/unset, allow users to use boolean values.
In the docs, use `DISABLE=true` instead of `DISABLE=1` as it's clearer IMO.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglx: turn LIBGL_ALWAYS_INDIRECT into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:53:47 +0000 (11:53 +0100)]
glx: turn LIBGL_ALWAYS_INDIRECT into a boolean

Instead of setting based on set/unset, allow users to use boolean values.
In the docs, use `ALWAYS=true` instead of `ALWAYS=1` as it's clearer IMO.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglx: turn LIBGL_ALLOW_SOFTWARE into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:46:25 +0000 (11:46 +0100)]
glx: turn LIBGL_ALLOW_SOFTWARE into a boolean

Instead of setting based on set/unset, allow users to use boolean values.
In the help string, use `ALLOW=true` instead of `ALLOW=1` as it's clearer IMO.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl+glx: turn LIBGL_ALWAYS_SOFTWARE into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:52:01 +0000 (11:52 +0100)]
egl+glx: turn LIBGL_ALWAYS_SOFTWARE into a boolean

Instead of setting based on set/unset, allow users to use boolean values.
In the docs, use `ALWAYS=true` instead of `ALWAYS=1` as it's clearer IMO.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglx: turn LIBGL_DIAGNOSTIC into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:45:23 +0000 (11:45 +0100)]
glx: turn LIBGL_DIAGNOSTIC into a boolean

Instead of setting based on set/unset, allow users to use boolean values.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agogbm: turn GBM_ALWAYS_SOFTWARE into a boolean
Eric Engestrom [Fri, 8 Sep 2017 10:39:43 +0000 (11:39 +0100)]
gbm: turn GBM_ALWAYS_SOFTWARE into a boolean

Instead of setting based on set/unset, allow users to use boolean values.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoanv: fix build issues on release build
Tapani Pälli [Tue, 12 Sep 2017 10:09:37 +0000 (13:09 +0300)]
anv: fix build issues on release build

Fixes: d083bc1c4b ("anv: wire up vk_errorf macro to do debug reporting")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoglsl: Disallow unsized array of atomic_uint
Iago Toral Quiroga [Mon, 11 Sep 2017 12:19:41 +0000 (14:19 +0200)]
glsl: Disallow unsized array of atomic_uint

This was a bugfix to the spec addressed in OpenGL 4.5 (revision
7 of the spec) and there is a CTS test to check this.

Fixes:
KHR-GL45.shader_atomic_counters.negative-unsized-array

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoanv: remove extra 'debug:' from anv_debug_ignored_stype
Tapani Pälli [Tue, 29 Aug 2017 05:44:55 +0000 (08:44 +0300)]
anv: remove extra 'debug:' from anv_debug_ignored_stype

anv_debug adds 'debug:' already, this is to clean following:
   debug: debug: anv_CreateDebugReportCallbackEXT: ignored VkStructureType 1000011000

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: move brw_process_intel_debug_variable to happen early
Tapani Pälli [Tue, 29 Aug 2017 05:44:54 +0000 (08:44 +0300)]
anv: move brw_process_intel_debug_variable to happen early

Currently anv_perf_warn call in anv_compute_heap_size does not ever
report a perf warning. Move debug variable read as the first thing
in case there will be other perf_warn calls added.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoanv: wire up vk_errorf macro to do debug reporting
Tapani Pälli [Fri, 25 Aug 2017 06:55:39 +0000 (09:55 +0300)]
anv: wire up vk_errorf macro to do debug reporting

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>