mesa.git
7 years agomesa: add KHR_no_error support for NamedFramebufferTexture
Timothy Arceri [Mon, 8 May 2017 02:01:33 +0000 (12:01 +1000)]
mesa: add KHR_no_error support for NamedFramebufferTexture

V3: use frame_buffer_texture() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: add KHR_no_error support for FramebufferTexture
Timothy Arceri [Mon, 8 May 2017 01:52:45 +0000 (11:52 +1000)]
mesa: add KHR_no_error support for FramebufferTexture

V3: use the frame_buffer_texture() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: add *FramebufferTexture() support to frame_buffer_texture helper
Timothy Arceri [Wed, 10 May 2017 01:44:54 +0000 (11:44 +1000)]
mesa: add *FramebufferTexture() support to frame_buffer_texture helper

V2: call check_layered_texture_target() even for no_error

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: add KHR_no_error support for NamedFramebufferTextureLayer
Timothy Arceri [Mon, 8 May 2017 01:37:33 +0000 (11:37 +1000)]
mesa: add KHR_no_error support for NamedFramebufferTextureLayer

v3: use frame_buffer_texture_layer() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: add KHR_no_error support for FramebufferTextureLayer
Timothy Arceri [Mon, 8 May 2017 01:24:07 +0000 (11:24 +1000)]
mesa: add KHR_no_error support for FramebufferTextureLayer

V3: use frame_buffer_texture_layer() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: add no error support to frame_buffer_texture_layer() helper
Timothy Arceri [Thu, 11 May 2017 05:43:44 +0000 (15:43 +1000)]
mesa: add no error support to frame_buffer_texture_layer() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: add frame_buffer_texture_layer() helper
Timothy Arceri [Wed, 10 May 2017 01:22:47 +0000 (11:22 +1000)]
mesa: add frame_buffer_texture_layer() helper

To be used to add KHR_no_error support while sharing code between
the DSA and non-DSA OpenGL function.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: add KHR_no_error support for glUseProgram
Timothy Arceri [Wed, 3 May 2017 06:40:39 +0000 (16:40 +1000)]
mesa: add KHR_no_error support for glUseProgram

V3: use always_inline attribute (Suggested by Nicolai)

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agomesa: move use_program() inside _mesa_use_program()
Timothy Arceri [Thu, 11 May 2017 04:59:41 +0000 (14:59 +1000)]
mesa: move use_program() inside _mesa_use_program()

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agointel/isl/gen6: Fix combined depth stencil alignment
Jason Ekstrand [Mon, 15 May 2017 20:51:13 +0000 (13:51 -0700)]
intel/isl/gen6: Fix combined depth stencil alignment

All combined depth stencil buffers (even those with just stencil)
require a 4x4 alignment on Sandy Bridge.  The only depth/stencil buffer
type that requires 4x2 is separate stencil.

Reviewed-by: Chad Versace <chadversary@chromium.org>
7 years agointel/isl: Refactor gen8_choose_image_alignment_el
Jason Ekstrand [Wed, 10 May 2017 19:29:04 +0000 (12:29 -0700)]
intel/isl: Refactor gen8_choose_image_alignment_el

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
7 years agointel/isl: Refactor gen6_choose_image_alignment_el
Jason Ekstrand [Wed, 10 May 2017 19:15:01 +0000 (12:15 -0700)]
intel/isl: Refactor gen6_choose_image_alignment_el

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
7 years agointel/isl: Refactor gen7_choose_image_alignment_el
Jason Ekstrand [Tue, 9 May 2017 16:50:21 +0000 (09:50 -0700)]
intel/isl: Refactor gen7_choose_image_alignment_el

The Ivy Bridge PRM provides a nice table that handles most of the
alignment cases in one place.  For standard color buffers we have a
little freedom of choice but for most depth, stencil and compressed it's
hard-coded.  Chad's original functions split halign and valign apart and
implemented them almost entirely based on restrictions and not the
table.  This makes things way more confusing than they need to be.  This
commit gets rid of the split and makes us implement the exact table
up-front.  If our surface isn't one of the ones in the table then we
have to make real choices.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
7 years agointel/isl/gen7: Use stencil vertical alignment of 8 instead of 4
Pohjolainen, Topi [Wed, 3 May 2017 09:22:50 +0000 (12:22 +0300)]
intel/isl/gen7: Use stencil vertical alignment of 8 instead of 4

