aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.h
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: fix incorrect freeing of drawpixels vertex shadersBrian Paul2010-01-221-1/+1
| | | | | These shaders are not st_vertex_shaders, but tgsi ureg shaders. Fixes fd.o bug 25959.
* gallium: adapt state trackers etc. to pipe_constant_buffer removalRoland Scheidegger2009-12-231-1/+1
|
* gallium: don't use edgeflags if the app didn't supply themRoland Scheidegger2009-12-191-0/+2
|
* mesa/st: refactor vertex and fragment shader translationKeith Whitwell2009-11-151-0/+2
| | | | | | | | | | | | | | | | | Translate vertex shaders independently of fragment shaders. Previously tried to make fragment shader semantic indexes always start at zero and exclude holes. This was unnecessary but meant that vertex shader translation had to be adjusted to take this into account. Now use a fixed scheme for labelling special FS input semantics (color, etc), and another fixed scheme for the generics. With this, vertex shaders can be translated independently of the bound fragment shader, assuming mesa has done its own job and ensured that the vertex shader provides at least the inputs the fragment shader is looking for. The state-tracker didn't attempt to do anything about this previously, so it shouldn't be needed now.
* st: added st_renderbuffer::defined flagBrian Paul2009-05-011-1/+2
| | | | | | | | | | 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.
* mesa/st: remove duplicate offset calculationKeith Whitwell2009-04-281-2/+0
|
* st: use the static atoms[] array directlyBrian Paul2009-04-211-5/+0
| | | | We can simplify this now that we no longer have any dynamic atoms.
* gallium: remove use of origin_lower_leftBrian Paul2009-03-201-1/+2
| | | | | | | | | | | | | | 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.
* gallium: no need to keep a copy of shader tokens in state trackerKeith Whitwell2009-03-131-3/+0
| | | | | | | | 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...
* mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul2009-02-121-0/+4
|
* gallium: avoid mapping same vertex buffer in subsequent framesKeith Whitwell2008-12-121-0/+2
| | | | | | | | | | | 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.
* gallium: replace 2 with PIPE_SHADER_TYPESBrian Paul2008-11-261-1/+1
|
* gallium: clean-up/fix msaa override in state trackerBrian Paul2008-09-171-0/+6
|
* gallium: use a default texture in update_textures(), update_samplers() when ↵Brian Paul2008-08-141-0/+2
| | | | | | | needed The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture.
* Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul2008-05-201-0/+6
|\
| * gallium: clean-up glDraw/CopyPixels shaders when destroying contextBrian Paul2008-05-201-0/+6
| |
* | gallium: fix some render to texture bugsBrian Paul2008-05-071-0/+3
|/ | | | | | | | | | | | | | | 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...
* gallium: simplify texture format selectionBrian Paul2008-04-301-0/+1
|
* gallium: remove unneeded st->bitmap_texcoord_biasBrian Paul2008-04-251-2/+0
|
* gallium: use simple color pass-through fragment shader if textures don't existBrian Paul2008-04-251-0/+2
| | | | | | | 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.
* gallium: fix some bitmap frag shader issuesBrian Paul2008-04-221-3/+0
| | | | | If texturing happens to be enabled when glBitmap() is called, need to be careful about choosing a sampler unit, etc.
* gallium: implement RGBA pixel maps in the pixel transfer fragment programBrian Paul2008-04-161-0/+2
|
* gallium: more elaborate tracking of front color buffer stateBrian Paul2008-04-091-3/+6
| | | | | | | 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.
* gallium: remove unneeded st->haveFramebufferSurfaces field.Brian Paul2008-04-091-6/+0
|
* gallium: streamline viewport/raster/shader state for clearing with quadsBrian Paul2008-04-031-0/+2
| | | | Move init of these items to new st_init_clear().
* gallium: turn on clipping for bitmapsBrian2008-03-311-0/+2
| | | | | 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.
* gallium: implement a glBitmap cacheBrian2008-03-281-0/+2
| | | | | | | 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.
* gallium: Update calls to the simple shader functionsBrian2008-03-271-0/+3
|
* gallium: glBitmap code now separe from glDraw/CopyPixels codeBrian2008-03-201-0/+3
| | | | | Also, glBitmap now re-uses the vertex buffer to avoid frequent allocations/ deallocations. And, use u_simple_shaders utility code.
* gallium: create one vertex buffer and re-use, also enable bypass_clippingBrian2008-03-201-0/+2
| | | | Quad clears should be a little more efficient now.
* gallium: use the utility pasthrough shadersBrian2008-03-201-0/+7
| | | | This avoids the Mesa->TGSI translation step.
* gallium: implement CSO save/restore functions for use by meta operations ↵Brian2008-03-191-1/+0
| | | | | | | (blit, gen-mipmaps, quad-clear, etc) Also, additional cso_set_*() functions for viewport, framebuffer, blend color, etc. state.
* gallium: plug in and init GL_EXT_framebuffer_blit function/extensionBrian2008-03-181-0/+4
|
* gallium: use new gallium utility code for generating mipmapsBrian2008-03-171-12/+1
|
* gallium: rework CSO-related code in state trackerBrian2008-03-111-9/+10
| | | | | | | | | | 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...
* gallium: michel's patch to rework texture/sampler binding interfaceKeith Whitwell2008-03-051-1/+4
| | | | | Bind all the samplers/textures at once rather than piecemeal. This is easier for drivers to understand.
* gallium: change st->state.sampler_texture[] to store pipe_texture pointersBrian Paul2008-02-291-1/+1
| | | | | This is a better fix for the previous check-in. Fixes texadd.c conform test, and probably other bugs.
* gallium: state tracker didn't always notify drivers of texobj data changesBrian2008-02-201-21/+1
| | | | | | | | 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.
* gallium: move gen-mipmap global/static vars into st_contextBrian2008-02-121-0/+9
| | | | This fixes potential problems with multi-context programs.
* gallium: add bitmap/drawpixels texcoord bias supportBrian2008-02-061-0/+2
| | | | | | | 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.
* gallium: Simplify winsys buffer interface.Michel Dänzer2008-01-251-7/+0
| | | | | | 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.
* Fix problems with vertex shaders and the private draw module.Brian2008-01-141-1/+1
| | | | | | | | 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.
* Fix problem with initial viewport/scissor size.Brian2007-12-191-0/+1
| | | | | | | | | | | 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().
* gallium: incorporate alpha state into depth_stencil state object.Keith Whitwell2007-12-171-1/+1
|
* gallium: remove set_sampler_units interfaceKeith Whitwell2007-12-111-1/+1
| | | | | The effect of this mapping can be acheived by the state tracker and setting up the pipe texture state pointers to incorporate its affects.
* gallium: remove redundant clear_color state.Keith Whitwell2007-12-111-1/+0
|
* gallium: Remove feedback interfaces from pipe driver.Keith Whitwell2007-12-111-1/+0
| | | | | Something similar will return when geometry shaders are added, but for now this interface is not required.
* Eliminate struct pipe_region.Michel Dänzer2007-12-071-3/+2
| | | | | Directly use struct pipe_buffer_handle for storage and struct pipe_surface for (un)mapping.
* Hide texture layout details from the state tracker.Michel Dänzer2007-12-061-2/+20
| | | | pipe->get_tex_surface() has to be used for access to texture image data.
* Reimplement glRasterPos using the private 'draw' module.Brian2007-11-161-1/+2
|