Skip to content

Scissor support

Qiang Yu requested to merge PabloPL:scissor-support into lima-17.3

Created by: PabloPL

This commit adds scissor support.

  • for non zero scissor we just add plbu cmd with scissor (taken from lima-ng).
  • for zero scissor we skip building plbu cmd after header and don't buld vs cmds (in previous patch i was trying to skip drawing in this case but then we would see state/image like in previous frame). This behaviour has been found by comparing binary driver memory dump with and without zero scissor.

It was tested with following sample https://github.com/PabloPL/gfx/tree/scissor-test/gbm-surface-scissor It's just a copy of gbm-surface-move where it should display following data:

  • frame0 - normal image
  • frame1 - non zero scissor
  • frame2 - non zero scissor
  • frame3 - zero scissor
  • frame4 - normal image Where non zero scissor is (0, 0, half of screen, half of screen), so result is top left quarter of screen.

Also during testing it's good to change this order, so first is zero scissor and later non zero, with previous implementation (where we're just skipping all in draw_vbo) this was not working (displaying the same image as in previous frame).

Merge request reports