projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'gallium-docs'
[mesa.git]
/
src
/
mesa
/
state_tracker
/
st_texture.c
diff --git
a/src/mesa/state_tracker/st_texture.c
b/src/mesa/state_tracker/st_texture.c
index dbccee86c1c279fb1f09e49dad41d7d6e203fcf2..8a3e4cd3ac3d3807e6b67f0b83ee5e3c7d14e720 100644
(file)
--- a/
src/mesa/state_tracker/st_texture.c
+++ b/
src/mesa/state_tracker/st_texture.c
@@
-43,6
+43,7
@@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_rect.h"
#include "util/u_math.h"
#include "util/u_rect.h"
#include "util/u_math.h"
@@
-104,7
+105,6
@@
st_texture_create(struct st_context *st,
pt.width0 = width0;
pt.height0 = height0;
pt.depth0 = depth0;
pt.width0 = width0;
pt.height0 = height0;
pt.depth0 = depth0;
- pf_get_block(format, &pt.block);
pt.tex_usage = usage;
newtex = screen->texture_create(screen, &pt);
pt.tex_usage = usage;
newtex = screen->texture_create(screen, &pt);
@@
-242,8
+242,9
@@
st_surface_data(struct pipe_context *pipe,
struct pipe_screen *screen = pipe->screen;
void *map = screen->transfer_map(screen, dst);
struct pipe_screen *screen = pipe->screen;
void *map = screen->transfer_map(screen, dst);
+ assert(dst->texture);
util_copy_rect(map,
util_copy_rect(map,
-
&dst->block
,
+
dst->texture->format
,
dst->stride,
dstx, dsty,
width, height,
dst->stride,
dstx, dsty,
width, height,
@@
-405,7
+406,7
@@
st_bind_texture_surface(struct pipe_surface *ps, int target, int level,
}
/* map pipe format to base format for now */
}
/* map pipe format to base format for now */
- if (
pf_get_component_bits(format, PIPE_FORMAT_COMP_A
) > 0)
+ if (
util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 3
) > 0)
internalFormat = GL_RGBA;
else
internalFormat = GL_RGB;
internalFormat = GL_RGBA;
else
internalFormat = GL_RGB;