Commit Graph

28 Commits

Author SHA1 Message Date
Michal Krol
853d4807fe mesa: Update vertex texture code after gallium changes. 2009-12-01 11:21:21 +01:00
Michel Dänzer
45bde75bd6 gallium: Remove some superfluous instances of #include "p_inlines.h". 2009-03-04 11:58:52 +01:00
Brian Paul
d917ad5dbd gallium: assorted state tracker fixes for > 8 texture samplers 2009-01-02 16:54:11 -07:00
Brian
9271662ae9 gallium: check vertex shaders for samplers/texture usage as we do for fragment shaders 2008-12-04 09:58:54 -07:00
Brian Paul
8f6d9e12be gallium: use a default texture in update_textures(), update_samplers() when 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-08-14 15:44:28 -06:00
Brian Paul
1a82d9648b gallium: fix some render to texture bugs
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-05-07 16:44:33 -06:00
Michel Dänzer
d4074c509b gallium: Reallocate pipe_texture in st_TexImage if the texture object was used.
Fixes problems with interleaved glTexImage and rendering calls.
2008-05-02 16:22:20 +01:00
Alan Hourihane
54507125e7 Some changed for non-C99 compilers 2008-05-02 10:30:34 +00:00
Brian Paul
332b77b852 gallium: use simple color pass-through fragment shader if textures don't exist
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-25 15:24:07 -06:00
Brian
74a6a46b74 gallium: adjust the code in update_textures() to look more like update_samplers() 2008-04-04 16:45:05 -06:00
Brian Paul
762e96c804 gallium: check SamplersUsed to determine if texture needed, as in st_atom_sampler.c
Otherwise, we were sometimes setting texture state but not the corresponding
sampler state.
2008-03-24 17:21:18 -06:00
Brian Paul
3b3774b122 gallium: catch some out of memory conditions in the texture image code.
st_finalize_texture()'s return code now indicates success/fail instead of
presence of texture border (which we discard earlier).
2008-03-20 17:08:07 -06:00
Brian Paul
4984487bc3 gallium: add face, dirtyLevels params to pipe->texture_update()
This provides better information about which images in texture object have changed.
Also, call texture_update() from more places previously missed.
2008-03-19 17:15:14 -06:00
Keith Whitwell
4528287e04 gallium: michel's patch to rework texture/sampler binding interface
Bind all the samplers/textures at once rather than piecemeal.
This is easier for drivers to understand.
2008-03-05 10:56:49 +01:00
Brian Paul
07d6347e8a gallium: change st->state.sampler_texture[] to store pipe_texture pointers
This is a better fix for the previous check-in.
Fixes texadd.c conform test, and probably other bugs.
2008-02-29 16:16:16 -07:00
Brian Paul
c8bca8d8a9 gallium: fix update_textures() bug in pipe_texture binding logic
The 'st' pointer might not have changed, but st->pt might have.  The dirtyData flag
will indicate when that's happened, so check it.
2008-02-29 15:38:43 -07:00
Brian
d5640a2dbd gallium: new pipe->texture_update() function
Called whenever texture data is changed (glTexImage, glTexSubImage,
glCopyTexSubImage, etc).
2008-02-20 13:24:52 -07:00
Brian
58edb0683d gallium: state tracker didn't always notify drivers of texobj data changes
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-20 11:20:25 -07:00
Brian
105b3596be added comment 2008-02-06 09:35:39 -07:00
Brian
71984d76aa clean-up 2008-02-06 09:35:38 -07:00
Keith Whitwell
c3af68dc50 gallium: remove set_sampler_units interface
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-11 14:39:37 +00:00
Michel Dänzer
753db0d840 Hide texture layout details from the state tracker.
pipe->get_tex_surface() has to be used for access to texture image data.
2007-12-06 11:18:11 +01:00
Brian
64988ff7fe silence the finalize_mipmap_tree msg 2007-11-01 18:01:47 -06:00
keithw
4185da4681 add names to tracked state atoms to improve debug 2007-08-25 22:01:32 +01:00
Brian
8cc668a4a8 fix some issues with texture/mipmap_tree state tracking 2007-08-13 15:20:08 -06:00
Brian
b4784862b4 debug info 2007-08-07 18:24:29 -06:00
Brian
d78dab1267 plug in texture/sampler state update 2007-08-07 15:12:22 -06:00
Brian
28d64d398b texture image state handling 2007-08-07 15:11:20 -06:00