summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: small texture targetIndex tidy upTimothy Arceri2017-05-071-5/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix broken indentationTimothy Arceri2017-05-071-7/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: some C99 tidy upsTimothy Arceri2017-05-071-24/+10
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support to copy buffer subdata functionsTimothy Arceri2017-05-072-1/+41
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _mesa from static functionTimothy Arceri2017-05-071-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_buffer_storage() staticTimothy Arceri2017-05-072-13/+7
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_copy_buffer_sub_data() staticTimothy Arceri2017-05-072-17/+8
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_clear_buffer_sub_data() staticTimothy Arceri2017-05-072-29/+13
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for flush mapped buffer functionsTimothy Arceri2017-05-072-1/+31
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_flush_mapped_buffer_range() staticTimothy Arceri2017-05-072-15/+9
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for unmap buffer functionsTimothy Arceri2017-05-072-0/+23
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: split unmap_buffer() in twoTimothy Arceri2017-05-071-12/+17
| | | | | | | This will allow us to implement KHR_no_error support for unmap functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_unmap_buffer() staticTimothy Arceri2017-05-072-9/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for some map buffer functionsTimothy Arceri2017-05-072-0/+63
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: split out validation from map_buffer_range()Timothy Arceri2017-05-071-27/+50
| | | | | | | This will allow us to add KHR_no_error support for *BufferRange functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make map_buffer_range() staticTimothy Arceri2017-05-072-20/+13
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Simplify _mesa_primitive_restart_index().Kenneth Graunke2017-05-061-10/+2
| | | | | | | We can use a simple shift equation rather than a switch statement. Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: process bindless/bound layout qualifiersSamuel Pitoiset2017-05-061-0/+10
| | | | | | | | | | | | This adds bindless_sampler and bound_sampler (and respectively bindless_image and bound_image) to the parser. v3: - add an extra space in apply_bindless_qualifier_to_variable() - fix indentation in merge_qualifier() Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: make sampler/image types as 64-bitSamuel Pitoiset2017-05-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The ARB_bindless_texture spec says: "Samplers are represented using 64-bit integer handles." and, "Images are represented using 64-bit integer handles." It seems simpler to always consider sampler and image types as 64-bit unsigned integer. This introduces a temporary workaround in _mesa_get_uniform() because at this point no flag are used to distinguish between bound and bindless samplers. This is going to be removed in a separate series. This avoids breaking arb_shader_image_load_store-state. v3: - update the comment slightly Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add ARB_bindless_texture to the extensions listSamuel Pitoiset2017-05-062-0/+2
| | | | | | | | This is required for the following GLSL bits. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa/tests: remove no longer needed HAVE_SHARED_GLAPI defineEmil Velikov2017-05-041-2/+0
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: make _mesa_accum() staticTimothy Arceri2017-05-042-57/+54
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: tidy up accum.hTimothy Arceri2017-05-041-2/+0
| | | | | | These were unused. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/varray: make use of dispatch KHR_no_error supportTimothy Arceri2017-05-042-177/+355
| | | | | | Make use of dispatch KHR_no_error support for varray functions. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add const qualifier on _mesa_valid_to_render()Brian Paul2017-05-032-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* glsl: set vector_elements to 1 for samplersSamuel Pitoiset2017-05-021-10/+5
| | | | | | | | | | | | | | | | I don't see any reasons why vector_elements is 1 for images and 0 for samplers. This increases consistency and allows to clean up some code a bit. This will also help for ARB_bindless_texture. No piglit regressions with RadeonSI. This time the Intel CI system doesn't report any failures. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: optimize color_buffer_writes_enabled()Brian Paul2017-04-281-4/+5
| | | | | | | | | | Return as soon as we find an existing color channel that's enabled for writing. Typically, this allows us to return true on the first loop iteration intead of doing four iterations. No piglit regressions. Reviewed-by: Marek Olšák <[email protected]>
* Revert "glsl: set vector_elements to 1 for samplers"Matt Turner2017-04-281-5/+10
| | | | | | This reverts commit 75a31a20af269c047661af33e28f793269537b79. This breaks thousands of tests on i965 with malloc corruption.
* mesa: remove wip framebuffer codeTimothy Arceri2017-04-281-7/+0
| | | | | | | This was added in 34b3b40af97d back in 2006. Seems it wasn't needed. Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: set vector_elements to 1 for samplersSamuel Pitoiset2017-04-271-10/+5
| | | | | | | | | | | | | | I don't see any reasons why vector_elements is 1 for images and 0 for samplers. This increases consistency and allows to clean up some code a bit. This will also help for ARB_bindless_texture. No piglit regressions with RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: tidy up left over APPLE_vertex_array_object semanticsTimothy Arceri2017-04-264-43/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: inline bind_vertex_array() helperTimothy Arceri2017-04-261-17/+6
| | | | | | The previous commit removed the only other user of this function. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: drop APPLE_vertex_array_object supportTimothy Arceri2017-04-267-69/+18
| | | | | | | | | | | | | | | | | | | | | Shared context support for VAOs was dropped in 0b2750620b65. From the ARB_vertex_array_object spec: "This extension differs from GL_APPLE_vertex_array_object in that client memory cannot be accessed through a non-zero vertex array object. It also differs in that vertex array objects are explicitly not sharable between contexts." Nobody should be using this extension over ARB_vertex_array_object anymore so just drop it rather than adding locking back just for VAOs created from these functions. For reference the Nvidia blob doesn't expose this extension. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: use locked version of HashWalk for xfb objectsTimothy Arceri2017-04-251-2/+2
| | | | | | | | | | | | From Chapter 5 'Shared Objects and Multiple Contexts' of the OpenGL 4.5 spec: "Objects which contain references to other objects include framebuffer, program pipeline, query, transform feedback, and vertex array objects. Such objects are called container objects and are not shared" Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: create locked version of HashWalkTimothy Arceri2017-04-252-8/+31
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: replace _mesa_index_buffer::type with index_sizeMarek Olšák2017-04-222-7/+9
| | | | | | | This avoids repeated translations of the enum. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: validate sampler type across the whole programTimothy Arceri2017-04-222-5/+23
| | | | | | | | | | | Currently we were only making sure types were the same within a single stage. This looks to have regressed with 953a0af8e3f73. Fixes: 953a0af8e3f73 ("mesa: validate sampler uniforms during gluniform calls") Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> https://bugs.freedesktop.org/show_bug.cgi?id=97524
* mesa: don't lock hashtables that are not shared across contextsTimothy Arceri2017-04-225-15/+16
| | | | | | | | | | | | | | | | | | | From Chapter 5 'Shared Objects and Multiple Contexts' of the OpenGL 4.5 spec: "Objects which contain references to other objects include framebuffer, program pipeline, query, transform feedback, and vertex array objects. Such objects are called container objects and are not shared" For we leave locking in place for framebuffer objects because the EXT fbo extension allowed sharing. We could maybe just replace the hash with an ordinary hash table but for now this should remove most of the unnecessary locking. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: Remove deleteFlag pattern from container objects.Matt Turner2017-04-222-6/+2
| | | | | | | | This pattern was only useful when we used mutex locks, which the previous commit removed. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: Remove unnecessary locking from container objects.Matt Turner2017-04-224-19/+0
| | | | | | | | | | | | | | | | | | | From Chapter 5 'Shared Objects and Multiple Contexts' of the OpenGL 4.5 spec: "Objects which contain references to other objects include framebuffer, program pipeline, query, transform feedback, and vertex array objects. Such objects are called container objects and are not shared" For we leave locking in place for framebuffer objects because the EXT fbo extension allowed sharing. V2: (Timothy Arceri) - rebased and dropped changes to framebuffer objects Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: remove fallback RefCount == 0 patternTimothy Arceri2017-04-226-59/+25
| | | | | | | | We should never get here if this is 0 unless there is a bug. Replace the check with an assert. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/glthread: correctly compare thread handlesEmil Velikov2017-04-211-1/+1
| | | | | | | | | | | | | As mentioned in the manual - comparing pthread_t handles via the C comparison operator is incorrect and pthread_equal() should be used instead. Cc: Timothy Arceri <[email protected]> Fixes: d8d81fbc316 ("mesa: Add infrastructure for a worker thread to process GL commands.") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: print target string in glBindTexture() error messageBrian Paul2017-04-191-1/+2
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix Windows build error related to getuid()Brian Paul2017-04-191-2/+6
| | | | | | getuid() and geteuid() are not present on Windows. Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glVertexAttribDivisor()Timothy Arceri2017-04-191-8/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/vbo: move some Draw checks out of validationTimothy Arceri2017-04-191-41/+2
| | | | | | | These checks do not generate any errors. Move them so we can add KHR_no_error support and still make sure we do these checks. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: add KHR_no_error support to *Pointer() functionsTimothy Arceri2017-04-191-116/+236
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: add KHR_no_error support to some callers of validate_array_format()Timothy Arceri2017-04-191-63/+73
| | | | | | | The only caller we don't update is update_arrays(), we leave that to the following commit. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: rename update_array_format() -> validate_array_format()Timothy Arceri2017-04-191-26/+45
| | | | | | | | | | We also move _mesa_update_array_format() into the caller. This gets these functions ready for KHR_no_error support. V2: Updated function comment as suggested by Brian. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: create get_array_format() helperTimothy Arceri2017-04-191-11/+20
| | | | | | | | This will help us split array validation from array update. V2: add const to ctx param Reviewed-by: Nicolai Hähnle <[email protected]>