Commit Graph

84368 Commits

Author SHA1 Message Date
Ilia Mirkin 5b18e5fd7b docs: sort extensions in relnotes
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-27 17:51:44 -04:00
Jason Ekstrand fb89551047 isl: Allow multisampled array textures
This probably isn't the only thing that needs to be done to get
multisampled array textures working in Vulkan but I think this is all that
ISL really needs and it does fix 8 of the new CTS tests.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-08-26 19:00:02 -07:00
Ian Romanick cf7be70aa7 mesa/version: OpenGL ES 3.2 depends on OES_texture_cube_map_array
This has a separate enable from ARB_texture_cube_map_array.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick b387bc90c8 i965: Enable OES_texture_cube_map_array on Gen8+
These are the only platforms that current expose OES_geometry_shader.
Once OpenGL ES 3.1 and OES_geometry_shader are enabled on Gen7, this
extension can be enabled there as well.

Gen6 will never get OpenGL ES 3.1, so it will never get this
extension... even though it has the desktop OpenGL extension.  Alas.

NOTE: This causes a failure on Gen8+ platforms in
ES3-CTS.gtf.GL3Tests.texture_storage.texture_storage_texture_targets.
The test only fails because it doesn't know that 0x9009 is a valid
value when the extension exists.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick dc4f53b683 mesa: Add support for OES_texture_cube_map_array
This has a separate enable flag because this extension also requires
OES_geometry_shader.  It is possible that some drivers may support
OpenGL ES 3.1 and ARB_texture_cube_map but not support
OES_geometry_shader.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick 87fa462ffd mesa: Add and use _mesa_has_texture_cube_map_array helper
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick 66b988d09a mesa: Use _mesa_has_ARB_texture_cube_map_array instead of open-coding it
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick daf1a61e11 mesa: Cosmetic changes in legal_texobj_target
Use bool instead of GLboolean and constify ctx.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick d79c950eeb mesa: Rearrange legal_texobj_target to look more like _mesa_legal_get_tex_level_parameter_target
This makes it a bit easier to add support for more features in different
APIs.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick ef5bad09c4 glsl: Add and use has_texture_cube_map_array helper
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick c879dbc4e4 glsl: Mark cube map array sampler types as reserved in GLSL ES 3.10
All the GLSL 4.x keywords were added to the list of reserved keywords
in GLSL ES 3.10.  As far as I can tell, these are the only ones that
were missed.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick 8fb4af7789 glsl: Silence unused parameter warning
glsl/lower_buffer_access.cpp:324:55: warning: unused parameter ‘var’ [-Wunused-parameter]
                                          ir_variable *var,
                                                       ^

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick 63af53dcd3 i965: Enable GL_OES_geometry_shader on Gen8+
Gen7 can get this extension (and GL_OES_shader_io_blocks) as soon as the
rest of OpenGL ES 3.1 is enabled.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick 259fc50545 glsl/linker: Fail linking on ES if uniform precision qualifiers don't match
When GL_OES_geometry_shader is enabled, this fixes
dEQP-GLES31.functional.shaders.linkage.geometry.uniform.rules.type_mismatch_1.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:15 -07:00
Ian Romanick 06201e4f1a glsl: Allow invocations layout qualifier with GL_OES_geometry_shader
Fixes

dEQP-GLES31.functional.geometry_shading.instanced.geometry_1_invocations
dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_2d_array
dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_2d_multisample_array
dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_3d
dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_cubemap
dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_2d_array
dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_2d_multisample_array
dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_3d
dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_cubemap
dEQP-GLES31.functional.geometry_shading.query.geometry_shader_invocations

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:14 -07:00
Ian Romanick 3a0ae7b55c glsl: Allow gl_InvocationID and gl_Layer with GL_OES_geometry_shader
Fixes

dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_array
dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_multisample_array
dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_3d
dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_cubemap

