Gzdoom does not work

Bugs that have been resolved.

Moderator: Graf Zahl

_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

Graf Zahl wrote:But one other question: For testing I disabled glGetStringi to see if the init code works with that. Turned out I got my first crash in gl_load itself, if it can't find that function it just aborted. So how were you hable to start it on OSX then?
glGetStringi has correct address on OS X. OpenGL framework has all functions up to 4.1 and they can be called but don't do anything until core context is created. That's why I didn't notice the problem there.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Gzdoom does not work

Post by Graf Zahl »

Ugh. That's even worse than a system that just refuses to return a valid address. But this explains the crash that got reported to me. With depending on glGetStringi, gl_load definitely would not work on pre 3.0 GL. I hope I got it fixed now.

Apple are idiots, though. I still don't understand what they gained by only implementing modern GL as core profile, and then stopping at 4.1. GZDoom could easily run fully featured if they had 4.4 support but without those persistently mapped buffers it's hopeless.
minerwilly
Posts: 2
Joined: Sun May 01, 2016 1:02

Re: Gzdoom does not work

Post by minerwilly »

_mental_ wrote:At the moment the latest version (2b710ec to be precise) works fine on mobile ATI 4330 with exception of already mentioned issue with edges of menu font.
That commit is working here – so long as I start up with -noshader. Otherwwlse. lots of noise from Mesa, and a black window:

Code: Select all

EE ../../../../../src/gallium/drivers/r600/r600_shader.c:183 r600_pipe_shader_create - translation from TGSI failed !
EE ../../../../../src/gallium/drivers/r600/r600_state_common.c:826 r600_shader_select - Failed to build shader variant (type=1) -1
Curiously, git master (51991ef2) has just decided to start working, albeit with the same shader problem.

(Mesa r600g 11.2.0-rc3; hw is Juniper.)
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

Graf Zahl wrote:Apple are idiots, though. I still don't understand what they gained by only implementing modern GL as core profile, and then stopping at 4.1. GZDoom could easily run fully featured if they had 4.4 support but without those persistently mapped buffers it's hopeless.
Apple is inventing a wheel, as always. No Vulcan, no modern OpenGL but Metal framework, exclusive for their OSes of course.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Gzdoom does not work

Post by Graf Zahl »

Yeah, that's my guess too. But I have to wonder if this is going to work out. Somehow I have the feeling that they want to gradually transform the Mac into a walled garden system just like the iPhone. Of course sooner or later they will lose the power users if this continues. My boss is a staunch Apple fan but his dissatisfaction with where the Mac is heading is steadily growing. But if people like him jump ship it'd be bad times for Apple.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

As we already discussing various topics related to compatibility, I managed to implement gamma correction in OS X native backend as a shader effect.
I pushed it to a separate branch. Let me know is it OK to commit to master. Should I put new effect inside #if ... #endif?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Gzdoom does not work

Post by Graf Zahl »

Just one question: Why do you need a texture for that? Shouldn't gamma be a simple math formula?
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

Graf Zahl wrote:Just one question: Why do you need a texture for that? Shouldn't gamma be a simple math formula?
This was written several years ago for really slow hardware like GeForce 9400M. It was faster to do a texture lookup than calculate value for each channel of each pixel.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Gzdoom does not work

Post by Graf Zahl »

Ok...
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

I compared performance of both approaches for gamma correction. It appeared that on mobile Intel Iris Pro and GeForce 750M calculation inside the shader is up to 10% faster than texture lookup. I updated my branch with new version while keeping old one in history (just in case I will want to test on different hardware).
So if you are OK with everything else I will push to the master branch.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

Also I solved the problem with texture wrapping and pushed the fix to the same branch. I was not sure about proper place to reset last sampler, so please take a look.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Gzdoom does not work

Post by Graf Zahl »

Good to see it was something this simple. Yes, that was the correct place for it. It may need some added work later for translated sprites, but I'm not sure yet if that's really necessary.
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: Gzdoom does not work

Post by Edward-san »

I'm having problems with latest gzdoom 2.x changes on my linux + intel hd3000 (other info is already shown in this thread, see the previous pages):

