[WORKAROUND] corrupted graphics srally2 -new3d (Linux, r759)

Having technical difficulties with Supermodel? Last-minute wardrobe malfunction? Get help here.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

[WORKAROUND] corrupted graphics srally2 -new3d (Linux, r759)

Postby addamm » Mon Dec 24, 2018 4:33 am

Running srally2.zip with "-new3d" flag leads to graphics problem (no background / black background).

Game works fine with "-legacy3d" flag.

See terminal output:
Code: Select all
$ ./supermodel srally2.zip

0:110(14): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:111(14): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:112(14): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:113(14): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:116(5): warning: `p0q0' used uninitialized
0:116(14): warning: `p1q0' used uninitialized
0:116(35): warning: `p0q0' used uninitialized
0:117(5): warning: `p0q0' used uninitialized
0:117(14): warning: `p0q1' used uninitialized
0:117(35): warning: `p0q0' used uninitialized
0:119(14): warning: `p0q0' used uninitialized
0:120(14): warning: `p1q1' used uninitialized

error: linking with uncompiled/unspecialized shader


See screenshot:
Image



WORKAROUND by Bart:
Code: Select all
./supermodel -quad-rendering srally2.zip
Last edited by addamm on Thu Dec 27, 2018 5:02 am, edited 1 time in total.
archlinux@ryzen1700+rx550
User avatar
addamm
 
Posts: 9
Joined: Thu Dec 20, 2018 4:19 am
Location: over here!

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby Bart » Mon Dec 24, 2018 10:03 am

This one is for Ian. Can you post your error.log file when this happens?
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby addamm » Mon Dec 24, 2018 11:30 am

This one is for Ian.

Which?

error.log
Code: Select all
Supermodel v0.3a-WIP Error Log
------------------------------

Started as:
  argv[0] = ./supermodel
  argv[1] = roms/srally2.zip

Opened roms/srally2.zip.
srally2:
  banked_crom: stride=8, chunk size=2, byte swap=1
    mpr-20605.4, crc32=0x00513401, offset=0x00000000
    mpr-20605.3, crc32=0x99c5f396, offset=0x00000002
    mpr-20603.2, crc32=0xad0d8eb8, offset=0x00000004
    mpr-20602.1, crc32=0x60cfa72a, offset=0x00000006
    mpr-20609.8, crc32=0xc03cc0e5, offset=0x01000000
    mpr-20608.7, crc32=0x0c9b0571, offset=0x01000002
    mpr-20607.6, crc32=0x6da85aa3, offset=0x01000004
    mpr-20606.5, crc32=0x072498fd, offset=0x01000006
    mpr-20613.12, crc32=0x2938c0d9, offset=0x02000000
    mpr-20612.11, crc32=0x721a44b6, offset=0x02000002
    mpr-20611.10, crc32=0x5d9f8ba2, offset=0x02000004
    mpr-20610.9, crc32=0xb6e0ff4e, offset=0x02000006
  crom: stride=8, chunk size=2, byte swap=1
    epr-20635.20, crc32=0x7937473f, offset=0x00000000
    epr-20634.19, crc32=0x45a09245, offset=0x00000002
    epr-20633.18, crc32=0xf5a24f24, offset=0x00000004
    epr-20632.17, crc32=0x6829a801, offset=0x00000006
  driveboard_program: stride=1, chunk size=1, byte swap=0
    epr-20512.bin, crc32=0xcf64350d, offset=0x00000000
  mpeg_music: stride=1, chunk size=1, byte swap=0
    mpr-20637.57, crc32=0xd66e8a02, offset=0x00000000
    mpr-20638.58, crc32=0xd1513382, offset=0x00400000
    mpr-20639.59, crc32=0xf6603b7b, offset=0x00800000
    mpr-20640.60, crc32=0x9eea07b7, offset=0x00c00000
  mpeg_program: stride=1, chunk size=1, byte swap=1
    epr-20641.2, crc32=0xc9b82035, offset=0x00000000
  sound_program: stride=1, chunk size=1, byte swap=1
    epr-20636.21, crc32=0x7139ebf8, offset=0x00000000
  sound_samples: stride=1, chunk size=1, byte swap=1
    mpr-20614.22, crc32=0xa3930e4a, offset=0x00000000
    mpr-20615.24, crc32=0x62e8a94a, offset=0x00400000
  vrom: stride=32, chunk size=2, byte swap=0
    mpr-20616.26, crc32=0xe11dcf8b, offset=0x00000000
    mpr-20617.27, crc32=0x96acef3f, offset=0x00000002
    mpr-20618.28, crc32=0x6c281281, offset=0x00000004
    mpr-20619.29, crc32=0x0fa65819, offset=0x00000006
    mpr-20620.30, crc32=0xee79585f, offset=0x00000008
    mpr-20621.31, crc32=0x3a99148f, offset=0x0000000a
    mpr-20622.32, crc32=0x0618f056, offset=0x0000000c
    mpr-20623.33, crc32=0xccf31b85, offset=0x0000000e
    mpr-20624.34, crc32=0x90f30936, offset=0x00000010
    mpr-20625.35, crc32=0x04f804fa, offset=0x00000012
    mpr-20626.36, crc32=0x2d6c97d6, offset=0x00000014
    mpr-20627.37, crc32=0xa14ee871, offset=0x00000016
    mpr-20628.38, crc32=0xbba829a3, offset=0x00000018
    mpr-20629.39, crc32=0xead2eb31, offset=0x0000001a
    mpr-20630.40, crc32=0xcc5881b8, offset=0x0000001c
    mpr-20631.41, crc32=0x5cb69ffd, offset=0x0000001e
