Commit Graph

92096 Commits

Author SHA1 Message Date
Tim Rowley dce41f7728 swr: don't use AttributeSet with llvm >= 5
This change fixes the build break with llvm-svn.

r301981 of llvm-svn made add/remove of function attributes
use AttrBuilder instead of AttributeList.

Tested with llvm-3.9, llvm-4.0, llvm-svn.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-05-17 11:24:46 -05:00
Chih-Wei Huang bfc0c23843 Android: correct libz dependency
Commit 6facb0c0 ("android: fix libz dynamic library dependencies")
unconditionally adds libz as a dependency to all shared libraries.
That is unnecessary.

Commit 85a9b1b5 introduced libz as a dependency to libmesa_util.
So only the shared libraries that use libmesa_util need libz.

Fix Android Lollipop build by adding the include path of zlib to
libmesa_util explicitly instead of getting the path implicitly
from zlib since it doesn't export the include path in Lollipop.

Fixes: 6facb0c0 "android: fix libz dynamic library dependencies"

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rob Herring <robh@kernel.org>
2017-05-17 14:04:18 +01:00
Timothy Arceri f96edf72b4 mesa: add KHR_no_error support for glDispatchCompute*()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri d1894c42ef mesa: add DispatchCompute* helpers
These will be used to add KHR_no_error support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri 07e14d561c mesa: move FLUSH_CURRENT() calls out of DispatchCompute*() validation
This is required to add KHR_no_error support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri f98411eaad mesa: compute.c C99 tidy up
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri 64757e73de mesa: move DispatchCompute() validation to compute.c
This is the only place it is used so there is no reason for it to be
in api_validate.c

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri 25591adc28 mesa: add KHR_no_error support for glBlendEquationSeparateiARB()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri 9aff3c605b mesa: add blend_equation_separatei() helper
Will be used to add KHR_no_error support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri 5c8252ba6f mesa: add KHR_no_error support for glBlendFunc*iARB()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:04 +10:00
Timothy Arceri b5c67f469a mesa: add blend_func_separatei() helper
This will be used to add KHR_no_error support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri b3888b7a68 mesa: add KHR_no_error support for glBufferSubData()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 7ec12293be mesa: add KHR_no_error support for glNamedBufferSubData()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri cab148c282 mesa: add buffer_sub_data() helper
This will allow us to share code between the dsa, non-dsa and
no_error variants.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 5d29e6aab8 mesa: create validate_buffer_sub_data() helper
This change assumes meta will always pass valid arguments to
_mesa_buffer_sub_data().

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 624dc2833e mesa: add KHR_no_error support for glBufferStorage()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri cdbfb19420 mesa: add KHR_no_error support for glNamedBufferStorage()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 09687c2282 mesa: add inlined_buffer_storage() helper
This will allow us to share code between the dsa, non-dsa and
no_error variants.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 70d4d1164e mesa: add validate_buffer_storage() helper
This will allow use to add KHR_no_error support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 6c8964bf63 mesa: add KHR_no_error support for glCompressedTex*SubImage3D()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri d1033cd1eb mesa: add 3D support to compressed_tex_sub_image() helper
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 7cc190aae8 mesa: add KHR_no_error support for glCompressedTex*SubImage2D()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 1b36aa02b0 mesa: add 2D support to compressed_tex_sub_image() helper
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri d5e382e316 mesa: add KHR_no_error support for CompressedTex*SubImage1D()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri cb5627cbac mesa: add compressed_tex_sub_image() helper
This reduces duplication between the dsa and non-dsa function
and will also be used in the following commit to add
KHR_no_error support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri f1e692b452 mesa: make _mesa_compressed_texture_sub_image() static
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 3336d248e8 mesa: add KHR_no_error support for NamedFramebufferTexture
V3: use frame_buffer_texture() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri 4e8aa4b9a2 mesa: add KHR_no_error support for FramebufferTexture
V3: use the frame_buffer_texture() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri f6229284e2 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>
2017-05-17 10:12:03 +10:00
Timothy Arceri 4e125c4da6 mesa: add KHR_no_error support for NamedFramebufferTextureLayer
v3: use frame_buffer_texture_layer() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
Timothy Arceri e75e8d6c94 mesa: add KHR_no_error support for FramebufferTextureLayer
V3: use frame_buffer_texture_layer() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-17 10:12:03 +10:00
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