diff options
author | Dave Airlie <[email protected]> | 2010-04-24 18:53:55 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-06-08 19:08:36 +1000 |
commit | a2817f6ae566b672f195cff22e14e2058d3617ea (patch) | |
tree | d6c8e1d354389727c9e0c490476ed007a340e32d /src/mesa/state_tracker/st_manager.c | |
parent | 3a876e847388ad89ea52486040e2b4682a3524c1 (diff) |
st/mesa: attempt to fix TFP by using sampler views (v1)
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]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 8c3dfb3f71f..ccfb1f4a520 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -550,12 +550,14 @@ st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target * To avoid that, internal_format is (wrongly) ignored here. A sane fix * is to use a sampler view. */ - if (util_format_get_component_bits(tex->format, + if (!st_sampler_compat_formats(tex->format, internal_format)) + internal_format = tex->format; + + if (util_format_get_component_bits(internal_format, UTIL_FORMAT_COLORSPACE_RGB, 3) > 0) internalFormat = GL_RGBA; else internalFormat = GL_RGB; - _mesa_init_teximage_fields(ctx, target, texImage, tex->width0, tex->height0, 1, 0, internalFormat); texImage->TexFormat = st_ChooseTextureFormat(ctx, internalFormat, |