Skip to content

nvk: call correct macro to clear views

Thomas Andersen requested to merge phomes/mesa:clear-views into nvk/main

I was reading the code and I found this thing odd. From nvk_CmdClearAttachments we call emit_clear_rects(). In that function there is an if statement checking if the rendering state has a view_mask set. In both true and false cases it will end up calling the mme macro NVK_MME_CLEAR_LAYERS, which expects a layer count rather than a view mask. It looks clear that it was intended to call NVK_MME_CLEAR_VIEWS instead.

I was looking for some tests to prove that this actually fixed something. I ran all tests matching *clear_att* but most are "Not supported".

The results showed only one extra test passing:

Before:

Test run totals:
  Passed:        58/8986 (0.6%)
  Failed:        502/8986 (5.6%)
  Not supported: 8426/8986 (93.8%)
  Warnings:      0/8986 (0.0%)
  Waived:        0/8986 (0.0%)

After:

  Test run totals:
  Passed:        59/8986 (0.7%)
  Failed:        501/8986 (5.6%)
  Not supported: 8426/8986 (93.8%)
  Warnings:      0/8986 (0.0%)
  Waived:        0/8986 (0.0%)

That specific test would pass in isolation both before and after. When running all tests matching *clear_att* it would failed with VK_ERROR_DEVICE_LOST before, but not after this change.

Edited by Thomas Andersen

Merge request reports

Loading