anchor
Forum Replies Created
-
AuthorPosts
-
2015-11-06 at 9:46 am in reply to: [***MetalGL ERROR***] GL_INVALID_OPERATION. glTexParameteri() #753
yes, everything is rendered with horde3d. i captured gpu frames, but i dont know what should i see.
uploaded them to: gpu capture
some transparent 3d mesh also not rendered, or invisible.EDIT1: the gpu capture made in debug mode, and with options showed above.
EDIT2: i tried to capture one original es2 frame without MetalGL, and it looks somehow totally different.
2015-11-06 at 4:41 am in reply to: [***MetalGL ERROR***] GL_INVALID_OPERATION. glTexParameteri() #749thanks for the explanation, now our app is cooperating with MetalGL. unfortunately the 2D overlays are not showing at all, only the 3D part.
so we have no buttons / texts / gui-screens. the only 2D thing is the blinking MetalGL logo 🙂NOTE: as i see 2bpp pvr textures loaded and rendered fine. so it is supported somehow 🙂
debug output about shader conversion:
[mgl-info] Converting GLSL: #version 100 uniform mat4 viewProjMat; uniform mat4 worldMat; attribute vec3 vertPos; void main() { gl_Position = viewProjMat * worldMat * vec4( vertPos, 1.0 ); } End GLSL [mgl-info] Converted MSL: #include <metal_stdlib> using namespace metal; struct xlatMtlShaderInput { float3 vertPos [[attribute(0)]]; }; struct xlatMtlShaderOutput { float4 gl_Position [[position]]; }; struct xlatMtlShaderUniform { float4x4 viewProjMat; float4x4 worldMat; }; vertex xlatMtlShaderOutput VertexShader1 (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]) { xlatMtlShaderOutput _mtl_o; float4 tmpvar_1; tmpvar_1.w = 1.0; tmpvar_1.xyz = _mtl_i.vertPos; _mtl_o.gl_Position = ((_mtl_u.viewProjMat * _mtl_u.worldMat) * tmpvar_1); return _mtl_o; } End MSL [mgl-info] Converting GLSL: #version 100 uniform vec4 color; void main() { gl_FragColor = color; } End GLSL [mgl-info] Converted MSL: #include <metal_stdlib> using namespace metal; struct xlatMtlShaderInput { }; struct xlatMtlShaderOutput { half4 gl_FragColor; }; struct xlatMtlShaderUniform { float4 color; }; fragment xlatMtlShaderOutput FragmentShader2 (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]) { xlatMtlShaderOutput _mtl_o; _mtl_o.gl_FragColor = half4(_mtl_u.color); return _mtl_o; } End MSL [mgl-info] Converting GLSL: #version 100 uniform mat4 projMat; attribute vec2 vertPos; attribute vec2 texCoords0; varying vec2 texCoords; void main( void ) { texCoords = vec2( texCoords0.s, -texCoords0.t ); gl_Position = projMat * vec4( vertPos.x, vertPos.y, 1, 1 ); } End GLSL [mgl-info] Converted MSL: #include <metal_stdlib> using namespace metal; struct xlatMtlShaderInput { float2 vertPos [[attribute(0)]]; float2 texCoords0 [[attribute(1)]]; }; struct xlatMtlShaderOutput { float4 gl_Position [[position]]; float2 texCoords; }; struct xlatMtlShaderUniform { float4x4 projMat; }; vertex xlatMtlShaderOutput VertexShader3 (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]) { xlatMtlShaderOutput _mtl_o; float2 tmpvar_1; tmpvar_1.x = _mtl_i.texCoords0.x; tmpvar_1.y = -(_mtl_i.texCoords0.y); _mtl_o.texCoords = tmpvar_1; float4 tmpvar_2; tmpvar_2.zw = float2(1.0, 1.0); tmpvar_2.xy = _mtl_i.vertPos; _mtl_o.gl_Position = (_mtl_u.projMat * tmpvar_2); return _mtl_o; } End MSL [mgl-info] Converting GLSL: #version 100 uniform vec4 olayColor; uniform sampler2D albedoMap; #ifdef _F01_ uniform sampler2D aiMap; #endif varying vec2 texCoords; void main( void ) { vec4 albedo = texture2D( albedoMap, texCoords ); gl_FragColor = albedo * olayColor; #ifdef _F01_ vec4 aicolor = texture2D( aiMap, vec2(texCoords.s,texCoords.t) ); gl_FragColor.rgb *= aicolor.a; #endif } End GLSL [mgl-info] Converted MSL: #include <metal_stdlib> using namespace metal; struct xlatMtlShaderInput { float2 texCoords; }; struct xlatMtlShaderOutput { half4 gl_FragColor; }; struct xlatMtlShaderUniform { float4 olayColor; }; fragment xlatMtlShaderOutput FragmentShader4 (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] , texture2d<half> albedoMap [[texture(0)]], sampler _mtlsmp_albedoMap [[sampler(0)]]) { xlatMtlShaderOutput _mtl_o; half4 tmpvar_1; tmpvar_1 = albedoMap.sample(_mtlsmp_albedoMap, (float2)(_mtl_i.texCoords.x, (1.0 - _mtl_i.texCoords.y))); _mtl_o.gl_FragColor = ((half4)((float4)tmpvar_1 * _mtl_u.olayColor)); return _mtl_o; } End MSL
2015-11-05 at 4:47 pm in reply to: [***MetalGL ERROR***] GL_INVALID_OPERATION. glTexParameteri() #747hello Bill, thanks for the quick reply.
yes, the first log is coming from release build. the second one from debug version is just one line.
horde3d compiled by source, not as lib. shadow feature is not used, and i commented out its setup in horde3d, but the crash still occurs.
xcode cant help to determine where, so i grabbed the crash log from the device:Hardware Model: iPad4,5 Process: IronWar_MetalGL [705] Path: /private/var/mobile/Containers/Bundle/Application/747D5775-1364-439E-8DC8-3731A00A8436/IronWar_MetalGL.app/IronWar_MetalGL Identifier: com.herocraft.ironwar Version: 0.0.27 (0.0.27) Code Type: ARM-64 (Native) Parent Process: launchd [1] Date/Time: 2015-11-05 17:41:07.07 +0100 Launch Time: 2015-11-05 17:40:59.59 +0100 OS Version: iOS 9.1 (13B143) Report Version: 105 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Subtype: KERN_PROTECTION_FAILURE at 0x0000000155e57710 Triggered by Thread: 0 Filtered syslog: None found Breadcrumb Trail: (reverse chronological seconds) 0 GC Framework: startAuthenticationForExistingPrimaryPlayer Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 ??? 0x0000000155e57710 0 + 5736068880 1 GLKit 0x0000000185511030 0x1854f0000 + 135216 2 GLKit 0x0000000185511294 0x1854f0000 + 135828 3 QuartzCore 0x00000001891d74d8 0x1891b0000 + 160984 4 QuartzCore 0x00000001891b9944 0x1891b0000 + 39236 5 QuartzCore 0x00000001891b9630 0x1891b0000 + 38448 6 QuartzCore 0x00000001891b8cc0 0x1891b0000 + 36032 7 QuartzCore 0x00000001891b8a08 0x1891b0000 + 35336 8 QuartzCore 0x00000001891b20f8 0x1891b0000 + 8440 9 CoreFoundation 0x00000001843e7bd0 0x18430c000 + 900048 10 CoreFoundation 0x00000001843e5974 0x18430c000 + 891252 11 CoreFoundation 0x0000000184314cc0 0x18430c000 + 36032 12 UIKit 0x0000000189a321c8 0x1899ac000 + 549320 13 UIKit 0x0000000189a2cffc 0x1899ac000 + 528380 14 IronWar_MetalGL 0x00000001000bdb80 0x1000b8000 + 23424 15 libdyld.dylib 0x00000001999a28b8 0x1999a0000 + 10424
in release build no DEBUG is defined, and im not used the mentioned metal debug flags.
yes, in debug mode only armv7 version generated, that is why i see 32bit version.
if i generating only 32bit version in release mode, it is also working fine. this crash
happening only with 64bit version. alas i did not see any fps increase with MetalGL in 32 bit release build.
maybe Metal available only with 64bit? because debug 64bit also crashes before the first update callNOTE: i read about 2bpp pvrtc textures in another thread. we use many 2bpp pvrtc textures 🙂
thanks 😉
-
AuthorPosts