Commit Graph

81800 Commits

Author SHA1 Message Date
Emil Velikov 0d31bfd71a Revert "mesa: Build EGL without X11 headers after interop patchset"
This reverts commit 4e2c9a0435.

The solution was incomplete and fragile. An alternative one is coming
shortly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
2016-05-24 23:02:05 +01:00
Ian Romanick c8d9ed5ea1 docs: Note that GL_OES_geometry_shader and GL_OES_tessellation_shader are started
The GL_OES_geometry_shader work is on the oes_shader_io_blocks branch
of idr's fd.o repository.

The GL_OES_tessellation_shader work is on the tess-gles branch
of kwg's fd.o repository.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2016-05-24 12:45:46 -07:00
Emil Velikov 7e196cd170 c11/threads: resolve link issues with -O0
Add weak symbol notation for the pthread_mutexattr* symbols, thus making
the linker happy. When building with -O1 or greater the optimiser will
kick in and remove the said functions as they are dead/unreachable code.

Ideally we'll enable the optimisations locally, yet that does not seem
to work atm.

v2: Add the AX_GCC_FUNC_ATTRIBUTE([weak]) hunk in configure.

Cc: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
2016-05-24 20:21:31 +01:00
Tim Rowley 0ceed1701d swr: [rasterizer] remove containers.hpp
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-24 13:29:37 -05:00
Tim Rowley 1e3e22efb5 swr: [rasterizer core] remove utility dead code
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-24 13:29:29 -05:00
Tim Rowley dc34479b8c swr: [rasterizer core] buckets fixes
1. Don't clear bucket descriptions to fix issues with sim level
   buckets getting out of sync.

2. Close out threadviz file descriptors in ClearThreads().

3. Skip buckets for jitter based buckets when multithreaded. We need
   thread local storage through llvm jit functions to be fixed before
   we can enable this.

4. Fix buckets StopCapture to correctly detect capture complete.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-24 13:29:21 -05:00
Tim Rowley 3074a2b4fa swr: [rasterizer core] move centroid setup out of CalcCentroidBarycentrics
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-24 13:29:14 -05:00
Tim Rowley 9a2a4ecb39 swr: [rasterizer jitter] implement InstanceID/VertexID in fetch jit
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-24 13:28:47 -05:00
Ian Romanick 7fc4a82007 mesa: Silence unused parameter warnings
Neither shProg nor name was used.  Remove them both.

