summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_fbo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 65ce12ccd4..45ce34a85f 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -49,6 +49,7 @@
#include "st_public.h"
#include "st_texture.h"
+#include "util/u_format.h"
#include "util/u_rect.h"
@@ -98,16 +99,14 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
strb->defined = GL_FALSE; /* undefined contents now */
if(strb->software) {
- struct pipe_format_block block;
size_t size;
_mesa_free(strb->data);
assert(strb->format != PIPE_FORMAT_NONE);
- pf_get_block(strb->format, &block);
- strb->stride = pf_get_stride(&block, width);
- size = pf_get_2d_size(&block, strb->stride, height);
+ strb->stride = util_format_get_stride(strb->format, width);
+ size = util_format_get_2d_size(strb->format, strb->stride, height);
strb->data = _mesa_malloc(size);
@@ -127,13 +126,12 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
memset(&template, 0, sizeof(template));
template.target = PIPE_TEXTURE_2D;
template.format = format;
- pf_get_block(format, &template.block);
- template.width[0] = width;
- template.height[0] = height;
- template.depth[0] = 1;
+ template.width0 = width;
+ template.height0 = height;
+ template.depth0 = 1;
template.last_level = 0;
template.nr_samples = rb->NumSamples;
- if (pf_is_depth_stencil(format)) {
+ if (util_format_is_depth_or_stencil(format)) {
template.tex_usage = PIPE_TEXTURE_USAGE_DEPTH_STENCIL;
}
else {
@@ -376,7 +374,7 @@ st_render_texture(GLcontext *ctx,
rb->_BaseFormat = texImage->_BaseFormat;
/*printf("***** render to texture level %d: %d x %d\n", att->TextureLevel, rb->Width, rb->Height);*/
- /*printf("***** pipe texture %d x %d\n", pt->width[0], pt->height[0]);*/
+ /*printf("***** pipe texture %d x %d\n", pt->width0, pt->height0);*/
pipe_texture_reference( &strb->texture, pt );