diff options
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_context.c b/src/gallium/drivers/freedreno/a2xx/fd2_context.c index 28073b07011..6d9dce2ffbe 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_context.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_context.c @@ -56,6 +56,8 @@ create_solid_vertexbuf(struct pipe_context *pctx) +0.000000, +1.000000, /* SCREEN_SCISSOR_BR value (must be at 60 byte offset in page) */ 0.0, + /* zero indices dummy draw workaround (3 16-bit zeros) */ + 0.0, 0.0, }; struct pipe_resource *prsc = pipe_buffer_create(pctx->screen, PIPE_BIND_CUSTOM, PIPE_USAGE_IMMUTABLE, sizeof(init_shader_const)); diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c index 05c4cd5391b..772127c7478 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c @@ -109,7 +109,7 @@ draw_impl(struct fd_context *ctx, const struct pipe_draw_info *info, OUT_RING(ring, 0x0003c004); OUT_RING(ring, 0x00000000); OUT_RING(ring, 0x00000003); - OUT_RELOC(ring, fd_resource(fd2_context(ctx)->solid_vertexbuf)->bo, 0x80, 0, 0); + OUT_RELOC(ring, fd_resource(fd2_context(ctx)->solid_vertexbuf)->bo, 64, 0, 0); OUT_RING(ring, 0x00000006); } else { OUT_WFI (ring); diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c index 17d6d6ef25a..1c073e31739 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c @@ -263,7 +263,7 @@ fd2_emit_tile_mem2gmem(struct fd_batch *batch, struct fd_tile *tile) float x0, y0, x1, y1; fd2_emit_vertex_bufs(ring, 0x9c, (struct fd2_vertex_buf[]) { - { .prsc = fd2_ctx->solid_vertexbuf, .size = 36, }, + { .prsc = fd2_ctx->solid_vertexbuf, .size = 36 }, { .prsc = fd2_ctx->solid_vertexbuf, .size = 24, .offset = 36 }, }, 2); @@ -273,7 +273,7 @@ fd2_emit_tile_mem2gmem(struct fd_batch *batch, struct fd_tile *tile) y0 = ((float)tile->yoff) / ((float)pfb->height); y1 = ((float)tile->yoff + bin_h) / ((float)pfb->height); OUT_PKT3(ring, CP_MEM_WRITE, 9); - OUT_RELOC(ring, fd_resource(fd2_ctx->solid_vertexbuf)->bo, 0x60, 0, 0); + OUT_RELOC(ring, fd_resource(fd2_ctx->solid_vertexbuf)->bo, 36, 0, 0); OUT_RING(ring, fui(x0)); OUT_RING(ring, fui(y0)); OUT_RING(ring, fui(x1)); @@ -685,7 +685,7 @@ fd2_emit_tile_renderprep(struct fd_batch *batch, struct fd_tile *tile) A2XX_PA_SC_SCREEN_SCISSOR_BR_Y(tile->bin_h)); /* tile offset for gl_FragCoord on a20x (C64 in fragment shader) */ - if (is_a20x(batch->ctx->screen)) { + if (is_a20x(ctx->screen)) { OUT_PKT3(ring, CP_SET_CONSTANT, 5); OUT_RING(ring, 0x00000580); OUT_RING(ring, fui(tile->xoff)); |