Code: Select all

Warning: 'Object' is freed outside the GC process.
Init Shader 'gammacorrection':
Fragment shader:
0:84(2): error: `FragColor' undeclared
0:84(2): error: value of type vec4 cannot be assigned to variable of type error

Linking:
error: linking with uncompiled shader

Full log:

Code: Select all

GZDoom g2.2pre-1517-g4c4b973 - 2016-05-02 13:02:55 +0300 - SDL version
Compiled on May  2 2016

M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /home/edward-san/zdoom/gzdoom/trunk/release/gzdoom.pk3, 612 lumps
 adding /home/edward-san/doom/wads/DOOM2.WAD, 2919 lumps
I_Init: Setting up machine state.
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i3-2328M CPU @ 2.20GHz
  Family 6, Model 42, Stepping 7
  Features: MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing FMOD
FMOD Sound System, copyright � Firelight Technologies Pty, Ltd., 1994-2009.
Loaded FMOD version 4.44.61
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
DECORATE parsing took 68.87 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading default status bar definition.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
GL_VENDOR: Intel Open Source Technology Center
GL_RENDERER: Mesa DRI Intel(R) Sandybridge Mobile 
GL_VERSION: 3.0 Mesa 11.0.2 (Compatibility profile)
GL_SHADING_LANGUAGE_VERSION: 1.30
GL_EXTENSIONS: GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compressed_texture_pixel_storage GL_ARB_conditional_render_inverted GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query2 GL_ARB_occlusion_query GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_robustness GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_objects GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shading_language_packing GL_ARB_shading_language_420pack GL_ARB_shadow GL_ARB_sync GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirrored_repeat GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rgb10_a2ui GL_ARB_texture_rg GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_copy_texture GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_polygon_offset GL_EXT_polygon_offset_clamp GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shader_integer_mix GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_subtexture GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_texture GL_EXT_texture_rectangle GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback GL_EXT_vertex_array_bgra GL_EXT_vertex_array GL_OES_EGL_image GL_OES_read_format GL_KHR_debug GL_KHR_context_flush_control GL_3DFX_texture_compression_FXT1 GL_AMD_draw_buffers_blend GL_AMD_performance_monitor GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_trinary_minmax GL_APPLE_object_purgeable GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ATI_blend_equation_separate GL_ATI_draw_buffers GL_ATI_separate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_IBM_multimode_draw_arrays GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_INGR_blend_func_separate GL_INTEL_performance_query GL_MESA_pack_invert GL_MESA_texture_signed_rgba GL_MESA_window_pos GL_NV_blend_square GL_NV_conditional_render GL_NV_depth_clamp GL_NV_light_max_exponent GL_NV_packed_depth_stencil GL_NV_primitive_restart GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_NV_texture_rectangle GL_S3_s3tc GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays
Max. texture size: 8192
Max. texture units: 16
Max. varying: 128
Max. uniform block size: 65536
Uniform block alignment: 16
Warning: 'Object' is freed outside the GC process.
Init Shader 'gammacorrection':
Fragment shader:
0:84(2): error: `FragColor' undeclared
0:84(2): error: value of type vec4 cannot be assigned to variable of type error

Linking:
error: linking with uncompiled shader
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

Hopefully fixed in this commit.
This doesn't happen to me on Windows with OpenGL 3.1 but now it should work everywhere.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Gzdoom does not work

Post by _mental_ »

Graf Zahl wrote:Good to see it was something this simple. Yes, that was the correct place for it. It may need some added work later for translated sprites, but I'm not sure yet if that's really necessary.
It appeared that there are other issues with sampler setup.
High quality resize modes are quite broken for small font: some modes make the text barely readable in the console. Need to check on different hardware though. Occurs on different hardware and OSes. Just compare gl_texture_hqresize 1 and 2. Although I still didn't check with the core context.
Also, playing with the current mode causes the old warping problem. And changing video mode too.
The latter can be fixed by resetting the last user sampler in FGLTexture::CreateTexBuffer() but again I'm not sure about all possible code paths.
Locked

Return to “Closed Bugs”