Commit Graph

92215 Commits

Author SHA1 Message Date
Timothy Arceri f6198e9146 mesa: add no error support to frame_buffer_texture_layer() helper
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 01081c6ee4 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>
2017-05-17 10:12:03 +10:00
Timothy Arceri 70aa66f181 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>
2017-05-17 10:12:03 +10:00
Timothy Arceri 35a9b9a70c mesa: move use_program() inside _mesa_use_program()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Jason Ekstrand e0d6f9afba 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>
2017-05-16 17:04:26 -07:00
Jason Ekstrand 74d626f383 intel/isl: Refactor gen8_choose_image_alignment_el
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-05-16 17:04:26 -07:00
Jason Ekstrand 2486c7dd54 intel/isl: Refactor gen6_choose_image_alignment_el
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-05-16 17:04:26 -07:00
Jason Ekstrand 715f47cb34 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>
2017-05-16 17:04:26 -07:00
Pohjolainen, Topi 236f17a9f7 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>
2017-05-16 17:04:26 -07:00
Rob Clark dafc2f1887 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>
2017-05-16 16:34:21 -04:00
Rob Clark da9a1cb8a6 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>
2017-05-16 16:34:21 -04:00
Rob Clark 8b4588b090 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>
2017-05-16 16:34:21 -04:00
Rob Clark 12aa1d15d5 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>
2017-05-16 16:34:21 -04:00
Rob Clark 2216a95946 ttn: fix txd src sizes
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-05-16 16:34:21 -04:00
Rob Clark b00fbb7daf ttn: fix txs dest size
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-05-16 16:34:21 -04:00
Rob Clark 1303afdd4f freedreno/a5xx: remove unneeded assert
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-05-16 16:34:21 -04:00
Rob Clark 9235ab6550 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>
2017-05-16 16:34:21 -04:00
Philipp Zabel cb16d91034 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>
2017-05-16 21:07:56 +02:00
Lucas Stach ba0b7de7e3 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>
2017-05-16 21:07:51 +02:00
Lucas Stach f8a3991458 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>
2017-05-16 21:07:46 +02:00
Lucas Stach 20ce6f1361 etnaviv: allow R/B swapped surfaces to be cleared
Fixes: 7f62ffb68a ("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>
2017-05-16 21:07:42 +02:00
Lucas Stach 8173d7d9e8 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: c9e8b49b88 ("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>
2017-05-16 21:07:37 +02:00
Matt Turner 169e1e26ee i965: Fix test_eu_validate.cpp
Broken by commit a7217e909c ("i965: Pass pointer and end of assembly
to brw_validate_instructions").

Reported-by: Aaron Watry <awatry@gmail.com>
2017-05-16 11:45:07 -07:00
Jason Ekstrand b5437fc05c anv: Implement VK_KHR_get_surface_capabilities2
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-05-16 08:38:46 -07:00
Jason Ekstrand 59f75dc2a4 vulkan/wsi/wayland: Add support for VK_KHR_get_surface_capabilities2
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-05-16 08:38:45 -07:00
Jason Ekstrand 56901c9ea4 vulkan/wsi/x11: Add support for VK_KHR_get_surface_capabilities2
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-05-16 08:38:43 -07:00
Jason Ekstrand a28163db05 vulkan/wsi: Add get_capabilities2 and get_formats2d interface pointers
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-05-16 08:38:39 -07:00
Jason Ekstrand 52e6271ffd vulkan/wsi: Use vk_outarray for surface_get_formats
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-05-16 08:38:38 -07:00
Jason Ekstrand c58f8bb56b vulkan: Update registry and headers to 1.0.49
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-05-16 08:38:34 -07:00
Nicolai Hähnle c485b47383 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>
2017-05-16 16:11:55 +02:00
Nicolai Hähnle cd9504667b radeonsi: make const_array externally accessible
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-16 16:11:54 +02:00
Nicolai Hähnle f0066eb57e radeonsi: make get_bounded_indirect_index externally accessible
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-16 16:11:54 +02:00
Nicolai Hähnle 9252638afa radeonsi: make emit_waitcnt externally accessible
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-16 16:11:54 +02:00
Nicolai Hähnle 3811730a37 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>
2017-05-16 16:11:54 +02:00
Nicolai Hähnle 4ea67c1751 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>
2017-05-16 16:11:54 +02:00
Nicolai Hähnle f4dbe2efb7 radeonsi: fix gl_PrimitiveIDIn in geometry shader when using tessellation
This builds on commit 0549ea15ec ("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>
2017-05-16 16:11:53 +02:00
Nicolai Hähnle 3accda4b82 ac/debug: handle index field in SET_*_REG correctly
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-16 16:11:53 +02:00
Samuel Pitoiset 0ca5bdb330 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>
2017-05-16 09:33:06 +02:00
Samuel Pitoiset 8080082ad7 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>
2017-05-16 09:33:04 +02:00
Samuel Pitoiset 3c95a4fd4c 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>
2017-05-16 09:33:02 +02:00
Samuel Pitoiset 989def73ec 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>
2017-05-16 09:32:59 +02:00
Timothy Arceri 25bb02d7a0 mesa: replace _mesa_problem() with unreachable() in pack.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-05-16 12:25:50 +10:00
Timothy Arceri 51486d3369 mesa: replace _mesa_problem() with unreachable() in mipmap.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-05-16 12:25:50 +10:00
Timothy Arceri 1bd692b946 mesa: replace _mesa_problem() with unreachable() in _mesa_convert_colors()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-05-16 12:25:49 +10:00
Timothy Arceri 4c1664ff08 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>
2017-05-16 12:25:49 +10:00
Timothy Arceri 59b9544fa7 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>
2017-05-16 12:25:49 +10:00
Timothy Arceri f25b2f76b0 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>
2017-05-16 11:53:16 +10:00
Matt Turner b1af896853 intel/aubinator_error_decode: Disassemble shader programs
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-05-15 12:04:04 -07:00
Matt Turner 23685f07d1 intel/aubinator_error_decode: Stop decoding after MI_BATCH_BUFFER_END
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-05-15 11:43:20 -07:00
Matt Turner 8e7221fa5a 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>
2017-05-15 11:43:14 -07:00