Age | Commit message (Collapse) | Author |
|
|
|
|
|
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 <airlied@redhat.com>
|
|
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 <airlied@redhat.com>
|
|
|
|
|
|
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.
|
|
Just pass the pipe context to st_get_texture_sampler_view()
as is done for st_get_renderbuffer_sampler_view().
|
|
|
|
Lazily create a sampler view when the texture is being bound
for the first time.
|
|
|
|
|
|
|
|
|
|
fragment shaders
|
|
needed
The default texture is used when the current fragment shader has texture
sample instructions but the user has not provided/bound a texture.
|
|
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...
|
|
Fixes problems with interleaved glTexImage and rendering calls.
|
|
|
|
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.
|
|
update_samplers()
|
|
st_atom_sampler.c
Otherwise, we were sometimes setting texture state but not the corresponding
sampler state.
|
|
st_finalize_texture()'s return code now indicates success/fail instead of
presence of texture border (which we discard earlier).
|
|
This provides better information about which images in texture object have changed.
Also, call texture_update() from more places previously missed.
|
|
Bind all the samplers/textures at once rather than piecemeal.
This is easier for drivers to understand.
|
|
This is a better fix for the previous check-in.
Fixes texadd.c conform test, and probably other bugs.
|
|
The 'st' pointer might not have changed, but st->pt might have. The dirtyData flag
will indicate when that's happened, so check it.
|
|
Called whenever texture data is changed (glTexImage, glTexSubImage,
glCopyTexSubImage, etc).
|
|
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.
|
|
|
|
|
|
The effect of this mapping can be acheived by the state tracker and
setting up the pipe texture state pointers to incorporate its affects.
|
|
pipe->get_tex_surface() has to be used for access to texture image data.
|
|
|
|
|
|
|
|
|
|
|
|
|