[Intel-gfx] gfx context switch

Ben Widawsky ben at bwidawsk.net
Wed Dec 12 21:34:59 CET 2012


On Wed, Dec 12, 2012 at 03:55:46PM +0000, Zhang, Xiong Y wrote:
> Hi, all:
> 
> When gfx executes batch buffer in render ring buffer, it will do
> context switch .
> 
> Since only when the previous batch buffer has finished, the next batch
> buffer can start. the batch buffer is executed in order. So I think
> there is no need to do context switch.
> 
> Why i915 driver introduce context switch ?  If context switch is
> disabled, what error will occur ?

No GPU state is preserved in between execution unless you use contexts.
Before contexts, it was required that the client upload any and all
state required to perform operations. While most state is still uploaded
anyway, some of it is not.

If you use a mesa expecting HW contexts, and a kernel which doesn't do
contexts switches, the results are undefined.

> 
> Why gfx need context switch, can somebody give me a example to use
> context switch ?

Transform feedback.

> 
> Thanks in advance.  _______________________________________________

-- 
Ben Widawsky, Intel Open Source Technology Center



More information about the Intel-gfx mailing list