summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.h
AgeCommit message (Collapse)Author
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
2007-10-30Use program serial numbers to avoid re-generating fragment programs for ↵Brian
glDrawPixels.
2007-10-30added pixel_transfer_cacheBrian
2007-10-30added pixel_transfer_program fieldBrian
2007-10-30comment unused 'cb' fieldBrian
2007-10-30update comments, fix typoBrian
2007-10-18Alternate CopyPixels path based on get/put_tile().Brian
For some drivers (like Xlib) it's not possible to treat the front/back color buffers as pipe_regions. So pipe->region_copy() won't work. Added a new state tracker field indicating if we can use regions for colorbuffer accesses. This should probably be re-considered someday...
2007-10-03Get rid of ST_NEW_SHADER flag and the dependency on _NEW_PROGRAMZack Rusin
which is being hit all the time. Done by Keith really.
2007-09-25some clean-up of ST_NEW_ shader flagsBrian
2007-09-25Translate mesa vertex/fragment programs to TGSI programs at same time to do ↵Brian
proper linking. Previously, programs were translated independently during validation. The problem is the translation to TGSI format, which packs shader input/outputs into continuous slots, depends on which vertex program is being paired with which fragment shader. Now, we look at the outputs of the vertex program in conjunction with the inputs of the fragment shader to be sure the attributes match up correctly. The new 'linked_program_pair' class keeps track of the associations between vertex and fragment shaders. It's also the place where the TGSI tokens are kept since they're no longer per-program state but per-linkage. Still a few loose ends, like implementing some kind of hash/lookup table for linked_program_pairs.
2007-09-21Make the alpha test state a cso.Zack Rusin
2007-09-20Checkpoint: vertex attribute clean-up.Brian
Remove/disable the attrib/slot mapping arrays in a few places. Work in progress...
2007-09-20Fix failover state binding and convert the sampler to use the newZack Rusin
state constant state object semantics.
2007-09-20Convert depth_stencil state to the new semantics.Zack Rusin
2007-09-20Switch fragment/vertex shaders to the new caching semantics.Zack Rusin
Allow driver custom allocation within cached objects. The shaders are currently twiced (by cso layer and by the program itself).
2007-09-19Convert the rasterizer cso to the new semantics.Zack Rusin
Basically make cso hold the driver specific struct, while managing the template.
2007-09-19Redo the cso cache to map driver data in a lot more pleasing way.Zack Rusin
Drivers can now create whatever they want from the state template. We use cso_state object to store the template (necessary during lookups), and the driver data. Convert blend state to the new semantics.