summaryrefslogtreecommitdiff
path: root/src/mesa/main/mtypes.h
AgeCommit message (Collapse)Author
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-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: 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-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-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: 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: 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-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-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
2009-06-08mesa: implement GL_ARB_map_buffer_rangeBrian Paul
Only enabled for software drivers at this point. Note that the gl_buffer_object::Access enum field has been replaced by a gl_buffer_object::AccessFlags bitfield. The new field is a mask of the GL_MAP_x_BIT flags which is a superset of the old GL_READ_ONLY, GL_WRITE_ONLY and GL_READ_WRITE modes. When we query GL_BUFFER_ACCESS_ARB we translate the bitfield into the conventional enum values.
2009-06-08mesa: reorder fields, update comments for gl_buffer_objectBrian Paul
2009-06-02mesa: new state for GL_ARB_copy_bufferBrian Paul
2009-05-28mesa: data structure updates for GL_EXT_provoking_vertexBrian Paul
2009-05-22mesa: reduce gl_array_object::VertexAttrib[] array from 32 to 16 elementsBrian Paul
This array was mistakenly dimensioned with VERT_ATTRIB_MAX (32) but it should really be MAX_VERTEX_GENERIC_ATTRIBS (16). The generic vertex attributes are in addition to the conventional arrays (except in NV vertex program mode- they alias/overlay in that case) so the total of all conventional attributes plus generic attributes should total 32 (not 48).
2009-05-21mesa: added gl_array_object::Weight array fieldBrian Paul
We don't really implement vertex weights but in the VBO code this fixes and odd case for the legacy_array[] setup. Before, the vbo->draw_prims() call was always indicating that the vertex weight array was present/enabled when it really wasn't.
2009-05-21mesa: updated comment for _MaxElement fieldBrian Paul
It's the largest array index, plus one.
2009-05-21mesa: move gl_array_attrib::_MaxElement to gl_array_object::_MaxElementBrian Paul
This value is per array object.
2009-05-13mesa: reference counting for gl_array_objectBrian Paul
Every kind of object that can be shared by multiple contexts should be refcounted. (cherry picked from commit 1030bf0ded2a88a5e27f7a4d393c11cfde3d3c5a)
2009-05-08mesa: more complete fix for transform_invarient glitchesKeith Whitwell
Add a new flag mvp_with_dp4 in the context, and use that to switch both ffvertex.c and programopt.c vertex transformation code to either DP4 or MUL/MAD implementations.
2009-05-07mesa: reference counting for gl_array_objectBrian Paul
Every kind of object that can be shared by multiple contexts should be refcounted.
2009-05-07mesa: array object commentsBrian Paul
2009-05-07mesa: move the NullBufferObj from GLcontext to gl_shared_stateBrian Paul
Since shared array objects may point to the null/default buffer object, the null/default buffer object should be part of the shared state.
2009-05-07mesa: remove unused gl_buffer_object::OnCard fieldBrian Paul
2009-05-07mesa: added gl_buffer_object::Written flag (for debug purposes)Brian Paul
The flag is set when we data has been written into the buffer object.
2009-05-07mesa: Compute gl_client_array->_MaxElement during array validationBrian Paul
Used to be done in the glVertex/Normal/Color/etc/Pointer() calls but if the VBO was reallocated the size could change. New _NEW_BUFFER_OBJECT state flag.
2009-05-07mesa: added _ElementSize field to gl_client_arrayBrian Paul
Will be handy for bounds checking later...
2009-05-07mesa: fix/add commentsBrian Paul
2009-05-05mesa: more complete fix for transform_invarient glitchesKeith Whitwell
Add a new flag mvp_with_dp4 in the context, and use that to switch both ffvertex.c and programopt.c vertex transformation code to either DP4 or MUL/MAD implementations.
2009-05-01mesa: fix commentBrian Paul
2009-05-01mesa: 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?
2009-04-21mesa: new _NEW_PROGRAM_CONSTANTS flagBrian Paul
This state flag will be used to indicate that vertex/fragment program constants have changed. _NEW_PROGRAM will be used to indicate changes to the vertex/fragment shader itself, or misc related state. _NEW_PROGRAM_CONSTANTS is also set whenever a program parameter that's tracking GL state has changed. For example, if the projection matrix is in the parameter list, calling glFrustum() will cause _NEW_PROGRAM_CONSTANTS to be set. This will let to remove the need for dynamic state atoms in some drivers. For now, we still set _NEW_PROGRAM in all the places we used to. We'll no longer set _NEW_PROGRAM in glUniform() after drivers/etc have been updated.
2009-04-03mesa: rename some gl_light fields to be clearerBrian Paul
EyeDirection -> SpotDirection _NormDirection -> _NormSpotDirection
2009-04-01mesa: get rid of gl_texture_object::_BorderChanBrian Paul
2009-04-01mesa: texture combine clean-upsBrian Paul
Use MAX_COMBINER_TERMS instead of 4. Rename some vars. Update comments.
2009-04-01glsl: implement compiling/linking of separate compilation unitsBrian Paul
A shader program may consist of multiple shaders (source code units). If we find there are unresolved functions after compiling the unit that defines main(), we'll concatenate all the respective vertex or fragment shaders then recompile. This isn't foolproof but should work in most cases.
2009-03-28mesa: add new signed rgba texture formatRoland Scheidegger
This is a (partial) backport of the signed texture format support in OGL 3.1. Since it wasn't promoted from an existing extension roll our own.
2009-03-19glsl: change GLSL #pragma initializationBrian Paul
Initialize the shader's pragma settings before calling the compiler. Added pragma "Ignore" fields to allow overriding the #pragma directives found in shader source code.
2009-03-12i965: fix polygon stipple when rendering to FBORobert Ellison
The polygon stipple pattern, like the viewport and the polygon face orientation, must be inverted on the i965 when rendering to a FBO (which itself has an inverted pixel coordinate system compared to raw Mesa). In addition, the polygon stipple offset, which orients the stipple to the window system, disappears when rendering to an FBO (because the window system offset doesn't apply, and there's no associated FBO offset). With these fixes, the conform triangle and polygon stipple tests pass when rendering to texture.
2009-03-12mesa: add support for ATI_envmap_bumpmapRoland Scheidegger
add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly)
2009-03-11i965: fix polygon face orientation when rendering to FBORobert Ellison
In the i965, the FBO coordinate system is inverted from the standard OpenGL/Mesa coordinate system; that means that the viewport and the polygon face orientation have to be inverted if rendering to a FBO. The viewport was already being handled correctly; but polygon face was not. This caused a conform failure when rendering to texture with two-sided lighting enabled. This fixes the problem in the i965 driver, and adds to the comment about the gl_framebuffer "Name" field so that this isn't a surprise to other driver writers.
2009-03-11mesa: remove some last remnants of GL_MESA_program_debugBrian Paul
2009-03-11mesa: minor commentsBrian Paul
2009-03-11mesa: remove gl_texture_object::_Function field and associated codeBrian Paul
It was only used in one place in swrast.
2009-03-09mesa: reorder register file enumsBrian Paul
2009-03-07mesa: gl_register_file enum typedefBrian Paul
2009-03-07mesa: remove GL_MESA_program_debug extensionBrian Paul
This was never fully fleshed out and hasn't been used.
2009-03-04mesa: Follow ARB_map_buffer_range more stricly.José Fonseca
Namelly, FlushMappedBufferRange takes a subrange relative to the original range.
2009-03-02mesa: add ctx->Stencil._Enabled fieldBrian Paul
Only true if stenciling is enabled, and there's a stencil buffer.