summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: rework texture completeness testingBrian Paul2012-03-2010-38/+79
| | | | | | | | | | | | | | | | | | | Instead of gl_texture_object::_Complete there are now two fields: _BaseComplete and _MipmapComplete. The former indicates whether the base texture level is valid. The later indicates whether the whole mipmap is valid. With sampler objects, a single texture can appear to be both complete and incomplete at the same time. See the GL_ARB_sampler_objects spec for more details. To implement this we now check if the texture is complete with respect to a sampler state. Another benefit of this is we no longer need to invalidate a texture's completeness state when we change the minification/magnification filters with glTexParameter(). Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add _mesa_is_mipmap_filter() helperBrian Paul2012-03-201-0/+9
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: use _mesa_dirty_texobj() in glTexParameter codeBrian Paul2012-03-201-1/+2
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: use _mesa_dirty_texobj() functionBrian Paul2012-03-201-12/+5
| | | | | | | To mark the texture object as incomplete. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: rewrite/consolidate code in _mesa_test_texobj_completeness()Brian Paul2012-03-201-138/+45
| | | | | | | | Merge the mipmap level checking code that was separate cases for 1D, 2D, 3D and CUBE before. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: use new baseImage var to simplify _mesa_test_texobj_completeness()Brian Paul2012-03-201-24/+27
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add comments in _mesa_test_texobj_completeness() related to the specBrian Paul2012-03-201-2/+2
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: better debug message in _mesa_test_texobj_completeness()Brian Paul2012-03-201-1/+1
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: move some code in _mesa_test_texobj_completeness()Brian Paul2012-03-201-7/+7
| | | | | | | | Move the simple MaxLevel < BaseLevel test earlier to be closer to where we error-check BaseLevel. Also, use the local baseLevel var in more places. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: use switch(target) in _mesa_test_texobj_completeness()Brian Paul2012-03-201-15/+19
| | | | | | | and add missing case for GL_TEXTURE_BUFFER. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: use MAX3() macro for 3D texture in _mesa_test_texobj_completeness()Brian Paul2012-03-201-3/+3
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_reference_sampler_object() an inline functionBrian Paul2012-03-202-6/+15
| | | | | | | | To make the no-change case faster, as we do for the other object-reference functions. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Validate the drawing primitive against the transform feedback mode.Eric Anholt2012-03-193-32/+43
| | | | | | Fixes piglit GL_EXT_transform_feedback/negative-prims. Reviewed-by: Brian Paul <[email protected]>
* mesa: Fold error generation into _mesa_valid_prim_mode().Eric Anholt2012-03-194-20/+19
| | | | | | | | | | | | | We want to start emitting an INVALID_OPERATION from here for transform feedback. Note that this forced dlist.c to almost not use this function, since it wants different behavior during dlist compile. Just pull the non-TF, non-GS test out for compile, because: 1) TF doesn't matter in that case because there's no drawing. 2) I don't think we're going to see GSes and display lists in the same context, if we don't do GL_ARB_compatibility. Reviewed-by: Brian Paul <[email protected]>
* i915: fallback for NPOT cubemap textureYuanhan Liu2012-03-191-0/+22
| | | | | | | | | | | | | | | | | Although some hardware support NPOT cubemap, but it seems we don't know the right layout for NPOT cubemap. Thus seems we need do fallback for other platforms as well. See comments inline the code for more detailed info. v2: give a more detailed info about why we need fallback for other platfroms as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46666 NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu <[email protected]>
* st/mesa: add null pointer check in st_texture_image_map()Brian Paul2012-03-171-0/+3
| | | | | | | | | | | | If we failed to allocate a memory resource for the texture we'd crash when we tried to map it. Now we propogate the NULL back up to the texstore code and generate GL_OUT_OF_MEMORY. Fixes a crash with the upcoming piglit max-texture-size test. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* dri_util: add copyright/license blurbBrian Paul2012-03-171-0/+24
|
* i965/fs: Jump from discard statements to the end of the program when done.Eric Anholt2012-03-164-5/+126
| | | | | | | | | | | | | | | | | From the GLSL 1.30 spec: The discard keyword is only allowed within fragment shaders. It can be used within a fragment shader to abandon the operation on the current fragment. This keyword causes the fragment to be discarded and no updates to any buffers will occur. Control flow exits the shader, and subsequent implicit or explicit derivatives are undefined when this control flow is non-uniform (meaning different fragments within the primitive take different control paths). v2: Don't emit the final HALT if no other HALTs were emitted. Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* i965: Add disasm for gen6+ UIP/JIP on BREAK/CONT/HALT.Eric Anholt2012-03-161-0/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add support for parsing #version 140.Eric Anholt2012-03-151-0/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable SIMD16 mode for shaders with loops on Gen6+.Kenneth Graunke2012-03-141-1/+1
| | | | | | The hardware supports it; there's no reason not to. Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: add back glGetnUniform*v() overflow error reportingDylan Noblesmith2012-03-132-5/+13
| | | | | | | | | | | | | | | | | | The error was removed in: commit 719909698c67c287a393d2380278e7b7495ae018 Author: Ian Romanick <[email protected]> Date: Tue Oct 18 16:01:49 2011 -0700 mesa: Rewrite the way uniforms are tracked and handled The GL_ARB_robustness spec doesn't say the implementation should truncate the output, so just return after setting the required error like it did before the above commit. Also fixup an old comment and add an assert. NOTE: This is a candidate for the 8.0 branch.
* mesa: Fix the cause of piglit test fbo-array failureAnuj Phogat2012-03-121-1/+3
| | | | | | | | | | | | | Handle the special case of glFramebufferTextureLayer() for which we pass teximage = 0 internally in framebuffer_texture(). This patch makes failing piglit test fbo-array, fbo-depth-array to pass. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47126 V4: Removed the duplicated code. Note: This is a candidate for the stable branches. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix _mesa_DebugMessageCallbackARB() to silence warningsBrian Paul2012-03-121-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* radeon: remove use of DD_FLATSHADEBrian Paul2012-03-121-1/+1
| | | | This got missed earlier <sigh>.
* mesa: add more comments about textarget in framebuffer_texture()Brian Paul2012-03-121-2/+10
|
* mesa: renumber remaining DD_ constantsBrian Paul2012-03-121-10/+10
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove unused DD_TRI_CULL_FRONT_BACKBrian Paul2012-03-123-12/+4
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove unused DD_FLATSHADEBrian Paul2012-03-124-9/+1
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove unused DD_TRI_TWOSTENCILBrian Paul2012-03-124-11/+1
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _DD_NEW_x flagsBrian Paul2012-03-121-21/+0
| | | | | | | They're no longer used anywhere. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tnl: stop using _DD_NEW_x flagsBrian Paul2012-03-121-1/+2
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: s/_DD_NEW_SEPARATE_SPECULAR/_MESA_NEW_SEPARATE_SPECULAR/Brian Paul2012-03-121-3/+3
| | | | | | | Another step toward removing the _DD_NEW_x flags Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: define _MESA_NEW_SEPARATE_SPECULARBrian Paul2012-03-122-2/+8
| | | | | | | | This will replace the soon-to-be-removed _DD_NEW_SEPARATE_SPECULAR flag. Note: there's a similar composite _MESA_NEW_NEED_EYE_COORDS flag set already. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i915: remove occurances of _DD_NEW_x flagsBrian Paul2012-03-121-7/+5
| | | | | | | | Just use the corresponding _NEW_x flags intead. The _DD_NEW_x flags will be removed in a following patch. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove ctx->Driver.ClearColor() hookBrian Paul2012-03-123-34/+0
| | | | | | | The driver Clear() function should just grab the clear color out of the context. Reviewed-by: Dave Airlie <[email protected]>
* mesa/gdi: remove clear_color() functionBrian Paul2012-03-121-32/+15
| | | | | | Setup the clearing color in the clear() function. Reviewed-by: Dave Airlie <[email protected]>
* xlib: remove clear_color() functionBrian Paul2012-03-121-25/+11
| | | | | | Just setup the clearing color in clear_buffers(). Reviewed-by: Dave Airlie <[email protected]>
* radeon/r200: remove ClearColor driver functionsBrian Paul2012-03-125-41/+0
| | | | | | The state.color.clear value was never used anywhere. Reviewed-by: Dave Airlie <[email protected]>
* mesa: remove ctx->Driver.ClearDepth(), ClearStencil() driver hooksBrian Paul2012-03-125-28/+0
| | | | | | | Not used by any drivers. Drivers can easily access the values from the Mesa context at glClear() time. Reviewed-by: Dave Airlie <[email protected]>
* radeon/r200: remove ClearDepth() and ClearStencil() driver hooksBrian Paul2012-03-125-86/+0
| | | | | | | The computed stencil.clear and depth.clear values aren't used anywhere. Those fields have been removed too. Reviewed-by: Dave Airlie <[email protected]>
* radeon/r200: remove hyperz/fast clear testing codeBrian Paul2012-03-122-20/+0
| | | | | | The flags which were computed were never actually used. Reviewed-by: Dave Airlie <[email protected]>
* mapi/glapi: Fix glDebugMessageCallbackARB arg type to GLDEBUGPROCARBJosé Fonseca2012-03-111-2/+2
| | | | | | Necessary to prevent type mismatches on MinGW. Signed-off-by: Dave Airlie <[email protected]>
* mesa: Prevent collision of ERROR define on Windows.José Fonseca2012-03-111-0/+3
| | | | | | | | This issue might recur on other OSes. If so then it might be better to remove the C-preprocessor magic, and use fully qualified defines instead. Signed-off-by: Dave Airlie <[email protected]>
* mesa: expose ARB_debug_outputMarek Olšák2012-03-101-0/+1
|
* mesa: display list dispatch for ARB_debug_outputMarek Olšák2012-03-101-0/+3
|
* mesa: print GL errors via debug_outputMarek Olšák2012-03-101-31/+66
|
* mesa: implement the last of GL_ARB_debug_outputnobled2012-03-103-28/+245
| | | | | | Store client-defined message IDs in a hash table, and sort them by severity into three linked lists so they can be selected by severity level later.
* mesa: add struct for managing client debug namespacesnobled2012-03-101-2/+8
| | | | The final piece of the puzzle for GL_ARB_debug_output.
* mesa: add control for categories of application-provided messagesnobled2012-03-101-5/+125
| | | | | | | | | This state is needed for deciding whether or not to log application messages with IDs that haven't been specifically passed to glDebugMessageControlARB yet. State for each individual ID number ever passed to glDebugMessageControlARB (per-context) still needs to be added.