summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* main: Added entry point for glCreateRenderbuffersMartin Peres2015-03-253-18/+58
| | | | | | | | v2: - refactor bindRenderBuffer and create_render_buffers to fix an assertion Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glCreateSamplersMartin Peres2015-03-253-6/+22
| | | | | | | | Because of the current way the code is architectured, there is no functional difference between the DSA and the non-DSA path. Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glCreateProgramPipelinesMartin Peres2015-03-253-6/+33
| | | | | | | | v2: - add spaces in an error message (Laura) Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry points for glGetQueryBufferObject*Martin Peres2015-03-253-0/+55
| | | | | | | | | These entry points will be fleshed out when the GL_ARB_query_buffer_object extension gets implemented. In the meantime, return GL_INVALID_OPERATION as suggested by Ian. Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glCreateQueriesMartin Peres2015-03-253-7/+72
| | | | | | | | v2: - display the name of the target instead of its id (Laura) Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glGetTransformFeedbacki64_vMartin Peres2015-03-253-0/+37
| | | | | | | | | | | | | | v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper v3: - use the new name of _mesa_lookup_transform_feedback_object_err v4: Review from Laura Ekstrand - fix some alignement problems Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glGetTransformFeedbacki_vMartin Peres2015-03-253-0/+34
| | | | | | | | | | | v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper v3: - use the new name of _mesa_lookup_transform_feedback_object_err Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glGetTransformFeedbackivMartin Peres2015-03-253-0/+29
| | | | | | | | v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glTransformFeedbackBufferRangeMartin Peres2015-03-254-16/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | v2: review from Laura Ekstrand - use the refactored code to lookup the objects - improve some error messages - factor out the gl method name computation - better handle the spec differences between the DSA and non-DSA cases - quote the spec a little more v3: review from Laura Ekstrand - use the new name of _mesa_lookup_bufferobj_err - swap the comments around the offset and size checks v4: review from Laura Ekstrand - add more spec quotes - properly fix the comments around the offset and size checks v5: review from Laura Ekstrand - add quotes on the spec citations - revert some changes in the printf format v6: review from Laura Ekstrand - remove a redondant "gl" in a method name Signed-off-by: Martin Peres <[email protected]> Reviewed-by: Laura Ekstrand <[email protected]>
* main: Added entry point for glTransformFeedbackBufferBaseMartin Peres2015-03-254-35/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: Review from Laura Ekstrand - give more helpful error messages - factor the lookup code for the xfb and objBuf - replace some already-existing tabs with spaces - add comments to explain the cases where xfb == 0 or buffer == 0 - fix the condition for binding the transform buffer or not v3: Review from Laura Ekstrand - rename _mesa_lookup_bufferobj_err to _mesa_lookup_transform_feedback_bufferobj_err and make it static to avoid a future conflict - make _mesa_lookup_transform_feedback_object_err static v4: Review from Laura Ekstrand - add the pdf page number when quoting the spec - rename some of the symbols to follow the public/private conventions v5: Review from Laura Ekstrand - properly rename some of the symbols to follow the public/private conventions - fix some alignments - add quotes around a spec citation - add back a newline I accidentally deleted - add spaces around the ternary operator usages Signed-off-by: Martin Peres <[email protected]> Reviewed-by: Laura Ekstrand <[email protected]>
* main: Added entry point for glCreateTransformFeedbacksMartin Peres2015-03-253-15/+56
| | | | | | | | | | | | | | | | | v2: Review from Laura Ekstrand - generate the name of the gl method once - shorten some lines to stay in the 78 chars limit v3: Review from Fredrik Höglund <[email protected]> - rename gl_mthd_name to func - set EverBound in _mesa_create_transform_feedbacks in the dsa case v4: - rename _mesa_create_transform_feedbacks to create_transform_feedbacks and make it static Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: fix the validation of the number of samplesMartin Peres2015-03-251-0/+9
| | | | | | | | | | Maybe this should be the job of the dispatch layer. v2: - add the section name and pdf page number of the quote (Laura) - OpenGL 3.0 core does not exist, get rid of "core" Signed-off-by: Martin Peres <[email protected]>
* main: replace tabs by 8 spaces in fbobject.cMartin Peres2015-03-251-83/+83
| | | | | Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: replace tabs by 8 spaces in bufferobj.cMartin Peres2015-03-251-8/+8
| | | | | Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* glsl: Avoid GLboolean vs bool arithmetic MSVC warnings.Jose Fonseca2015-03-221-2/+2
| | | | | | | | | | | | | Note that GLboolean is an alias for unsigned char, which lacks the implicit true/false semantics that C++/C99 bool have. Reviewed-by: Brian Paul <[email protected]> v2: Change gl_shader::IsES and gl_shader_program::IsES to be bool as recommended by Ian Romanick. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: reorder gl_light_attribDave Airlie2015-03-211-4/+7
| | | | | | | | reduces from 2664->2656. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_framebufferDave Airlie2015-03-211-8/+9
| | | | | | | | this reduces it from 1088 -> 1080 bytes Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: fix hole in vertex_array_objectDave Airlie2015-03-211-1/+3
| | | | | | | | this just removes 4 bytes from this object. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: repack gl_texture_attrib.Dave Airlie2015-03-211-4/+5
| | | | | | | | This removes a hole, and puts the large allocation at the end, Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reduce gl_colorbuffer_attrib and gl_fog_attribDave Airlie2015-03-211-3/+4
| | | | | | | | These 392->388 and 72->68. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_image_unitDave Airlie2015-03-211-6/+7
| | | | | | | | | reduces 40->32 but reduces use in context from 7680->6144. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_program, gl_shader, gl_shader_programDave Airlie2015-03-211-6/+9
| | | | | | | | | | gl_program : 1344->1336 gl_shader: 488->472 gl_shader_program: 352->344. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_transform_feedback_objectDave Airlie2015-03-211-9/+9
| | | | | | | | Reduces size from 184 to 176 bytes. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_array_attribDave Airlie2015-03-211-3/+3
| | | | | | | | drops 80 bytes to 72. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_client_arrayDave Airlie2015-03-211-1/+1
| | | | | | | | | drops from 56 to 48 bytes, drops gl_vertex_array_object from 4584 to 4320 bytes Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_texture_unitDave Airlie2015-03-211-2/+3
| | | | | | | | | drops size from 520 -> 512 bytes, which then makes gl_texture_attrib go from 99984 to 98440. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_point_attribDave Airlie2015-03-211-1/+1
| | | | | | | | this drops the size from 52 bytes to 48 bytes. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: reorder gl_multisample_attribDave Airlie2015-03-211-2/+4
| | | | | | | | drops size from 28 bytes to 20. Acked-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher [email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Make sure the buffer exists in _mesa_lookup_bufferobj_errFredrik Höglund2015-03-201-4/+6
| | | | | | | | | | Generate GL_INVALID_OPERATION and return NULL when the buffer object hasn't been created. All callers expect this. v2: Use a more concise error message. Cc: Laura Ekstrand <[email protected]> Reviewed-by: Laura Ekstrand <[email protected]>
* main: Add TEXTURE_CUBE_MAP support in CopyTextureSubImage3D.Laura Ekstrand2015-03-191-3/+11
| | | | | | | | | | | | | | | | | | So it turns out that this doesn't actually fix any bugs or add any features, stictly speaking. However, it does avoid a lot of kludginess. Previously, if you called glCopyTextureSubImage3D(texcube, 0, 0, 0, zoffset = 3, ... it would grab the texture image object for face = 0 in teximage.c instead of the desired face = 3. But Line 274 of brw_blorp_blit.cpp would correct for this by updating the slice to 3. This commit does the correct thing before calling any drivers, which should make the functionality much more robust and uniform across all drivers. Reviewed-by: Anuj Phogat <[email protected]>
* main: Simplify debug messages for CopyTex*SubImage*D.Laura Ekstrand2015-03-192-49/+38
| | | | | Reviewed-by: Martin Peres <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* main: Change the type argument of use_shader_program() to gl_shader_stage.Paul Berry2015-03-191-12/+11
| | | | | | | This allows it to be called from a loop. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* main: Clean up a strange construction in use_shader_program().Paul Berry2015-03-191-1/+1
| | | | Reviewed-by: Jordan Justen <[email protected]>
* mesa: use more descriptive error messages for glUniform errorsBrian Paul2015-03-191-4/+65
| | | | | | | | Different errors for type mismatches, size mismatches and matrix/ non-matrix mismatches. Use a common format of "uniformName"@location in the messags. Reviewed-by: Martin Peres <[email protected]>
* mesa: Replace _mesa_round_to_even() with _mesa_roundeven().Matt Turner2015-03-182-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric's initial patch adding constant expression evaluation for ir_unop_round_even used nearbyint. The open-coded _mesa_round_to_even implementation came about without much explanation after a reviewer asked whether nearbyint depended on the application not modifying the rounding mode. Of course (as Eric commented) we rely on the application not changing the rounding mode from its default (round-to-nearest) in many other places, including the IROUND function used by _mesa_round_to_even! Worse, IROUND() is implemented using the trunc(x + 0.5) trick which fails for x = nextafterf(0.5, 0.0). Still worse, _mesa_round_to_even unexpectedly returns an int. I suspect that could cause problems when rounding large integral values not representable as an int in ir_constant_expression.cpp's ir_unop_round_even evaluation. Its use of _mesa_round_to_even is clearly broken for doubles (as noted during review). The constant expression evaluation code for the packing built-in functions also mistakenly assumed that _mesa_round_to_even returned a float, as can be seen by the cast through a signed integer type to an unsigned (since negative float -> unsigned conversions are undefined). rint() and nearbyint() implement the round-half-to-even behavior we want when the rounding mode is set to the default round-to-nearest. The only difference between them is that nearbyint() raises the inexact exception. This patch implements _mesa_roundeven{f,}, a function similar to the roundeven function added by a yet unimplemented technical specification (ISO/IEC TS 18661-1:2014), with a small difference in behavior -- we don't bother raising the inexact exception, which I don't think we care about anyway. At least recent Intel CPUs can quickly change a subset of the bits in the x87 floating-point control register, but the exception mask bits are not included. rint() does not need to change these bits, but nearbyint() does (twice: save old, set new, and restore old) in order to raise the inexact exception, which would incur some penalty. Reviewed-by: Carl Worth <[email protected]>
* mesa: remove MSVC warning pragmasBrian Paul2015-03-181-20/+0
| | | | | | | | Removing this block of pragmas doesn't seem to increase the number of warning generated by MSVC. Other than signed/unsigned comparison warnings there's very few other warnings nowadays. Acked-by: Matt Turner <[email protected]>
* mesa: add void to format_array_format_table_init() declarationBrian Paul2015-03-181-1/+1
| | | | | | Silences an MSVC warning where it's called from call_once(). Reviewed-by: Matt Turner <[email protected]>
* mesa: make _mesa_alloc_dispatch_table() staticBrian Paul2015-03-182-9/+5
| | | | | | Never called from outside of context.c Reviewed-by: Jose Fonseca <[email protected]>
* mesa: reimplement dispatch table no-op function handlingBrian Paul2015-03-183-67/+37
| | | | | | | | | | | | | | | | | | | | | Use the new _glapi_new_nop_table() and _glapi_set_nop_handler() to improve how we handle calling no-op GL functions. If there's a current context for the calling thread, generate a GL_INVALID_OPERATION error. This will happen if the app calls an unimplemented extension function or it calls an illegal function between glBegin/glEnd. If there's no current context, print an error to stdout if it's a debug build. The dispatch_sanity.cpp file has some previous checks removed since the _mesa_generic_nop() function no longer exists. This fixes the piglit gl-1.0-dlist-begin-end and gl-1.0-beginend-coverage tests on Windows. Reviewed-by: Jose Fonseca <[email protected]>
* main: Correct _mesa_error with no format in bufferobj.c.Laura Ekstrand2015-03-171-1/+1
| | | | | | | This fixes Bug 89616, a build failure due to line 1639 of bufferobj.c: _mesa_error(ctx, GL_INVALID_OPERATION, func); Trivial.
* main: Cosmetic changes to GetBufferSubData.Laura Ekstrand2015-03-172-3/+3
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for GetNamedBufferSubData.Laura Ekstrand2015-03-173-0/+27
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Cosmetic updates to GetBufferPointerv.Laura Ekstrand2015-03-171-4/+5
| | | | | | | v3: Review from Fredrik Hoglund -Split cosmetic refactor of GetBufferPointerv out into a separate commit Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for GetNamedBufferPointerv.Laura Ekstrand2015-03-173-0/+25
| | | | | | | v3: Review from Fredrik Hoglund -Split cosmetic refactor of GetBufferPointerv out into a separate commit Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for GetNamedBufferParameteri[64]v.Laura Ekstrand2015-03-173-0/+48
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Refactor GetBufferParameteri[64]v.Laura Ekstrand2015-03-171-74/+45
| | | | | | v2: Split into a refactor commit and an entry point commit. Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for FlushMappedNamedBufferRange.Laura Ekstrand2015-03-173-0/+21
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Refactor FlushMappedBufferRange.Laura Ekstrand2015-03-172-26/+40
| | | | | | | v2:-Remove "_mesa" from in front of static software fallback. -Split out the refactor from the addition of the DSA entry points. Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for UnmapNamedBuffer.Laura Ekstrand2015-03-173-13/+42
| | | | | | | | v2: review from Ian Romanick - Restore VBO_DEBUG and BOUNDS_CHECK - Remove _mesa from static software fallback unmap_buffer. Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for MapNamedBuffer[Range].Laura Ekstrand2015-03-173-3/+55
| | | | Reviewed-by: Fredrik Höglund <[email protected]>