gpt4 book ai didi

android - ZTE Android 版本 4.0.4 上的着色器损坏

转载 作者:搜寻专家 更新时间:2023-11-01 08:55:43 25 4
gpt4 key购买 nike

我在编译着色器时遇到了这个烦人的问题,该着色器已经在数十个设备上编译但不是在 1 或 2 个特定设备上编译

我正在尝试使用以下方式加载 fragment 着色器:

 GLES20.glShaderSource(shader, source);

但是我一直在使用日志崩溃:

glCompileShader Fatal signal 11 (SIGSEGV) at 0x3412d01

我虽然 GLSL 版本在编译着色器时可能有问题,但通过查看它的版本,我发现具有相同 GLSL 版本的其他设备已成功编译它。

OpenGL 驱动程序详细信息中的错误是:

中兴4.0.4

GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 1.00
GL_VENDOR: Qualcomm
GL_RENDERER: Adreno (TM) 200
GL_EXTENSIONS:
GL_AMD_compressed_ATC_texture
GL_AMD_performance_monitor
GL_AMD_program_binary_Z400
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_type_2_10_10_10_REV
GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture
GL_OES_depth_texture
GL_OES_depth24
GL_OES_EGL_image GL_OES_EGL_image_external
GL_OES_element_index_uint
GL_OES_fbo_render_mipmap
GL_OES_fragment_precision_high
GL_OES_get_program_binary
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8 GL_OES_standard_derivatives
GL_OES_texture_3D GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_vertex_half_float
GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object
GL_QCOM_alpha_test
GL_QCOM_binning_control
GL_QCOM_driver_control
GL_QCOM_perfmon_global_mode
GL_QCOM_extended_get
GL_QCOM_extended_get2
GL_QCOM_tiled_rendering
GL_QCOM_writeonly_rendering
GL_AMD_compressed_3DC_texture

最佳答案

解决方案是部分的。在着色器中,我定义了一些导致此崩溃并出现 SIGDEV 错误的长宏。我假设他们破坏了我的内存并且应用程序变得疯狂。

我把所有的宏都改成了函数,它解决了这个错误

关于android - ZTE Android 版本 4.0.4 上的着色器损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19096531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com