[Mesa-dev] [PATCH] radeonsi: Enable VGPR spilling for all shader types v3

Michel Dänzer michel at daenzer.net
Wed Jan 21 18:27:32 PST 2015


On 21.01.2015 21:12, Marek Olšák wrote:
> We also had a case when the CPU accidentally corrupted shaders,
> because the shaders were mapped after textures and a CPU texture
> upload overflowed and overwrote shaders. I suppose we should have
> unmapped the shaders.

Sounds like a good idea.


Tom, for now I suggest this solution, summarized from Marek's previous
descriptions:

(At least) for shaders which have relocations, keep a copy of the
machine code in malloced memory. When the relocated values change,
update them in the malloced memory, allocate a new BO, map it, copy the
machine code from the malloced memory to the BO, replace any existing
shader BO with the new one and invalidate the shader state.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list