v2: Don't enable gl_ViewportIndex in GLSL ES 3.20.  Noticed by Ilia.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:14 -07:00
Ian Romanick 1a72fbf9e6 mesa: Allow GL_EXT_geometry_shader and GL_EXT_geometry_point_size
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:14 -07:00
Ian Romanick 658e90f9a8 mesa: Document reasons for allowing XFB drawing modes in GLES 3.1 w/GL_OES_geometry_shader
Originally this patch added the checks to allow the draw calls with XFB,
but commit 2dabd497 beat me to it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:14 -07:00
Ian Romanick aa228eb1a6 mesa: Remove redundant _mesa_has_shader_subroutine
The checks in _mesa_has_shader_subroutine are slightly different than
_mesa_has_ARB_shader_subroutine, but they're not different in a way
that matters.  The only way to have ctx->Version >= 40 is if
ctx->Extensions.ARB_shader_subroutine is set.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
2016-08-26 15:03:14 -07:00
Ian Romanick 0115f356ee nouveau: Enable EXT_texture_env_dot3 on NV10 and NV20
GL_DOT3_RGB_EXT and GL_DOT3_RGBA_EXT. are nearly identical to
GL_DOT3_RGB and GL_DOT3_RGBA.  The only difference is the _EXT
versions do not apply the post-scale.  Just smash logscale to 0 so
that RC_OUT_SCALE_1 is always used.

NOTE: I have not actually tested this.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-26 15:03:14 -07:00
Ian Romanick a7d92c3c0b nouveau: Fix non-1x post-scale factor with DOT3 combiner
Fixes long standing bug on NV10 and NV20 where using a non-1x RGB or A
post-scale with GL_DOT3_RGB or GL_DOT3_RGBA texture environment would
not work.

The old combiner math uses HALF_BIAS_NORMAL and HALF_BIAS_NEGATE.  The
GL_NV_register_combiners defines these as

    HALF_BIAS_NORMAL_NV       max(0.0, e) - 0.5
    HALF_BIAS_NEGATE_NV       -max(0.0, e) + 0.5

In order to get the correct result from the dot-product, the
intermediate dot-product must be multiplied by 4.  This is a literal
implementation of the GL_ARB_texture_env_dot3 spec.  It also requires
using the register combiner post-scale.  As a result, the post-scale
cannot be used for the post-scale set by the application.

The new combiner math uses EXPAND_NORMAL and EXPAND_NEGATE.  The
GL_NV_register_combiners defines these as

    EXPAND_NORMAL_NV          2.0 * max(0.0, e) - 1.0
    EXPAND_NEGATE_NV          -2.0 * max(0.0, e) + 1.0

Since this fully expands the value to [-1, 1] range, the intermediate
dot-product result is the desired value.  This leaves the register
combiner post-scale available for application use.

NOTE: I have not actually tested this.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-26 15:03:14 -07:00
Ian Romanick f926cf5bd0 docs: Rename GL3.txt to features.txt
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-08-26 15:03:14 -07:00
Ian Romanick 8cd5c3cfe7 docs: Update GL3.txt for OpenGL 4.x on i965-ish hardware
v2: Note that GL_KHR_blend_equation_advanced and
GL_KHR_blend_equation_advanced_coherent are done.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-08-26 15:03:14 -07:00
Nicholas Bishop d0a4c36dd6 docs: add links to clarify patch mailing section
* Changed "Mesa mailing list" to "mesa-dev mailing list" to clarify
  which list patches should be sent to

* Added an explicit link to
  https://lists.freedesktop.org/mailman/listinfo/mesa-dev to show
  where to subscribe to the list

* Added a link to https://git-scm.com/docs/git-send-email to help new
  users of that command

v2: add signed-off-by