The reasoning Chad gave in the comment for choosing a valign of 4 is
entirely bunk.  The fact that you have to multiply pitch by 2 is
completely unrelated to the halign/valign parameters used for texture
layout.  (Not completely unrelated.  W-tiling is just Y-tiling with a
bit of extra swizzling which turns 8x8 W-tiled chunks into 16x4 y-tiled
chunks so it makes everything easier if miplevels are always aligned to
8x8.)  The fact that RENDER_SURFACE_STATE::SurfaceVerticalAlignmet
doesn't have a VALIGN_8 option doesn't matter since this is gen7 and you
can't do stencil texturing anyway.

v2 (Jason Ekstrand):
 - Delete most of Chad's comment and add a more descriptive commit
   message.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "17.0 17.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
7 years agofreedreno/gmem: fix hw binning hangs with large render targets
Rob Clark [Tue, 16 May 2017 12:37:50 +0000 (08:37 -0400)]
freedreno/gmem: fix hw binning hangs with large render targets

On all 3 gens, we have 4 bits for width and height in the VSC pipe
config.  And overflow results in setting width and/or height to zero
which causes hangs.

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno/ir3: fix crash with atomics
Rob Clark [Mon, 15 May 2017 20:42:15 +0000 (16:42 -0400)]
freedreno/ir3: fix crash with atomics

Atomics can have a result value.  And sometimes it is even used.

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agomesa/st: fix yuv EGLImage's
Rob Clark [Tue, 16 May 2017 14:29:44 +0000 (10:29 -0400)]
mesa/st: fix yuv EGLImage's

Don't reject YUV formats that the driver doesn't handle natively, since
mesa/st already knows how to lower this in shader.

Reported-by: Nicolas Dechesne <ndec@linaro.org>
Fixes: 83e9de2 ("st/mesa: EGLImageTarget* error handling")
Cc: 17.1 <mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Clark <robdclark@gmail.com>
Tested-by: Nicolas Dechesne <ndec@linaro.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agottn: fix dest size for some texture instructions
Rob Clark [Mon, 15 May 2017 17:31:44 +0000 (13:31 -0400)]
ttn: fix dest size for some texture instructions

Some, like lod, don't return 4 components.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agottn: fix txd src sizes
Rob Clark [Mon, 15 May 2017 17:24:34 +0000 (13:24 -0400)]
ttn: fix txd src sizes

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agottn: fix txs dest size
Rob Clark [Mon, 15 May 2017 17:03:44 +0000 (13:03 -0400)]
ttn: fix txs dest size

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agofreedreno/a5xx: remove unneeded assert
Rob Clark [Mon, 15 May 2017 18:08:16 +0000 (14:08 -0400)]
freedreno/a5xx: remove unneeded assert

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno/a5xx: fallback to slow-clear for z32
Rob Clark [Mon, 15 May 2017 16:36:24 +0000 (12:36 -0400)]
freedreno/a5xx: fallback to slow-clear for z32

We probably *could* do this with blit path, but I think it would involve
clobbering settings from batch->gmem (see emit_zs()).

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agoetnaviv: increment the resource seqno in resource_changed
Philipp Zabel [Wed, 10 May 2017 16:01:08 +0000 (18:01 +0200)]
etnaviv: increment the resource seqno in resource_changed

Just increment the resource seqno instead of setting the texture
seqno to be lower by one than the resource seqno.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agoetnaviv: clean up sampler view reference counting
Lucas Stach [Wed, 10 May 2017 16:01:07 +0000 (18:01 +0200)]
etnaviv: clean up sampler view reference counting

Use the proper pipe_resource_reference function instead of
rolling our own.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agoetnaviv: apply feature overrides in one central location
Lucas Stach [Wed, 10 May 2017 16:01:06 +0000 (18:01 +0200)]
etnaviv: apply feature overrides in one central location

This way we can just test the feature bits and don't need to spread
the debug overrides to all locations touching a feature.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agoetnaviv: allow R/B swapped surfaces to be cleared
Lucas Stach [Wed, 10 May 2017 16:01:05 +0000 (18:01 +0200)]
etnaviv: allow R/B swapped surfaces to be cleared

Fixes: 7f62ffb68ad ("etnaviv: add support for rb swap")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agoetnaviv: stop oversizing buffer resources
Lucas Stach [Wed, 10 May 2017 16:01:04 +0000 (18:01 +0200)]
etnaviv: stop oversizing buffer resources

