summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fix GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT queryBrian Paul2017-07-182-1/+13
| | | | | | | | This query is not allowed in GL core profile 3.3 and later (since GL_QUADS and GL_QUAD_STRIP are disallowed). The query was (mistakenly) supported in GL 3.2. This fixes the glGet error test accordingly. Reviewed-by: Neha Bhende<[email protected]>
* mesa: flag _NEW_TEXTURE_OBJECT for GL_TEXTURE_LOD_BIAS_EXTMarek Olšák2017-07-171-1/+1
| | | | | | | Only the compatibility profile can set it. It was done incorrectly when we split _NEW_TEXTURE. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/marshal: fix Windows buildGrigori Goronzy2017-07-141-3/+3
| | | | | | | This was broken by commit 1ad24faa. Reported by AppVeyor: https://ci.appveyor.com/project/mesa3d/mesa/build/4918
* mesa/marshal: fix glNamedBufferData with NULL dataGrigori Goronzy2017-07-141-4/+13
| | | | | | | The semantics are similar to glBufferData. Tested-by: Marc Dietrich <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/marshal: add marshalling for glClearBuffer*Grigori Goronzy2017-07-142-2/+160
| | | | | | | | | Add async marshalling/unmarshalling for all glClearBuffer variants. These entry points are commonly used in general and Alien Isolation specifically uses glClearBufferiv. Slightly reduces the number of thread synchronizations with glthread in that game. Reviewed-by: Marek Olšák <[email protected]>
* mesa/marshal: extract ClearBuffer helpersGrigori Goronzy2017-07-142-29/+50
| | | | | | | | | Extract clear buffer helper functions in preparation for adding marshal/unmarshal functions for the various glClearBuffer variants. v2: Fix command size. Reviewed-by: Marek Olšák <[email protected]>
* mesa: Return GL_INVALID_ENUM for bogus TEXTURE_SRGB_DECODE_EXT params.Kenneth Graunke2017-07-131-1/+12
| | | | | | | Fixes dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.srgb_decode_samplerparameter{f,fv,i,Iiv,Iuiv,iv}. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* main/formats: Add a get_linear_format_srgb helperJason Ekstrand2017-07-122-0/+25
| | | | Reviewed-by: Chad Versace <[email protected]>
* main/formats: Autogenerate _mesa_get_srgb_format_linearJason Ekstrand2017-07-122-117/+46
| | | | | | | | | | | | | | | | | | Due to the wonders of autogeneration, this new version covers a few formats that the old version was missing: MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6 Reviewed-by: Chad Versace <[email protected]>
* mesa: finish implementing glPrimitiveRestartNV() for display listsBrian Paul2017-07-071-1/+21
| | | | | | | | | | | | | If we try to build a display list with just a glPrimitiveRestartNV() call, we'd crash because of a null GLvertexformat::PrimitiveRestartNV pointer. This change fixes that case. The previous patch fixed the case of calling glPrimitiveRestartNV() inside a glBegin/End pair. v2: minor clean-up in save_PrimitiveRestartNV(), per Charmaine. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: add some braces in _mesa_make_current()Brian Paul2017-07-071-1/+2
| | | | Slightly better readability.
* vbo: simplify vbo_save_NotifyBegin()Brian Paul2017-07-071-17/+1
| | | | | | | | | | | | | This function always returned GL_TRUE. Just make it a void function. Remove unreachable code following the call to vbo_save_NotifyBegin() in save_Begin() in dlist.c There were some stale comments that no longer applied since an earlier code refactoring. No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: simplify get_tex_images_for_clear()Brian Paul2017-07-061-19/+14
| | | | | | Get rid of redundant code. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: new comments, assertion related to glClearTexSubImageBrian Paul2017-07-061-0/+12
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* mesa: Avoid set comprehension.Vinson Lee2017-07-051-1/+1
| | | | | | | | | | | | | | Fix build error on CentOS 6.9 with Python 2.6. GEN main/format_fallback.c File "./main/format_fallback.py", line 42 names = {fmt.name for fmt in formats} ^ SyntaxError: invalid syntax Fixes: a1983223d883 ("mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]") Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* mesa: Require mipmap completeness for glCopyImageSubData() at times.Kenneth Graunke2017-06-281-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | This patch makes glCopyImageSubData require mipmap completeness when the texture object's built-in sampler object has a mipmapping MinFilter. This is apparently the de facto behavior and mandated by Android's CTS. One exception is that we ignore format based completeness rules (specifically integer formats with linear filtering), as this is also the de facto behavior that until recently was mandated by the OpenGL 4.5 CTS. This was discussed with both the OpenGL and OpenGL ES working groups, and while everyone agrees this behavior is unfortunate and complicated, it is what it is at this point. There was little appetite for relaxing restrictions given that all conformant Android drivers followed the mipmapping rule, and all conformant GL 4.5 implementations ignored the integer/linear rule. Fixes (on i965): dEQP-GLES31.functional.debug.negative_coverage.*.buffer.copy_image_sub_data Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224 Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: tidy up white space in pixelstore.cTimothy Arceri2017-06-291-6/+6
|
* mesa: Refactor error checking for GL_TEXTURE_BASE_LEVEL vs texture targetsIan Romanick2017-06-281-7/+19
| | | | | | | | | | Add a big spec quotation justifying the error generated, which has changed over the GL versions. v2: Compact the spec quote based on a Khronos bug and discussion with Jason. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: add KHR_no_error support for glBlendFunc*()Timothy Arceri2017-06-292-0/+30
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: create some glBlendFunc*() helper functionsTimothy Arceri2017-06-291-50/+81
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add KHR_no_error support for glBindFragDataLocation*()Timothy Arceri2017-06-292-0/+38
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add bind_frag_data_location() helperTimothy Arceri2017-06-291-11/+19
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add KHR_no_error support for glGetUniformLocation()Timothy Arceri2017-06-292-0/+13
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: inline _mesa_finish()Timothy Arceri2017-06-292-19/+8
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add KHR_no_error support for glDisableVertexA*A*()Timothy Arceri2017-06-292-0/+23
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: move error handling into disable_vertex_array_attrib() callersTimothy Arceri2017-06-291-10/+14
| | | | | | | This will let us just call disable_vertex_array_attrib() for KHR_no_error support. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add KHR_no_error support for glEnableVertexA*A*()Timothy Arceri2017-06-292-0/+25
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add KHR_no_error support for glLogicOp()Timothy Arceri2017-06-292-0/+12
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add logic_op() helperTimothy Arceri2017-06-291-9/+16
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add KHR_no_error support for glPixelStore*()Timothy Arceri2017-06-292-0/+21
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add pixel_storei() helperTimothy Arceri2017-06-291-46/+57
| | | | | | Will be used to add KHR_no_error support. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: remove redundant error checkTimothy Arceri2017-06-291-4/+0
| | | | | | | We do the same check in the shared code in the set_tex_parameterf() call. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: GL_TEXTURE_BORDER_COLOR exists in OpenGL 1.0, so don't depend on ↵Ian Romanick2017-06-281-1/+9
| | | | | | | | | | | | | | | | | | | | | GL_ARB_texture_border_clamp On NV20 (and probably also on earlier NV GPUs that lack GL_ARB_texture_border_clamp) fixes the following piglit tests: gl-1.0-beginend-coverage gltexparameter[if]{v,} push-pop-texture-state texwrap 1d texwrap 1d proj texwrap 2d proj texwrap formats All told, 49 more tests pass on NV20 (10de:0201). No changes on Intel CI run or RV250 (1002:4c66). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: do not use format string as literal stringJuan A. Suarez Romero2017-06-281-2/+2
| | | | | | | | | | | | | | | | This fixes a couple of errors when building in Android: external/mesa3d/src/mesa/main/shaderapi.c:293:49: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] _mesa_error(ctx, GL_INVALID_OPERATION, caller); ^~~~~~ external/mesa3d/src/mesa/main/shaderapi.c:293:49: note: treat the string as an argument to avoid this _mesa_error(ctx, GL_INVALID_OPERATION, caller); ^ Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Juan A. Suarez Romero <[email protected]>
* mesa: add KHR_no_error support for glClear()Samuel Pitoiset2017-06-282-0/+10
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clear() helperSamuel Pitoiset2017-06-281-23/+31
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindAttribLocation()Samuel Pitoiset2017-06-282-0/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add bind_attrib_location() helperSamuel Pitoiset2017-06-281-19/+29
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for gl*ReadBuffer()Samuel Pitoiset2017-06-282-0/+38
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: create read_buffer_err() and always inline read_buffer()Samuel Pitoiset2017-06-281-18/+31
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glVertex*AttribBinding()Samuel Pitoiset2017-06-282-0/+30
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glShaderStorageBlockBinding()Samuel Pitoiset2017-06-282-0/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add shader_storage_block_binding() helperSamuel Pitoiset2017-06-281-9/+19
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glUniformBlockBinding()Samuel Pitoiset2017-06-282-0/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add uniform_block_binding() helperSamuel Pitoiset2017-06-281-9/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glFenceSync()Samuel Pitoiset2017-06-282-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add fence_sync() helperSamuel Pitoiset2017-06-281-17/+25
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glClientWaitSync()Samuel Pitoiset2017-06-282-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add client_wait_sync() helperSamuel Pitoiset2017-06-281-16/+26
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glCheckFramebufferStatus()Samuel Pitoiset2017-06-282-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>