ARM-software / patrace

MIT License
71 stars 37 forks source link

requires extension GL_OES_EGL_image_external_essl3 to be enabled #52

Closed BuryFlowers closed 1 year ago

BuryFlowers commented 1 year ago

When I tried to trace "Honkai: Star Rail", the shader compilation error "requires extension GL_OES_EGL_image_external_essl3 to be enabled" occurred.

I checked the code, found GL_OES_EGL_image_external_essl3 has already been written in gl2ext.h.

Is it a compatibility problem or did I make a mistake on setting?

Here is the log:

07-03 11:36:45.446 11381 11456 I patrace64: egltrace.cpp,2132: PaTrace init version: r4p3 dev unofficial 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,41: ErrorOutOnBinaryShaders: true 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,42: MaximumAnisotropicFiltering: 0 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,43: EnableErrorCheck: true 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,44: EnableActiveAttribCheck: true 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,45: InteractiveIntercept: false 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,46: FlushTraceFileEveryFrame: true 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,47: DisableBufferStorage: false 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,48: RendererName: 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,49: EnableRandomVersion: true 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,50: CloseTraceFileByTerminate: false 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,52: DisableErrorReporting: true 07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,61: FilterSupportedExtension false 07-03 11:36:45.454 11381 11456 I patrace64: gleslayer_helper.cpp,1258: layer_init_netx_proc_address called with layer(patraceLayer) layer_id 0xb400007b7b45ea40 get_next_layer_proc_address 0x7d7e05e038, pid(11381) 07-03 11:36:45.454 11381 11456 I patrace64: egltrace_auto.cpp,54424: layer_init_intercept_map called. 07-03 11:36:45.458 11381 11456 I patrace64: Current process: com.miHoYo.hkrpg (11381) 07-03 11:36:45.458 11381 11456 I patrace64: Current process: com.miHoYo.hkrpg (11381) 07-03 11:36:45.458 11381 11456 I patrace64: egltrace.cpp,147: The trace file name is : /data/apitrace/com.miHoYo.hkrpg/com.miHoYo.hkrpg.3.pat 07-03 11:36:45.458 11381 11456 I patrace64: out_file.cpp,60: Successfully open file /data/apitrace/com.miHoYo.hkrpg/com.miHoYo.hkrpg.3.pat 07-03 11:36:45.459 11381 11456 I patrace64: out_file.cpp,74: json file end calculated correctly, endoffs: 524288 07-03 11:36:45.468 11381 11456 I patrace64: egltrace_auto.cpp,46511: eglDestroyContext called (implies flush to disk) 07-03 11:36:45.470 11381 11456 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080 07-03 11:36:45.473 11381 11456 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256 07-03 11:36:45.637 11381 11456 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080 07-03 11:36:48.171 11381 11456 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080 07-03 11:36:56.014 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07b80 does not exist! 07-03 11:36:56.022 11381 11961 I patrace64: egltrace_auto.cpp,46511: eglDestroyContext called (implies flush to disk) 07-03 11:36:56.025 11381 11961 I patrace64: egltrace.cpp,1443: Error: EGLSurface 0xb400007ac5f07b80 doesn't exist! 07-03 11:36:56.037 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist! 07-03 11:36:56.049 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x821E 07-03 11:36:56.130 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC 07-03 11:36:56.130 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256 07-03 11:36:56.143 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC 07-03 11:36:56.143 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256 07-03 11:36:56.361 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist! 07-03 11:36:56.361 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC 07-03 11:36:56.361 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256 07-03 11:36:56.369 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC 07-03 11:36:56.370 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256 07-03 11:36:56.552 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC 07-03 11:36:56.552 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256 07-03 11:36:56.695 11381 12132 I patrace64: egltrace.cpp,1073: Warning: EGLSurface is EGL_NO_SURFACE! 07-03 11:36:56.695 11381 12132 I patrace64: egltrace_auto.cpp,32782: Invalid index 116 to extension list! Max is 116. 07-03 11:36:56.695 11381 12132 I patrace64: egltrace_auto.cpp,32782: Invalid index 117 to extension list! Max is 116. 07-03 11:36:56.701 11381 12132 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080 07-03 11:36:56.731 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call 07-03 11:36:56.738 11381 12132 I patrace64: gleslayer_helper.cpp,22: dispatch_intercept_func(glBindFragDataLocationEXT): Not support to trace proc glBindFragDataLocationEXT, and calling from next layer. 07-03 11:36:56.741 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call 07-03 11:36:56.744 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call 07-03 11:36:56.747 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call 07-03 11:36:56.796 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist! 07-03 11:36:56.797 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist! 07-03 11:36:56.797 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist! 07-03 11:36:56.797 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist! 07-03 11:37:15.950 11381 12132 I patrace64: gleslayer_helper.cpp,22: dispatch_intercept_func(eglGetNativeClientBufferANDROID): Not support to trace proc eglGetNativeClientBufferANDROID, and calling from next layer. 07-03 11:37:15.962 11381 12132 I patrace64: shaderutility.cpp,16: texture_external_image fragment shader compilation information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled 07-03 11:37:15.962 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated. 07-03 11:37:15.962 11381 12132 I patrace64: 07-03 11:37:15.962 11381 12132 I patrace64: 07-03 11:37:15.962 11381 12132 I patrace64: shaderutility.cpp,34: shader program texture_external_image shader's linking information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled 07-03 11:37:15.962 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated. 07-03 11:37:15.962 11381 12132 I patrace64: 07-03 11:37:15.962 11381 12132 I patrace64: 07-03 11:37:15.962 11381 12132 I patrace64: shaderutility.cpp,44: unifor parameter u_Texture hasn't been defined. 07-03 11:37:15.982 11381 12132 I patrace64: shaderutility.cpp,16: texture_external_image fragment shader compilation information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled 07-03 11:37:15.982 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated. 07-03 11:37:15.982 11381 12132 I patrace64: 07-03 11:37:15.982 11381 12132 I patrace64: 07-03 11:37:15.982 11381 12132 I patrace64: shaderutility.cpp,34: shader program texture_external_image shader's linking information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled 07-03 11:37:15.982 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated. 07-03 11:37:15.982 11381 12132 I patrace64: 07-03 11:37:15.982 11381 12132 I patrace64: 07-03 11:37:15.982 11381 12132 I patrace64: shaderutility.cpp,44: unifor parameter u_Texture hasn't been defined. 07-03 11:37:16.022 11381 12132 I patrace64: egltrace.cpp,1073: Warning: EGLSurface is EGL_NO_SURFACE!

per-mathisen-arm commented 1 year ago

This could also be happening during a normal run, and you just wouldn't see it. Does the trace otherwise work fine?

per-mathisen-arm commented 1 year ago

Also, can you please try with the latest release of patrace pushed to github today?

BuryFlowers commented 1 year ago

I found the error is in the shader of "eglsize.cpp" from line 238 to line 245.

I changed the extension from "GL_OES_EGL_image_external" to "GL_OES_EGL_image_external_essl3", then the compilation succeed.

per-mathisen-arm commented 1 year ago

Thanks a lot! We'll put this into the next release :-)