summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove duplicated prototypes in varray.hBrian Paul2013-11-151-6/+0
|
* main: Fix MaxUniformComponents for geometry shaders.Paul Berry2013-11-151-1/+1
| | | | | | | | | | | | | | | For both vertex and fragment shaders we default MaxUniformComponents to 4 * MAX_UNIFORMS. It makes sense to do this for geometry shaders too; if back-ends have different limits they can override them as necessary. Fixes piglit test: spec/glsl-1.50/built-in constants/gl_MaxGeometryUniformComponents Cc: "10.0" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: Fix derived vertex state not being updated in glCallList()Fredrik Höglund2013-11-151-6/+16
| | | | | | | | | | AEcontext::NewState is not always set when the vertex array state is changed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71492 Cc: "10.0" <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: 80-column wrapping, remove trailing whitespace in arrayobj.cBrian Paul2013-11-121-13/+16
|
* mesa: add comment for struct gl_vertex_buffer_bindingBrian Paul2013-11-121-0/+6
|
* mesa: call update_array_format() after error checkingBrian Paul2013-11-121-5/+5
| | | | | | | | We try to do all error checking before changing any GL state. Cc: "10.0" <[email protected]> Jordan Justen <[email protected]>
* mesa: use _mesa_is_bufferobj() helper in _mesa_vertex_attrib_address()Brian Paul2013-11-121-3/+4
| | | | | | And use a regular if statment to slightly improve readability. Jordan Justen <[email protected]>
* mesa: add const qualifiers to vertex array helper functionsBrian Paul2013-11-121-4/+4
| | | | Jordan Justen <[email protected]>
* tests: Fix make check for out of tree builds.Rico Schüller2013-11-111-0/+1
| | | | | | Cc: "10.0" <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Rico Schüller <[email protected]>
* mesa: Implement proper tracking logic for glGetGraphicsResetStatusARBIan Romanick2013-11-071-4/+43
| | | | | | | Drivers still have to implement dd_function_table::GetGraphicsResetStatus. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add gl_shared_state::ShareGroupReset and gl_context::ShareGroupResetIan Romanick2013-11-072-0/+20
| | | | | | | | | | These will be used to determine whether to signal a GPU reset after another context in the share group has observed a reset. v2: Change ShareGroupReset from GLboolean to bool. Suggested by Brian. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add dd_function_table::GetGraphicsResetStatusIan Romanick2013-11-071-0/+9
| | | | | | | | | | This allows drivers to determine whether a GPU reset has occured. It should return non-zero status if a reset was observed by the specified context. Another mechanism will be used to observe resets occuring in other contexts in the share group. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove gl_context::ResetStatusIan Romanick2013-11-073-5/+1
| | | | | | | | This isn't going to be used in the actual implemenation of glGetGraphicsResetStatus. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix return statements in varray.cBrian Paul2013-11-071-2/+2
| | | | | | Return false, not GL_FALSE. Add missing return value. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71359
* mesa: Add a streaming load memcpy implementation.Matt Turner2013-11-072-0/+118
| | | | | | | Uses SSE 4.1's MOVNTDQA instruction (streaming load) to read from uncached memory without polluting the cache. Reviewed-by: Chad Versace <[email protected]>
* mesa: Add support to _mesa_bytes_per_vertex_attrib for 10_11_11 format.Chris Forbes2013-11-081-0/+5
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add varray support for UNSIGNED_INT_10F_11F_11F_REV typeChris Forbes2013-11-081-3/+17
| | | | | | | | V2: fix interaction with VertexAttribFormat, since that landed after this was originally written Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add extension scaffolding for ARB_vertex_type_10f_11f_11f_revChris Forbes2013-11-082-0/+2
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Enable ARB_vertex_attrib_bindingFredrik Höglund2013-11-071-0/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Optimize rebinding the same VBOFredrik Höglund2013-11-071-2/+5
| | | | | | | Check if the new buffer object has the same name as the current buffer object before looking it up. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Handle zero-stride arrays in _mesa_update_array_max_element()Fredrik Höglund2013-11-071-2/+4
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add Get* support for ARB_vertex_attrib_bindingFredrik Höglund2013-11-073-0/+38
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add ARB_vertex_attrib_bindingFredrik Höglund2013-11-0716-125/+691
| | | | | | | update_array() and update_array_format() are changed to update the new attrib and binding states, and the client arrays become derived state. Reviewed-by: Eric Anholt <[email protected]>
* glapi: Add infrastructure for ARB_vertex_attrib_bindingFredrik Höglund2013-11-073-6/+72
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Make handle_bind_buffer_gen() non-staticFredrik Höglund2013-11-072-11/+22
| | | | | | | | | | | | | | ...and rename it to _mesa_bind_buffer_gen(). This is so the function can be called from _mesa_BindVertexBuffer(). This patch also adds a caller parameter so we can report the right entry point in error messages. Based on a patch by Eric Anholt. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Rename gl_array_object::VertexAttrib to _VertexAttribFredrik Höglund2013-11-0712-128/+128
| | | | | | | | This will become derived state as part of the ARB_vertex_attrib_binding support. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Split out the format code from update_array()Fredrik Höglund2013-11-071-57/+93
| | | | | | | | | | Split out the code for updating the array format into a new function called update_array_format(). This function will be called by both update_array() and the new glVertexAttrib*Format() entry points in ARB_vertex_attrib_binding. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Restore gl_array_object::NewArrayFredrik Höglund2013-11-074-0/+10
| | | | | | | | This will be used by the ARB_vertex_attrib_binding implementation. This reverts commit db38e9a0e179441f59274f6f2a751912c29872e2. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add arm64 supportFabio Pedretti2013-11-061-1/+1
| | | | | | | Patch from Ubuntu package Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* mesa: Add unreachable() macro.Matt Turner2013-11-061-0/+15
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* mesa: for GLSL_DUMP_ON_ERROR, also dump the info logBrian Paul2013-11-061-0/+2
| | | | | | | Since it's helpful to know why the shader did not compile. Also, call fflush() for Windows. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove __alpha__ && CCPML checkBrian Paul2013-11-041-4/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove OPENSTEP stuffBrian Paul2013-11-041-1/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove WGLAPI macroBrian Paul2013-11-041-16/+0
| | | | | | WGLAPI was defined in glheader.h but wasn't used anywhere. Reviewed-by: Matt Turner <[email protected]>
* mesa: remove Watcom C supportBrian Paul2013-11-041-35/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove BUILD_FOR_SNAP bitsBrian Paul2013-11-042-7/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* glsl: Add new builtins required by GL_ARB_sample_shadingAnuj Phogat2013-11-011-1/+9
| | | | | | | | | | | | | | | | New builtins added by GL_ARB_sample_shading: in vec2 gl_SamplePosition in int gl_SampleID in int gl_NumSamples out int gl_SampleMask[] V2: - Use SWIZZLE_XXXX for STATE_NUM_SAMPLES. - Use "result.samplemask" in arb_output_attrib_string. - Add comment to explain the size of gl_SampleMask[] array. - Make gl_SampleID and gl_SamplePosition system values. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add new functions and enums required by GL_ARB_sample_shadingAnuj Phogat2013-11-017-2/+53
| | | | | | | | | | | | | | | | | | | | | | New functions added by GL_ARB_sample_shading: glMinSampleShadingARB() New enums: GL_SAMPLE_SHADING_ARB GL_MIN_SAMPLE_SHADING_VALUE_ARB V2: Update comments. Create new GL4x.xml. Remove redundant code in get.c. Update the API_XML list in Makefile.am. Add extra_gl40_ARB_sample_shading predicate to get.c. V3: Fix make check failure. Add checks for desktop GL. Use GLfloat in place of GLclampf in glMinSampleShading(). Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ken Graunke <[email protected]>
* mesa: Add infrastructure for GL_ARB_sample_shadingAnuj Phogat2013-11-012-0/+2
| | | | | | | | | | | This patch implements the common support code required for the GL_ARB_sample_shading extension. V2: Move GL_ARB_sample_shading to ARB extension list. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ken Graunke <[email protected]>
* mesa: Add a new GetTransformFeedbackVertexCount() driver hook.Kenneth Graunke2013-10-312-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DrawTransformFeedback() needs to obtain the number of vertices written to a particular stream during the last Begin/EndTransformFeedback block. The new driver hook returns exactly that information. Gallium drivers already implement this by passing the transform feedback object to the drawing function, counting the number of vertices written on the GPU, and using draw indirect. This is efficient, but doesn't always work: If vertex data comes from user arrays, then the VBO module needs to know how many vertices to upload, so we need to synchronously count. Gallium drivers are currently broken in this case. It also doesn't work if primitive restart is done in software. For normal drawing, vbo_draw_arrays() performs software primitive restart, splitting the draw call in two. vbo_draw_transform_feedback() currently doesn't because it has no idea how many vertices need to be drawn. The new driver hook gives it that information, allowing us to reuse the existing vbo_draw_arrays() code to do everything right. On Intel hardware (at least Ivybridge), using the draw indirect approach is difficult since the hardware counts primitives, rather than vertices, which requires doing some simple math. So we always use this hook. Gallium drivers will likely want to use this hook in some cases, but want to use the existing draw indirect approach where possible. Hence, I've added a flag to allow drivers to opt-in to this call. v2: Make it possible to implement this hook but only use this path when necessary (suggested by Marek). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Separate transform feedback object initialization from allocation.Kenneth Graunke2013-10-312-5/+18
| | | | | | | | | | | Both Gallium and i965 subclass gl_transform_feedback_object, which requires implementing a custom NewTransformFeedback hook. Creating a helper function to initialize the fields avoids code duplication and divergence. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix some MSVC signed/unsigned compiler warningsBrian Paul2013-10-313-6/+8
|
* mesa: Drop unused return value from use_shader_programGregory Hainaut2013-10-301-5/+3
| | | | | | | | | | | | The return value has been unused since commit d348b0c. This was originally included in another patch, but it was split out by Ian Romanick. v2: Drop unnecessary final return. Suggested by Paul. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Cc: Eric Anholt <[email protected]>
* mesa: Add support for ARB_shader_atomic_counters.Francisco Jerez2013-10-2910-3/+263
| | | | | | | | | | | | | | | This patch implements the common support code required for the ARB_shader_atomic_counters extension. It defines the necessary data structures for tracking atomic counter buffer objects (from now on "ABOs") associated with some specific context or shader program, it implements support for binding buffers to an ABO binding point and querying the existing atomic counters and buffers declared by GLSL shaders. v2: Fix extension checks. Drop unused MAX_ATOMIC_BUFFERS constant. Acked-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Add support for ARB_shader_atomic_counters.Francisco Jerez2013-10-293-1/+10
| | | | | | | | Add XML file for the dispatch code generator, update the dispatch_sanity test and add stub definition for the new entry point. Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Define introspection macro to determine whether a type is trivially ↵Francisco Jerez2013-10-291-1/+23
| | | | | | | | | | destructible. Only implemented on GCC and Clang for now. Other compilers use a dummy implementation that always returns false, which should be a safe [but slightly inefficient] assumption in all cases. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Generalize MSVC fix for strcasecmp().Paul Berry2013-10-291-0/+1
| | | | | | | | This will let us use strcasecmp() from anywhere inside Mesa without having to worry about the fact that it doesn't exist in MSVC. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* Remove error when calling glGenQueries/glDeleteQueries while a query is activeCarl Worth2013-10-281-15/+10
| | | | | | | | | | | | | | | | There is nothing in the OpenGL specification which prevents the user from calling glGenQueries to generate a new query object while another object is active. Neither is there anything in the Mesa implementation which prevents this. So remove the INVALID_OPERATION errors in this case. Similarly, it is explicitly allowed by the OpenGL specification to delete an active query, so remove the assertion for that case, replacing it with the necesssary state updates to end the query, (clear the bindpt pointer and call into the driver's EndQuery hook). CC: <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: Remove trailing whitespace in texparam.cRico Schüller2013-10-281-6/+6
| | | | | Signed-off-by: Rico Schüller <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: use void in _mesa_VDPAUFiniNV() as in the header fileBrian Paul2013-10-281-1/+1
|