summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove redundant _ae_invalidate_state() callTimothy Arceri2017-06-091-3/+0
| | | | | | | | | The FLUSH_VERTICES(ctx, _NEW_ARRAY) above this will already cause this to be called. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: inline vbo_exec_invalidate_state() and call from mesa coreTimothy Arceri2017-06-091-1/+4
| | | | | | | | Rather than calling it indirectly in each driver. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: rework vbo_exec_init()Timothy Arceri2017-06-092-0/+8
| | | | | | | | | | Here we make some assumptions about the AEcontext and set the recalculate bools directly. Some formating fixes are also made while we are here. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: stop passing state bitfield to UpdateState()Timothy Arceri2017-06-092-6/+3
| | | | | | | | | | | | | | | | | | The code comment which seems to have been added in cab974cf6c2db (from year 2000) says: "Set ctx->NewState to zero to avoid recursion if Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?)" As far as I can tell nothing in any of the UpdateState() calls should cause it to be called recursively. V2: add a wrapper around the osmesa update function so it can still be used internally. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: Fix gl_shader_stage enum unsigned comparisonRob Herring2017-06-081-0/+4
| | | | | | | | | | | Replace -1 with MESA_SHADER_NONE enum value to fix sign related warning: external/mesa3d/src/compiler/glsl/link_varyings.cpp:1415:25: warning: comparison of constant -1 with expression of type 'gl_shader_stage' is always true [-Wtautological-constant-out-of-range-compare] (consumer_stage != -1 && consumer_stage != MESA_SHADER_FRAGMENT))) { ~~~~~~~~~~~~~~ ^ ~~ Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* mesa/main: fix gl_buffer_index enum comparisonRob Herring2017-06-073-7/+8
| | | | | | | | | | | | | | For clang, enums are unsigned by default and gives the following warning: external/mesa3d/src/mesa/main/buffers.c:764:21: warning: comparison of constant -1 with expression of type 'gl_buffer_index' is always false [-Wtautological-constant-out-of-range-compare] if (srcBuffer == -1) { ~~~~~~~~~ ^ ~~ Replace -1 with an enum value to fix this. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* mesa: add gl_driver_flags::NewFramebufferSRGBMarek Olšák2017-06-072-1/+7
| | | | | | | _NEW_BUFFERS updates too much stuff. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support for glTexSubImage*D()Samuel Pitoiset2017-06-072-0/+61
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add texsubimage() helperSamuel Pitoiset2017-06-071-0/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make _mesa_texture_sub_image() staticSamuel Pitoiset2017-06-071-20/+20
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename texsubimage() to texsubimage_err()Samuel Pitoiset2017-06-071-17/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glCopyImageSubData()Samuel Pitoiset2017-06-072-0/+30
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add copy_image_subdata() helperSamuel Pitoiset2017-06-071-31/+45
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add prepare_target() helperSamuel Pitoiset2017-06-071-0/+24
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename prepare_target() to prepare_target_err()Samuel Pitoiset2017-06-071-16/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBlitNamedFramebuffer()Samuel Pitoiset2017-06-072-0/+27
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add blit_named_framebuffer() helperSamuel Pitoiset2017-06-071-31/+54
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBlitFramebuffer()Samuel Pitoiset2017-06-072-0/+21
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add validate_depth_buffer() helperSamuel Pitoiset2017-06-071-29/+43
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add validate_stencil_buffer() helperSamuel Pitoiset2017-06-071-34/+47
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add validate_color_buffer() helperSamuel Pitoiset2017-06-071-61/+77
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: wrap blit_framebuffer() into blit_framebuffer_err()Samuel Pitoiset2017-06-071-9/+25
| | | | | | | Also add ALWAYS_INLINE to blit_framebuffer(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add 'no_error' parameter to blit_framebuffer()Samuel Pitoiset2017-06-071-97/+95
| | | | | | | | The whole GLES3 block has been moved before the buffer validation checks. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make _mesa_blit_framebuffer() staticSamuel Pitoiset2017-06-072-23/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindBuffer()Samuel Pitoiset2017-06-072-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glInvalidateBufferData()Samuel Pitoiset2017-06-072-0/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glInvalidateBufferSubData()Samuel Pitoiset2017-06-072-0/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add invalidate_buffer_subdata() helperSamuel Pitoiset2017-06-071-4/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindVertexBuffers()Samuel Pitoiset2017-06-072-0/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glVertexArrayVertexBuffers()Samuel Pitoiset2017-06-072-0/+21
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add vertex_array_vertex_buffers_err() helperSamuel Pitoiset2017-06-071-47/+61
| | | | | | | | This also adds a 'no_error' parameter to vertex_array_vertex_buffer() to be used in a following patch. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glScissor*()Samuel Pitoiset2017-06-072-0/+44
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add scissor() and scissor_array() helpersSamuel Pitoiset2017-06-071-20/+35
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename ScissorIndexed() to scissor_indexed_err()Samuel Pitoiset2017-06-071-6/+9
| | | | | | | | And move GET_CURRENT_CONTEXT() into the APIENTRY calls for consistency. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: use _mesa_set_scissor() in ScissorIndexed()Samuel Pitoiset2017-06-071-4/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make _mesa_scissor_bounding_box() staticSamuel Pitoiset2017-06-072-9/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: inline update_image_transfer_state() into _mesa_update_pixel()Samuel Pitoiset2017-06-071-14/+6
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove useless check in _mesa_update_pixel()Samuel Pitoiset2017-06-073-5/+4
| | | | | | | | | The only caller is _mesa_update_state_locked() which already checks if _NEW_PIXEL is set before calling _mesa_update_pixel(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make use of NewWindowRectangles driver flagsSamuel Pitoiset2017-06-061-1/+3
| | | | | | | | Now, st_update_window_rectangles() won't be called when the scissor is going to be updated. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add new gl_driver_flags::NewWindowRectanglesSamuel Pitoiset2017-06-061-0/+5
| | | | | | | | | | | | This new driver flag will replace _NEW_SCISSOR which is emitted when setting new window rectangles but it actually triggers useless changes in the state tracker (like scissor and rasterizer). EXT_window_rectangles is currently only supported by Nouveau. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: remove call to Driver.Scissor() in _mesa_WindowRectanglesEXT()Samuel Pitoiset2017-06-061-3/+0
| | | | | | | | | This is actually useless because this driver call is only used by the classic DRI drivers which don't support that extension and probably won't never support it. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: only emit _NEW_MULTISAMPLE when min sample shading changesSamuel Pitoiset2017-06-061-3/+6
| | | | | | | | We usually check that given parameters are different before updating the state. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: only emit _NEW_MULTISAMPLE when sample mask changesSamuel Pitoiset2017-06-061-0/+3
| | | | | | | | We usually check that given parameters are different before updating the state. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: only emit _NEW_MULTISAMPLE when coverage parameters changeSamuel Pitoiset2017-06-061-3/+7
| | | | | | | | We usually check that given parameters are different before updating the state. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: document range of SampleCoverageValue, MinSampleShadingValueBrian Paul2017-06-021-2/+2
| | | | Trivial.
* mesa/main: replace remaining uses of IROUND() in GetUniform*() by round()Iago Toral Quiroga2017-06-011-2/+2
| | | | | | | | | These were correct since they were used only in conversions to signed integers, however this makes the implementation a bit more is more consistent and reduces chances of propagating use of these macros to unsigned cases in the future, which would not be correct. Reviewed-by: Matt Turner <[email protected]>
* mesa/main: conversion from float in GetUniformi64v requires rounding to nearestIago Toral Quiroga2017-06-011-1/+1
| | | | | | | | As we do for all other cases of float/double conversions to integers. v2: use round() instead of IROUND() macros (Iago) Reviewed-by: Matt Turner <[email protected]>
* mesa/main: Add conversion from double to uint64/int64 in GetUniform*i64v()Iago Toral Quiroga2017-06-011-0/+14
| | | | | | | | v2: - need unsigned rounding for double->uint64 conversion (Nicolai) - use round() instead of IROUND() macros (Iago) Reviewed-by: Matt Turner <[email protected]>
* mesa/main: Clamp GetUniformui64v values to be >= 0Iago Toral Quiroga2017-06-011-1/+45
| | | | | | | | | | Like we do for the 32-bit case. v2: - need unsigned rounding for float->uint64 conversion (Nicolai) - use roundf() instead of IROUND() macros (Iago) Reviewed-by: Matt Turner <[email protected]>
* mesa/main: Clamp GetUniformuiv values to be >= 0Kenneth Graunke2017-06-011-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | Section 2.2.2 (Data Conversions For State Query Commands) of the OpenGL 4.5 October 24th 2016 specification says: "If a command returning unsigned integer data is called, such as GetSamplerParameterIuiv, negative values are clamped to zero." v2: uint to int conversion should clamp to INT_MAX (Nicolai) v3 (Iago) - Add conversions conversions from 64-bit integer paths - Rebase on master v4: - need unsigned rounding for float/double->uint conversions (Nicolai) - use round{f}() instead of IROUND() macros (Iago) Fixes: KHR-GL45.gpu_shader_fp64.state_query Reviewed-by: Nicolai Hähnle <[email protected]> (v2) Reviewed-by: Matt Turner <[email protected]>