Bug 25946 - brw_state_upload.c: assertion failed playing Prince of Persia (wine)
Summary: brw_state_upload.c: assertion failed playing Prince of Persia (wine)
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2010-01-08 00:36 UTC by Frank Heisig
Modified: 2016-02-26 01:38 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
lspci (1.97 KB, text/plain)
2010-01-08 00:36 UTC, Frank Heisig
Details

Description Frank Heisig 2010-01-08 00:36:00 UTC
Created attachment 32518 [details]
lspci

Tested with ubuntu 9.10 distribution package (mesa 7.6) and with git tag mesa_7_7.
In both cases game (Prince of Persia: The sands of Time) ends with:
brw_state_upload.c:336: brw_validate_state: Assertion `(fp->tex_units_used & ctx->Texture._EnabledUnits) == fp->tex_units_used' failed.

(mesa_7_7_branch head I could not get working with KDE+Plasma+3D-effects)
Comment 1 Eric Anholt 2010-03-08 16:15:01 UTC
Could you try again with Mesa master?  I've looked around and don't see a way in the driver to hit this, unless Mesa core's screwing up, and there have been some fixes to core since then that may impact this.
Comment 2 Ari Entlich 2010-03-24 21:37:07 UTC
I can hit this with the Halo Demo using Mesa 7.8 rc2. I can provide logs/backtraces if necessary.
Comment 3 Ari Entlich 2010-03-25 12:38:34 UTC
A bit more news: Halo 1 only triggers this if force_s3tc_enable is disabled, i.e. when wine has called glCompressedTex{Sub,}Image2D a few times with 0 as the format number. I'm not sure why wine doesn't have a better way of handling this, but in any case it might provide some insight into the cause of the assertion.
Comment 4 Frank Heisig 2010-04-06 14:01:55 UTC
Sorry for delay. It takes some time to test, I don't had last. I tried mesa 7.7.1 and 7.8.1 (master, I tried first, makes some trouble on build, I'll try again soon). Both are working with KDE and composite effects - but Prince of Persia still crashes after intro (same with both versions of mesa /wine 1.1.41):

Mesa: User error: GL_INVALID_ENUM in glCompressedTexImage2D
fixme:d3d:IWineD3DDeviceImpl_UpdateSurface >>>>>>>>>>>>>>>>> GL_INVALID_ENUM (0x500) from glTexSubImage2D @ device.c / 5302
Mesa: User error: GL_INVALID_ENUM in glCompressedTexImage2D
fixme:d3d:IWineD3DDeviceImpl_UpdateSurface >>>>>>>>>>>>>>>>> GL_INVALID_ENUM (0x500) from glTexSubImage2D @ device.c / 5302
brw_state_upload.c:407: brw_validate_state: Assertion `(fp->tex_units_used & ctx->Texture._EnabledUnits) == fp->tex_units_used' failed.
lea@leasschleppi:~/.wine/drive_c/Programme/UBISOFT/Prince of Persia The Sands of Time$

here my glxinfo - maybe it helps:

Mesa: CPU vendor: GenuineIntel                            
Mesa: CPU name: Intel(R) Celeron(R) CPU          900  @ 2.20GHz
Mesa: Mesa 7.9-devel DEBUG build Apr  6 2010 21:54:25          
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
Mesa: MMX cpu detected.                                                                        
Mesa: SSE cpu detected.                                                                        
Mesa: Not testing OS support for SSE, leaving enabled.                                         
display: :0  screen: 0                                                                         
direct rendering: Yes                                                                          
server glx vendor string: SGI                                                                  
server glx version string: 1.2                                                                 
server glx extensions:                                                                         
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,                  
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,                      
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig,                              
    GLX_SGIX_visual_select_group                                                               
client glx vendor string: Mesa Project and SGI                                                 
client glx version string: 1.4                                                                 
client glx extensions:                                                                         
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,                     
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,                      
    GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control,                                           
    GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control,                      
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,                       
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,                                 
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap,                                 
    GLX_INTEL_swap_event                                                                       
GLX version: 1.2                                                                               
GLX extensions:                                                                                
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,                     
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,                      
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_SGI_video_sync,                            
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group,                     
    GLX_EXT_texture_from_pixmap                                                                
