summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* main: Use _mesa_geometric_samples to calculate GL_SAMPLE_BUFFERSNeil Roberts2016-02-052-1/+4
| | | | | | | Otherwise it won't take into account the default samples for framebuffers with no attachments. Reviewed-by: Ilia Mirkin <[email protected]>
* main: Use _mesa_geometric_samples to calculate the value of GL_SAMPLESNeil Roberts2016-02-052-1/+5
| | | | | | | Otherwise it won't take into account the default samples for framebuffers with no attachments. Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: add core implementation of ARB_query_buffer_objectIlia Mirkin2016-02-041-147/+138
| | | | | | | Forwards query result writes to drivers. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add driver interface for writing query results to buffersIlia Mirkin2016-02-041-0/+9
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Handle QUERY_BUFFER_BINDING in GetIntegervRafal Mielniczuk2016-02-042-0/+8
| | | | | | | Signed-off-by: Rafal Mielniczuk <[email protected]> [imirkin: move to GL/GL_CORE section] Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Add QueryBuffer to contextRafal Mielniczuk2016-02-042-0/+16
| | | | | | | | | Add QueryBuffer and initialise it to NullBufferObj on start Signed-off-by: Rafal Mielniczuk <[email protected]> [imirkin: also release QueryBuffer on free] Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Add ARB_query_buffer_object extension flagRafal Mielniczuk2016-02-042-0/+2
| | | | | | | Signed-off-by: Rafal Mielniczuk <[email protected]> [imirkin: add string to extensions.c] Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add MESA_NO_MINMAX_CACHE environment variableNicolai Hähnle2016-02-031-0/+22
| | | | | | | | | | When set to a truish value, this globally disables the minmax cache for all buffer objects. No #ifdef DEBUG guards because this option can be interesting for benchmarking. Reviewed-by: Marek Olšák <[email protected]>
* vbo: disable the minmax cache when the hit rate is lowNicolai Hähnle2016-02-031-0/+2
| | | | | | | | | | | | | | | | | | When applications stream their index buffers, the caches for those BOs become useless and add overhead, so we want to disable them. The tricky part is coming up with the right heuristic for *when* to disable them. The first question is which hit rate to aim for. Since I'm not aware of any interesting borderline applications that do something like "draw two or three times for each upload", I just kept it simple. The second question is how soon we should give up on the caching. Applications might have a warm-up phase where they fill a buffer gradually but then keep reusing it. For this reason, I count the number of indices that hit and miss (instead of the number of calls that hit or miss), since comparing that to the size of the buffer makes sense. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add USAGE_DISABLE_MINMAX_CACHE flag to buffer UsageHistoryNicolai Hähnle2016-02-031-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* vbo: cache/memoize the result of vbo_get_minmax_indices (v3)Nicolai Hähnle2016-02-032-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Some games developers are unaware that an index buffer in a VBO still needs to be read by the CPU if some varying data comes from a user pointer (unless glDrawRangeElements and friends are used). This is particularly bad when they tell us that the index buffer should live in VRAM. This cache helps, e.g. lifting This War Of Mine (a particularly bad offender) from under 10fps to slightly over 20fps on a Carrizo. Note that there is nothing prohibiting a user from rendering from multiple threads simultaneously with the same index buffer, hence the locking. (The internal buffer map taken for the buffer still leads to a race, but at least the locks are a move in the right direction.) v2: disable the cache on USAGE_TEXTURE_BUFFER as well (Chris Forbes) v3: - use bool instead of GLboolean for MinMaxCacheDirty (Ian Romanick) - replace the sticky USAGE_PERSISTENT_WRITE_MAP bit by a direct AccessFlags check Reviewed-by: Chris Forbes <[email protected]> (v2) Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: bail earlier for size == 0 in _mesa_clear_buffer_sub_dataNicolai Hähnle2016-02-031-8/+8
| | | | | | | | | Note that the conversion of the clear data (when data != NULL) can fail due to an out of memory condition, but it does not check any error conditions mandated by the spec. Therefore, it is safe to skip when size == 0. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: add USAGE_PIXEL_PACK_BUFFER flag to buffer UsageHistoryNicolai Hähnle2016-02-032-0/+10
| | | | | | | | We will want to disable minmax index caching for buffers that are used in this way. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: add USAGE_TRANSFORM_FEEDBACK_BUFFER flag to buffer UsageHistoryNicolai Hähnle2016-02-032-0/+4
| | | | | | | | We will want to disable minmax index caching for buffers that are used in this way. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util/hash_table: add _mesa_hash_table_num_entriesNicolai Hähnle2016-02-031-3/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: use default geometry's samples when there are no attachmentsIlia Mirkin2016-02-021-1/+1
| | | | | | | | | Whether multisampling is turned on depends, in part, on whether attachments are themselves multisample surfaces. However when there are no attachments, we should rely on the default geometry for this. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: invalidate framebuffer when changing parametersIlia Mirkin2016-02-021-0/+3
| | | | | | | | | | | | | This fixes dEQP-GLES31.functional.fbo.completeness.no_attachments When the width or height are 0, the framebuffer is incomplete. We may also not have been passing the new state down to the driver when the widths/heights/etc changed. Make sure to dirty the state so that the framebuffer state is revalidated at draw time. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: the _mesa_geometric_* functions require full types from mtypes.hIlia Mirkin2016-02-021-1/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix typo in python scriptsRoland Scheidegger2016-02-021-1/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: enable enums for OES_geometry_shaderMarta Lofstedt2016-02-012-36/+98
| | | | | | | | | | | | | Enable GL_OES_geometry_shader enums for OpenGL ES 3.1. V4: EXTRA tokens updated according to comments from Ilia Mirkin. V5: Account for check_extra does not evaluate "or" lazy. Fix issues with EXTRA_EXT_FB_NO_ATTACH_CS. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: add PROGRAM_IMMEDIATE, PROGRAM_BUFFERIlia Mirkin2016-01-291-0/+2
| | | | | | | | | This makes PROGRAM_IMMEDIATE a first-class gl_register_file type, and adds PROGRAM_BUFFER to the list. These are used purely inside glsl_to_tgsi conversion. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: add GL_OES_geometry_point_size and conditionalize gl_PointSizeIlia Mirkin2016-01-261-0/+1
| | | | | | | | | | | For now this will be enabled in tandem with GL_OES_geometry_shader. Should a driver come along that wants to separate them out, another enable can be added. Also adds the missed GL_OES_geometry_shader define in glcpp. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marta Lofstedt <[email protected]>
* glsl: move to compiler/Emil Velikov2016-01-269-21/+21
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* nir: move glsl_types.{cpp,h} to compilerEmil Velikov2016-01-263-3/+3
| | | | | | | | Allows us to remove the SCons workaround :-) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* nir: move shader_enums.[ch] to compilerEmil Velikov2016-01-261-1/+1
| | | | | | | | | This way one can reuse it in glsl, nir or other infrastructure without pulling nir as dependency. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* mesa: Don't include meta.hIan Romanick2016-01-251-1/+0
| | | | | | | | Commit 055093e removed the call to _mesa_meta_in_progress, and meta.h has not been necessary in src/mesa/main/enable.c since. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* Revert "mesa: enable enums for OES_geometry_shader"Marek Olšák2016-01-242-86/+30
| | | | | | | This reverts commit 67e30987031d189d606125d4b712a575f619ab44. It breaks a bunch of geometry shader tests, such as "spec@!opengl 3.2@minmax" and others depending on the glGet queries.
* Revert "mesa: Deal with size differences between GLuint and GLhandleARB in ↵Jeremy Huddleston Sequoia2016-01-221-17/+1
| | | | | | | | | GetAttachedObjectsARB" This reverts commit 739ac3d39dacdede853d150b9903001524453330. This will be done a differnet way. See http://lists.freedesktop.org/archives/mesa-dev/2016-January/105642.html
* mesa: Update _mesa_has_geometry_shadersMarta Lofstedt2016-01-221-1/+2
| | | | | | | | Updates the _mesa_has_geometry_shaders function to also look for OpenGL ES 3.1 contexts that has OES_geometry_shader enabled. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: enable enums for OES_geometry_shaderMarta Lofstedt2016-01-222-30/+86
| | | | | | | | | | Enable GL_OES_geometry_shader enums for OpenGL ES 3.1. V4: EXTRA tokens updated according to comments from Ilia Mirkin. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glapi: add GL_OES_geometry_shader extensionMarta Lofstedt2016-01-223-0/+5
| | | | | | | | | Add xml definitions for the GL_OES_geometry_shader extension and expose the extension for OpenGL ES 3.1. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: wire up EmitStringMarker for KHR_debugRob Clark2016-01-211-0/+7
| | | | | | | | | | | | The extension spec[1] describes DEBUG_TYPE_MARKER as "Annotation of the command stream". So for DEBUG_TYPE_MARKER, also pass the buf to the driver's EmitStringMarker() to be inserted in the command stream. [1] https://www.opengl.org/registry/specs/KHR/debug.txt Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add GREMEDY_string_markerRob Clark2016-01-216-0/+28
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* texobj: Remove redundant checks that the texture cube faces match sizeNeil Roberts2016-01-211-10/+0
| | | | | | | | | | The texture mipmap completeness checking code was checking whether all of the faces have the same size. However this is pointless because the code just above it checks whether the face has the expected size calculated for the mipmap level anyway so the error condition could never be reached. This patch just removes it. Reviewed-by: Ian Romanick <[email protected]>
* texobj: Fix the completeness checks for cube texturesNeil Roberts2016-01-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to the GL 1.4 spec section 3.8.10, a cubemap texture is only complete if: • The level base arrays of each of the six texture images making up the cube map have identical, positive, and square dimensions. • The level base arrays were each specified with the same internal format. • The level base arrays each have the same border width. Previously the texture completeness code was only checking the first point. This patch makes it additionally check the other two. This fixes the following two dEQP tests: deqp-gles2.functional.texture.completeness.cube.format_mismatch_rgba_rgb_level_0_neg_z deqp-gles2.functional.texture.completeness.cube.format_mismatch_rgb_rgba_level_0_pos_z And also this Piglit test: spec/!opengl 2.0/incomplete-cubemap-format Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93792 Cc: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Deal with size differences between GLuint and GLhandleARB in ↵Jeremy Huddleston Sequoia2016-01-211-1/+17
| | | | | | | GetAttachedObjectsARB Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Fix format warningsJeremy Huddleston Sequoia2016-01-211-1/+1
| | | | | | | | | | main/shaderapi.c:1318:51: warning: format specifies type 'unsigned int' but the argument has type 'GLhandleARB' (aka 'unsigned long') [-Wformat] _mesa_debug(ctx, "glDeleteObjectARB(%u)\n", obj); ~~ ^~~ %lu Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Fix some function prototype mismatchingJeremy Huddleston Sequoia2016-01-214-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main/api_exec.c:543:36: warning: incompatible pointer types passing 'void (GLhandleARB, GLuint, const GLcharARB *)' (aka 'void (unsigned long, unsigned int, const char *)') to parameter of type 'void (*)(GLuint, GLuint, const GLchar *)' (aka 'void (*)(unsigned int, unsigned int, const char *)') [-Wincompatible-pointer-types] SET_BindAttribLocation(exec, _mesa_BindAttribLocation); ^~~~~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7590:88: note: passing argument to parameter 'fn' here static inline void SET_BindAttribLocation(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, const GLchar *)) { ^ main/api_exec.c:547:31: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_CompileShader(exec, _mesa_CompileShader); ^~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7612:83: note: passing argument to parameter 'fn' here static inline void SET_CompileShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ main/api_exec.c:568:33: warning: incompatible pointer types passing 'void (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)' (aka 'void (unsigned long, unsigned int, int, int *, int *, unsigned int *, char *)') to parameter of type 'void (*)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *)' (aka 'void (*)(unsigned int, unsigned int, int, int *, int *, unsigned int *, char *)') [-Wincompatible-pointer-types] SET_GetActiveAttrib(exec, _mesa_GetActiveAttrib); ^~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7711:85: note: passing argument to parameter 'fn' here static inline void SET_GetActiveAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLsizei , GLsizei *, GLint *, GLenum *, GLchar *)) { ^ main/api_exec.c:571:35: warning: incompatible pointer types passing 'GLint (GLhandleARB, const GLcharARB *)' (aka 'int (unsigned long, const char *)') to parameter of type 'GLint (*)(GLuint, const GLchar *)' (aka 'int (*)(unsigned int, const char *)') [-Wincompatible-pointer-types] SET_GetAttribLocation(exec, _mesa_GetAttribLocation); ^~~~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7744:88: note: passing argument to parameter 'fn' here static inline void SET_GetAttribLocation(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLuint, const GLchar *)) { ^ main/api_exec.c:585:33: warning: incompatible pointer types passing 'void (GLhandleARB, GLsizei, GLsizei *, GLcharARB *)' (aka 'void (unsigned long, int, int *, char *)') to parameter of type 'void (*)(GLuint, GLsizei, GLsizei *, GLchar *)' (aka 'void (*)(unsigned int, int, int *, char *)') [-Wincompatible-pointer-types] SET_GetShaderSource(exec, _mesa_GetShaderSource); ^~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7788:85: note: passing argument to parameter 'fn' here static inline void SET_GetShaderSource(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { ^ main/api_exec.c:597:29: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_LinkProgram(exec, _mesa_LinkProgram); ^~~~~~~~~~~~~~~~~ ./main/dispatch.h:7909:81: note: passing argument to parameter 'fn' here static inline void SET_LinkProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ main/api_exec.c:628:30: warning: incompatible pointer types passing 'void (GLhandleARB, GLsizei, const GLcharARB *const *, const GLint *)' (aka 'void (unsigned long, int, const char *const *, const int *)') to parameter of type 'void (*)(GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (*)(unsigned int, int, const char *const *, const int *)') [-Wincompatible-pointer-types] SET_ShaderSource(exec, _mesa_ShaderSource); ^~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7920:82: note: passing argument to parameter 'fn' here static inline void SET_ShaderSource(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLchar * const *, const GLint *)) { ^ main/api_exec.c:653:28: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_UseProgram(exec, _mesa_UseProgram); ^~~~~~~~~~~~~~~~ ./main/dispatch.h:8173:80: note: passing argument to parameter 'fn' here static inline void SET_UseProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ main/api_exec.c:655:33: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_ValidateProgram(exec, _mesa_ValidateProgram); ^~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:8184:85: note: passing argument to parameter 'fn' here static inline void SET_ValidateProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { main/dlist.c:9457:26: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_UseProgram(table, save_UseProgramObjectARB); ^~~~~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:8173:80: note: passing argument to parameter 'fn' here static inline void SET_UseProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: remove link validation that should be done elsewhereTimothy Arceri2016-01-201-60/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if re-linking fails rendering shouldn't fail as the previous succesfully linked program will still be available. It also shouldn't be possible to have an unlinked program as part of the current rendering state. This fixes a subtest in: ES31-CTS.sepshaderobjs.StateInteraction This change should improve performance on CPU limited benchmarks as noted in commit d6c6b186cf308f. >From Section 7.3 (Program Objects) of the OpenGL 4.5 spec: "If a program object that is active for any shader stage is re-linked unsuccessfully, the link status will be set to FALSE, but any existing executables and associated state will remain part of the current rendering state until a subsequent call to UseProgram, UseProgramStages, or BindProgramPipeline removes them from use. If such a program is attached to any program pipeline object, the existing executables and associated state will remain part of the program pipeline object until a subsequent call to UseProgramStages removes them from use. An unsuccessfully linked program may not be made part of the current rendering state by UseProgram or added to program pipeline objects by UseProgramStages until it is successfully re-linked." "void UseProgram(uint program); ... An INVALID_OPERATION error is generated if program has not been linked, or was last linked unsuccessfully. The current rendering state is not modified." V2: apply the rule to both core and compat. Cc: Tapani Pälli <[email protected]> Cc: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Move sanity check of BindVertexBuffer for OpenGL ES 3.1Marta Lofstedt2016-01-192-1/+5
| | | | | | | | | Sanity check of BindVertexBuffer for OpenGL ES in _mesa_handle_bind_buffer_gen breaks OpenGL ES 2 conformance. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93426 Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: fix segfault in glUniformSubroutinesuiv()Timothy Arceri2016-01-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | From Section 7.9 (SUBROUTINE UNIFORM VARIABLES) of the OpenGL 4.5 Core spec: "The command void UniformSubroutinesuiv(enum shadertype, sizei count, const uint *indices); will load all active subroutine uniforms for shader stage shadertype with subroutine indices from indices, storing indices[i] into the uniform at location i. The indices for any locations between zero and the value of ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS minus one which are not used will be ignored." V2: simplify NULL check suggested by Jason. Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Cc: "11.0 11.1" [email protected] https://bugs.freedesktop.org/show_bug.cgi?id=93731
* mesa: add Driver.InvalidateBufferSubDataNicolai Hähnle2016-01-142-8/+9
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: fix the checks in _mesa_InvalidateBuffer(Sub)DataNicolai Hähnle2016-01-141-3/+15
| | | | | | | | Change the check to be in line with what the quoted spec fragment says. I have sent out a piglit test for this as well. Reviewed-by: Ian Romanick <[email protected]>
* texobj: Check completeness with InternalFormat rather than Mesa formatNeil Roberts2016-01-141-1/+1
| | | | | | | | | | | | | | The internal Mesa format used for a texture might not match the one requested in the internalFormat when the texture was created, for example if the driver is internally remapping RGB textures to RGBA. Otherwise it can cause false positives for completeness if one mipmap image is created as RGBA and the other as RGB because they would both have an RGBA Mesa format. If we check the InternalFormat instead then we are directly checking the API usage which I think better matches the intention of the check. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93700 Reviewed-by: Anuj Phogat <[email protected]>
* mesa: do not validate io of non-compute and compute stageTapani Pälli2016-01-131-0/+7
| | | | | | | | | Fixes regression on SSO tests that have both non-compute and compute programs in a program pipeline. Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93532 Reviewed-by: Marta Lofstedt <[email protected]>
* mesa: print the invalid enum when CreateShader failsTimothy Arceri2016-01-131-1/+2
| | | | Reviewed-by: Tapani Pälli <[email protected]>
* mesa: use gl_shader_variable in program resource listTapani Pälli2016-01-122-19/+80
| | | | | | | | | | | | | | Patch changes linker to allocate gl_shader_variable instead of using ir_variable. This makes it possible to get rid of ir_variables and ir in memory after linking. v2: check that we do not create duplicate entries with packed varyings v3: document 'patch' bit (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* main: get rid of needless conditionalErik Faye-Lund2016-01-121-13/+12
| | | | | | | | We already check if the driver changed the completeness, we don't need to duplicate that check. Let's just early out there instead. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Refator _mesa_BindSampler to make _mesa_bind_samplerIan Romanick2016-01-112-6/+16
| | | | | | | | | Pulls the parts of _mesa_BindSampler that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add _mesa_set_sampler_srgb_decode methodIan Romanick2016-01-112-0/+14
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>