Runtime configuration:
  GameXMLFile=Config/Games.xml
  InitStateFile=
  MultiThreaded=1
  GPUMultiThreaded=1
  PowerPCFrequency=50
  MultiTexture=0
  VertexShader=
  FragmentShader=
  VertexShaderFog=
  FragmentShaderFog=
  VertexShader2D=
  FragmentShader2D=
  EmulateSound=1
  Balance=0
  EmulateDSB=1
  SoundVolume=100
  MusicVolume=100
  New3DEngine=1
  QuadRendering=0
  XResolution=496
  YResolution=384
  FullScreen=0
  WideScreen=0
  Stretch=0
  VSync=1
  Throttle=1
  ShowFrameRate=0
  Crosshairs=0
  FlipStereo=0
  InputSystem=sdl
  Outputs=none
  EmulateNet=0
  port_in=1970
  port_out=1971
  addr_out=127.0.0.1
  InputStart1=KEY_1,JOY1_BUTTON9
  InputStart2=KEY_2,JOY2_BUTTON9
  InputCoin1=KEY_3,JOY1_BUTTON10
  InputCoin2=KEY_4,JOY2_BUTTON10
  InputServiceA=KEY_5
  InputServiceB=KEY_7
  InputTestA=KEY_6
  InputTestB=KEY_8
  InputJoyUp=KEY_UP,JOY1_UP
  InputJoyDown=KEY_DOWN,JOY1_DOWN
  InputJoyLeft=KEY_LEFT,JOY1_LEFT
  InputJoyRight=KEY_RIGHT,JOY1_RIGHT
  InputJoyUp2=JOY2_UP
  InputJoyDown2=JOY2_DOWN
  InputJoyLeft2=JOY2_LEFT
  InputJoyRight2=JOY2_RIGHT
  InputPunch=KEY_A,JOY1_BUTTON1
  InputKick=KEY_S,JOY1_BUTTON2
  InputGuard=KEY_D,JOY1_BUTTON3
  InputEscape=KEY_F,JOY1_BUTTON4
  InputPunch2=JOY2_BUTTON1
  InputKick2=JOY2_BUTTON2
  InputGuard2=JOY2_BUTTON3
  InputEscape2=JOY2_BUTTON4
  InputShift=KEY_A,JOY1_BUTTON1
  InputBeat=KEY_S,JOY1_BUTTON2
  InputCharge=KEY_D,JOY1_BUTTON3
  InputJump=KEY_F,JOY1_BUTTON4
  InputShortPass=KEY_A,JOY1_BUTTON1
  InputLongPass=KEY_S,JOY1_BUTTON2
  InputShoot=KEY_D,JOY1_BUTTON3
  InputShortPass2=JOY2_BUTTON1
  InputLongPass2=JOY2_BUTTON2
  InputShoot2=JOY2_BUTTON3
  InputSteeringLeft=KEY_LEFT
  InputSteeringRight=KEY_RIGHT
  InputSteering=JOY1_XAXIS
  InputAccelerator=KEY_UP,JOY1_UP
  InputBrake=KEY_DOWN,JOY1_DOWN
  InputGearShiftUp=KEY_Y
  InputGearShiftDown=KEY_H
  InputGearShift1=KEY_Q,JOY1_BUTTON5
  InputGearShift2=KEY_W,JOY1_BUTTON6
  InputGearShift3=KEY_E,JOY1_BUTTON7
  InputGearShift4=KEY_R,JOY1_BUTTON8
  InputGearShiftN=KEY_T
  InputVR1=KEY_A,JOY1_BUTTON1
  InputVR2=KEY_S,JOY1_BUTTON2
  InputVR3=KEY_D,JOY1_BUTTON3
  InputVR4=KEY_F,JOY1_BUTTON4
  InputViewChange=KEY_A,JOY1_BUTTON1
  InputHandBrake=KEY_S,JOY1_BUTTON2
  InputRearBrake=KEY_S,JOY1_BUTTON2
  InputMusicSelect=KEY_D,JOY1_BUTTON3
  InputTwinJoyTurnLeft=KEY_Q,JOY1_RXAXIS_NEG
  InputTwinJoyTurnRight=KEY_W,JOY1_RXAXIS_POS
  InputTwinJoyForward=KEY_UP,JOY1_YAXIS_NEG
  InputTwinJoyReverse=KEY_DOWN,JOY1_YAXIS_POS
  InputTwinJoyStrafeLeft=KEY_LEFT,JOY1_XAXIS_NEG
  InputTwinJoyStrafeRight=KEY_RIGHT,JOY1_XAXIS_POS
  InputTwinJoyJump=KEY_E,JOY1_BUTTON1
  InputTwinJoyCrouch=KEY_R,JOY1_BUTTON2
  InputTwinJoyLeft1=NONE
  InputTwinJoyLeft2=NONE
  InputTwinJoyRight1=NONE
  InputTwinJoyRight2=NONE
  InputTwinJoyUp1=NONE
  InputTwinJoyUp2=NONE
  InputTwinJoyDown1=NONE
  InputTwinJoyDown2=NONE
  InputTwinJoyShot1=KEY_A,JOY1_BUTTON5
  InputTwinJoyShot2=KEY_S,JOY1_BUTTON6
  InputTwinJoyTurbo1=KEY_Z,JOY1_BUTTON7
  InputTwinJoyTurbo2=KEY_X,JOY1_BUTTON8
  InputAnalogJoyLeft=KEY_LEFT
  InputAnalogJoyRight=KEY_RIGHT
  InputAnalogJoyUp=KEY_UP
  InputAnalogJoyDown=KEY_DOWN
  InputAnalogJoyX=JOY_XAXIS,MOUSE_XAXIS
  InputAnalogJoyY=JOY_YAXIS,MOUSE_YAXIS
  InputAnalogJoyTrigger=KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON
  InputAnalogJoyEvent=KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON
  InputAnalogJoyTrigger2=KEY_D,JOY_BUTTON2
  InputAnalogJoyEvent2=NONE
  InputGunLeft=KEY_LEFT
  InputGunRight=KEY_RIGHT
  InputGunUp=KEY_UP
  InputGunDown=KEY_DOWN
  InputGunX=MOUSE_XAXIS,JOY1_XAXIS
  InputGunY=MOUSE_YAXIS,JOY1_YAXIS
  InputTrigger=KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON
  InputOffscreen=KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON
  InputAutoTrigger=0
  InputGunLeft2=NONE
  InputGunRight2=NONE
  InputGunUp2=NONE
  InputGunDown2=NONE
  InputGunX2=JOY2_XAXIS
  InputGunY2=JOY2_YAXIS
  InputTrigger2=JOY2_BUTTON1
  InputOffscreen2=JOY2_BUTTON2
  InputAutoTrigger2=0
  InputAnalogGunLeft=KEY_LEFT
  InputAnalogGunRight=KEY_RIGHT
  InputAnalogGunUp=KEY_UP
  InputAnalogGunDown=KEY_DOWN
  InputAnalogGunX=MOUSE_XAXIS,JOY1_XAXIS
  InputAnalogGunY=MOUSE_YAXIS,JOY1_YAXIS
  InputAnalogTriggerLeft=KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON
  InputAnalogTriggerRight=KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON
  InputAnalogGunLeft2=NONE
  InputAnalogGunRight2=NONE
  InputAnalogGunUp2=NONE
  InputAnalogGunDown2=NONE
  InputAnalogGunX2=NONE
  InputAnalogGunY2=NONE
  InputAnalogTriggerLeft2=NONE
  InputAnalogTriggerRight2=NONE
  InputSkiLeft=KEY_LEFT
  InputSkiRight=KEY_RIGHT
  InputSkiUp=KEY_UP
  InputSkiDown=KEY_DOWN
  InputSkiX=JOY1_XAXIS
  InputSkiY=JOY1_YAXIS
  InputSkiPollLeft=KEY_A,JOY1_BUTTON1
  InputSkiPollRight=KEY_S,JOY1_BUTTON2
  InputSkiSelect1=KEY_Q,JOY1_BUTTON3
  InputSkiSelect2=KEY_W,JOY1_BUTTON4
  InputSkiSelect3=KEY_E,JOY1_BUTTON5
  InputMagicalLeverUp1=KEY_UP
  InputMagicalLeverDown1=KEY_DOWN
  InputMagicalLeverUp2=NONE
  InputMagicalLeverDown2=NONE
  InputMagicalLever1=JOY1_YAXIS
  InputMagicalLever2=JOY2_YAXIS
  InputMagicalPedal1=KEY_A,JOY1_BUTTON1
  InputMagicalPedal2=KEY_S,JOY2_BUTTON1
  InputFishingRodLeft=KEY_LEFT
  InputFishingRodRight=KEY_RIGHT
  InputFishingRodUp=KEY_UP
  InputFishingRodDown=KEY_DOWN
  InputFishingStickLeft=KEY_A
  InputFishingStickRight=KEY_D
  InputFishingStickUp=KEY_W
  InputFishingStickDown=KEY_S
  InputFishingRodX=JOY1_XAXIS
  InputFishingRodY=JOY1_YAXIS
  InputFishingStickX=JOY1_RXAXIS
  InputFishingStickY=JOY1_RYAXIS
  InputFishingReel=KEY_SPACE,JOY1_ZAXIS_POS
  InputFishingCast=KEY_Z,JOY1_BUTTON1
  InputFishingSelect=KEY_X,JOY1_BUTTON2

