summaryrefslogtreecommitdiff
path: root/src/mesa/main
AgeCommit message (Collapse)Author
2009-07-09mesa: From float type modifier from values to large for singlesIan Romanick
The values 2147483648.0 and 4294967294.0 are too larget to be stored in single precision floats. Forcing these to be singles causes bits to be lost, which results in errors in some pixel transfer tests. This fixes bug #22344. (cherry picked from commit 70e72070fce6aa1e0918dcc62c1949465cee69f7)
2009-07-07mesa: only use fallback texture when using shaders, not fixed-function (take ↵Brian Paul
two) The semantics are a little different for shaders vs. fixed-function when trying to use an incomplete texture. The fallback texture returning (0,0,0,1) should only be used with shaders. For fixed function, the texture unit is truly disabled/ignored. Fixes glean fbo test regression. (cherry picked from commit 01e16befd4809e3e93ee7855a4a5d7df9fe010d9) (cherry picked from commit 51325f44d1e7e62b47795a79f8038d10dc5bc30b) [anholt: squashed these two together from master, skipping the mess in between]
2009-07-07Cap array elements at 0 when passed an invalid pointer for an array object.Eric Anholt
Otherwise, a pointer greater than the size would underflow and give a large maximum element. Reviewed-by: Brian Paul <brianp@vmware.com> (previous version)
2009-07-03Merge branch 'mesa_7_5_branch'Jakob Bornecrantz
Conflicts: src/mesa/main/dlist.c src/mesa/vbo/vbo_save_api.c
2009-06-30mesa/dlist: fixes and improvements for material cachingKeith Whitwell
Only short-circuit material call if *all* statechanges from this call are cached. Some material calls (eg with FRONT_AND_BACK) change more than one piece of state -- need to check all of them before returning. Also, Material calls are legal inside begin/end pairs, so don't need to be as careful about begin/end state as with regular statechanges (like ShadeModel) when caching. Take advantage of this and do better caching.
2009-06-30mesa/dlist: don't cache state which may not be replayed on CallListKeith Whitwell
Statechanges which occur before the first End in a display list may not be replayed when the list is called, in particular if it is called from within a begin/end pair. Recognize vulnerable statechanges and do not use them to fill in the state cache.
2009-06-30mesa/dlist: invalidate cached dlist compile state after CallListKeith Whitwell
When compiling a display list containing a CallList, it is necessary to invalidate any assumption about the GL state after the recursive call completes.
2009-06-30Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuitKeith Whitwell
Need this to pick up fixes for per-vertex materials.
2009-06-30mesa: remove whitespaceKeith Whitwell
2009-06-30mesa: remove dead constant pointsize code from ffvertex_prog.cKeith Whitwell
2009-06-30mesa: remove dead vertex fog code from ffvertex_prog.cKeith Whitwell
2009-06-30mesa: fix material inputs in ffvertex_prog.cKeith Whitwell
Varying material inputs were not being picked up from the same slots where the VBO code is currently placing them (GENERIC0 and above). Most often they were just being ignored.
2009-06-30mesa/dlist: restore missing SAVE_FLUSH_VERTICES in save_ShadeModelKeith Whitwell
Reorganization of ShadeModel to avoid flushing vertices too often ended up never flushing vertices due to omitted line of code.
2009-06-30mesa: add debug printer for primitive nameKeith Whitwell
Add a simple version of _mesa_lookup_enum_by_nr() which expects a primitive enum (GL_POINTS..GL_POLYGON). This avoids some annoying duplicates when looking up primitives, such as the GL_FALSE/GL_POINTS clash.
2009-06-30mesa/dlist: shortcircuit some redundant statechanges at compile timeKeith Whitwell
Currently, state-changes in mesa display lists are more or less a verbatim recording of the GL calls made during compilation. This change introduces a minor optimization to recognize and eliminate cases where the application emits redundant state changes, eg: glShadeModel( GL_FLAT ); glBegin( prim ) ... glEnd() glShadeModel( GL_FLAT ); glBegin( prim ) ... glEnd() The big win is when we can eliminate all the statechanges between two primitive blocks and combine them into a single VBO node. This commit implements state-change elimination for Material and ShadeModel only. This is enough to make a start on debugging, etc.
2009-06-29mesa: check for ARB_framebuffer_object for GL_TEXTURE_STENCIL_SIZE_EXT queryBrian Paul
2009-06-26mesa: raise MAX_VARYING (number of shader varying vars) to 16Brian Paul
16 is the limit for now because of various 32-bit bitfields. (cherry picked from master, commit 4e762395ef7e8c332c16fd0c11025cfa52763a45)
2009-06-26mesa: bump version to 7.5-rc4Brian Paul
2009-06-26glsl: Added gl_shader_state::EmitContReturn fieldBrian Paul
This is the start of a glsl-continue-return feature branch to support a GLSL code generator option for 'continue' and 'return' statements. Some targets don't support CONT or RET statements so we'll need to try to generate code that does not use them...
2009-06-22mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcsBrian Paul
(cherry picked from commit 4dc426c01627a240bd5b148c1804c45b0d5ecd6c)
2009-06-22mesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBSBrian Paul
Be clearer that this is the number of generic vertex program/shader attributes, not counting the legacy attributes (pos, normal, color, etc). (cherry picked from commit 4a95185c9f30c2de7a03bb1a0653f51b53b1111d)
2009-06-22mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTSBrian Paul
(cherry picked from commit d2a74d76c96957cf0294dcf40d29526621ada95e)
2009-06-22mesa: fix some potential state-restore issues in pop_texture_group()Brian Paul
Call the _mesa_set_enable() functions instead of driver functions, etc. Also, add missing code for 1D/2D texture arrays. (cherry picked from commit aac19609bfd7c950b2577489b06886c8a8097bb2)
2009-06-22mesa: create/use a fallback texture when bound texture is incompleteBrian Paul
When a GLSL sampler reads from an incomplete texture it should return (0,0,0,1). Instead of jumping through hoops in all the drivers to make this happen, just create/install a fallback texture with those texel values. Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some GPU lockups when trying to sample from missing surfaces. If a binding table entry is NULL, it seems that sampling sometimes works, but not always (lockup). Todo: create a fallback texture for each type of texture target? (cherry picked from commit 3f25219c7bf0f090502489928f0f018e62c4f6cf)
2009-06-19Always free image offsets memory when re-initializing texture image fields.Michel Dänzer
Fixes leak running compiz with direct rendering.
2009-06-18mesa: protect Elements against multiple definitionsKeith Whitwell
Mesa and gallium both have a definition of this macro
2009-06-17Fast path when rebinding the same texture in single context environmentIan Romanick
If there is no shared context, there is no purpose in rebinding the same texture. In some artificial tests this improves performance 10% - 30%. (cherry picked from commit 7f8000db8bd45bb95bda4a4f8535c49b8ef74254)
2009-06-17mesa: Mark FBOs with compressed color attachments as FBO-incomplete.Eric Anholt
Both EXT_fbo and ARB_fbo agree on this. Fixes a segfault in the metaops mipmap generation in Intel for SGIS_generate_mipmap of S3TC textures in Regnum Online. Bug #21654. (cherry picked from commit 0307e609aa3e707eeb40051bd664d36f2340ba9b)
2009-06-17mesa: rework viewport/scissor initialization codeBrian Paul
The first time a context is bound to a drawable, the viewport and scissor bounds are initialized to the buffer's size. This is actually a bit tricky. A new _mesa_check_init_viewport() function is called in several places to check if the viewport has been initialized. We also use a new ctx->ViewportInitialized flag instead of the overloaded ctx->FirstTimeCurrent flag.
2009-06-16mesa: fix incorrect viewport clamping in _mesa_set_viewport()Brian Paul
A 0 by 0 viewport size is legal. Don't clamp against lower bound of one. The error checking earlier in the function prevents negative values.
2009-06-15mesa: Always return a value.José Fonseca
2009-06-15mesa: Use appropriate float/integer types.José Fonseca
2009-06-15mesa: Use type modifier for float constants.José Fonseca
2009-06-15mesa: Use integer type with appropriate sign.José Fonseca
2009-06-26Merge branch 'arb_vertex_array_object'Brian Paul
2009-06-26Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: Makefile src/gallium/drivers/softpipe/sp_screen.c src/mesa/main/version.h
2009-06-22mesa: plug in glBindVertexArray, glGenVertexArrays functionsBrian Paul
2009-06-22mesa: enforce the rule that arrays live in VBOs for GL_ARB_vertex_array_objectBrian Paul
2009-06-22mesa: added extension flag for ARB_vertex_array_objectBrian Paul
2009-06-19mesa: implement _mesa_GenVertexArrays() for GL_ARB_vertex_array_objectBrian Paul
This also involves adding a gl_array_object::VBOonly field. For the ARB extension, all arrays in the object must reside in a VBO. This flag keeps track of that requirement.
2009-06-19mesa: implement _mesa_BindVertexArray()Brian Paul
2009-06-19mesa: move vertex array objects from shared state to per-contextBrian Paul
The ARB version requires VAOs to be per-context while the Apple extension was ambiguous.
2009-06-19mesa: regenerated files related to GL_ARB_vertex_array_objectBrian Paul
2009-06-19mesa: make query-related driver fallback functions staticBrian Paul
Plug them in via _mesa_init_query_object_functions().
2009-06-19mesa: make buffer object-related driver fallback functions staticBrian Paul
Plug them in via _mesa_init_buffer_object_functions().
2009-06-19mesa: create/destroy buffer objects via driver functionsBrian Paul
2009-06-19Merge branch 'ext-provoking-vertex'Brian Paul
Conflicts: docs/relnotes-7.6.html progs/tests/Makefile src/gallium/drivers/softpipe/sp_prim_vbuf.c src/glx/x11/indirect.c src/mesa/glapi/Makefile src/mesa/glapi/dispatch.h src/mesa/glapi/glapioffsets.h src/mesa/glapi/glapitable.h src/mesa/glapi/glapitemp.h src/mesa/glapi/glprocs.h src/mesa/main/dlist.c src/mesa/main/enums.c src/mesa/sparc/glapi_sparc.S src/mesa/x86-64/glapi_x86-64.S src/mesa/x86/glapi_x86.S
2009-06-16Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: src/mesa/main/api_validate.c
2009-06-15Merge branch 'arb_map_buffer_range'Brian Paul
Conflicts: docs/relnotes-7.6.html src/mesa/main/mtypes.h
2009-06-24Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/i915/i915_tex_layout.c src/mesa/drivers/dri/i965/brw_wm_glsl.c src/mesa/drivers/dri/intel/intel_buffer_objects.c src/mesa/drivers/dri/intel/intel_pixel_bitmap.c src/mesa/drivers/dri/intel/intel_pixel_draw.c src/mesa/main/enums.c src/mesa/main/texstate.c src/mesa/vbo/vbo_exec_array.c