[4.1.3] WallSprites crash in software renderer

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [4.1.3] WallSprites crash in software renderer

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Sat Oct 05, 2019 1:58 pm

You're welcome. :)

Re: [4.1.3] WallSprites crash in software renderer

by Rachael » Sat Oct 05, 2019 12:50 pm

Thank you for that fix. :)

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Sat Oct 05, 2019 12:24 pm

I know but for me it was not obvious that that information was needed else i wouldn't have reverted it. Your post came too late else i'd have changed the PR.
The fact is now it doesn't crash and that was the objective, i looked at the original commit and found that information was missing so somewhow i recreated that part.

Re: [4.1.3] WallSprites crash in software renderer

by Rachael » Sat Oct 05, 2019 12:03 pm

We don't revert commits just because they say the wrong thing. Only if they actually cause major problems.

Needless to say, all that information was missing, and while you might say it didn't actually fix the crash, for me and Sanya it did, so obviously it did put in some necessary information, and did help to some extent.

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Sat Oct 05, 2019 11:44 am

Sorry, the description said it fixed the crash and it still crashed. Now it doesn't crash so i thought it was not needed.
First i reverted it to investigate the issue with a different approach.

Re: [4.1.3] WallSprites crash in software renderer

by Rachael » Sat Oct 05, 2019 11:26 am

Why'd you revert the previous commit? That was still passing information to the drawers, that is now ignored.

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Sat Oct 05, 2019 9:36 am

Seems it's fixed for real this time, just made a PR. https://github.com/coelckers/gzdoom/pull/947
It was again introduced in the refactoring started with "move visibility calculation to LightVisibility", this commit: "move more of the light calculation code to the drawerargs".

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Sat Oct 05, 2019 5:45 am

I've checked today's devbuild and as expected it crashes. The feature must have worked sometime as it was added in 2014 in "Q&D port of decal code to draw generic wall sprites". May be it was screwed after the floatification.

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Fri Oct 04, 2019 1:39 pm

They look very different. Wall of errors.

Re: [4.1.3] WallSprites crash in software renderer

by Rachael » Fri Oct 04, 2019 12:55 pm

