summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Use _mesa_has_ARB_texture_cube_map_array instead of open-coding itIan Romanick2016-08-263-4/+3
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Cosmetic changes in legal_texobj_targetIan Romanick2016-08-261-12/+12
| | | | | | | | Use bool instead of GLboolean and constify ctx. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Rearrange legal_texobj_target to look more like ↵Ian Romanick2016-08-261-11/+26
| | | | | | | | | | | _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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add and use has_texture_cube_map_array helperIan Romanick2016-08-262-4/+8
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Mark cube map array sampler types as reserved in GLSL ES 3.10Ian Romanick2016-08-261-4/+4
| | | | | | | | | | | 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 <[email protected]> Cc: [email protected] Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Silence unused parameter warningIan Romanick2016-08-264-6/+5
| | | | | | | | | | glsl/lower_buffer_access.cpp:324:55: warning: unused parameter ‘var’ [-Wunused-parameter] ir_variable *var, ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable GL_OES_geometry_shader on Gen8+Ian Romanick2016-08-261-0/+1
| | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl/linker: Fail linking on ES if uniform precision qualifiers don't matchIan Romanick2016-08-261-0/+7
| | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Allow invocations layout qualifier with GL_OES_geometry_shaderIan Romanick2016-08-261-2/+4
| | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Allow gl_InvocationID and gl_Layer with GL_OES_geometry_shaderIan Romanick2016-08-261-2/+11
| | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Allow GL_EXT_geometry_shader and GL_EXT_geometry_point_sizeIan Romanick2016-08-266-2/+27
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Document reasons for allowing XFB drawing modes in GLES 3.1 ↵Ian Romanick2016-08-261-2/+31
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove redundant _mesa_has_shader_subroutineIan Romanick2016-08-263-26/+16
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* nouveau: Enable EXT_texture_env_dot3 on NV10 and NV20Ian Romanick2016-08-263-1/+17
| | | | | | | | | | | | 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 <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* nouveau: Fix non-1x post-scale factor with DOT3 combinerIan Romanick2016-08-261-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* svga: minor whitespace, etc clean-ups in svga_pipe_misc.cBrian Paul2016-08-261-26/+23
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: move some code in svga_propagate_surface()Brian Paul2016-08-261-18/+19
| | | | | | | Move computation of zslice, layer inside the conditional where they're used. Reviewed-by: Neha Bhende <[email protected]>
* svga: simplify surface propagation code in svga_set_framebuffer_state()Brian Paul2016-08-261-12/+4
| | | | | | Rewrite the comment too. Reviewed-by: Neha Bhende <[email protected]>
* svga: add some comments in the svga_surface structBrian Paul2016-08-261-0/+16
| | | | | | Give more info about backing resources/surfaces. Reviewed-by: Neha Bhende <[email protected]>
* svga: use new svga_check_sampler_framebuffer_resource_collision()Brian Paul2016-08-261-18/+3
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: add new svga_check_sampler_framebuffer_resource_collision()Brian Paul2016-08-262-1/+36
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: remove assertions in svga_surface cast wrappersBrian Paul2016-08-261-2/+0
| | | | | | | We don't do this for other cast wrappers. And this will simplify some code at call sites. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor code simplification in svga_texture_transfer_unmap()Brian Paul2016-08-261-2/+1
| | | | | | Use the tex variable instead of using svga_texture() again. Reviewed-by: Neha Bhende <[email protected]>
* svga: reformat some expressions in svga_texture_transfer_map()Brian Paul2016-08-261-3/+3
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: remove duplicated variable in svga_texture_transfer_map()Brian Paul2016-08-261-1/+0
| | | | | | tex was already declared at the function body scope. Reviewed-by: Neha Bhende <[email protected]>
* svga: move some assignments in svga_texture_transfer_map()Brian Paul2016-08-261-4/+4
| | | | | | Put near other assignments to the svga_transfer variable. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor simplifications in svga_texture_transfer_map()Brian Paul2016-08-261-9/+9
| | | | | | Use local vars instead of jumping through a pointer. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor reformatting of svga_texture() cast wrapperBrian Paul2016-08-261-1/+2
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: rewrite svga_buffer() cast wrapperBrian Paul2016-08-261-6/+4
| | | | | | To make it symmetric with the svga_texture() cast wrapper. Reviewed-by: Neha Bhende <[email protected]>
* svga: remove local variable in create_backed_surface_view()Brian Paul2016-08-261-7/+4
| | | | | | To simplify the code a bit. Reviewed-by: Neha Bhende <[email protected]>
* r600: increase performance for DRI PRIME offloading if 2nd GPU is Evergreen+Mario Kleiner2016-08-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Cc: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* i965: Enable OpenGLES 3.1 for HaswellJordan Justen2016-08-261-0/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Enable ARB_texture_stencil8 for HaswellJordan Justen2016-08-261-1/+1
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Enable ARB_stencil_texturing for HaswellJordan Justen2016-08-261-1/+4
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/gen7: Use R8_UINT stencil copy when sampling the stencil textureJordan Justen2016-08-261-2/+10
| | | | | | | | v2: * Check gen <= 7, rather than gen == 7. (Ian) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/gen7: Copy stencil when sampling the stencil textureJordan Justen2016-08-261-0/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Add function to copy a stencil miptree to an R8_UINT miptreeJordan Justen2016-08-262-1/+60
| | | | | | | | | v2: * Cleanups suggested by Ian, Matt and Topi Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Track that the stencil data was updated when using Tex*ImageJordan Justen2016-08-262-2/+8
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Track that the stencil data was updated when renderingJordan Justen2016-08-261-0/+1
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Track that the stencil data was updated when clearingJordan Justen2016-08-261-0/+8
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/gen7: Add R8_UINT stencil miptree copy for samplingJordan Justen2016-08-262-0/+14
| | | | | | | | | | | For gen < 8, we can't sample from the stencil buffer, which is required for the ARB_stencil_texturing extension. We'll make a copy of the stencil data into a new texture that we can sample using the R8_UINT surface type. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Fix assert with multisampling and cubemapsJordan Justen2016-08-261-2/+4
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/hsw: Adjust uploading default color for stencil surfacesJordan Justen2016-08-261-2/+15
| | | | | | | | v2: * has_component (Ken); const bits_per_channel (Topi) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/hsw: Don't advertise more than 64 threads for compute shadersJordan Justen2016-08-261-14/+25
| | | | | | | | | | | thread_width_max in the GPGPU walker command limits us to a maximum of 64 threads. This fixes a crash on Haswell in the OpenGLES 3.1 conformance test suite which tests the advertised limits of the max invocation counts. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* main: Add MESA_VERBOSE=api support for glClearStencilJordan Justen2016-08-261-0/+3
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* main: Add MESA_VERBOSE=api support for glTexImageJordan Justen2016-08-261-0/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* svga: add guest statistic gathering interfaceCharmaine Lee2016-08-261-0/+49
| | | | | | | This file was supposed to be added with the previous "svga: add guest statistic gathering interface" patch but went MIA for some reason. Reviewed-by: Brian Paul <[email protected]>
* radeonsi: disable CE on SI + AMDGPUMarek Olšák2016-08-261-1/+3
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* winsys/amdgpu: disable IB chaining on SIMarek Olšák2016-08-261-5/+6
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* winsys/amdgpu: finish up SI addrlib integrationMarek Olšák2016-08-261-5/+25
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>