Permalink
Browse files

More texture translation fixes.

  • Loading branch information...
1 parent 4ea86e0 commit 31c42679aa2ba4d52684d077084f0243a8969284 @gzorin committed Aug 15, 2012
Showing with 5 additions and 26 deletions.
  1. +1 −3 src/library/st_format.c
  2. +0 −18 src/library/textures.cc
  3. +4 −5 src/nvfx/nvfx_fragtex.c
View
@@ -871,7 +871,7 @@ static const struct format_mapping format_map[] = {
},
{
{ 3, GL_RGB, GL_RGB8, 0 },
- { DEFAULT_RGB_FORMATS }
+ { PIPE_FORMAT_R8G8B8X8_UNORM, DEFAULT_RGB_FORMATS }
},
{
{ GL_RGB12, GL_RGB16, GL_RGBA12, GL_RGBA16, 0 },
@@ -1644,14 +1644,12 @@ rsxgl_choose_format(struct pipe_screen *screen, GLenum internalFormat,
}
#endif
-#if 0
/* search for exact matches */
pf = find_exact_format(internalFormat, format, type);
if (pf != PIPE_FORMAT_NONE &&
screen->is_format_supported(screen, pf,
target, sample_count, bindings))
return pf;
-#endif
/* search table for internalFormat */
for (i = 0; i < Elements(format_map); i++) {
View
@@ -727,21 +727,6 @@ rsxgl_texture_target_dims(GLenum target)
}
static inline uint32_t
-rsxgl_tex_remap(uint32_t op0,uint32_t op1,uint32_t op2,uint32_t op3,
- uint32_t src0,uint32_t src1,uint32_t src2,uint32_t src3)
-{
- return
- (op0 << 14) |
- (op1 << 12) |
- (op2 << 10) |
- (op3 << 8) |
- (src0 << 6) |
- (src1 << 4) |
- (src2 << 2) |
- (src3 << 0);
-}
-
-static inline uint32_t
rsxgl_get_tex_level_offset_size(const texture_t::dimension_size_type _size[3],
const uint32_t pitch,
const texture_t::level_size_type level,
@@ -1751,9 +1736,6 @@ rsxgl_tex_subimage(rsxgl_context_t * ctx,texture_t & texture,GLint _level,GLint
}
else if(data) {
rsxgl_assert(dstaddress != 0);
-
- const texture_t::level_t & level = texture.levels[_level];
-
util_format_translate(pdstformat,dstaddress,dstpitch,x,y,
psrcformat,data,srcpitch,0,0,width,height);
}
View
@@ -379,14 +379,13 @@ nvfx_get_texture_remap(const struct nvfx_texture_format * tf,uint8_t r,uint8_t g
tf->comp[r],tf->comp[g],tf->comp[b],tf->comp[a]);
#endif
- // Works for evas icons:
return 0
- | ((uint32_t)tf->src[b] << NV30_3D_TEX_SWIZZLE_S0_X__SHIFT)
- | ((uint32_t)tf->src[g] << NV30_3D_TEX_SWIZZLE_S0_Y__SHIFT)
| ((uint32_t)tf->src[r] << NV30_3D_TEX_SWIZZLE_S0_Z__SHIFT)
+ | ((uint32_t)tf->src[g] << NV30_3D_TEX_SWIZZLE_S0_Y__SHIFT)
+ | ((uint32_t)tf->src[b] << NV30_3D_TEX_SWIZZLE_S0_X__SHIFT)
| ((uint32_t)tf->src[a] << NV30_3D_TEX_SWIZZLE_S0_W__SHIFT)
- | ((uint32_t)tf->comp[b] << NV30_3D_TEX_SWIZZLE_S1_X__SHIFT)
- | ((uint32_t)tf->comp[g] << NV30_3D_TEX_SWIZZLE_S1_Y__SHIFT)
| ((uint32_t)tf->comp[r] << NV30_3D_TEX_SWIZZLE_S1_Z__SHIFT)
+ | ((uint32_t)tf->comp[g] << NV30_3D_TEX_SWIZZLE_S1_Y__SHIFT)
+ | ((uint32_t)tf->comp[b] << NV30_3D_TEX_SWIZZLE_S1_X__SHIFT)
| ((uint32_t)tf->comp[a] << NV30_3D_TEX_SWIZZLE_S1_W__SHIFT);
}

0 comments on commit 31c4267

Please sign in to comment.