OpenGL vendor string: Tungsten Graphics, Inc                                                   
OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 7.9-devel                                                                
OpenGL shading language version string: 1.20                                                             
OpenGL extensions:                                                                                       
    GL_ARB_copy_buffer, GL_ARB_depth_texture, GL_ARB_depth_clamp,                                        
    GL_ARB_draw_buffers, GL_ARB_draw_elements_base_vertex,                                               
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_program,                                          
    GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader,                                              
    GL_ARB_framebuffer_object, GL_ARB_half_float_pixel,                                                  
    GL_ARB_half_float_vertex, GL_ARB_map_buffer_range, GL_ARB_multisample,                               
    GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_pixel_buffer_object,                             
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_provoking_vertex,                               
    GL_ARB_seamless_cube_map, GL_ARB_shader_objects,                                                     
    GL_ARB_shading_language_100, GL_ARB_shading_language_120, GL_ARB_shadow,                             
    GL_ARB_sync, GL_ARB_texture_border_clamp, GL_ARB_texture_compression,                                
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add,                                                     
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,                                             
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,                                             
    GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle,                                           
    GL_ARB_transpose_matrix, GL_ARB_vertex_array_bgra,                                                   
    GL_ARB_vertex_array_object, GL_ARB_vertex_buffer_object,                                             
    GL_ARB_vertex_program, GL_ARB_vertex_shader, 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_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract,                                   
    GL_EXT_cull_vertex, GL_EXT_compiled_vertex_array, GL_EXT_copy_texture,                               
    GL_EXT_draw_buffers2, GL_EXT_draw_range_elements, GL_EXT_framebuffer_blit,                           
    GL_EXT_framebuffer_object, GL_EXT_fog_coord,                                                         
    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays,                                             
    GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels,                                                   
    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters,                                                 
    GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal,                               
    GL_EXT_secondary_color, GL_EXT_separate_specular_color,                                              
    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap,                                   
    GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D,                                                 
    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_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle,                            
    GL_EXT_texture_sRGB, GL_EXT_texture_swizzle, GL_EXT_vertex_array,                                    
    GL_EXT_vertex_array_bgra, GL_3DFX_texture_compression_FXT1,                                          
    GL_APPLE_client_storage, GL_APPLE_packed_pixels,                                                     
    GL_APPLE_vertex_array_object, GL_APPLE_object_purgeable,                                             
    GL_ATI_blend_equation_separate, GL_ATI_envmap_bumpmap,                                               
    GL_ATI_texture_env_combine3, GL_ATI_separate_stencil,                                                
    GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip,                                                 
    GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate,                                         
    GL_MESA_pack_invert, GL_MESA_texture_signed_rgba, GL_MESA_ycbcr_texture,                             
    GL_MESA_window_pos, GL_NV_blend_square, GL_NV_depth_clamp,                                           
    GL_NV_light_max_exponent, GL_NV_packed_depth_stencil,                                                
    GL_NV_texture_env_combine4, GL_NV_texture_rectangle,                                                 
    GL_NV_texgen_reflection, GL_NV_vertex_program, GL_NV_vertex_program1_1,                              
    GL_OES_read_format, GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp,                           
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays,                           
    GL_OES_EGL_image                                                                                     

32 GLX Visuals
   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x21 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x22 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x86 24 tc  0 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x87 24 tc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x88 24 tc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x89 24 tc  0 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x8a 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x8b 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x8c 24 tc  0 32  0 r  .  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x8d 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x8e 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x8f 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x90 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x91 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow
0x92 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x93 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x94 24 dc  0 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x95 24 dc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x96 24 dc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x97 24 dc  0 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x98 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x99 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x9a 24 dc  0 32  0 r  .  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x9b 24 dc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x9c 24 dc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x9d 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x9e 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x9f 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0xa0 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow
0xa1 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0xa2 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x55 32 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None

48 GLXFBConfigs:
   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x56  0 tc  0 16  0 r  .  .  5  6  5  0  0  0  0  0  0  0  0  0 0 None
0x57  0 tc  0 16  0 r  y  .  5  6  5  0  0  0  0  0  0  0  0  0 0 None
0x58  0 tc  0 16  0 r  y  .  5  6  5  0  0  0  0  0  0  0  0  0 0 None
0x59  0 tc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x5a  0 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x5b  0 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x5c  0 tc  0 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x5d  0 tc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x5e  0 tc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x5f  0 tc  0 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x60  0 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x61  0 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x62  0 tc  0 32  0 r  .  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x63  0 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x64  0 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x65  0 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x66  0 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x67  0 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x68  0 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x69  0 tc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x6a  0 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x6b  0 tc  0 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow
0x6c  0 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x6d  0 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x6e  0 dc  0 16  0 r  .  .  5  6  5  0  0  0  0  0  0  0  0  0 0 None
0x6f  0 dc  0 16  0 r  y  .  5  6  5  0  0  0  0  0  0  0  0  0 0 None
0x70  0 dc  0 16  0 r  y  .  5  6  5  0  0  0  0  0  0  0  0  0 0 None
0x71  0 dc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x72  0 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x73  0 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x74  0 dc  0 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x75  0 dc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x76  0 dc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x77  0 dc  0 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x78  0 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x79  0 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x7a  0 dc  0 32  0 r  .  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x7b  0 dc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x7c  0 dc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x7d  0 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x7e  0 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x7f  0 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x80  0 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x81  0 dc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x82  0 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x83  0 dc  0 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow
0x84  0 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x85  0 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
Comment 5 Eric Anholt 2011-01-04 13:33:25 UTC
If wine was using GLSL (this is a question for your wine configuration), Mesa master may or the 7.10 branch may fix the problem.  Either way, the root cause sounds like wine incorrectly trying to use compressed textures in the absence of support for the extension.
Comment 6 Matt Turner 2014-08-11 03:26:44 UTC
Please create an apitrace that reproduces the issue.
Comment 7 Christopher M. Penalver 2016-02-26 01:38:46 UTC
Frank Heisig, Ubuntu 9.10 reached EOL on April 30, 2011. For more on this, please see https://wiki.ubuntu.com/Releases .

If this is reproducible in a supported release, it will help immensely if you filed a new report with Ubuntu by ensuring you have the package xdiagnose installed, and that you click the Yes button for attaching additional debugging information running the following from a terminal:
ubuntu-bug xorg

Also, please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.