GC3000 I-cache

Wladimir J. van der Laan laanwj at gmail.com
Fri Nov 25 15:52:33 UTC 2016


While looking at command stream dumps for OpenCL program on gc3000 I think I
stumbled on this "I-cache" thing mentioned in the i.MX6qp migration guide
(http://www.nxp.com/assets/documents/data/en/engineering-bulletins/EB810.pdf).

This allows (on supporting GPUs) sourcing shaders from memory instead of having
to load them into states. This means they can have effectively unlimited size,
and less state churn during rendering.

Seems quite easy to use. A new state is added, INST_ADDR, which points to the
instructions base address in memory. For the PS this is:
https://github.com/etnaviv/etna_viv/commit/7dcfa814eec63f30e526ee13c175e8d3b15c65df
There is probably a flag to enable it for normal rendering. I haven't tried
using it for anything else than CL yet.

I've added a "hello world" example to the etnaviv shader tests:
https://github.com/etnaviv/etnaviv_gpu_tests/blob/master/src/etnaviv_cl_test_gc3000.c

Another thing that seems new for gc3000 shaders is the ability to provide
immediate values for operands in shader instructions. This can save on uniform
shader constants. This instruction syntax is not handled by disasm.py yet.

Regards,
Wladimir



More information about the etnaviv mailing list