main/shader_query.cpp:779:53: warning: unused parameter ‘shProg’ [-Wunused-parameter]
 program_resource_location(struct gl_shader_program *shProg,
                                                     ^
main/shader_query.cpp:780:72: warning: unused parameter ‘name’ [-Wunused-parameter]
                           struct gl_program_resource *res, const char *name,
                                                                        ^

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2016-05-24 11:04:08 -07:00
Ian Romanick 78399cf170 glsl/linker: Silence unused parameter warning
The parameter is required for the interface.

glsl/link_uniforms.cpp:689:61: warning: unused parameter ‘record_type’ [-Wunused-parameter]
                             bool row_major, const glsl_type *record_type,
                                                             ^

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2016-05-24 11:04:05 -07:00
Kristian Høgsberg Kristensen 2bb935be2e dri: Add YVU formats
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-24 10:14:57 -07:00
Kristian Høgsberg Kristensen 1be1114e6b i965: Allow creating planar YUV __DRIimages
Lift the resctriction we had before and allow creation of images with
multiple planes. We still require all the planes to be within the same
bo.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-05-24 10:14:57 -07:00
Kristian Høgsberg Kristensen 654e950cba i965: Invoke lowering pass for YUV textures
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-24 10:14:57 -07:00
Kristian Høgsberg Kristensen 44997fc0c1 i965: Support textures with multiple planes
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-24 10:14:57 -07:00
Kristian Høgsberg Kristensen 3352f2d746 i965: Create multiple miptrees for planar YUV images
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-24 10:14:57 -07:00
Kristian Høgsberg Kristensen 6eede87631 i965: Refactor intel_set_texture_image_bo() to create_mt_for_dri_image()
This function now only creates the mt and we then call
intel_set_texture_image_mt() in intel_image_target_texture_2d() to set
it for the texture image.

Reviewed-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-24 10:14:57 -07:00
Kristian Høgsberg Kristensen 8ceb7c7d9b i965: Use intel_set_texture_image_mt() in intelSetTexBuffer2()
Create the mt for the drawable bo directly and call our new
intel_miptree_create_for_bo() helper instead.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-05-24 10:14:56 -07:00
Kristian Høgsberg Kristensen 40e9be4a5c i965: Add new intel_set_texture_image_mt() helper
This factors out the work of setting up a miptree as the backing for a
texture image into a new helper.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-05-24 10:14:56 -07:00
Kristian Høgsberg Kristensen a41b57679f nir: Add a lowering pass for YUV textures
This lowers sampling from YUV textures to 1) one or more texture
instructions to sample each plane and 2) color space conversion to RGB.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-24 10:14:56 -07:00
Kristian Høgsberg Kristensen 50c24c3ff3 nir: Handle NULL in nir_copy_deref()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-24 10:14:56 -07:00
Kristian Høgsberg Kristensen 29921ee987 nir: Add new 'plane' texture source type
This will be used to select the plane to sample from for planar
textures.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-24 10:14:56 -07:00
Brian Paul 39b7b8b906 mesa: log buffer ID numbers in decimal, not hexadecimal
All the other error messages use decimal.  Let's be consistent.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-05-24 10:26:26 -06:00
Brian Paul ce1cc70e27 mesa: use enum name in bind_buffer_object() error message
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-05-24 10:26:26 -06:00
Brian Paul 55c19527a6 mesa: raise error for glEnable(GL_VERTEX_ARRAY), etc. in core profile
Otherwise, if the call executes normally we'll hit an assertion later
in the VBO code when we draw something.  Note that these cases were
already handled correctly for the glIsEnabled() function (and the API
checks were copied from there).

Tested with new piglit gl-3.1-enable-vertex-array test.

v2: fix compat/es mix-up, per Ilia.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-05-24 10:26:26 -06:00
Nicolas Boichat a9b2b5e241 docs/egl: Android platform can also be build using autotools
We added support for Android build using autotools (configure),
update the documentation to reflect that.

Signed-off-by: Nicolas Boichat <drinkcat@google.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-05-24 16:24:54 +01:00
Juan A. Suarez Romero e79aa19d88 i965: fix double-precision vertex inputs measurement
For double-precision vertex inputs we need to measure them in dvec4
terms, and for single-precision vertex inputs we need to measure them in
vec4 terms.

For the later case, we use type_size_vec4() function. For the former
case, we had a wrong implementation based on type_size_vec4().

This commit introduces a proper type_size_dvec4() function, that we use
to measure vertex inputs.

