Commit 3a41f66f authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Demonstrate quad drawing

parent 11a9a728
......@@ -442,9 +442,8 @@ trans_emit_for_draw(struct panfrost_context *ctx)
int size = ctx->varyings[i].stride * ctx->vertex_count;
ctx->varyings[i].size = size;
printf("Sz %d\n", size);
/* Apparently has to be 64-byte aligned? */
/* Varyings appear to need 64-byte alignment */
size += 64 - size & 63;
if (i + 1 != ctx->varying_count)
......
......@@ -25,10 +25,10 @@ int main(int argc, const char **argv)
gallium->bind_vs_state(gallium, gallium->create_vs_state(gallium, &vs_cso));
float attributes_data_1_0[] = {
-0.50000f, 0.500000f, 0.000000f, 1.0f,
0.500000f, 0.500000f, 0.000000f, 1.0f,
0.500000f, -0.500000f, 0.000000f, 1.0f,
-0.50000f, -0.500000f, 0.000000f, 1.0f,
-0.50000f, 0.500000f, 0.000000f, 1.0f,
0.500000f, -0.500000f, 0.000000f, 1.0f,
};
struct pipe_resource templ = {
......@@ -84,7 +84,7 @@ int main(int argc, const char **argv)
const struct pipe_draw_info info = {
.start = 0,
.count = 4,
.mode = PIPE_PRIM_LINE_STRIP
.mode = PIPE_PRIM_TRIANGLE_STRIP
};
gallium->draw_vbo(gallium, &info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment