create_solid_vertexbuf(struct pipe_context *pctx)
{
static const float init_shader_const[] = {
- /* for clear/gmem2mem: */
- -1.000000, +1.000000, +1.000000, +1.100000,
- +1.000000, +1.000000, -1.000000, -1.100000,
- +1.000000, +1.100000, -1.100000, +1.000000,
- /* for mem2gmem: (vertices) */
- -1.000000, +1.000000, +1.000000, +1.000000,
- +1.000000, +1.000000, -1.000000, -1.000000,
- +1.000000, +1.000000, -1.000000, +1.000000,
+ /* for clear/gmem2mem/mem2gmem (vertices): */
+ -1.000000, +1.000000, +1.000000,
+ +1.000000, +1.000000, +1.000000,
+ -1.000000, -1.000000, +1.000000,
/* for mem2gmem: (tex coords) */
- +0.000000, +0.000000, +1.000000, +0.000000,
- +0.000000, +1.000000, +1.000000, +1.000000,
+ +0.000000, +0.000000,
+ +1.000000, +0.000000,
+ +0.000000, +1.000000,
};
struct pipe_resource *prsc = pipe_buffer_create(pctx->screen,
PIPE_BIND_CUSTOM, PIPE_USAGE_IMMUTABLE, sizeof(init_shader_const));
FD_DIRTY_FRAMEBUFFER | FD_DIRTY_SCISSOR));
fd2_emit_vertex_bufs(ring, 0x9c, (struct fd2_vertex_buf[]) {
- { .prsc = fd2_ctx->solid_vertexbuf, .size = 48 },
+ { .prsc = fd2_ctx->solid_vertexbuf, .size = 36 },
}, 1);
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
struct pipe_framebuffer_state *pfb = &batch->framebuffer;
fd2_emit_vertex_bufs(ring, 0x9c, (struct fd2_vertex_buf[]) {
- { .prsc = fd2_ctx->solid_vertexbuf, .size = 48 },
+ { .prsc = fd2_ctx->solid_vertexbuf, .size = 36 },
}, 1);
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
float x0, y0, x1, y1;
fd2_emit_vertex_bufs(ring, 0x9c, (struct fd2_vertex_buf[]) {
- { .prsc = fd2_ctx->solid_vertexbuf, .size = 48, .offset = 0x30 },
- { .prsc = fd2_ctx->solid_vertexbuf, .size = 32, .offset = 0x60 },
+ { .prsc = fd2_ctx->solid_vertexbuf, .size = 36, },
+ { .prsc = fd2_ctx->solid_vertexbuf, .size = 24, .offset = 36 },
}, 2);
/* write texture coordinates to vertexbuf: */