mesa/src
Ben Widawsky 6ef8149bcd i965: Fix texture views of 2d array surfaces
It is legal to have a texture view of a single layer from a 2D array texture;
you can sample from it, or render to it. Intel hardware needs to be made aware
when it is using a 2d array surface in the surface state. The texture view is
just a 2d surface with the backing miptree actually being a 2d array surface.
This caused the previous code would not set the right bit in the surface state
since it wasn't considered an array texture.

I spotted this early on in debug but brushed it off because it is clearly not
needed on other platforms (since they all pass). I have no idea how this works
properly on other platforms (I think gen7 introduced the bit in the state, but I
am too lazy to check). As such, I have opted not to modify gen7, though I
believe the current code is wrong there as well.

Thanks to Chris for helping me debug this.

v2: Just use the underlying mt's target type to make the array determination.
This replaces a bug in the first patch which was incorrectly relying only
on non-zero depth (not sure how that had no failures). (Ilia)

Cc: Chris Forbes <chrisf@ijw.co.nz>
Reported-by: Mark Janes <mark.a.janes@intel.com> (Jenkins)
References: https://www.opengl.org/registry/specs/ARB/texture_view.txt
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92609
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-12-07 18:47:04 -08:00
..
egl egl: don't forget to ship platform_x11_dri3.h into the tarball 2015-11-20 18:08:04 +00:00
gallium radeonsi: last_gfx_fence is a winsys fence 2015-12-07 21:15:59 -05:00
gbm gbm.h: Add a missing stddef.h include for size_t. 2015-10-30 19:12:14 +00:00
getopt
glsl nir/lower_io: Pass the builder and type_size into get_io_offset 2015-12-03 20:58:12 -08:00
glx glx/dri3: Convert to use dri3 helper in loader library 2015-11-17 17:26:20 +02:00
gtest mesa: Enable subdir-objects globally. 2015-06-26 12:55:25 +01:00
hgl
loader loader: unconditionally add AM_CPPFLAGS to libloader_la_CPPFLAGS 2015-11-23 12:07:50 +00:00
mapi mesa: do not enable KHR_debug for ES 1.0 2015-12-03 19:17:48 +00:00
mesa i965: Fix texture views of 2d array surfaces 2015-12-07 18:47:04 -08:00
util util: fix comment typo 2015-12-04 14:06:41 +00:00
Makefile.am glsl: move shader_enums into nir 2015-10-09 15:03:28 -04:00
SConscript scons: rework the EGL build 2015-07-22 16:35:27 +01:00