Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lgc: kill unused outputs based on channelWriteMask #2774

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

xuechen417
Copy link
Contributor

This is an optimization of output calculations based on channelWriteMask of the pipeline stats from two aspects:

  • Remove export instructions for color targets that have a 0 write mask
  • Replace components that aren't used according to the write mask with 'poision'

(cherry picked from commit 4dd226794ec1a09b3b95063197f1a4842145f548)

@xuechen417 xuechen417 requested a review from a team as a code owner October 19, 2023 06:13
@amdvlk-admin
Copy link

Test summary for commit 4340863

CTS tests (Failed: 0/138994)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 41144/69503 (59.2%)
    • Failed: 0/69503 (0.0%)
    • Not Supported: 28359/69503 (40.8%)
    • Warnings: 0/69503 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 41178/69491 (59.3%)
    • Failed: 0/69491 (0.0%)
    • Not Supported: 28313/69491 (40.7%)
    • Warnings: 0/69491 (0.0%)

Copy link
Member

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is mostly nice, but I think the code in handleColorExportInstruction should be cleaned up while we're making this change. You can tell that there's a weakness because the remapping for EXP_FORMAT_32_AR needs to be addressed in two different places, and the logic for compressed exports is kind of difficult to follow.

How about the following:

  • comps currently has two different meanings. It is initially used to represent the components written by the application shader. It is then later used to represent the data to be exported. This overload of meanings should be avoided by using two different arrays; perhaps call them comps and exports. (They can be std::array<Value *, 4> instead of SmallVector)
  • Initially exports with poison values and then fill in the real data as well as exportMask in a single pass within each of the cases of the switch statement based on the export format (taking the compCount and channelWriteMask into account)
  • Also, there's currently a duplicate export creation for the non-half case and the half-but-gfx11 case. (Not from your change but pre-existing.) Please try to avoid that.

@xuechen417
Copy link
Contributor Author

Thanks! This is mostly nice, but I think the code in handleColorExportInstruction should be cleaned up while we're making this change. You can tell that there's a weakness because the remapping for EXP_FORMAT_32_AR needs to be addressed in two different places, and the logic for compressed exports is kind of difficult to follow.

How about the following:

  • comps currently has two different meanings. It is initially used to represent the components written by the application shader. It is then later used to represent the data to be exported. This overload of meanings should be avoided by using two different arrays; perhaps call them comps and exports. (They can be std::array<Value *, 4> instead of SmallVector)
  • Initially exports with poison values and then fill in the real data as well as exportMask in a single pass within each of the cases of the switch statement based on the export format (taking the compCount and channelWriteMask into account)
  • Also, there's currently a duplicate export creation for the non-half case and the half-but-gfx11 case. (Not from your change but pre-existing.) Please try to avoid that.

Thank you for the detailed comments. I will update the code as you suggestions.

@xuechen417
Copy link
Contributor Author

V1: Refine the logic in handleColorExportInstructions as comments.

@amdvlk-admin
Copy link

Test summary for commit 03c7675

CTS tests (Failed: 526/138995)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 40729/69504 (58.6%)
    • Failed: 415/69504 (0.6%)

      Failures:

      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.cube_layers.r16g16_sint
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.cube_layers.r32_uint
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.a8b8g8r8_sint_pack32
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.a8b8g8r8_sint_pack32_33x128
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.a8b8g8r8_unorm_pack32_200x180
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.b8g8r8a8_snorm_64x11
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.r16_sfloat_200x180
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.r16g16_uint_33x128
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.r16g16_unorm_1x33_clamp_input
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.r16g16_unorm_64x11_clamp_input
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.r8g8_unorm_64x11
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.r8g8b8a8_snorm_200x180
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.cube_layers.a4r4g4b4_unorm_pack16_clamp_input
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.cube_layers.b8g8r8a8_uint
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.cube_layers.r16g16b16a16_uint
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.multiple_layers.a2r10g10b10_unorm_pack32_200x180
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.multiple_layers.a2r10g10b10_unorm_pack32_64x11
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.multiple_layers.a8b8g8r8_sint_pack32
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.multiple_layers.e5b9g9r9_ufloat_pack32
      Stack trace: Fail
      
      FAILURE: dEQP-VK.api.image_clearing.core.partial_clear_color_attachment.multiple_layers.r16g16_unorm_64x11_clamp_input
      Stack trace: Fail
      ...
      

    • Not Supported: 28360/69504 (40.8%)
    • Warnings: 0/69504 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 41066/69491 (59.1%)
    • Failed: 111/69491 (0.2%)

      Failures:

      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.sparserendertarget.r16g16_unorm
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_unorm.load.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_unorm.clear.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_unorm.clear.clear_draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_8
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_4
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_4_resolve_level_4
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_8_resolve_level_3
      Stack trace: Fail
      ...
      

    • Not Supported: 28314/69491 (40.7%)
    • Warnings: 0/69491 (0.0%)

