andrei-drexler / ironwail

High-performance QuakeSpasm fork
GNU General Public License v2.0
546 stars 50 forks source link

error linking cull/mark program. Out of resource error. #108

Closed lukazumi closed 2 years ago

lukazumi commented 2 years ago

Trying to run on Win10x64, with i5-5220u (intel hd5500), and receive this error. I have copied ID1 from my quake installation (GOG). Any ideas what the cause of this error is?

andrei-drexler commented 2 years ago

It's a bug in the driver's shader compiler. I've added a work-around in commit https://github.com/andrei-drexler/ironwail/commit/1771e012d57c4975bf75acbe72169841c03859a0.

andrey-budko commented 2 years ago

@andrei-drexler, for some reason my Intel HD Graphics 4600 still does not like cull_mark_compute_shader.

Error compiling cull/mark compute shader : ERROR: 1:120: ')' : syntax error syntax error

The only way I was able to fix this is replacing SURF_FRAMECOUNT, SURF_TEXNUM, SURF_NUMEDGES, SURF_FIRSTVERT and CMD_FIRST_INDEX defines with its content.

https://pastebin.com/WmfWCZb9

Now ironwail compiles and runs fine on that old hardware.

andrei-drexler commented 2 years ago

Thanks for letting me know, @andrey-budko. The strange part is that the GPU I tested this fix on is an HD Graphics 4400, and I would've expected a 4600 to share the same bugs... I'm wondering if the comments in the SIZEOF_CMD/SIZEOF_SURFACE macros are triggering this, though - could you please try the current code but without those comments? I'd really like to avoid making the shader any less readable than it already is, if possible.

andrey-budko commented 2 years ago
-"#define SIZEOF_CMD                                    5 // uints\n"
+"#define SIZEOF_CMD                                    5\n"

-"#define SIZEOF_SURFACE                                2 // uvec4s\n"
+"#define SIZEOF_SURFACE                                2\n"

same error, unfortunately

andrei-drexler commented 2 years ago

Ah, that's unfortunate, thanks for trying, though! Maybe replacing uint(base) with just base in the CMD/SURF* macros might do the trick?

andrey-budko commented 2 years ago

No, it does not. But looks like I found the solution. Removing 'u' suffix does help.

https://pastebin.com/YYtmdX7d

It's hard to understand, why 'u' suffix works just fine directly from the code, but does not from #define..

andrei-drexler commented 2 years ago

Great, thanks! Hopefully https://github.com/andrei-drexler/ironwail/commit/ba3a6dd2ae993e1b6dd49d913e0859210554f7b6 is the end of it.

lukazumi commented 2 years ago

Do you have an idea when this will be in a new release? Looking forward to trying this engine!

Tanks!

Sent from Outlookhttp://aka.ms/weboutlook


From: Andrei Drexler @.> Sent: Saturday, 23 July 2022 1:29 AM To: andrei-drexler/ironwail @.> Cc: lukazumi @.>; Author @.> Subject: Re: [andrei-drexler/ironwail] error linking cull/mark program. Out of resource error. (Issue #108)

Great, thanks! Hopefully ba3a6ddhttps://github.com/andrei-drexler/ironwail/commit/ba3a6dd2ae993e1b6dd49d913e0859210554f7b6 is the end of it.

— Reply to this email directly, view it on GitHubhttps://github.com/andrei-drexler/ironwail/issues/108#issuecomment-1192744806, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVNBN6YZVSZIMWVJN5QBZTVVLD5ZANCNFSM53Y6L4UQ. You are receiving this because you authored the thread.Message ID: @.***>

andrei-drexler commented 2 years ago

Probably in a few weeks, maybe a bit more, there are still some things I'd like to finish. I can make a build with the latest code if you want to test it, though.

lukazumi commented 2 years ago

I will wait for the next build, thanks for the offer though.

Thank you!

Sent from Outlookhttp://aka.ms/weboutlook


From: Andrei Drexler @.> Sent: Saturday, 6 August 2022 9:43 PM To: andrei-drexler/ironwail @.> Cc: lukazumi @.>; Author @.> Subject: Re: [andrei-drexler/ironwail] error linking cull/mark program. Out of resource error. (Issue #108)

Probably in a few weeks, maybe a bit more, there are still some things I'd like to finish. I can make a build with the latest code if you want to test it, though.

— Reply to this email directly, view it on GitHubhttps://github.com/andrei-drexler/ironwail/issues/108#issuecomment-1207208241, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVNBN7GXD33YY4CQWCJM7TVXZMYNANCNFSM53Y6L4UQ. You are receiving this because you authored the thread.Message ID: @.***>

Mhbuur commented 1 year ago

I'm having the same problem with 0.6.0 and a HD Graphics 4600. @andrei-drexler Is there a build available with this fix somewhere?