summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.h
AgeCommit message (Collapse)Author
2009-05-01st: added st_renderbuffer::defined flagBrian Paul
Indicates whether there's defined image contents, or garbage/don't care. This is set when we draw into a renderbuffer and cleared when we resize/ reallocate a renderbuffer or do a buffer swap (back buffer becomes undefined). We use this to determine whether the front color buffer has been drawn to, and whether to display its contents upon glFlush/Finish(), when the new st_swapbuffers() function is used.
2009-04-28mesa/st: remove duplicate offset calculationKeith Whitwell
2009-04-21st: use the static atoms[] array directlyBrian Paul
We can simplify this now that we no longer have any dynamic atoms.
2009-03-20gallium: remove use of origin_lower_leftBrian Paul
This was used to indicate OpenGL's lower-left origin for fragment window coordinates for polygon stipple and gl_FragCoord. Now: - fragment coordinate origin is always upper-left corner - GL polygon stipple is inverted and shifted before given to gallium - GL fragment programs that use INPUT[WPOS] are modified to use an inverted window coord which is placed in a temp register. Note: the origin_lower_left field still exists in pipe_rasterizer_state. Remove it when all the drivers, etc. no longer reference it.
2009-03-13gallium: no need to keep a copy of shader tokens in state trackerKeith Whitwell
Any driver who needs a copy of the shader tokens must organize to do so itself. This has been the case for a long time, but there was still defensive code in the state tracker, which is now removed. Any bugs resulting from this need to be fixed in the offending driver...
2009-02-12mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul
2008-12-12gallium: avoid mapping same vertex buffer in subsequent framesKeith Whitwell
Quite a few util modules were maintaining a single vertex buffer over multiple frames, and potentially reusing it in subsequent frames. Unfortunately that would force us into syncrhonous rendering as the buffer manager would be forced to wait for the previous rendering to complete prior to allowing the map. This resolves that issue, but requires the state tracker to issue a few new flush() calls at the end of each frame.
2008-11-26gallium: replace 2 with PIPE_SHADER_TYPESBrian Paul
2008-09-17gallium: clean-up/fix msaa override in state trackerBrian Paul
2008-08-14gallium: use a default texture in update_textures(), update_samplers() when ↵Brian Paul
needed The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture.
2008-05-20Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul
2008-05-20gallium: clean-up glDraw/CopyPixels shaders when destroying contextBrian Paul
2008-05-07gallium: fix some render to texture bugsBrian Paul
Before, we were sometimes rendering into a stale texture because st_finalize_texture() would discard the old texture and create a new one. Moved st_update_framebuffer atom after texture validation so that we can create a new renderbuffer surface if the texture changes. Also, split texture validation into two parts: finalize_textures and update_textures. Do finalize_textures first to avoid getting into the situtation where we're doing a pipe->surface_copy() mid-way through state validation. Some debug code still in place, but disabled...
2008-04-30gallium: simplify texture format selectionBrian Paul
2008-04-25gallium: remove unneeded st->bitmap_texcoord_biasBrian Paul
2008-04-25gallium: use simple color pass-through fragment shader if textures don't existBrian Paul
If we run out of texture memory we may not have the texture needed by the fragment shader. If this happens, plug in a color passthrough shader. So instead of crashing, we just don't see the texture. GL_OUT_OF_MEMORY is raised, of course.
2008-04-22gallium: fix some bitmap frag shader issuesBrian Paul
If texturing happens to be enabled when glBitmap() is called, need to be careful about choosing a sampler unit, etc.
2008-04-16gallium: implement RGBA pixel maps in the pixel transfer fragment programBrian Paul
2008-04-09gallium: more elaborate tracking of front color buffer stateBrian Paul
This fixes the case where the app calls SwapBuffers then calls glReadPixels to read the front color buffer. We now keep track of when the front buffer is a _logically_ copy of the back buffer (after SwapBuffers) and read from the back color buffer instead of the front.
2008-04-09gallium: remove unneeded st->haveFramebufferSurfaces field.Brian Paul
2008-04-03gallium: streamline viewport/raster/shader state for clearing with quadsBrian Paul
Move init of these items to new st_init_clear().
2008-03-31gallium: turn on clipping for bitmapsBrian
Bitmaps can extend beyond window edges so we need to clip. Also, move some state atom vars to st_context to be a bit more efficient.
2008-03-28gallium: implement a glBitmap cacheBrian
The bitmap cache attempts to accumulate a series of glBitmap calls in a buffer to effectively render a whole bunch of bitmaps at once. The cache can be disabled, if needed, by setting UseBitmapCache=GL_FALSE.
2008-03-27gallium: Update calls to the simple shader functionsBrian
2008-03-20gallium: glBitmap code now separe from glDraw/CopyPixels codeBrian
Also, glBitmap now re-uses the vertex buffer to avoid frequent allocations/ deallocations. And, use u_simple_shaders utility code.
2008-03-20gallium: create one vertex buffer and re-use, also enable bypass_clippingBrian
Quad clears should be a little more efficient now.
2008-03-20gallium: use the utility pasthrough shadersBrian
This avoids the Mesa->TGSI translation step.
2008-03-19gallium: implement CSO save/restore functions for use by meta operations ↵Brian
(blit, gen-mipmaps, quad-clear, etc) Also, additional cso_set_*() functions for viewport, framebuffer, blend color, etc. state.
2008-03-18gallium: plug in and init GL_EXT_framebuffer_blit function/extensionBrian
2008-03-17gallium: use new gallium utility code for generating mipmapsBrian
2008-03-11gallium: rework CSO-related code in state trackerBrian
Use the code in cso_context.c rather than st_cache.c. Basically, binding of state objects now goes through the CSO module. But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're not cached by the CSO module at this time. Also, update softpipe driver to handle NULL state objects in various places. This happens during context destruction. May need to update other drivers...
2008-03-05gallium: michel's patch to rework texture/sampler binding interfaceKeith Whitwell
Bind all the samplers/textures at once rather than piecemeal. This is easier for drivers to understand.
2008-02-29gallium: change st->state.sampler_texture[] to store pipe_texture pointersBrian Paul
This is a better fix for the previous check-in. Fixes texadd.c conform test, and probably other bugs.
2008-02-20gallium: state tracker didn't always notify drivers of texobj data changesBrian
Calling glTexSubImage() or glTexImage() to replace texture data didn't reliably cause pipe->set_sampler_texture() to get called so drivers didn't always get notified of new texture data. The st_texture_object->pt pointer doesn't always indicate changed data so added a dirtyData field.
2008-02-12gallium: move gen-mipmap global/static vars into st_contextBrian
This fixes potential problems with multi-context programs.
2008-02-06gallium: add bitmap/drawpixels texcoord bias supportBrian
The state tracker will call pipe->get_paramf(PIPE_CAP_BITMAP_TEXCOORD_BIAS) to get a bias factor for adjusting the texcoords used in bitmap/drawpixels. This allows us to compensate for small differences in rasterization from one device to another.
2008-01-25gallium: Simplify winsys buffer interface.Michel Dänzer
The properties of a buffer represented by struct pipe_buffer_handle are now basically constant over its lifetime. The state tracker gets to deal with any more complex buffer semantics it may need to provide.
2008-01-14Fix problems with vertex shaders and the private draw module.Brian
The CSO returned by pipe->create_vs_state() can't be passed to the private draw module. That was causing glRasterPos to blow up. Add a 'draw_shader' field to st_vertex_program for use with the private draw module. Change st_context->state.vs type from cso_vertex_shader to st_vertex_program.
2007-12-19Fix problem with initial viewport/scissor size.Brian
If an app never called glViewport, the viewport size was always 0 by 0 pixels. Now pass initial size to st_create_framebuffer() and initialize the viewport and scissor bounds in st_make_current(). This could also be fixed by ensuring the gl_framebuffers passed to _mesa_make_current() were initialized to the right size. But that involves allocating the renderbuffers/pipe_surfaces earlier and that runs into some other issues ATM. Also remove obsolete createRenderbuffers param to st_create_framebuffer().
2007-12-17gallium: incorporate alpha state into depth_stencil state object.Keith Whitwell
2007-12-11gallium: remove set_sampler_units interfaceKeith Whitwell
The effect of this mapping can be acheived by the state tracker and setting up the pipe texture state pointers to incorporate its affects.
2007-12-11gallium: remove redundant clear_color state.Keith Whitwell
2007-12-11gallium: Remove feedback interfaces from pipe driver.Keith Whitwell
Something similar will return when geometry shaders are added, but for now this interface is not required.
2007-12-07Eliminate struct pipe_region.Michel Dänzer
Directly use struct pipe_buffer_handle for storage and struct pipe_surface for (un)mapping.
2007-12-06Hide texture layout details from the state tracker.Michel Dänzer
pipe->get_tex_surface() has to be used for access to texture image data.
2007-11-16Reimplement glRasterPos using the private 'draw' module.Brian
2007-11-05move st_invalidate_state() prototype to st_context.hBrian
2007-11-05Update xlib driver to use newer state tracker context/framebuffer functions.Brian
XMesaContext has an st_context * which contains a mesa context.
2007-11-05Introduce st_framebuffer type and st_create_framebuffer(), st_make_current()Brian
2007-10-30Implement shader concatenation for glBitmap.Brian