@amdvlk-admin
Copy link

Test summary for commit 03c7675

CTS tests (Failed: 279/138995)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 40976/69504 (59.0%)
    • Failed: 168/69504 (0.2%)

      Failures:

      FAILURE: dEQP-VK.draw.renderpass.output_location.array.b8g8r8a8-unorm-highp-output-vec2
      Stack trace: Crash
      
      FAILURE: dEQP-VK.draw.renderpass.output_location.array.r8g8-uint-highp
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.sparserendertarget.r16g16_unorm
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment_write_mask.attachment_count_4.start_index_3
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment_write_mask.attachment_count_8.start_index_6
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_unorm.load.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.attachment_write_mask.attachment_count_8.start_index_0
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.attachment_write_mask.attachment_count_8.start_index_1
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_unorm.clear.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_unorm.clear.clear_draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_8
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_4
      Stack trace: Fail
      ...
      

    • Not Supported: 28360/69504 (40.8%)
    • Warnings: 0/69504 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 41066/69491 (59.1%)
    • Failed: 111/69491 (0.2%)

      Failures:

      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.sparserendertarget.r16g16_unorm
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_unorm.load.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_unorm.clear.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_unorm.clear.clear_draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_8
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_4
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_4_resolve_level_4
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_8_resolve_level_3
      Stack trace: Fail
      ...
      

    • Not Supported: 28314/69491 (40.7%)
    • Warnings: 0/69491 (0.0%)

@qiaojbao qiaojbao closed this Oct 24, 2023
@qiaojbao qiaojbao reopened this Oct 24, 2023
@amdvlk-admin
Copy link

Test summary for commit 03c7675

CTS tests (Failed: 414/208498)
  • Built with version 1.3.5.2
  • Rhel 8.9, Gfx10
    • Passed: 36437/69504 (52.4%)
    • Failed: 135/69504 (0.2%)

      Failures:

      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r32_uint.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r32_uint.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r32_sfloat.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.sparserendertarget.r16g16_unorm
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_unorm.load.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_unorm.clear.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_unorm.clear.clear_draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_8
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_4
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      ...
      

    • Not Supported: 32932/69504 (47.4%)
    • Warnings: 0/69504 (0.0%)
    Ubuntu navi3x, Srdcvk
    • Passed: 40976/69503 (59.0%)
    • Failed: 168/69503 (0.2%)

      Failures:

      FAILURE: dEQP-VK.draw.renderpass.output_location.array.b8g8r8a8-unorm-highp-output-vec2
      Stack trace: Crash
      
      FAILURE: dEQP-VK.draw.renderpass.output_location.array.r8g8-uint-highp
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.sparserendertarget.r16g16_unorm
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment_write_mask.attachment_count_4.start_index_3
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment_write_mask.attachment_count_8.start_index_6
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_unorm.load.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.attachment_write_mask.attachment_count_8.start_index_0
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.attachment_write_mask.attachment_count_8.start_index_1
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_unorm.clear.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_unorm.clear.clear_draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_8
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_4
      Stack trace: Fail
      ...
      

    • Not Supported: 28359/69503 (40.8%)
    • Warnings: 0/69503 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 41066/69491 (59.1%)
    • Failed: 111/69491 (0.2%)

      Failures:

      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.sparserendertarget.r16g16_unorm
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_unorm.load.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_unorm.clear.draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_unorm.clear.clear_draw
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_3.r16_unorm.samples_8
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16_unorm.samples_2_resolve_level_4
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16_unorm.samples_2_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.layers_6.r16g16b16a16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16_unorm.samples_4_resolve_level_2
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16g16_unorm.samples_4_resolve_level_4
      Stack trace: Fail
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.multisample_resolve.r16g16b16a16_unorm.samples_8_resolve_level_3
      Stack trace: Fail
      ...
      

    • Not Supported: 28314/69491 (40.7%)
    • Warnings: 0/69491 (0.0%)