Signed-off-by: Nicholas Bishop <nicholasbishop@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-08-26 14:54:26 -07:00
Brian Paul ea33df7b58 svga: minor whitespace, etc clean-ups in svga_pipe_misc.c
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul 8433b43337 svga: move some code in svga_propagate_surface()
Move computation of zslice, layer inside the conditional where they're
used.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul 1a10b37ac3 svga: simplify surface propagation code in svga_set_framebuffer_state()
Rewrite the comment too.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul bb7f094b37 svga: add some comments in the svga_surface struct
Give more info about backing resources/surfaces.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul dcf63339e7 svga: use new svga_check_sampler_framebuffer_resource_collision()
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul ff500ed5a1 svga: add new svga_check_sampler_framebuffer_resource_collision()
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul d3d20d650d svga: remove assertions in svga_surface cast wrappers
We don't do this for other cast wrappers.  And this will simplify some
code at call sites.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul c6e89fa215 svga: minor code simplification in svga_texture_transfer_unmap()
Use the tex variable instead of using svga_texture() again.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul fe5a2704ec svga: reformat some expressions in svga_texture_transfer_map()
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul 10ef6ddcf9 svga: remove duplicated variable in svga_texture_transfer_map()
tex was already declared at the function body scope.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul 09d2780b39 svga: move some assignments in svga_texture_transfer_map()
Put near other assignments to the svga_transfer variable.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:18 -06:00
Brian Paul 4a52512666 svga: minor simplifications in svga_texture_transfer_map()
Use local vars instead of jumping through a pointer.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:18 -06:00
Brian Paul 088dd8f45e svga: minor reformatting of svga_texture() cast wrapper
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:18 -06:00
Brian Paul e206f67261 svga: rewrite svga_buffer() cast wrapper
To make it symmetric with the svga_texture() cast wrapper.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:18 -06:00
Brian Paul c72dcd9a71 svga: remove local variable in create_backed_surface_view()
To simplify the code a bit.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:18 -06:00
Kenneth Graunke bc13e5f42a docs: Add GL_KHR_blend_equation_advanced to relnotes. 2016-08-26 13:17:22 -07:00
Mario Kleiner 2cc880cba5 r600: increase performance for DRI PRIME offloading if 2nd GPU is Evergreen+
This is a direct port of Marek Olšáks patch
"radeonsi: increase performance for DRI PRIME
offloading if 2nd GPU is CIK or VI" to r600.

It uses SDMA for the detiling blit from renderoffload VRAM
to GTT, as SDMA is much faster for tiled->linear blits from
VRAM to GTT.

Testing on a dual Radeon HD-5770 setup reduced the time
for the render offload gpu to get its rendering into
system RAM from approximately 16 msecs for simple rendering
at 1920x1080 pixel 32 bpp to 5 msecs, a > 3x speedup!

This was measured using ftrace to trace the time the radeon kms
driver waited on the dmabuf fence of the renderoffload gpu to
complete.

All in all this brought the time for a flip down from 20 msecs
to 9 msecs, so the prime setup can display at full 60 fps instead
of barely 30 fps vsync'ed.

The current r600 implementation supports SDMA on Evergreen and
later, but not R600/R700 due to some bugs apparently present
in their SDMA implementation.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2016-08-26 19:57:21 +02:00
Jordan Justen 7970238fcf docs: Update stencil texturing & ES 3.1 status for i965 Haswell
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen 93f5eb7ae7 i965: Enable OpenGLES 3.1 for Haswell
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen 116b6e12d4 i965: Enable ARB_texture_stencil8 for Haswell
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen f20f616324 i965: Enable ARB_stencil_texturing for Haswell
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen 751682434e i965/gen7: Use R8_UINT stencil copy when sampling the stencil texture
v2:
 * Check gen <= 7, rather than gen == 7. (Ian)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen 8d78b096f8 i965/gen7: Copy stencil when sampling the stencil texture
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen 7af51b8f03 i965: Add function to copy a stencil miptree to an R8_UINT miptree
v2:
 * Cleanups suggested by Ian, Matt and Topi

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen c8194dc737 i965: Track that the stencil data was updated when using Tex*Image
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-08-26 10:09:22 -07:00
Jordan Justen 101b56bab2 i965: Track that the stencil data was updated when rendering
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-08-26 10:09:22 -07:00