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
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to