OpenGL information:
  Vendor                   : X.Org
  Renderer                 : Radeon RX 550 Series (POLARIS12, DRM 3.27.0, 4.19.11-arch1-1-ARCH, LLVM 7.0.0)
  Version                  : 4.5 (Compatibility Profile) Mesa 18.3.1
  Shading Language Version : 4.50
  Maximum Vertex Array Size: 3000 vertices
  Maximum Texture Size     : 16384 texels
  Maximum Vertex Attributes: 16
  Maximum Vertex Uniforms  : 16384
  Maximum Texture Img Units: 32

Audio device information:
    Frequency: 44100
     Channels: 2
Sample Format: 32784

Program terminated normally.
archlinux@ryzen1700+rx550
User avatar
addamm
 
Posts: 9
Joined: Thu Dec 20, 2018 4:19 am
Location: over here!

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby Ian » Tue Dec 25, 2018 8:11 am

That's a bug in your driver. The shaders are specified as 1.2 which means texture2DLod should exist
These methods were depreciated in later opengl versions, and became just textureLod

You can try just removing the 2d and recompiling .. if you can compile it yourself.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby addamm » Tue Dec 25, 2018 8:42 am

Ian wrote:You can try just removing the 2d and recompiling .. if you can compile it yourself.

Hey Ian!