Measuring double-precision vertex inputs as dvec4 is required because
ARB_vertex_attrib_64bit states that these uses the same number of
locations than the single-precision version. That is, two consecutives
dvec4 would be located in location "x" and location "x+1", not "x+2".

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-24 10:06:29 +02:00
Ilia Mirkin ccd58015a2 docs: true up nvc0 status - images, etc
Images aren't supported on maxwell, but neither is tessellation. Don't
overly confuse matters by trying to expose those subtleties in the
GL3.txt file/relnotes.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Dave Airlie <airlied@redhat.com>
2016-05-23 23:47:11 -04:00
Ilia Mirkin 856587909c st/mesa: enable ARB_ES3_1_compatibility when ES 3.1 would be exposed
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-05-23 23:47:11 -04:00
Ilia Mirkin 5878254545 mesa: remove separate enable for KHR_robust_buffer_access_behavior
This extension appears to be a strict subset of the ARB version. Also
remove it from GL3.txt since it doesn't seem relevant.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 23:47:11 -04:00
Timothy Arceri 72449c477e glsl: add support for explicit components to frag outputs
V2: fix error checking for arrays and components. V1 was
only taking into account all the array elements and all the
components of one of the varyings during the comparision
and treating the other as a single slot/component.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-05-24 12:46:48 +10:00
Ilia Mirkin 37266dfb7c mesa: add view classes for 3d astc formats
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-05-23 22:34:37 -04:00
Ilia Mirkin 979bcb9f42 glsl: add EXT_clip_cull_distance support based on ARB_cull_distance
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-05-23 22:22:06 -04:00
Ilia Mirkin f236f1f506 nvc0: expose robust buffer access
We apparently pass all the relevant CTS tests. There are probably some
shortcomings, but they can be addressed down the line.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-05-23 22:22:05 -04:00
Jason Ekstrand 9f5ccaf4dc i965: Use ISL for surface format introspection
With this, we can delete the surface format table in brw_surface_formats.c
because all of the information we need is now in ISL.
2016-05-23 19:12:34 -07:00
Jason Ekstrand d68acde1cb anv/formats: Use isl_format_supports* for format introspection 2016-05-23 19:12:34 -07:00
Jason Ekstrand 7374d006b6 isl: Add per-gen format introspection
This is just a copy-and-paste from brw_surface_formats.c.  For the
supports_vertex_fetch function, we do a bit more work so that it properly
handles Bay Trail.
2016-05-23 19:12:34 -07:00
Jason Ekstrand 03a82dc5d1 isl: Add the ISL_FORMAT_R32G32_FLOAT_LD format 2016-05-23 19:12:34 -07:00
Jason Ekstrand 35a514e6ff isl: Add support for quering the string name of a format 2016-05-23 19:12:34 -07:00
Jason Ekstrand 75d10dff0b i965: Enable ARB/KHR_robust_buffer_access_behavior on BYT and HSW+
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand 1a092fcf3b main: Add extension enable bits for KHR_robust_buffer_access_behavior
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand 66e137ecf1 nir/lower_samplers: Protect against sampler index overflow
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand 27b9481d03 glsl: Add an option to clamp block indices when lowering UBO/SSBOs
This prevents array overflow when the block is actually an array of UBOs or
SSBOs.  On some hardware such as i965, such overflows can cause GPU hangs.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand ac242aac3d glsl/linker: Add a helper variable for compiler options
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand aec10a1d5b i965/draw: Use the real size for index buffers
Previously, we were using the size of the whole BO which may be
substantially larger than the actual index buffer size.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand 7c8dfa78b9 i965/draw: Use the real size for vertex buffers
Previously, we were using the size of the BO which may be substantially
larger than the actual vertex buffer size.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand a643bc6246 i965/draw: Use 3-channel formats for vertex fetch when possible.
For a long time, several of the 3-channel vertex formats didn't exist so we
faked them with 4-channel versions.  Starting with Sandy Bridge, we can use
R16G16B16_FLOAT and 8 and 16-bit integer formats become available on
Haswell and Bay Trail.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand ab3d8d5ea4 i965/surface_formats: Update the VB column for new formats added on BYT
Bay Trail and Haswell added a bunch of new vertex formats.  There was also
the addition of 64-bit passthrough formats for BDW+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand d5b4ab2c5f i965/draw: Properly handle rounding when dividing by InstanceDivisor
The old code always divided rounded down and then subtracted 1.  What we
wanted was to divide rounded up and then subtract 1 which is equivalent to
subtracting 1 and then dividing rounded down.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand ad42ab473c i965/draw: Account for BaseInstance in VBO bounds
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00
Jason Ekstrand ad3deec8ca i965/draw: Use worst-case VBO bounds if brw->num_instances == 0
Previously, we only handled the "I don't know what's going on" case for
things with InstanceDivisor == 0.  However, in the DrawIndirect case we can
get num_instances == 0 and we don't know what's going on with the instanced
ones either.  This commit makes the worst-case bound the default and then
conservatively tightens the bound.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-23 19:12:34 -07:00