aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_texture.c
Commit message (Collapse)AuthorAgeFilesLines
* intel: Add support for ARB_sampler_objects.Eric Anholt2011-04-231-1/+3
| | | | | | | | | | | | This extension support consists of replacing "gl_texture_obj->Sampler." with "_mesa_get_samplerobj(ctx, unit)->". One instance of referencing the texture's base sampler remains in the initial miptree allocation, where I'm not sure we have a clear association with any texture unit. Tested with piglit ARB_sampler_objects/sampler-objects. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: minor clean-ups in update_textures()Brian Paul2011-04-131-4/+8
|
* mesa: move sampler state into new gl_sampler_object typeBrian Paul2011-04-101-5/+13
| | | | | | gl_texture_object contains an instance of this type for the regular texture object sampling state. glGenSamplers() generates new instances of gl_sampler_object which can override that state with glBindSampler().
* st/mesa: Set samplers views' first_level.Henri Verbeet2011-04-081-1/+3
| | | | | | | | Base level and min LOD aren't equivalent. In particular, min LOD has no effect on image array selection for magnification and non-mipmapped minification. Signed-off-by: Brian Paul <[email protected]>
* st/mesa: clean up the sampler view format codeBrian Paul2011-01-201-7/+14
|
* st/mesa: formatting, whitespace fixesBrian Paul2011-01-201-10/+15
|
* gallium: add EXT_texture_sRGB_decode.Dave Airlie2011-01-161-0/+4
| | | | | | This uses a sampler view to access the texture with the alternate format. Signed-off-by: Dave Airlie <[email protected]>
* mesa/st: initial attempt at RG support for gallium driversDave Airlie2010-10-021-1/+9
| | | | passes all piglit RG tests with softpipe.
* st/mesa: implement depth texture modesMarek Olšák2010-07-201-11/+85
|
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-1/+1
|
* st/mesa: attempt to fix TFP by using sampler views (v1)Dave Airlie2010-06-081-7/+21
| | | | | | | | | Okay I think this is good enough for now, I can't see any other reason for mesa to want to use a sampler view so lets just leave it at all the A->X conversions for now. I've been running gnome-shell under r300g with this for day or so and it seems fine. Signed-off-by: Dave Airlie <[email protected]>
* mesa/st: add support for EXT_texture_swizzle.Dave Airlie2010-06-051-2/+55
| | | | | | | | | | | This passes on r300g, the only bit I'm not really sure about is the handling of the sampler_view in st_atom_texture.c, I unreference it there if the swizzle value changes and I also have to create a new set of functions to create a new one since the u_sampler.c ones don't handle swizzle so much. adds r300g + softpipe enables, I think other drivers could pass easily enough. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: remove dead codeBrian Paul2010-05-031-9/+0
|
* st/mesa: remove unused needFlush parameter to st_finalize_texture()Brian Paul2010-05-031-4/+4
|
* st/mesa: ignore gl_texture_object::BaseLevel when allocating gallium texturesBrian Paul2010-04-301-3/+0
| | | | | | | | | | | | | | | Previously, when we created a gallium texture for a corresponding Mesa texture we'd only allocate space for mipmap levels >= BaseLevel. This patch undoes that mechanism. This fixes a render-to-texture bug when rendering to level 0 when BaseLevel=1. Also, it makes sense to allocate the whole texture object memory when BaseLevel > 0 since a common use of GL_TEXTURE_BASE_LEVEL is to progressively load/render mipmaps. Eventually, the app almost always fills in the level=0 mipmap image. Finally, the texture image code is bit easier to understand now.
* st/mesa: remove st_texture_object::pipe fieldBrian Paul2010-04-181-1/+2
| | | | | Just pass the pipe context to st_get_texture_sampler_view() as is done for st_get_renderbuffer_sampler_view().
* st/mesa: s/st_get_stobj_sampler_view/st_get_texture_sampler_view/Brian Paul2010-04-181-1/+1
|
* st/mesa: Associate a sampler view with an st texture object.Michal Krol2010-03-121-10/+10
| | | | | Lazily create a sampler view when the texture is being bound for the first time.
* gallium: pipe/p_inlines.h -> util/u_inlines.hJosé Fonseca2010-02-021-0/+1
|
* mesa: Update vertex texture code after gallium changes.Michal Krol2009-12-011-0/+8
|
* gallium: Remove some superfluous instances of #include "p_inlines.h".Michel Dänzer2009-03-041-1/+0
|
* gallium: assorted state tracker fixes for > 8 texture samplersBrian Paul2009-01-021-1/+1
|
* gallium: check vertex shaders for samplers/texture usage as we do for ↵Brian2008-12-041-6/+14
| | | | fragment shaders
* gallium: use a default texture in update_textures(), update_samplers() when ↵Brian Paul2008-08-141-11/+23
| | | | | | | needed The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture.
* gallium: fix some render to texture bugsBrian Paul2008-05-071-30/+50
| | | | | | | | | | | | | | | 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: Reallocate pipe_texture in st_TexImage if the texture object was used.Michel Dänzer2008-05-021-0/+2
| | | | Fixes problems with interleaved glTexImage and rendering calls.
* Some changed for non-C99 compilersAlan Hourihane2008-05-021-10/+5
|
* gallium: use simple color pass-through fragment shader if textures don't existBrian Paul2008-04-251-2/+28
| | | | | | | 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: adjust the code in update_textures() to look more like ↵Brian2008-04-041-8/+7
| | | | update_samplers()
* gallium: check SamplersUsed to determine if texture needed, as in ↵Brian Paul2008-03-241-16/+15
| | | | | | | st_atom_sampler.c Otherwise, we were sometimes setting texture state but not the corresponding sampler state.
* gallium: catch some out of memory conditions in the texture image code.Brian Paul2008-03-201-1/+4
| | | | | st_finalize_texture()'s return code now indicates success/fail instead of presence of texture border (which we discard earlier).
* gallium: add face, dirtyLevels params to pipe->texture_update()Brian Paul2008-03-191-5/+0
| | | | | This provides better information about which images in texture object have changed. Also, call texture_update() from more places previously missed.
* gallium: michel's patch to rework texture/sampler binding interfaceKeith Whitwell2008-03-051-6/+9
| | | | | 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-8/+6
| | | | | This is a better fix for the previous check-in. Fixes texadd.c conform test, and probably other bugs.
* gallium: fix update_textures() bug in pipe_texture binding logicBrian Paul2008-02-291-1/+3
| | | | | The 'st' pointer might not have changed, but st->pt might have. The dirtyData flag will indicate when that's happened, so check it.
* gallium: new pipe->texture_update() functionBrian2008-02-201-4/+10
| | | | | Called whenever texture data is changed (glTexImage, glTexSubImage, glCopyTexSubImage, etc).
* gallium: state tracker didn't always notify drivers of texobj data changesBrian2008-02-201-9/+9
| | | | | | | | 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.
* added commentBrian2008-02-061-0/+1
|
* clean-upBrian2008-02-061-12/+7
|
* gallium: remove set_sampler_units interfaceKeith Whitwell2007-12-111-11/+21
| | | | | The effect of this mapping can be acheived by the state tracker and setting up the pipe texture state pointers to incorporate its affects.
* Hide texture layout details from the state tracker.Michel Dänzer2007-12-061-7/+7
| | | | pipe->get_tex_surface() has to be used for access to texture image data.
* silence the finalize_mipmap_tree msgBrian2007-11-011-0/+2
|
* add names to tracked state atoms to improve debugkeithw2007-08-251-0/+1
|
* fix some issues with texture/mipmap_tree state trackingBrian2007-08-131-4/+5
|
* debug infoBrian2007-08-071-0/+5
|
* plug in texture/sampler state updateBrian2007-08-071-1/+4
|
* texture image state handlingBrian2007-08-071-0/+76