10

freedreno/a6xx: bump varyings limit

 4 years ago
source link: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7917
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Opened 3 months ago by

freedreno/a6xx: bump varyings limit

GL_MAX_VARYING_COMPONENTS is bumped to 124 since it should not include the components of gl_Position. (Same as in blob)

MAX_*_OUTPUT_COMPONENTS is bumped to 128. (Same as in blob)

GL_MAX_VARYING_COMPONENTS and MAX_*_OUTPUT_COMPONENTS are required to be 128 since GL3.2.

Detached merge request pipeline #247052 passed for 972e9ca2
Approval is optional
Test summary results are being parsed
View full report

Merged by 2 months ago (Dec 21, 2020 10:38pm GMT+0800) 2 months ago

The changes were merged into master with 972e9ca2

Pipeline #247055 waiting for manual action for 972e9ca2 on master
    • I can't find a requirement for 128 in GL 3.2 (or any later dektop GL either)

    • Collapse replies
    • Yes, indeed, the spec mandates 128 only for gl_MaxGeometryOutputComponents and gl_MaxFragmentInputComponents.

      Other than that, I got the gl_MaxGeometryInputComponents wrong. So I'll recheck the limits and would update the MR.

    Please register or sign in to reply
  • b2f68d8e - freedreno/a6xx: Fix assert which checks the count of shader outputs
  • c136a645 - freedreno/a6xx: bump varyings limit

Compare with previous version

    • Reduced gl_MaxGeometryInputComponents to 64 (same as in Turnip and blob).
    • Fixed assert in fd6_program.c

    The test coverage of the limits isn't great. And almost always hitting a register allocation failure doesn't help.

  • Collapse replies
  • I sent an MR to piglit with tests that don't trigger RA failure - piglit!430 (merged)

    The only failing test there is tcs-tes-max-in-out-components which hangs.

Please register or sign in to reply
  • c136a645...f5711ae7 - 304 commits from branch mesa:master
  • b5cee9d1 - freedreno/a6xx: Fix assert which checks the count of shader outputs
  • b4def9da - ir3: Allow tesselation to use all 32 varying slots
  • b804ec02 - freedreno/a6xx: bump varyings limit

Compare with previous version

Toggle commit list
  • Fixed hang in tcs-tes-max-in-out-components via ir3: Allow tesselation to use all 32 varying slots.

    Now all tests are passing.

  • Collapse replies
  • cool, lgtm.. r-b for the additional patches

Please register or sign in to reply
  • Resolved by Danylo Piliaiev 2 months ago

    In piglit!430 (merged) Marek Olšák noticed that I forgot some cases. So I found yet another hang - when passing varyings between vs -> tcs.

    I found out that it happens when SP_HS_UNKNOWN_A831 becomes greater than 64. To my surprise, the value of A831 doesn't affect anything - I set it to zero and all my tests are passing.

    Looking at blob's output did confuse me even more:

    A831 value depending on varyings count (click me)

    All traces (some register numbers could be borked due to the assert num < MAX_REG in regmask_set when decoding traces):

    vs-tcs-blob-traces.tar.gz

    I see that A650 has a considerable difference in how this value is calculated. @flto you fixed SP_HS_UNKNOWN_A831 for A650, maybe you could offer an advice or an educated guess? Thanks!

    Edited by Danylo Piliaiev 2 months ago
  • Last reply by Danylo Piliaiev 2 months ago
  • 17f77349 - freedreno/a6xx: Fix assert which checks the count of shader outputs
  • ada5e27f - ir3: Allow tesselation to use all 32 varying slots
  • 8c5e5aee - freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value
  • 1db6089b - freedreno/a6xx: bump varyings limit

Compare with previous version

Toggle commit list
  • Resolved by Danylo Piliaiev 2 months ago

    Added "freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value" which ports A831 calculation for A650 from turnip and uses the formula devised by @flto for others.

    The difference between A650 and others is in the calculation of prims-per-wave:

    max_a831 = 0x40
    max_prims_per_wave = max_a831 * wavesize / (vs->output_size * patch_control_points)
    prims_per_wave = MIN2(prims_per_wave, max_prims_per_wave);

    I think it means that there is a limited storage of max_a831 * wavesize size per wave and if we are exceeding it - we are forced to reduce the count of prims processed per wave.

  • Last reply by Danylo Piliaiev 2 months ago
  • 9689cc3f - freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value
  • d4c34a42 - freedreno/a6xx: bump varyings limit

Compare with previous version

  • 21555e0e - freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value and document it
  • 52106178 - freedreno/a6xx: bump varyings limit

Compare with previous version

Rob Clark :speech_balloon:@robclark started a thread on an outdated change in commit 21555e0e 2 months ago
Resolved by Danylo Piliaiev 2 months ago
  • f5373253 - freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value and document it
  • 838e98f6 - freedreno/a6xx: bump varyings limit

Compare with previous version

  • 838e98f6...296d8662 - 278 commits from branch mesa:master
  • 234bcc6b - freedreno/a6xx: Fix assert which checks the count of shader outputs
  • 29847716 - ir3: Allow tesselation to use all 32 varying slots
  • da5714c5 - freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value and document it
  • 5cec9fea - freedreno/a6xx: bump varyings limit

Compare with previous version

Toggle commit list

I couldn't merge this branch: CI failed!

  • af2b978d - freedreno/a6xx: Fix assert which checks the count of shader outputs
  • a1d8a508 - ir3: Allow tesselation to use all 32 varying slots
  • 973f0608 - freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value and document it
  • dea74d31 - freedreno/a6xx: bump varyings limit

Compare with previous version

Toggle commit list
  • 4b208fa3 - freedreno/a6xx: Fix assert which checks the count of shader outputs
  • 22180137 - ir3: Allow tesselation to use all 32 varying slots
  • e5499ca2 - freedreno/a6xx: Fix SP_HS_UNKNOWN_A831 value and document it
  • 972e9ca2 - freedreno/a6xx: bump varyings limit

Compare with previous version

Toggle commit list
Please register or sign in to reply

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK