radeonsi: Rename r600->si remaining identifiers in si_blit.c.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
45578def71
commit
7b7eb4dd1f
|
@ -26,28 +26,28 @@
|
||||||
#include "si_pipe.h"
|
#include "si_pipe.h"
|
||||||
#include "si_state.h"
|
#include "si_state.h"
|
||||||
|
|
||||||
enum r600_blitter_op /* bitmask */
|
enum si_blitter_op /* bitmask */
|
||||||
{
|
{
|
||||||
R600_SAVE_TEXTURES = 1,
|
SI_SAVE_TEXTURES = 1,
|
||||||
R600_SAVE_FRAMEBUFFER = 2,
|
SI_SAVE_FRAMEBUFFER = 2,
|
||||||
R600_DISABLE_RENDER_COND = 4,
|
SI_DISABLE_RENDER_COND = 4,
|
||||||
|
|
||||||
R600_CLEAR = 0,
|
SI_CLEAR = 0,
|
||||||
|
|
||||||
R600_CLEAR_SURFACE = R600_SAVE_FRAMEBUFFER,
|
SI_CLEAR_SURFACE = SI_SAVE_FRAMEBUFFER,
|
||||||
|
|
||||||
R600_COPY = R600_SAVE_FRAMEBUFFER | R600_SAVE_TEXTURES |
|
SI_COPY = SI_SAVE_FRAMEBUFFER | SI_SAVE_TEXTURES |
|
||||||
R600_DISABLE_RENDER_COND,
|
SI_DISABLE_RENDER_COND,
|
||||||
|
|
||||||
R600_BLIT = R600_SAVE_FRAMEBUFFER | R600_SAVE_TEXTURES |
|
SI_BLIT = SI_SAVE_FRAMEBUFFER | SI_SAVE_TEXTURES |
|
||||||
R600_DISABLE_RENDER_COND,
|
SI_DISABLE_RENDER_COND,
|
||||||
|
|
||||||
R600_DECOMPRESS = R600_SAVE_FRAMEBUFFER | R600_DISABLE_RENDER_COND,
|
SI_DECOMPRESS = SI_SAVE_FRAMEBUFFER | SI_DISABLE_RENDER_COND,
|
||||||
|
|
||||||
R600_COLOR_RESOLVE = R600_SAVE_FRAMEBUFFER | R600_DISABLE_RENDER_COND
|
SI_COLOR_RESOLVE = SI_SAVE_FRAMEBUFFER | SI_DISABLE_RENDER_COND
|
||||||
};
|
};
|
||||||
|
|
||||||
static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op)
|
static void si_blitter_begin(struct pipe_context *ctx, enum si_blitter_op op)
|
||||||
{
|
{
|
||||||
struct si_context *rctx = (struct si_context *)ctx;
|
struct si_context *rctx = (struct si_context *)ctx;
|
||||||
|
|
||||||
|
@ -67,10 +67,10 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
|
||||||
util_blitter_save_so_targets(rctx->blitter, rctx->b.streamout.num_targets,
|
util_blitter_save_so_targets(rctx->blitter, rctx->b.streamout.num_targets,
|
||||||
(struct pipe_stream_output_target**)rctx->b.streamout.targets);
|
(struct pipe_stream_output_target**)rctx->b.streamout.targets);
|
||||||
|
|
||||||
if (op & R600_SAVE_FRAMEBUFFER)
|
if (op & SI_SAVE_FRAMEBUFFER)
|
||||||
util_blitter_save_framebuffer(rctx->blitter, &rctx->framebuffer);
|
util_blitter_save_framebuffer(rctx->blitter, &rctx->framebuffer);
|
||||||
|
|
||||||
if (op & R600_SAVE_TEXTURES) {
|
if (op & SI_SAVE_TEXTURES) {
|
||||||
util_blitter_save_fragment_sampler_states(
|
util_blitter_save_fragment_sampler_states(
|
||||||
rctx->blitter, rctx->samplers[PIPE_SHADER_FRAGMENT].n_samplers,
|
rctx->blitter, rctx->samplers[PIPE_SHADER_FRAGMENT].n_samplers,
|
||||||
(void**)rctx->samplers[PIPE_SHADER_FRAGMENT].samplers);
|
(void**)rctx->samplers[PIPE_SHADER_FRAGMENT].samplers);
|
||||||
|
@ -81,7 +81,7 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
|
||||||
rctx->samplers[PIPE_SHADER_FRAGMENT].views.views);
|
rctx->samplers[PIPE_SHADER_FRAGMENT].views.views);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((op & R600_DISABLE_RENDER_COND) && rctx->current_render_cond) {
|
if ((op & SI_DISABLE_RENDER_COND) && rctx->current_render_cond) {
|
||||||
rctx->saved_render_cond = rctx->current_render_cond;
|
rctx->saved_render_cond = rctx->current_render_cond;
|
||||||
rctx->saved_render_cond_cond = rctx->current_render_cond_cond;
|
rctx->saved_render_cond_cond = rctx->current_render_cond_cond;
|
||||||
rctx->saved_render_cond_mode = rctx->current_render_cond_mode;
|
rctx->saved_render_cond_mode = rctx->current_render_cond_mode;
|
||||||
|
@ -90,7 +90,7 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_blitter_end(struct pipe_context *ctx)
|
static void si_blitter_end(struct pipe_context *ctx)
|
||||||
{
|
{
|
||||||
struct si_context *rctx = (struct si_context *)ctx;
|
struct si_context *rctx = (struct si_context *)ctx;
|
||||||
if (rctx->saved_render_cond) {
|
if (rctx->saved_render_cond) {
|
||||||
|
@ -168,10 +168,10 @@ static void si_blit_decompress_depth(struct pipe_context *ctx,
|
||||||
cbsurf = ctx->create_surface(ctx,
|
cbsurf = ctx->create_surface(ctx,
|
||||||
(struct pipe_resource*)flushed_depth_texture, &surf_tmpl);
|
(struct pipe_resource*)flushed_depth_texture, &surf_tmpl);
|
||||||
|
|
||||||
r600_blitter_begin(ctx, R600_DECOMPRESS);
|
si_blitter_begin(ctx, SI_DECOMPRESS);
|
||||||
util_blitter_custom_depth_stencil(rctx->blitter, zsurf, cbsurf, 1 << sample,
|
util_blitter_custom_depth_stencil(rctx->blitter, zsurf, cbsurf, 1 << sample,
|
||||||
custom_dsa[sample], depth);
|
custom_dsa[sample], depth);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
|
|
||||||
pipe_surface_reference(&zsurf, NULL);
|
pipe_surface_reference(&zsurf, NULL);
|
||||||
pipe_surface_reference(&cbsurf, NULL);
|
pipe_surface_reference(&cbsurf, NULL);
|
||||||
|
@ -215,11 +215,11 @@ static void si_blit_decompress_depth_in_place(struct si_context *rctx,
|
||||||
|
|
||||||
zsurf = rctx->b.b.create_surface(&rctx->b.b, &texture->resource.b.b, &surf_tmpl);
|
zsurf = rctx->b.b.create_surface(&rctx->b.b, &texture->resource.b.b, &surf_tmpl);
|
||||||
|
|
||||||
r600_blitter_begin(&rctx->b.b, R600_DECOMPRESS);
|
si_blitter_begin(&rctx->b.b, SI_DECOMPRESS);
|
||||||
util_blitter_custom_depth_stencil(rctx->blitter, zsurf, NULL, ~0,
|
util_blitter_custom_depth_stencil(rctx->blitter, zsurf, NULL, ~0,
|
||||||
rctx->custom_dsa_flush_inplace,
|
rctx->custom_dsa_flush_inplace,
|
||||||
1.0f);
|
1.0f);
|
||||||
r600_blitter_end(&rctx->b.b);
|
si_blitter_end(&rctx->b.b);
|
||||||
|
|
||||||
pipe_surface_reference(&zsurf, NULL);
|
pipe_surface_reference(&zsurf, NULL);
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ void si_flush_depth_textures(struct si_context *rctx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_blit_decompress_color(struct pipe_context *ctx,
|
static void si_blit_decompress_color(struct pipe_context *ctx,
|
||||||
struct r600_texture *rtex,
|
struct r600_texture *rtex,
|
||||||
unsigned first_level, unsigned last_level,
|
unsigned first_level, unsigned last_level,
|
||||||
unsigned first_layer, unsigned last_layer)
|
unsigned first_layer, unsigned last_layer)
|
||||||
|
@ -283,10 +283,10 @@ static void r600_blit_decompress_color(struct pipe_context *ctx,
|
||||||
surf_tmpl.u.tex.last_layer = layer;
|
surf_tmpl.u.tex.last_layer = layer;
|
||||||
cbsurf = ctx->create_surface(ctx, &rtex->resource.b.b, &surf_tmpl);
|
cbsurf = ctx->create_surface(ctx, &rtex->resource.b.b, &surf_tmpl);
|
||||||
|
|
||||||
r600_blitter_begin(ctx, R600_DECOMPRESS);
|
si_blitter_begin(ctx, SI_DECOMPRESS);
|
||||||
util_blitter_custom_color(rctx->blitter, cbsurf,
|
util_blitter_custom_color(rctx->blitter, cbsurf,
|
||||||
rctx->custom_blend_decompress);
|
rctx->custom_blend_decompress);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
|
|
||||||
pipe_surface_reference(&cbsurf, NULL);
|
pipe_surface_reference(&cbsurf, NULL);
|
||||||
}
|
}
|
||||||
|
@ -317,27 +317,27 @@ void si_decompress_color_textures(struct si_context *rctx,
|
||||||
tex = (struct r600_texture *)view->texture;
|
tex = (struct r600_texture *)view->texture;
|
||||||
assert(tex->cmask.size || tex->fmask.size);
|
assert(tex->cmask.size || tex->fmask.size);
|
||||||
|
|
||||||
r600_blit_decompress_color(&rctx->b.b, tex,
|
si_blit_decompress_color(&rctx->b.b, tex,
|
||||||
view->u.tex.first_level, view->u.tex.last_level,
|
view->u.tex.first_level, view->u.tex.last_level,
|
||||||
0, util_max_layer(&tex->resource.b.b, view->u.tex.first_level));
|
0, util_max_layer(&tex->resource.b.b, view->u.tex.first_level));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_clear(struct pipe_context *ctx, unsigned buffers,
|
static void si_clear(struct pipe_context *ctx, unsigned buffers,
|
||||||
const union pipe_color_union *color,
|
const union pipe_color_union *color,
|
||||||
double depth, unsigned stencil)
|
double depth, unsigned stencil)
|
||||||
{
|
{
|
||||||
struct si_context *rctx = (struct si_context *)ctx;
|
struct si_context *rctx = (struct si_context *)ctx;
|
||||||
struct pipe_framebuffer_state *fb = &rctx->framebuffer;
|
struct pipe_framebuffer_state *fb = &rctx->framebuffer;
|
||||||
|
|
||||||
r600_blitter_begin(ctx, R600_CLEAR);
|
si_blitter_begin(ctx, SI_CLEAR);
|
||||||
util_blitter_clear(rctx->blitter, fb->width, fb->height,
|
util_blitter_clear(rctx->blitter, fb->width, fb->height,
|
||||||
util_framebuffer_get_num_layers(fb),
|
util_framebuffer_get_num_layers(fb),
|
||||||
buffers, color, depth, stencil);
|
buffers, color, depth, stencil);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_clear_render_target(struct pipe_context *ctx,
|
static void si_clear_render_target(struct pipe_context *ctx,
|
||||||
struct pipe_surface *dst,
|
struct pipe_surface *dst,
|
||||||
const union pipe_color_union *color,
|
const union pipe_color_union *color,
|
||||||
unsigned dstx, unsigned dsty,
|
unsigned dstx, unsigned dsty,
|
||||||
|
@ -345,13 +345,13 @@ static void r600_clear_render_target(struct pipe_context *ctx,
|
||||||
{
|
{
|
||||||
struct si_context *rctx = (struct si_context *)ctx;
|
struct si_context *rctx = (struct si_context *)ctx;
|
||||||
|
|
||||||
r600_blitter_begin(ctx, R600_CLEAR_SURFACE);
|
si_blitter_begin(ctx, SI_CLEAR_SURFACE);
|
||||||
util_blitter_clear_render_target(rctx->blitter, dst, color,
|
util_blitter_clear_render_target(rctx->blitter, dst, color,
|
||||||
dstx, dsty, width, height);
|
dstx, dsty, width, height);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_clear_depth_stencil(struct pipe_context *ctx,
|
static void si_clear_depth_stencil(struct pipe_context *ctx,
|
||||||
struct pipe_surface *dst,
|
struct pipe_surface *dst,
|
||||||
unsigned clear_flags,
|
unsigned clear_flags,
|
||||||
double depth,
|
double depth,
|
||||||
|
@ -361,17 +361,17 @@ static void r600_clear_depth_stencil(struct pipe_context *ctx,
|
||||||
{
|
{
|
||||||
struct si_context *rctx = (struct si_context *)ctx;
|
struct si_context *rctx = (struct si_context *)ctx;
|
||||||
|
|
||||||
r600_blitter_begin(ctx, R600_CLEAR_SURFACE);
|
si_blitter_begin(ctx, SI_CLEAR_SURFACE);
|
||||||
util_blitter_clear_depth_stencil(rctx->blitter, dst, clear_flags, depth, stencil,
|
util_blitter_clear_depth_stencil(rctx->blitter, dst, clear_flags, depth, stencil,
|
||||||
dstx, dsty, width, height);
|
dstx, dsty, width, height);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper for decompressing a portion of a color or depth resource before
|
/* Helper for decompressing a portion of a color or depth resource before
|
||||||
* blitting if any decompression is needed.
|
* blitting if any decompression is needed.
|
||||||
* The driver doesn't decompress resources automatically while u_blitter is
|
* The driver doesn't decompress resources automatically while u_blitter is
|
||||||
* rendering. */
|
* rendering. */
|
||||||
static void r600_decompress_subresource(struct pipe_context *ctx,
|
static void si_decompress_subresource(struct pipe_context *ctx,
|
||||||
struct pipe_resource *tex,
|
struct pipe_resource *tex,
|
||||||
unsigned level,
|
unsigned level,
|
||||||
unsigned first_layer, unsigned last_layer)
|
unsigned first_layer, unsigned last_layer)
|
||||||
|
@ -384,7 +384,7 @@ static void r600_decompress_subresource(struct pipe_context *ctx,
|
||||||
level, level,
|
level, level,
|
||||||
first_layer, last_layer);
|
first_layer, last_layer);
|
||||||
} else if (rtex->fmask.size || rtex->cmask.size) {
|
} else if (rtex->fmask.size || rtex->cmask.size) {
|
||||||
r600_blit_decompress_color(ctx, rtex, level, level,
|
si_blit_decompress_color(ctx, rtex, level, level,
|
||||||
first_layer, last_layer);
|
first_layer, last_layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,7 +399,7 @@ struct texture_orig_info {
|
||||||
unsigned npix0_y;
|
unsigned npix0_y;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void r600_compressed_to_blittable(struct pipe_resource *tex,
|
static void si_compressed_to_blittable(struct pipe_resource *tex,
|
||||||
unsigned level,
|
unsigned level,
|
||||||
struct texture_orig_info *orig)
|
struct texture_orig_info *orig)
|
||||||
{
|
{
|
||||||
|
@ -448,7 +448,7 @@ static void r600_compressed_to_blittable(struct pipe_resource *tex,
|
||||||
rtex->mipmap_shift = level - (rtex->resource.b.b.last_level-2);
|
rtex->mipmap_shift = level - (rtex->resource.b.b.last_level-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_change_format(struct pipe_resource *tex,
|
static void si_change_format(struct pipe_resource *tex,
|
||||||
unsigned level,
|
unsigned level,
|
||||||
struct texture_orig_info *orig,
|
struct texture_orig_info *orig,
|
||||||
enum pipe_format format)
|
enum pipe_format format)
|
||||||
|
@ -466,7 +466,7 @@ static void r600_change_format(struct pipe_resource *tex,
|
||||||
tex->format = format;
|
tex->format = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_reset_blittable_to_orig(struct pipe_resource *tex,
|
static void si_reset_blittable_to_orig(struct pipe_resource *tex,
|
||||||
unsigned level,
|
unsigned level,
|
||||||
struct texture_orig_info *orig)
|
struct texture_orig_info *orig)
|
||||||
{
|
{
|
||||||
|
@ -482,7 +482,7 @@ static void r600_reset_blittable_to_orig(struct pipe_resource *tex,
|
||||||
rtex->mipmap_shift = 0;
|
rtex->mipmap_shift = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r600_resource_copy_region(struct pipe_context *ctx,
|
static void si_resource_copy_region(struct pipe_context *ctx,
|
||||||
struct pipe_resource *dst,
|
struct pipe_resource *dst,
|
||||||
unsigned dst_level,
|
unsigned dst_level,
|
||||||
unsigned dstx, unsigned dsty, unsigned dstz,
|
unsigned dstx, unsigned dsty, unsigned dstz,
|
||||||
|
@ -506,14 +506,14 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
|
||||||
|
|
||||||
/* The driver doesn't decompress resources automatically while
|
/* The driver doesn't decompress resources automatically while
|
||||||
* u_blitter is rendering. */
|
* u_blitter is rendering. */
|
||||||
r600_decompress_subresource(ctx, src, src_level,
|
si_decompress_subresource(ctx, src, src_level,
|
||||||
src_box->z, src_box->z + src_box->depth - 1);
|
src_box->z, src_box->z + src_box->depth - 1);
|
||||||
|
|
||||||
restore_orig[0] = restore_orig[1] = FALSE;
|
restore_orig[0] = restore_orig[1] = FALSE;
|
||||||
|
|
||||||
if (util_format_is_compressed(src->format) &&
|
if (util_format_is_compressed(src->format) &&
|
||||||
util_format_is_compressed(dst->format)) {
|
util_format_is_compressed(dst->format)) {
|
||||||
r600_compressed_to_blittable(src, src_level, &orig_info[0]);
|
si_compressed_to_blittable(src, src_level, &orig_info[0]);
|
||||||
restore_orig[0] = TRUE;
|
restore_orig[0] = TRUE;
|
||||||
sbox.x = util_format_get_nblocksx(orig_info[0].format, src_box->x);
|
sbox.x = util_format_get_nblocksx(orig_info[0].format, src_box->x);
|
||||||
sbox.y = util_format_get_nblocksy(orig_info[0].format, src_box->y);
|
sbox.y = util_format_get_nblocksy(orig_info[0].format, src_box->y);
|
||||||
|
@ -523,7 +523,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
|
||||||
sbox.depth = src_box->depth;
|
sbox.depth = src_box->depth;
|
||||||
psbox=&sbox;
|
psbox=&sbox;
|
||||||
|
|
||||||
r600_compressed_to_blittable(dst, dst_level, &orig_info[1]);
|
si_compressed_to_blittable(dst, dst_level, &orig_info[1]);
|
||||||
restore_orig[1] = TRUE;
|
restore_orig[1] = TRUE;
|
||||||
/* translate the dst box as well */
|
/* translate the dst box as well */
|
||||||
dstx = util_format_get_nblocksx(orig_info[1].format, dstx);
|
dstx = util_format_get_nblocksx(orig_info[1].format, dstx);
|
||||||
|
@ -533,33 +533,33 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
|
||||||
|
|
||||||
switch (blocksize) {
|
switch (blocksize) {
|
||||||
case 1:
|
case 1:
|
||||||
r600_change_format(src, src_level, &orig_info[0],
|
si_change_format(src, src_level, &orig_info[0],
|
||||||
PIPE_FORMAT_R8_UNORM);
|
PIPE_FORMAT_R8_UNORM);
|
||||||
r600_change_format(dst, dst_level, &orig_info[1],
|
si_change_format(dst, dst_level, &orig_info[1],
|
||||||
PIPE_FORMAT_R8_UNORM);
|
PIPE_FORMAT_R8_UNORM);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
r600_change_format(src, src_level, &orig_info[0],
|
si_change_format(src, src_level, &orig_info[0],
|
||||||
PIPE_FORMAT_R8G8_UNORM);
|
PIPE_FORMAT_R8G8_UNORM);
|
||||||
r600_change_format(dst, dst_level, &orig_info[1],
|
si_change_format(dst, dst_level, &orig_info[1],
|
||||||
PIPE_FORMAT_R8G8_UNORM);
|
PIPE_FORMAT_R8G8_UNORM);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
r600_change_format(src, src_level, &orig_info[0],
|
si_change_format(src, src_level, &orig_info[0],
|
||||||
PIPE_FORMAT_R8G8B8A8_UNORM);
|
PIPE_FORMAT_R8G8B8A8_UNORM);
|
||||||
r600_change_format(dst, dst_level, &orig_info[1],
|
si_change_format(dst, dst_level, &orig_info[1],
|
||||||
PIPE_FORMAT_R8G8B8A8_UNORM);
|
PIPE_FORMAT_R8G8B8A8_UNORM);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
r600_change_format(src, src_level, &orig_info[0],
|
si_change_format(src, src_level, &orig_info[0],
|
||||||
PIPE_FORMAT_R16G16B16A16_UINT);
|
PIPE_FORMAT_R16G16B16A16_UINT);
|
||||||
r600_change_format(dst, dst_level, &orig_info[1],
|
si_change_format(dst, dst_level, &orig_info[1],
|
||||||
PIPE_FORMAT_R16G16B16A16_UINT);
|
PIPE_FORMAT_R16G16B16A16_UINT);
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
r600_change_format(src, src_level, &orig_info[0],
|
si_change_format(src, src_level, &orig_info[0],
|
||||||
PIPE_FORMAT_R32G32B32A32_UINT);
|
PIPE_FORMAT_R32G32B32A32_UINT);
|
||||||
r600_change_format(dst, dst_level, &orig_info[1],
|
si_change_format(dst, dst_level, &orig_info[1],
|
||||||
PIPE_FORMAT_R32G32B32A32_UINT);
|
PIPE_FORMAT_R32G32B32A32_UINT);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -571,16 +571,16 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
|
||||||
restore_orig[1] = TRUE;
|
restore_orig[1] = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
r600_blitter_begin(ctx, R600_COPY);
|
si_blitter_begin(ctx, SI_COPY);
|
||||||
util_blitter_copy_texture(rctx->blitter, dst, dst_level, dstx, dsty, dstz,
|
util_blitter_copy_texture(rctx->blitter, dst, dst_level, dstx, dsty, dstz,
|
||||||
src, src_level, psbox);
|
src, src_level, psbox);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
|
|
||||||
if (restore_orig[0])
|
if (restore_orig[0])
|
||||||
r600_reset_blittable_to_orig(src, src_level, &orig_info[0]);
|
si_reset_blittable_to_orig(src, src_level, &orig_info[0]);
|
||||||
|
|
||||||
if (restore_orig[1])
|
if (restore_orig[1])
|
||||||
r600_reset_blittable_to_orig(dst, dst_level, &orig_info[1]);
|
si_reset_blittable_to_orig(dst, dst_level, &orig_info[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For MSAA integer resolving to work, we change the format to NORM using this function. */
|
/* For MSAA integer resolving to work, we change the format to NORM using this function. */
|
||||||
|
@ -652,14 +652,14 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
|
||||||
info->src.box.depth == 1 &&
|
info->src.box.depth == 1 &&
|
||||||
dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D &&
|
dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D &&
|
||||||
!(dst->surface.flags & RADEON_SURF_SCANOUT)) {
|
!(dst->surface.flags & RADEON_SURF_SCANOUT)) {
|
||||||
r600_blitter_begin(ctx, R600_COLOR_RESOLVE);
|
si_blitter_begin(ctx, SI_COLOR_RESOLVE);
|
||||||
util_blitter_custom_resolve_color(rctx->blitter,
|
util_blitter_custom_resolve_color(rctx->blitter,
|
||||||
info->dst.resource, info->dst.level,
|
info->dst.resource, info->dst.level,
|
||||||
info->dst.box.z,
|
info->dst.box.z,
|
||||||
info->src.resource, info->src.box.z,
|
info->src.resource, info->src.box.z,
|
||||||
sample_mask, rctx->custom_blend_resolve,
|
sample_mask, rctx->custom_blend_resolve,
|
||||||
format);
|
format);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -678,13 +678,13 @@ static void si_blit(struct pipe_context *ctx,
|
||||||
|
|
||||||
/* The driver doesn't decompress resources automatically while
|
/* The driver doesn't decompress resources automatically while
|
||||||
* u_blitter is rendering. */
|
* u_blitter is rendering. */
|
||||||
r600_decompress_subresource(ctx, info->src.resource, info->src.level,
|
si_decompress_subresource(ctx, info->src.resource, info->src.level,
|
||||||
info->src.box.z,
|
info->src.box.z,
|
||||||
info->src.box.z + info->src.box.depth - 1);
|
info->src.box.z + info->src.box.depth - 1);
|
||||||
|
|
||||||
r600_blitter_begin(ctx, R600_BLIT);
|
si_blitter_begin(ctx, SI_BLIT);
|
||||||
util_blitter_blit(rctx->blitter, info);
|
util_blitter_blit(rctx->blitter, info);
|
||||||
r600_blitter_end(ctx);
|
si_blitter_end(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void si_flush_resource(struct pipe_context *ctx,
|
static void si_flush_resource(struct pipe_context *ctx,
|
||||||
|
@ -694,10 +694,10 @@ static void si_flush_resource(struct pipe_context *ctx,
|
||||||
|
|
||||||
void si_init_blit_functions(struct si_context *rctx)
|
void si_init_blit_functions(struct si_context *rctx)
|
||||||
{
|
{
|
||||||
rctx->b.b.clear = r600_clear;
|
rctx->b.b.clear = si_clear;
|
||||||
rctx->b.b.clear_render_target = r600_clear_render_target;
|
rctx->b.b.clear_render_target = si_clear_render_target;
|
||||||
rctx->b.b.clear_depth_stencil = r600_clear_depth_stencil;
|
rctx->b.b.clear_depth_stencil = si_clear_depth_stencil;
|
||||||
rctx->b.b.resource_copy_region = r600_resource_copy_region;
|
rctx->b.b.resource_copy_region = si_resource_copy_region;
|
||||||
rctx->b.b.blit = si_blit;
|
rctx->b.b.blit = si_blit;
|
||||||
rctx->b.b.flush_resource = si_flush_resource;
|
rctx->b.b.flush_resource = si_flush_resource;
|
||||||
rctx->b.blit_decompress_depth = si_blit_decompress_depth;
|
rctx->b.blit_decompress_depth = si_blit_decompress_depth;
|
||||||
|
|
Loading…
Reference in New Issue