diff options
author | Jason Ekstrand <[email protected]> | 2017-06-12 10:40:46 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-07-12 21:15:46 -0700 |
commit | 30cfed57ce1f6dcbbf677e4f615438c969ef3d30 (patch) | |
tree | 5b28604d3041965ed2f52556352c30d99cba07c5 /src | |
parent | 091965760da6d2624b6cebd2e67c17fb905dae7e (diff) |
i965: Use miptree_create_for_dri_image in image_target_renderbuffer_storage
This does make a tiny functional change in that we now also test for
whether or not the format supports texturing and not just rendering.
However, this should have no practical effect as all renderbuffers use
texturable formats.
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_fbo.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index b59fc1fc7d0..4003e288250 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -362,31 +362,10 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx, * buffer's content to the main buffer nor for invalidating the aux buffer's * content. */ - irb->mt = intel_miptree_create_for_bo(brw, - image->bo, - image->format, - image->offset, - image->width, - image->height, - 1, - image->pitch, - MIPTREE_LAYOUT_DISABLE_AUX); + irb->mt = intel_miptree_create_for_dri_image(brw, image, GL_TEXTURE_2D); if (!irb->mt) return; - /* Adjust the miptree's upper-left coordinate. - * - * FIXME: Adjusting the miptree's layout outside of - * intel_miptree_create_layout() is fragile. Plumb the adjustment through - * intel_miptree_create_layout() and brw_tex_layout(). - */ - irb->mt->level[0].level_x = image->tile_x; - irb->mt->level[0].level_y = image->tile_y; - irb->mt->level[0].slice[0].x_offset = image->tile_x; - irb->mt->level[0].slice[0].y_offset = image->tile_y; - irb->mt->total_width += image->tile_x; - irb->mt->total_height += image->tile_y; - rb->InternalFormat = image->internal_format; rb->Width = image->width; rb->Height = image->height; |