I don't know what you are talking about, I don't know how to do that neither what to do at all! :P :oops:

See if I understood correctly... You are telling me that my driver has been written for using deprecated technology (texture2DLod) and in 2018 it should use textureLod.
Am I right?

What is removing the 2d and recompiling? :shock:
Maybe if you'd like to explain me I could recompile... :P You mean I should recompile mesa drivers?

... I'm a bit afraid :lol: :mrgreen:
archlinux@ryzen1700+rx550
User avatar
addamm
 
Posts: 9
Joined: Thu Dec 20, 2018 4:19 am
Location: over here!

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby Ian » Tue Dec 25, 2018 8:50 am

The driver should support the function texture2DLod
but it does not, for reasons unknown
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby addamm » Tue Dec 25, 2018 8:59 am

Mmmh... Who should I file a bug to?
AMD? Mesa? Xorg? Arch Linux?

I can point you some infos here.
They say:
Install the mesa package, which provides the DRI driver for 3D acceleration.

Or:
For Vulkan support, install the vulkan-radeon package.
archlinux@ryzen1700+rx550
User avatar
addamm
 
Posts: 9
Joined: Thu Dec 20, 2018 4:19 am
Location: over here!

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby Ian » Wed Dec 26, 2018 4:14 am

either AMD or Mesa, who ever makes the driver
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby Bart » Wed Dec 26, 2018 9:38 pm