Copy link
Member

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this already looks much better. A few remaining comments inline, and looks like there's still a bug hidden somewhere.

lgc/patch/FragColorExport.cpp Outdated Show resolved Hide resolved
lgc/patch/FragColorExport.cpp Outdated Show resolved Hide resolved
@xuechen417
Copy link
Contributor Author

V2: Use Intrinsic ID.

@amdvlk-admin
Copy link

Test summary for commit bc2cb88

CTS tests (Failed: 95/137948)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 35280/68946 (51.2%)
    • Failed: 73/68946 (0.1%)

      Failures:

      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment_write_mask.attachment_count_8.start_index_0
      Stack trace: Crash
      
      FAILURE: dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment_write_mask.attachment_count_8.start_index_6
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec2.as_int_int
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec2.as_float_float
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec2.as_int_int
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec2.as_int_int_unused
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float_unused
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec2.as_int_int
      Stack trace: Crash
      
      FAILURE: dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec2.as_float_float
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.b8g8r8a8_srgb_r16g16_sfloat_draw_load
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.b8g8r8a8_srgb_r16g16_sint_draw_load_format_list
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.b8g8r8a8_srgb_r16g16_sint_draw_texture_format_list
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.b8g8r8a8_srgb_r16g16_uint_draw_load_format_list
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.r16g16_uint_r16g16_sint_draw_texture
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.r32_sfloat_r16g16_sfloat_draw_load
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.r32_sfloat_r16g16_sint_draw_copy
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.r32_sfloat_r16g16_sint_draw_load
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.r32_sint_r16g16_sint_draw_texture_format_list
      Stack trace: Crash
      
      FAILURE: dEQP-VK.image.mutable.2d.r8g8b8a8_sint_r16g16_sfloat_draw_copy
      Stack trace: Crash
      ...
      

    • Not Supported: 33593/68946 (48.7%)
    • Warnings: 0/68946 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 35402/69002 (51.3%)
    • Failed: 22/69002 (0.0%)

      Failures:

      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_16.scalar10_frag
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_16.scalar15_frag
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_16.vector7_frag
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_32_to_16.scalar14_rtz_geom
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_32_to_16.scalar3_unspecified_rnd_mode_geom
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_32_to_16.scalar5_unspecified_rnd_mode_vert
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_32_to_16.scalar7_rte_geom
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_32_to_16.scalar8_rte_tesse
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_32_to_16.vector2_rtz_geom
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_32_to_16.vector2_unspecified_rnd_mode_tesse
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar12_rte_frag
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar13_rtz_geom
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar14_rtz_tessc
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar15_rte_frag
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar15_unspecified_rnd_mode_tessc
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar4_rte_tesse
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar5_unspecified_rnd_mode_tessc
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar6_rtz_frag
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.scalar8_rtz_frag
      Stack trace: Crash
      
      FAILURE: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_64_to_16.vector2_rte_tesse
      Stack trace: Crash
      ...
      

    • Not Supported: 33578/69002 (48.7%)
    • Warnings: 0/69002 (0.0%)

@amdvlk-admin
Copy link

Test summary for commit dc096a2

CTS tests (Failed: 0/137948)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 35353/68946 (51.3%)
    • Failed: 0/68946 (0.0%)
    • Not Supported: 33593/68946 (48.7%)
    • Warnings: 0/68946 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 35424/69002 (51.3%)
    • Failed: 0/69002 (0.0%)
    • Not Supported: 33578/69002 (48.7%)
    • Warnings: 0/69002 (0.0%)

This is an optimization of output caculations based on
channelWriteMask of the pipeline stats from two aspects:
- Remove export instructions for color targets that have a 0 write mask
- Replace components that aren't used according to the write mask with
  'poison'
@xuechen417
Copy link
Contributor Author

V3: update a lit test.

@amdvlk-admin
Copy link

Test summary for commit e8d466a

CTS tests (Failed: 0/137948)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 35353/68946 (51.3%)
    • Failed: 0/68946 (0.0%)
    • Not Supported: 33593/68946 (48.7%)
    • Warnings: 0/68946 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 35424/69002 (51.3%)
    • Failed: 0/69002 (0.0%)
    • Not Supported: 33578/69002 (48.7%)
    • Warnings: 0/69002 (0.0%)

Copy link
Member

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@xuechen417 xuechen417 merged commit 58f91b4 into GPUOpen-Drivers:dev Oct 30, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants