summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Set green, blue channels to zero only for formats with these componentsAnuj Phogat2015-07-241-3/+10
| | | | | | | | | This is an optimization which avoids setting pixel transfer operations when not required. _mesa_ReadPixels falls back to slower path if transfer operations are set. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* meta: Don't do fragment color clamping in _mesa_meta_pbo_GetTexSubImageAnuj Phogat2015-07-241-0/+5
| | | | | | | | | | | | | | | _mesa_meta_pbo_GetTexSubImage() uses _mesa_meta_BlitFrameBuffer(), which will do fragment clamping if enabled. But fragment clamping doesn't affect ReadPixels and GetTexImage. Without this patch, piglit test arb_color_buffer_float-clear fails, when forced to use the meta pbo path. v2: Apply this fix to both glReadPixels and glGetTexImage. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* meta: Abort meta pbo path if readpixels need signed-unsigned conversionAnuj Phogat2015-07-241-0/+26
| | | | | | | | | | | | | | | | Meta pbo path for ReadPixels rely on BlitFramebuffer which doesn't support signed to unsigned integer conversions and vice versa. Without this patch, piglit test fbo_integer_readpixels_sint_uint fails, when forced to use the meta pbo path. v2: Make need_signed_unsigned_int_conversion() a static function. (Iago) Bump up the comment and the commit message. (Jason) Signed-off-by: Anuj Phogat <[email protected]> Cc: <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral <[email protected]>
* meta: Fix transfer operations check in meta pbo path for readpixelsAnuj Phogat2015-07-241-4/+9
| | | | | | | | | | | | | | | | | | | Currently used ctx->_ImageTransferState check is not sufficient because it doesn't include the read color clamping enabled with GL_CLAMP_READ_COLOR. So, use the helper function _mesa_get_readpixels_transfer_ops(). Also, transfer operations don't affect glGetTexImage(). So, do the check only for glReadPixles. Without this patch, arb_color_buffer_float-readpixels test fails, when forced to use meta pbo path. V2: Add a comment and bump up the commit message. Signed-off-by: Anuj Phogat <[email protected]> Cc: <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: Turn get_readpixels_transfer_ops() in to a global functionAnuj Phogat2015-07-242-7/+15
| | | | | | | | This utility function is utilized in a later patch. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Use updated kernel interface for accurate TIMESTAMP readsChris Wilson2015-07-243-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I was mistaken, I thought we already had fixed this in the kernel a couple of years ago. We had not, and the broken read (the hardware shifts the register output on 64bit kernels, but not on 32bit kernels) is now enshrined into the ABI. I also had the buggy architecture reversed, believing it to be 32bit that had the shifted results. On the basis of those mistakes, I wrote commit c8d3ebaffc0d7d915c1c19d54dba61fd1e57b338 Author: Chris Wilson <[email protected]> Date: Wed Apr 29 13:32:38 2015 +0100 i965: Query whether we have kernel support for the TIMESTAMP register once Now that we do have an extended register read interface for always reporting the full 36bit TIMESTAMP (irrespective of whether the hardware is buggy or not), make use of it and in the process fix my reversed detection of the buggy reads for unpatched kernels. Signed-off-by: Chris Wilson <[email protected]> Cc: Martin Peres <[email protected]> Cc: Kenneth Graunke <[email protected]> Cc: Michał Winiarski <[email protected]> Cc: Daniel Vetter <[email protected]> Tested-and-acked-by: Chris Forbes <[email protected]> Reviewed-by: Daniel Vetter <[email protected]>
* radeon: Silence GCC unused-but-set-variable warnings.Vinson Lee2015-07-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | radeon_fbo.c: In function 'radeon_map_renderbuffer_s8z24': radeon_fbo.c:162:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ radeon_fbo.c: In function 'radeon_map_renderbuffer_z16': radeon_fbo.c:200:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ radeon_fbo.c: In function 'radeon_map_renderbuffer': radeon_fbo.c:242:8: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ radeon_fbo.c: In function 'radeon_unmap_renderbuffer': radeon_fbo.c:419:14: warning: variable 'ok' set but not used [-Wunused-but-set-variable] GLboolean ok; ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* doxygen: Link GLvector4f struct members properly, avoiding invalid XML/HTML ↵Rhys Kidd2015-07-231-1/+1
| | | | | | | | warning Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* doxygen: Correct grammatical typo in math/m_vector.hRhys Kidd2015-07-231-1/+1
| | | | | | Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: minor clean-ups in shaderapi.cBrian Paul2015-07-231-7/+10
| | | | 80-column wrapping. Move break statements. Indentation fixes.
* mesa: fix _mesa_error() compiler warnings in shaderapi.cBrian Paul2015-07-231-33/+33
| | | | | | | | | | | | | | Fix many instances of: main/shaderapi.c: In function '_mesa_GetSubroutineUniformLocation': main/shaderapi.c:2176:7: warning: format not a string literal and no format arguments [-Wformat-security] _mesa_error(ctx, GL_INVALID_OPERATION, api_name); ^ Ideally, many of these error messages should be improved to indicate which argument is incorrect as we do in other parts of Mesa. Reviewed-by: Kai Wasserbäch <[email protected]> Tested-by: Kai Wasserbäch <[email protected]>
* st/mesa: remove unused 'samp' function parametersBrian Paul2015-07-231-5/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add comments on a few sampler view functionsBrian Paul2015-07-231-0/+10
| | | | Trivial.
* mesa: do more thorough target checking in compressed_subtexture_target_check()Brian Paul2015-07-231-26/+40
| | | | | | | When we're error-checking the target, we also need to check if the corresponding extension is supported. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: another target fix in compressed_subtexture_target_check()Brian Paul2015-07-231-1/+8
| | | | | | | | | | | | | The previous fix added GL_TEXTURE_CUBE_MAP_ARRAY but we also need to support GL_TEXTURE_CUBE_MAP (via DSA). So in the end, GL_TEXTURE_3D is the only (legal) target for glCompressedTex*SubImage3D() which needs additional compression format checking. GL_TEXTURE_2D_ARRAY, GL_TEXTURE_CUBE_MAP_ARRAY and GL_TEXTURE_CUBE_MAP are basically 2D images which support all compressed formats. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: simplify format check in compressed_subtexture_target_check()Brian Paul2015-07-231-14/+10
| | | | | | Lose the invalidformat local variable. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: initialize variables to silence compiler warningsBrian Paul2015-07-232-3/+3
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* i965: add support for ARB_shader_subroutineDave Airlie2015-07-245-0/+13
| | | | | | | | This just adds some missing pieces to nir/i965, it is lightly tested on my Haswell. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: rearrange texture error checking orderIlia Mirkin2015-07-231-13/+13
| | | | | | | | | | | | | This moves the width/height/depth == 0 check to the front and avoids doing any other checking when that is the case. Also moves the dimensions check after the format/type checks so that we don't bail out with success on a width/height/depth == 0 request when the format/type don't match. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91425 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: adjust error message when there's a missing teximageIlia Mirkin2015-07-231-2/+1
| | | | | | | The current message makes it seem like the zoffset is invalid. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix error in target validation of glCompressedTex(ture)SubImage3D() callsEduardo Lima Mitev2015-07-231-1/+2
| | | | | | | | | | | | | | Basically, two different target error checks are chained consecutively, and the second one is executed regardless the result of the first one. This produces an incorrect error if the first check fails but is overrided by the second. This patch conditions the execution of the second check to a successful pass of the first one. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d Reviewed-by: Laura Ekstrand <[email protected]>
* st/mesa: enable shader subroutineDave Airlie2015-07-231-0/+1
| | | | | | | since this touches drivers, only enable it on gallium for now for drivers reporting GLSL 1.30 or above. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add subroutine bits (v1.1)Dave Airlie2015-07-231-1/+1
| | | | | | | | | | Just add support for the subroutine type to the glsl->tgsi convertor. v1.1: add subroutine to int support. Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: fill out the ARB_shader_subroutine APIsDave Airlie2015-07-232-3/+451
| | | | | | | | | | This fleshes out the APIs, using the program resource APIs where they should match. It also sets the default values to valid subroutines. Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* program: add subroutine uniform support (v1.1)Dave Airlie2015-07-231-0/+3
| | | | | | | | | Add support for the subroutine uniform type ir->mesa.cpp v1.1: add subroutine to int to switch Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* program_resource: add subroutine support (v3.1)Dave Airlie2015-07-232-22/+179
| | | | | | | | | | | | | | This fleshes out the ARB_program_query support for the APIs that ARB_shader_subroutine introduces, leaving some TODOs for later addition. v2: reworked for lots of the ARB_program_interface_query entry points and tests v3: use common function to test for subroutine support v3.1: add tess, fix missing breaks Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/mtypes: add gl_subroutine_function and uniform storage to shader (v2)Dave Airlie2015-07-231-0/+28
| | | | | | | | This adds the necessary storage for subroutine info to gl_shader. v2: add comments, rename one member Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add function to check if shader subroutines are enabled.Dave Airlie2015-07-231-0/+9
| | | | | | | | This checks if core profile and shader subroutine extension is enabled. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add inline conversion functions for ARB_shader_subroutine (v2)Dave Airlie2015-07-231-0/+101
| | | | | | | | | | | This handles converting the shader stages to the internal prefix along with the program resource interfaces. v2: add tess support Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl/types: add new subroutine type (v3.2)Dave Airlie2015-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This type will be used to store the name of subroutine types as in subroutine void myfunc(void); will store myfunc into a subroutine type. This is required to the parser can identify a subroutine type in a uniform decleration as a valid type, and also for looking up the type later. Also add contains_subroutine method. v2: handle subroutine to int comparisons, needed for lowering pass. v3: do subroutine to int with it's own IR operation to avoid hacking on asserts (Kayden) v3.1: fix warnings in this patch, fix nir, fix tgsi v3.2: fixup tests Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]> tests: fix warnings
* dispatch_sanity: add shader subroutine to fix make checkDave Airlie2015-07-231-8/+10
| | | | | | | | Add the shader subroutine to the core only API list, and fixup dispatch_sanity to suit. Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Add glGet support for ARB_shader_subroutine implementation limitsChris Forbes2015-07-234-0/+20
| | | | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Add extension tracking for arb_shader_subroutine (v2)Chris Forbes2015-07-233-1/+3
| | | | | | | | | v2: [airlied]: merge version check update. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Add stubs for ARB_shader_subroutine entrypointsChris Forbes2015-07-232-0/+95
| | | | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* dispatch_sanity.cpp: remove commented out tess entriesDave Airlie2015-07-231-2/+0
| | | | | | | These entries were put in the GL4.0 section, so removed the commented out ones. Signed-off-by: Dave Airlie <[email protected]>
* i965: fix warning since tess merge.Dave Airlie2015-07-231-0/+2
| | | | Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: enable tessellation if the driver supports itMarek Olšák2015-07-231-0/+5
|
* st/mesa: set default tessellation levelsMarek Olšák2015-07-236-1/+67
|
* st/mesa: add barrier supportIlia Mirkin2015-07-231-1/+4
|
* st/mesa: disable copy propagation for tessellation shadersIlia Mirkin2015-07-231-1/+5
| | | | This can't work due to shared inputs and outputs and barriers.
* st/mesa: set vertices_per_patch when drawingIlia Mirkin2015-07-231-0/+2
|
* st/mesa: add 2d indexing support to outputsIlia Mirkin2015-07-231-10/+37
|
* st/mesa: handle tessellation 2D varyings correctlyMarek Olšák2015-07-231-8/+20
|
* st/mesa: lower gl_TessLevel from float[] to vecnIlia Mirkin2015-07-231-0/+2
|
* st/mesa: query shader CAPs for tessellationIlia Mirkin2015-07-231-0/+15
| | | | The MaxTessPatchComponents query added by Marek.
* st/mesa: add texture updates for tessellation programsIlia Mirkin2015-07-234-0/+72
|
* st/mesa: handle constbufs/ubos for tessellation shadersIlia Mirkin2015-07-233-1/+95
|
* st/mesa: add conversion for tessellation shadersMarek Olšák2015-07-232-98/+274
| | | | Based on code from Ilia Mirkin <[email protected]>.
* st/mesa: add tessellation shader statesIlia Mirkin2015-07-239-1/+459
| | | | additional fixes by Marek
* mesa: implement GL_IS_PER_PATCHMarek Olšák2015-07-231-2/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>