summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_video.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-04-01 15:37:11 -0400
committerMarek Olšák <[email protected]>2018-04-05 15:34:58 -0400
commit605ba1b9ae8012338f9ae6b9f0d0062a4a00c546 (patch)
tree5e17b160efbe3bb93133b896f5f8a6b1336a25d7 /src/gallium/drivers/radeon/radeon_video.c
parent0b2f2a6a18c5422a2551009a228c57f382b4d66f (diff)
radeonsi: use r600_common_context less pt7
Acked-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_video.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_video.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
index d80410d51b3..3ae1d21cf1f 100644
--- a/src/gallium/drivers/radeon/radeon_video.c
+++ b/src/gallium/drivers/radeon/radeon_video.c
@@ -119,9 +119,9 @@ error:
/* clear the buffer with zeros */
void si_vid_clear_buffer(struct pipe_context *context, struct rvid_buffer* buffer)
{
- struct r600_common_context *rctx = (struct r600_common_context*)context;
+ struct si_context *sctx = (struct si_context*)context;
- rctx->dma_clear_buffer(context, &buffer->res->b.b, 0,
+ sctx->b.dma_clear_buffer(context, &buffer->res->b.b, 0,
buffer->res->buf->size, 0);
context->flush(context, NULL, 0);
}
@@ -130,25 +130,23 @@ void si_vid_clear_buffer(struct pipe_context *context, struct rvid_buffer* buffe
* join surfaces into the same buffer with identical tiling params
* sumup their sizes and replace the backend buffers with a single bo
*/
-void si_vid_join_surfaces(struct r600_common_context *rctx,
+void si_vid_join_surfaces(struct si_context *sctx,
struct pb_buffer** buffers[VL_NUM_COMPONENTS],
struct radeon_surf *surfaces[VL_NUM_COMPONENTS])
{
- struct radeon_winsys* ws;
+ struct radeon_winsys *ws = sctx->b.ws;;
unsigned best_tiling, best_wh, off;
unsigned size, alignment;
struct pb_buffer *pb;
unsigned i, j;
- ws = rctx->ws;
-
for (i = 0, best_tiling = 0, best_wh = ~0; i < VL_NUM_COMPONENTS; ++i) {
unsigned wh;
if (!surfaces[i])
continue;
- if (rctx->chip_class < GFX9) {
+ if (sctx->b.chip_class < GFX9) {
/* choose the smallest bank w/h for now */
wh = surfaces[i]->u.legacy.bankw * surfaces[i]->u.legacy.bankh;
if (wh < best_wh) {
@@ -165,7 +163,7 @@ void si_vid_join_surfaces(struct r600_common_context *rctx,
/* adjust the texture layer offsets */
off = align(off, surfaces[i]->surf_alignment);
- if (rctx->chip_class < GFX9) {
+ if (sctx->b.chip_class < GFX9) {
/* copy the tiling parameters */
surfaces[i]->u.legacy.bankw = surfaces[best_tiling]->u.legacy.bankw;
surfaces[i]->u.legacy.bankh = surfaces[best_tiling]->u.legacy.bankh;