What happens if you copy the entirety of the RenderSprite::Project function and dump it into RenderWallSprite::Project (and replace everything that's there)? Does it still crash?

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Fri Oct 04, 2019 12:43 pm

VS 2017 15.9.12 x64 RelWithDebInfo. navy3d.ipk3.

Re: [4.1.3] WallSprites crash in software renderer

by Rachael » Fri Oct 04, 2019 12:17 pm

No, it is not. What are you using to compile it? What are you using to test it?

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Fri Oct 04, 2019 11:47 am

Just updated the previous post. To clarify for me it still crashes in master. That trace is from the latest master, is it crashing for you?

Re: [4.1.3] WallSprites crash in software renderer

by Rachael » Fri Oct 04, 2019 11:44 am

In that case, then, check and make sure that all the information being passed to the drawer is correct. I would do a compare between the functions "RenderSprite::Project" and "RenderWallSprite::Project" - make sure both functions are functionally identical, other than the projection algorithms. In worst case scenario, simply disable wallsprites entirely and forward the function to RenderSprite::Project instead, at least to fix the crash until you can come up with a more comprehensive solution.

Re: [4.1.3] WallSprites crash in software renderer

by drfrag » Fri Oct 04, 2019 11:35 am

In the last step colormap is NULL:

Code: Select all

>	gzdoom.exe!swrenderer::RenderWallSprite::Render(swrenderer::RenderThread * thread, short * mfloorclip, short * mceilingclip, int __formal, int __formal, swrenderer::Fake3DTranslucent __formal) Line 242	C++

+		WallSpriteTile	0x000001fb41e36480 {mTexture=0x000001fb2bc51500 {mImage=0x000001fb30051dc0 {BitDepth=8 '\b' ColorType=...} } ...}	FSoftwareTexture *
-		drawerargs	{dc_dest=0x000001fb3c29fb55 "\x4\x4\a\a\a\a\x6\x6\x6\x5\x6\x5\x6\x4\x6\x6\x6\x6\x5\x4\x4\b\b\b\x6\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\a\a\b\b\b\b\b\b\b\b\b\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\a\a\b\b\b\b\b\b\b\b\b\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\b\b\b\b\b\b\b\b\b\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\b\b\b\a\a\a\a\a\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\b\b\b\a\a\a\a\a\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a... ...}	swrenderer::SpriteDrawerArgs
-		swrenderer::DrawerArgs	{mBaseColormap=0x0000000000000000 <NULL> mLight=18.2693996 mShade=1376256 ...}	swrenderer::DrawerArgs
+		mBaseColormap	0x0000000000000000 <NULL>	FSWColormap *
		mLight	18.2693996	float
		mShade	1376256	int
+		mTranslation	0x0000000000000000 <NULL>	unsigned char *
+		dc_dest	0x000001fb3c29fb55 "\x4\x4\a\a\a\a\x6\x6\x6\x5\x6\x5\x6\x4\x6\x6\x6\x6\x5\x4\x4\b\b\b\x6\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\a\a\b\b\b\b\b\b\b\b\b\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\a\a\b\b\b\b\b\b\b\b\b\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\b\b\b\b\b\b\b\b\b\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\b\b\b\a\a\a\a\a\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\b\b\b\a\a\a\a\a\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\x6\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a...	unsigned char *
		dc_dest_y	188	int
		dc_count	132	int
		dc_iscale	64079	int
		dc_texturefrac	2348	int
		dc_texturefracx	0	unsigned int
		dc_textureheight	129	unsigned int
+		dc_source	0x000001fb447bfd90 "ooooljjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj@jjjjjjjjjj@gggggggggggggggggggg@jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjggggooooljjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj@jjjjjjjjjj@ggggggggggg...	const unsigned char *
+		dc_source2	0x0000000000000000 <NULL>	const unsigned char *
		drawer_needs_pal_input	false	bool
+		dc_srcblend	0x0000000000000000 {???}	unsigned int *
+		dc_destblend	0x0000000000000000 {???}	unsigned int *
		dc_srcalpha	65536	int
		dc_destalpha	0	int
		dc_x	237	int
		dc_yl	188	int
		dc_yh	319	int
		dc_color	0	int
		dc_color_bgra	0	unsigned int
		dc_srccolor	0	unsigned int
		dc_srccolor_bgra	0	unsigned int
		dynlightcolor	0	unsigned int
		colfunc	0x00007ff66b0a89e4 {gzdoom.exe![thunk]:swrenderer::SWPixelFormatDrawers::`vcall'{72,{flat}}' }'}	void(swrenderer::SWPixelFormatDrawers::*)(const swrenderer::SpriteDrawerArgs &)
+		dc_viewport	0x000001fb35cabdf0 {WorldToView={Matrix=0x000001fb35cabdf0 {1.55134330e-06, 7.105e-43#DEN, 3.78815912e-07, ...} } ...}	swrenderer::RenderViewport *
+		mceilingclip	0x000001fb35c5ddf8 {0}	short *
+		mfloorclip	0x000001fb35c58038 {613}	short *
		sprflipvert	false	bool
+		this	0x000001fb42b68ce0 {wallc={tleft={X=-61.9186058 Y=94.7692413 } tright={X=-67.9553375 Y=105.006615 } ...} ...}	swrenderer::RenderWallSprite *
+		thread	0x000001fb35c57f90 {Scene=0x000001fb314a6538 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...} ...}	swrenderer::RenderThread *
+		translucentPass	0x000001fb34ca94a0 {Thread=0x000001fb35c57f90 {Scene=0x000001fb314a6538 {dontmaplines=false clearcolor=...} ...} ...}	swrenderer::RenderTranslucentPass *
+		walltexcoords	{VStep=0x00000049b70cf5c0 {0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, ...} ...}	swrenderer::ProjectedWallTexcoords
		x	237	int

>	gzdoom.exe!swrenderer::VisibleSprite::Render(swrenderer::RenderThread * thread, swrenderer::Fake3DTranslucent clip3DFloor) Line 507	C++

+		clip3DFloor	{clipBottom=false clipTop=false down2Up=false ...}	swrenderer::Fake3DTranslucent
+		clipbot	0x000001fb35c58038 {613}	short *
-		colormap	0x00007ff66b9545e8 {gzdoom.exe!FDynamicColormap NormalLight} {Maps=0x000001fb35533c30 "" Color={b=255 'ÿ' ...} ...}	FSWColormap *
+		Maps	0x000001fb35533c30 ""	unsigned char *
+		Color	{b=255 'ÿ' g=255 'ÿ' r=255 'ÿ' ...}	PalEntry
+		Fade	{b=0 '\0' g=0 '\0' r=0 '\0' ...}	PalEntry
		Desaturate	0	int
		minvoxely	0	int
+		this	0x000001fb42b68ce0 {wallc={tleft={X=-61.9186058 Y=94.7692413 } tright={X=-67.9553375 Y=105.006615 } ...} ...}	swrenderer::VisibleSprite * {swrenderer::RenderWallSprite}


Top