ValveSoftware / Dota-2-Vulkan

Tracker for issues specific to the Vulkan version of Dota 2 on Windows, Linux, and macOS
101 stars 17 forks source link

Drawing with incompatible pipeline on macOS #365

Closed kvark closed 3 years ago

kvark commented 3 years ago

Your system information

Please describe your issue in as much detail as possible:

I'm seeing Dota2 trying to issue a draw call when the active graphics pipeline is not compatible with the render subpass. The subpass color is BGRA8Unorm_sRGB with depth-stencil Depth32Float_Stencil8. The pipeline bound has color RGB10A2Unorm with depth-stencil Depth32Float_Stencil8. The draw call looks like a regular quad: 4 vertices, single instance, no indices.

Note: this is the first time the game tries to use RGB10A2Unorm, hopefully this is helpful to identify the spot in your code.

If my reading (of Dota2 command stream) is correct, this is invalid use of Vulkan. I'd expect the draws only be issued with compatible pipelines in the render pass.

Steps for reproducing this issue:

  1. Run dota2 Vulkan on macOS
  2. Reach the main menu
  3. Check the state of pipelines and render passes for the draw calls
danginsburg commented 3 years ago

Is this resulting in a Metal Validation error? Can you check if it happens with -autoconfig_level N where N=3,2,1,0. I'm having trouble reproducing this so far. I'm not sure how it could happen yet - our renderpass compatibility check does definitely look at color target formats matching.

kvark commented 3 years ago

My apologies, this turned out to be a small error in my code. I wasn't initializing the sample count properly at the start of a secondary command buffer.