PIPE_BUFFER is a target enum, not a binding. This caused the driver to
up-align the height of buffer resources, leading to largely oversizing
those resources. This is especially bad, as the buffer resources used
by the upload manager are already 1MB in size. Height alignment meant
that those would result in 4 to 8MB big BOs.

Fixes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agoi965: Fix test_eu_validate.cpp
Matt Turner [Tue, 16 May 2017 18:43:57 +0000 (11:43 -0700)]
i965: Fix test_eu_validate.cpp

Broken by commit a7217e909ce6 ("i965: Pass pointer and end of assembly
to brw_validate_instructions").

Reported-by: Aaron Watry <awatry@gmail.com>
7 years agoanv: Implement VK_KHR_get_surface_capabilities2
Jason Ekstrand [Fri, 17 Mar 2017 22:07:44 +0000 (15:07 -0700)]
anv: Implement VK_KHR_get_surface_capabilities2

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agovulkan/wsi/wayland: Add support for VK_KHR_get_surface_capabilities2
Jason Ekstrand [Fri, 17 Mar 2017 21:08:04 +0000 (14:08 -0700)]
vulkan/wsi/wayland: Add support for VK_KHR_get_surface_capabilities2

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agovulkan/wsi/x11: Add support for VK_KHR_get_surface_capabilities2
Jason Ekstrand [Fri, 17 Mar 2017 21:04:57 +0000 (14:04 -0700)]
vulkan/wsi/x11: Add support for VK_KHR_get_surface_capabilities2

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agovulkan/wsi: Add get_capabilities2 and get_formats2d interface pointers
Jason Ekstrand [Fri, 17 Mar 2017 20:50:24 +0000 (13:50 -0700)]
vulkan/wsi: Add get_capabilities2 and get_formats2d interface pointers

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agovulkan/wsi: Use vk_outarray for surface_get_formats
Jason Ekstrand [Fri, 17 Mar 2017 21:02:43 +0000 (14:02 -0700)]
vulkan/wsi: Use vk_outarray for surface_get_formats

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agovulkan: Update registry and headers to 1.0.49
Jason Ekstrand [Mon, 15 May 2017 14:58:43 +0000 (07:58 -0700)]
vulkan: Update registry and headers to 1.0.49

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agoradeonsi: extract TGSI memory/texture opcode handling into its own file
Nicolai Hähnle [Mon, 15 May 2017 21:35:28 +0000 (23:35 +0200)]
radeonsi: extract TGSI memory/texture opcode handling into its own file

It's about time to get the growth of si_shader.c somewhat under control.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: make const_array externally accessible
Nicolai Hähnle [Mon, 15 May 2017 21:17:54 +0000 (23:17 +0200)]
radeonsi: make const_array externally accessible

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: make get_bounded_indirect_index externally accessible
Nicolai Hähnle [Mon, 15 May 2017 21:11:46 +0000 (23:11 +0200)]
radeonsi: make get_bounded_indirect_index externally accessible

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: make emit_waitcnt externally accessible
Nicolai Hähnle [Mon, 15 May 2017 21:06:08 +0000 (23:06 +0200)]
radeonsi: make emit_waitcnt externally accessible

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: silence a Coverity warning
Nicolai Hähnle [Wed, 10 May 2017 16:45:40 +0000 (18:45 +0200)]
radeonsi: silence a Coverity warning

Coverity doesn't understand that we'll never pass non-NULL for vertex
shaders.

This is a bit lame, actually. A straightforward cross-procedural analysis
limited to this source file should be enough to prove that there's no
NULL-pointer dereference. Oh well.

CID: 1405999
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: rename tcs_tes_uses_prim_id for clarity
Nicolai Hähnle [Mon, 15 May 2017 09:13:44 +0000 (11:13 +0200)]
radeonsi: rename tcs_tes_uses_prim_id for clarity

What we care about is whether PrimID is used while tessellation is
enabled; whether it's used in TCS/TES or further down the pipeline is
irrelevant.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: fix gl_PrimitiveIDIn in geometry shader when using tessellation
Nicolai Hähnle [Mon, 15 May 2017 09:10:13 +0000 (11:10 +0200)]
radeonsi: fix gl_PrimitiveIDIn in geometry shader when using tessellation

This builds on commit 0549ea15ec38 ("radeonsi: fix primitive ID in
fragment shader when using tessellation").

Fixes piglit
arb_tessellation_shader/execution/gs-primitiveid-instanced.shader_test

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoac/debug: handle index field in SET_*_REG correctly
Nicolai Hähnle [Mon, 15 May 2017 09:10:31 +0000 (11:10 +0200)]
ac/debug: handle index field in SET_*_REG correctly

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoglsl: simplify link_assign_uniform_storage() a bit
Samuel Pitoiset [Mon, 15 May 2017 10:55:06 +0000 (12:55 +0200)]
glsl: simplify link_assign_uniform_storage() a bit

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: unify _mesa_uniform() for image uniforms
Samuel Pitoiset [Mon, 15 May 2017 10:55:05 +0000 (12:55 +0200)]
mesa: unify _mesa_uniform() for image uniforms

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: fix indentation in _mesa_uniform()
Samuel Pitoiset [Mon, 15 May 2017 10:55:04 +0000 (12:55 +0200)]
mesa: fix indentation in _mesa_uniform()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: fix indentation in _mesa_associate_uniform_storage()
Samuel Pitoiset [Mon, 15 May 2017 10:55:03 +0000 (12:55 +0200)]
mesa: fix indentation in _mesa_associate_uniform_storage()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: replace _mesa_problem() with unreachable() in pack.c
Timothy Arceri [Tue, 9 May 2017 02:50:56 +0000 (12:50 +1000)]
mesa: replace _mesa_problem() with unreachable() in pack.c

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agomesa: replace _mesa_problem() with unreachable() in mipmap.c
Timothy Arceri [Tue, 9 May 2017 02:46:48 +0000 (12:46 +1000)]
mesa: replace _mesa_problem() with unreachable() in mipmap.c

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agomesa: replace _mesa_problem() with unreachable() in _mesa_convert_colors()
Timothy Arceri [Tue, 9 May 2017 02:38:44 +0000 (12:38 +1000)]
mesa: replace _mesa_problem() with unreachable() in _mesa_convert_colors()

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agomesa: replace _mesa_problem() with unreachable() in _mesa_light()
Timothy Arceri [Tue, 9 May 2017 02:36:35 +0000 (12:36 +1000)]
mesa: replace _mesa_problem() with unreachable() in _mesa_light()

All drivers but the old nouveau dri driver return after this anyway.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agomesa: replace _mesa_problem() with assert() in hash table
Timothy Arceri [Tue, 9 May 2017 02:27:41 +0000 (12:27 +1000)]
mesa: replace _mesa_problem() with assert() in hash table

There should be no way the OpenGL test suites don't hit the assert()
should we do something to cause this code path to be taken.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agomesa: don't crash in KHR_no_error uniform variants when location == -1
Timothy Arceri [Sat, 13 May 2017 05:53:08 +0000 (15:53 +1000)]
mesa: don't crash in KHR_no_error uniform variants when location == -1

From Seciton 7.6 (UNIFORM VARIABLES) of the OpenGL 4.5 spec:

  "If the value of location is -1, the Uniform* commands will
  silently ignore the data passed in, and the current uniform values
  will not be changed.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agointel/aubinator_error_decode: Disassemble shader programs
Matt Turner [Mon, 3 Apr 2017 18:10:37 +0000 (11:10 -0700)]
intel/aubinator_error_decode: Disassemble shader programs

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agointel/aubinator_error_decode: Stop decoding after MI_BATCH_BUFFER_END
Matt Turner [Thu, 6 Apr 2017 20:43:38 +0000 (13:43 -0700)]
intel/aubinator_error_decode: Stop decoding after MI_BATCH_BUFFER_END

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agointel/tools: Refactor gen_disasm_disassemble() to use annotations
Matt Turner [Mon, 1 May 2017 18:59:32 +0000 (11:59 -0700)]
intel/tools: Refactor gen_disasm_disassemble() to use annotations

Which will allow us to print validation errors found in shader assembly
in GPU hang error states.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agointel/decoder: Fix indentation
Matt Turner [Sat, 8 Apr 2017 05:37:00 +0000 (22:37 -0700)]
intel/decoder: Fix indentation

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
7 years agogenxml: Remove brackets from kernel start pointer names
Matt Turner [Sat, 8 Apr 2017 22:39:59 +0000 (15:39 -0700)]
genxml: Remove brackets from kernel start pointer names

Newer Gens' names don't have the brackets. Having common names will make
some later patches simpler.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
7 years agoi965: Add a weak no-op nir_print_instr() symbol
Matt Turner [Mon, 1 May 2017 18:43:07 +0000 (11:43 -0700)]
i965: Add a weak no-op nir_print_instr() symbol

intel_asm_annotation.c is part of libintel_compiler.la, which contains
code for disassembling and validating shaders that we want to call in
aubinator_error_decode.

dump_assembly() calls nir_print_instr() to print annotations, and
although dump_assembly() is not called by aubinator_error_decode (nor is
any function in intel_asm_annotation.c) it causes undefined references
to nir_print_instr().

To work around, provide a no-op weak symbol to resolve against.

7 years agoi965: Allow brw_eu_validate to handle compact instructions
Matt Turner [Sat, 29 Apr 2017 00:06:56 +0000 (17:06 -0700)]
i965: Allow brw_eu_validate to handle compact instructions

This will allow the validator to run on shader programs we find in the
GPU hang error state.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Pass pointer and end of assembly to brw_validate_instructions
Matt Turner [Sat, 29 Apr 2017 00:05:44 +0000 (17:05 -0700)]
i965: Pass pointer and end of assembly to brw_validate_instructions

This will allow us to more easily run brw_validate_instructions() on
shader programs we find in GPU hang error states.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
7 years agoi965: Mark shader programs for capture in the error state.
Matt Turner [Tue, 25 Apr 2017 17:00:19 +0000 (10:00 -0700)]
i965: Mark shader programs for capture in the error state.

When the GPU hangs, the kernel saves some state for us. Until now it has
not included the shader programs, which are very often the reason the
GPU hang occurred. With the programs saved in the error state, we should
be more capable of debugging hangs.

Thanks to Chris Wilson and Ben Widawsky who provided the kernel support
for this feature ("drm/i915: Copy user requested buffers into the error
state"), which will be in kernel v4.13.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoegl: fix android logger compilation
Tapani Pälli [Fri, 12 May 2017 06:32:15 +0000 (09:32 +0300)]
egl: fix android logger compilation

1ce5853 broken compilation since LOG_ERROR is not defined and also
macro expansion won't work as planned (expands to 'ANDROID_egl2alog[level]')

v2: append 'ANDROID' to egl2alog table and use LOG_PRI
    (suggested by Chih-Wei Huang)

Fixes: 1ce5853 ("egl: simplify the Android logger")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: perf: fix pointer to integer cast
Lionel Landwerlin [Fri, 12 May 2017 11:34:46 +0000 (12:34 +0100)]
i965: perf: fix pointer to integer cast

v2: Just use cast to uintptr_t (Chris)

Reported-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
7 years agointel: gen-decoder: fix xml parser leak
Lionel Landwerlin [Fri, 12 May 2017 09:49:46 +0000 (10:49 +0100)]
intel: gen-decoder: fix xml parser leak

In the unlikely case the parsing of genxml files fails, we were
leaking an xml parser object.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
7 years agoradeonsi: enable threaded_context
Marek Olšák [Thu, 2 Mar 2017 00:28:51 +0000 (01:28 +0100)]
radeonsi: enable threaded_context

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/u_threaded: drop and ignore all non-async debug callbacks
Marek Olšák [Thu, 11 May 2017 23:25:49 +0000 (01:25 +0200)]
gallium/u_threaded: drop and ignore all non-async debug callbacks

This is necessary to comply with OpenGL.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogallium/radeon: add threaded context counter monitoring for HUD
Marek Olšák [Fri, 10 Mar 2017 11:17:20 +0000 (12:17 +0100)]
gallium/radeon: add threaded context counter monitoring for HUD

"tc" will be initialized by the next commit.

v2: rename stuff according to v2 changes in u_threaded_context

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agoradeonsi: implement replace_buffer_storage for the threaded context
Marek Olšák [Sun, 12 Mar 2017 13:19:31 +0000 (14:19 +0100)]
radeonsi: implement replace_buffer_storage for the threaded context

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: subclass and handle threaded_query
Marek Olšák [Sun, 12 Mar 2017 20:44:07 +0000 (21:44 +0100)]
gallium/radeon: subclass and handle threaded_query

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: subclass threaded_transfer
Marek Olšák [Tue, 2 May 2017 23:51:42 +0000 (01:51 +0200)]
gallium/radeon: subclass threaded_transfer

v2: use assert on rtransfer->b.staging

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: subclass threaded_resource
Marek Olšák [Fri, 10 Mar 2017 14:48:24 +0000 (15:48 +0100)]
gallium/radeon: subclass threaded_resource

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: handle other map buffer flags from the threaded context
Marek Olšák [Sun, 12 Mar 2017 13:17:25 +0000 (14:17 +0100)]
gallium/radeon: handle other map buffer flags from the threaded context

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: handle TC_TRANSFER_MAP_THREADED_UNSYNC
Marek Olšák [Thu, 2 Mar 2017 00:27:53 +0000 (01:27 +0100)]
gallium/radeon: handle TC_TRANSFER_MAP_THREADED_UNSYNC

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: unwrap a context if we get a wrapped one
Marek Olšák [Sun, 26 Feb 2017 17:48:28 +0000 (18:48 +0100)]
gallium/radeon: unwrap a context if we get a wrapped one

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region
Marek Olšák [Tue, 2 May 2017 23:23:54 +0000 (01:23 +0200)]
gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region

spotted randomly.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/util: add threaded_context as a pipe_context wrapper
Marek Olšák [Thu, 2 Mar 2017 00:15:55 +0000 (01:15 +0100)]
gallium/util: add threaded_context as a pipe_context wrapper

v2: - rename num_calls -> num_call_slots (for tc_call)
    - rename num_calls -> num_total_call_slots (for tc_batch)
    - rename num_offloaded/direct_calls -> num_offloaded/direct_slots
    - declare slot[0] instead of slot[1]
    - remove no-op leftover code from tc_draw_vbo
    - use tc_set_resource_reference to fill threaded_transfer
    - fix map flags for sparse buffers
    - cosmetic changes

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/u_upload: add u_upload_clone
Marek Olšák [Sat, 18 Feb 2017 22:01:14 +0000 (23:01 +0100)]
gallium/u_upload: add u_upload_clone

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium: add flag PIPE_CONTEXT_PREFER_THREADED
Marek Olšák [Fri, 24 Mar 2017 00:57:40 +0000 (01:57 +0100)]
gallium: add flag PIPE_CONTEXT_PREFER_THREADED

State trackers can set this to tell the driver when u_threaded_context is
desirable.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agoradeonsi/gfx9: add support for Raven
Marek Olšák [Mon, 27 Feb 2017 21:26:10 +0000 (22:26 +0100)]
radeonsi/gfx9: add support for Raven

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoamd/addrlib: import Raven support
Marek Olšák [Mon, 27 Feb 2017 21:25:43 +0000 (22:25 +0100)]
amd/addrlib: import Raven support

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agorenderonly: Initialize fields of struct winsys_handle.
Eric Anholt [Tue, 9 May 2017 18:24:21 +0000 (11:24 -0700)]
renderonly: Initialize fields of struct winsys_handle.

vc4 was rejecting renderonly's import, because the offset field was
nonzero.

Fixes: 848b49b288f ("gallium: add renderonly library")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agoRevert "freedreno: use bypass if only clears"
Rob Clark [Sun, 14 May 2017 18:16:39 +0000 (14:16 -0400)]
Revert "freedreno: use bypass if only clears"

Causing issues with stk on a4xx.. still probably a good idea, but seems
some debugging is needed first.

This reverts commit 3ab072d3c8643c66d8e07e63df970b792728bac6.

7 years agofreedreno: fix crash when flush() but no rendering
Rob Clark [Sun, 14 May 2017 15:32:44 +0000 (11:32 -0400)]
freedreno: fix crash when flush() but no rendering

If we haven't created a batch, just bail in pipe->flush(), since there
is nothing to do.

Fixes crash in warsow, which creates a whole bunch of contexts used for
nothing but texture uploads.

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno: fix indexbuffer upload
Rob Clark [Sat, 13 May 2017 18:43:45 +0000 (14:43 -0400)]
freedreno: fix indexbuffer upload

My fault for not having time to test Marek's patches while they were on
list.

Fixes: 330d0607 ("gallium: remove pipe_index_buffer and set_index_buffer")
Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agoradv: Save descriptor set even if vertex buffers are not saved.
Bas Nieuwenhuizen [Sat, 13 May 2017 16:05:36 +0000 (18:05 +0200)]
radv: Save descriptor set even if vertex buffers are not saved.

Totally independent.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: 0e6d532d327 "radv/meta: add support for save/restore meta without vertex data."
7 years agofreedreno/a5xx: hw binning support
Rob Clark [Fri, 12 May 2017 13:56:56 +0000 (09:56 -0400)]
freedreno/a5xx: hw binning support

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno: update generated headers
Rob Clark [Thu, 11 May 2017 17:53:55 +0000 (13:53 -0400)]
freedreno: update generated headers

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno: use bypass if only clears
Rob Clark [Fri, 12 May 2017 18:24:33 +0000 (14:24 -0400)]
freedreno: use bypass if only clears

Some things trigger batches that only contain a clear (like glmark2
startup).  No point to use GMEM for this.

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agonv50/ir: Report wrong prog types using proper var
Pierre Moreau [Fri, 12 May 2017 09:01:32 +0000 (11:01 +0200)]
nv50/ir: Report wrong prog types using proper var

Coverity caught the use of the uninitialised variable `type`.
However, it was `info->type`, which is initialised, which was meant to
be used.

CID: 1406000
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Fixes: b490ca9a387d ("nv50/ir: Fail if encountering unknown shader type")
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agomesa: fix KHR_no_error SSO support
Timothy Arceri [Fri, 12 May 2017 05:29:57 +0000 (15:29 +1000)]
mesa: fix KHR_no_error SSO support

Fixes: 00c5119a5e821 ("mesa: add KHR_no_error support for glUseProgramStages()")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agodocs: update calendar, add news item and link release notes for 17.0.6
Andres Gomez [Fri, 12 May 2017 23:20:32 +0000 (02:20 +0300)]
docs: update calendar, add news item and link release notes for 17.0.6

Signed-off-by: Andres Gomez <agomez@igalia.com>
7 years agodocs: add sha256 checksums for 17.0.6
Andres Gomez [Fri, 12 May 2017 23:14:17 +0000 (02:14 +0300)]
docs: add sha256 checksums for 17.0.6

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

7 years agodocs: add release notes for 17.0.6
Andres Gomez [Fri, 12 May 2017 20:41:51 +0000 (23:41 +0300)]
docs: add release notes for 17.0.6

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

7 years agobin/get-fixes-pick-list.sh: bring back the warning
Andres Gomez [Mon, 8 May 2017 17:57:35 +0000 (20:57 +0300)]
bin/get-fixes-pick-list.sh: bring back the warning

We warn again if there are more than one line with the "fixes:" tag.

The warning is silenced when the commit has already landed or each
fixes tag reference a commit that is in branch.

v2:
 - Warn if any of the fixes tags has not landed (Emil)

v3:
 - Remove unnecessary head command
 - Clarify commit message (Emil)
 - Skip already picked commits sooner (Emil)

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: extend until the end of August
Andres Gomez [Sat, 6 May 2017 15:46:13 +0000 (18:46 +0300)]
docs: extend until the end of August

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

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: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: update "Release manager" column
Andres Gomez [Sat, 6 May 2017 15:46:12 +0000 (18:46 +0300)]
docs: update "Release manager" column

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: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglsl: include image qualifiers when printing IR
Nicolai Hähnle [Wed, 26 Apr 2017 16:34:09 +0000 (18:34 +0200)]
glsl: include image qualifiers when printing IR

v2:
- fix copy&paste errors noted by Samuel
- rebase

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agoradeonsi: get rid of secondary input/output word
Nicolai Hähnle [Tue, 2 May 2017 15:46:12 +0000 (17:46 +0200)]
radeonsi: get rid of secondary input/output word

By keeping track of fewer generics, everything can fit into 64 bits.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: reduce the number of generics for shader IO unique indices
Nicolai Hähnle [Wed, 10 May 2017 11:22:10 +0000 (13:22 +0200)]
radeonsi: reduce the number of generics for shader IO unique indices

This is a high as possible while still allowing to merge the bitfields
with the next commit.

For OpenGL, 32 would be sufficient. Nine apparently uses (much!) higher
indices than. Indices that are out of bound don't hurt for VS-PS
pipelines, except that the VS output kill optimization is not applied.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: at most 8 sets of texture coordinates are supported
Nicolai Hähnle [Wed, 10 May 2017 07:58:31 +0000 (09:58 +0200)]
radeonsi: at most 8 sets of texture coordinates are supported

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>