addamm wrote:What is removing the 2d and recompiling? :shock:
Maybe if you'd like to explain me I could recompile... :P You mean I should recompile mesa drivers?

... I'm a bit afraid :lol: :mrgreen:


I notice that Ian doesn't use texture2DLod() in the quad shader. Try running Supermodel with "-new3d -quad-rendering". Does it work? If performance with quad rendering is a problem and you want to use triangle rendering, you can attempt to recompile Supermodel with the change Ian mentioned and see if it helps. To do this:

1. Open up Src/Graphics/New3D/R3DShaderTriangles.h
2. Replace all occurrences of "texture2DLod" with "textureLod" (there are 4 of them beginning on line 159).
3. Re-compile Supermodel as you did before (i.e., run "make").

It doesn't seem Ian's rendering engine supports loading external shader files anymore. We should probably fix that at some point so -frag-shader works with it.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: corrupted graphics srally2 -new3d (Linux, r759)

Postby addamm » Thu Dec 27, 2018 4:58 am

Bart wrote:
addamm wrote:What is removing the 2d and recompiling? :shock:
Maybe if you'd like to explain me I could recompile... :P You mean I should recompile mesa drivers?

... I'm a bit afraid :lol: :mrgreen:


I notice that Ian doesn't use texture2DLod() in the quad shader. Try running Supermodel with "-new3d -quad-rendering". Does it work? If performance with quad rendering is a problem and you want to use triangle rendering, you can attempt to recompile Supermodel with the change Ian mentioned and see if it helps. To do this:

1. Open up Src/Graphics/New3D/R3DShaderTriangles.h
2. Replace all occurrences of "texture2DLod" with "textureLod" (there are 4 of them beginning on line 159).
3. Re-compile Supermodel as you did before (i.e., run "make").

It doesn't seem Ian's rendering engine supports loading external shader files anymore. We should probably fix that at some point so -frag-shader works with it.

No performance issues with my specs.
Works flawlessly! Thanks Bart! 8-)



Bart wrote:1. Open up Src/Graphics/New3D/R3DShaderTriangles.h
2. Replace all occurrences of "texture2DLod" with "textureLod" (there are 4 of them beginning on line 159).
3. Re-compile Supermodel as you did before (i.e., run "make").

If replacing "texture2DLod" with "textureLod", still no background neither 3D as my first post.
Code: Select all
$ cat Src/Graphics/New3D/R3DShaderTriangles.h | grep textureLod

    vec4 p0q0 = textureLod(texSampler, vec2(tx[0],ty[0]), level);
vec4 p1q0 = textureLod(texSampler, vec2(tx[1],ty[0]), level);
vec4 p0q1 = textureLod(texSampler, vec2(tx[0],ty[1]), level);
vec4 p1q1 = textureLod(texSampler, vec2(tx[1],ty[1]), level);
archlinux@ryzen1700+rx550
User avatar
addamm
 
Posts: 9
Joined: Thu Dec 20, 2018 4:19 am
Location: over here!

Next

Return to The Fitting Room

Who is online

Users browsing this forum: No registered users and 1 guest