Commit f77ab0de authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Support user constant buffer as well

parent 5266c778
......@@ -856,10 +856,22 @@ panfrost_set_constant_buffer(
size_t sz = buf->buffer_size;
printf("Constant buffer set... %d %d\n", index, sz);
void *cpu;
struct panfrost_resource *rsrc = (struct panfrost_resource *) (buf->buffer);
printf("Rsrc %p\n", rsrc);
printf("CPU %p\n", rsrc->cpu);
printf("Val %f..\n", ((float *) rsrc->cpu)[0]);
if (rsrc) {
printf("Rsrc %p\n", rsrc);
printf("CPU %p\n", rsrc->cpu);
cpu = rsrc->cpu;
} else if (buf->user_buffer) {
cpu = buf->user_buffer;
} else {
printf("No constant buffer?\n");
printf("Val %f..\n", ((float *) cpu)[0]);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment