freedreno: a2xx: minor solid_vertexbuf fixups
The big thing here is the 0x60 offset for the mem2gmem copy which I missed in my last patch. Signed-off-by: Jonathan Marek <jonathan@marek.ca>
This commit is contained in:

committed by
Rob Clark

parent
912a9c8d8c
commit
cccec0b457
@@ -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));
|
||||
|
@@ -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);
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user