<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>549</bug_id>
          
          <creation_ts>2012-01-04 09:51:05 +0100</creation_ts>
          <short_desc>Incorrect calculation of count value in GLUniformData (was: No rendering results with GLSL on Intel HD Graphics 3000 (i3 / Sandy Bridge))</short_desc>
          <delta_ts>2012-01-05 20:28:43 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>opengl</component>
          <version>2</version>
          <rep_platform>Other</rep_platform>
          <op_sys>windows</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs>0b56df9939bcd2e0e1bd193f597206c60fe56c51</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1316</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-01-04 09:51:05 +0100</bug_when>
    <thetext>Preliminary applets tests on new test machine showed that our GLSL examples
(GearsES2, etc) didn&apos;t render properly (only background color).

The shader-less examples work properly.

No exception thrown on Java console.

+++

Machine: Windows 7 - x86_64

Intel Core i3-2105 Sandy Bridge
  - HD Graphics 3000
  - Intel64 Family 6 Model 42

++

WindowsGraphicsDevice[type Windows, connection decon]: GLAvailability[Native[GL4bc false, GL4 false, GL3bc true[3.1 (compatibility profile, any, new)], GL3 true[3.1 (core profile, any, new)], GL2 true[3.0 (compatibility profile, any, new)], GL2ES1 true, GLES1 false, GL2ES2 true, GLES2 false], Profiles[GLProfile[GL2ES2/GL3bc], GLProfile[GL2ES1/GL3bc], GLProfile[GL2/GL2], GLProfile[GL3/GL3], GLProfile[GL3bc/GL3bc], GLProfile[GL2GL3/GL3bc], GLProfile[GL3bc/GL3bc], , default GLProfile[GL3bc/GL3bc]]]
Swap Interval -1
GL Profile    GLProfile[GL3bc/GL3bc]
CTX VERSION   3.1 (compatibility profile, any, new) - 3.1.0 - Build 8.15.10.2559
GL            jogamp.opengl.gl4.GL4bcImpl@1ad98ef
GL_VENDOR     Intel
GL_VERSION    3.1.0 - Build 8.15.10.2559
GL_EXTENSIONS
              GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_texture_edge_clamp GL_EXT_separate_specular_color GL_ARB_multitexture GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_texture_env_add GL_IBM_texture_mirrored_repeat GL_EXT_multi_draw_arrays GL_NV_blend_square GL_ARB_texture_compression GL_3DFX_texture_compression_FXT1 GL_EXT_texture_filter_anisotropic GL_ARB_texture_border_clamp GL_ARB_point_parameters GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_EXT_texture_compression_s3tc GL_ARB_shadow GL_ARB_window_pos GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_ARB_vertex_program GL_EXT_texture_rectangle GL_ARB_fragment_program GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_ARB_vertex_buffer_object GL_EXT_texture_lod_bias GL_ARB_occlusion_query GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_non_power_of_two GL_ARB_vertex_shader GL_NV_texgen_reflection GL_ARB_point_sprite GL_ARB_fragment_program_shadow GL_EXT_blend_equation_separate GL_ARB_depth_texture GL_ARB_texture_rectangle GL_ARB_draw_buffers GL_ARB_color_buffer_float GL_ARB_half_float_pixel GL_ARB_texture_float GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_EXT_draw_buffers2 GL_WIN_swap_hint GL_EXT_texture_sRGB GL_ARB_multisample GL_EXT_packed_float GL_EXT_texture_shared_exponent GL_ARB_texture_rg GL_ARB_texture_compression_rgtc GL_NV_conditional_render GL_EXT_texture_swizzle GL_ARB_sync GL_ARB_framebuffer_sRGB GL_EXT_packed_depth_stencil GL_ARB_depth_buffer_float GL_EXT_transform_feedback GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_ARB_framebuffer_object GL_EXT_texture_array GL_EXT_texture_integer GL_ARB_map_buffer_range GL_EXT_texture_snorm GL_INTEL_performance_queries GL_ARB_copy_buffer GL_ARB_sampler_objects GL_NV_primitive_restart GL_ARB_seamless_cube_map GL_ARB_uniform_buffer_object GL_ARB_depth_clamp GL_ARB_vertex_array_bgra GL_ARB_draw_elements_base_vertex GL_ARB_fragment_coord_conventions GL_EXT_gpu_program_parameters GL_ARB_compatibility GL_ARB_vertex_array_object
GLX_EXTENSIONS
              WGL_EXT_extensions_string WGL_ARB_extensions_string WGL_ARB_pbuffer WGL_ARB_multisample WGL_EXT_depth_float WGL_ARB_create_context WGL_ARB_pixel_format WGL_ARB_pixel_format_float WGL_ARB_framebuffer_sRGB WGL_ARB_make_current_read WGL_EXT_pixel_format_packed_float WGL_EXT_swap_control WGL_ARB_buffer_region
GLSL          true, shader-compiler: true</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1326</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-01-05 19:30:40 +0100</bug_when>
    <thetext>Running GearsES2 with &quot;-Djogl.debug.DebugGL&quot; discloses the GL error:

Exception in thread &quot;main-AWTAnimator-1&quot; javax.media.opengl.GLException: Thread[main-AWTAnimator-1,5,main] glGetError() returned the following error codes after a call to 
  glUniform(&lt;javax.media.opengl.GLUniformData&gt; 
     GLUniformData[name pmvMatrix, location 22675456, size 4*4, count 6, matrix true, 
     data java.nio.HeapFloatBuffer[pos=32 lim=96 cap=96]]): 
  GL_INVALID_OPERATION ( 1282 0x502),

This happens right at GearsES2 shader initialization w/ proper values.

&quot;-Djogl.debug.TraceGL&quot; shows (until the GL error):


&lt;!-- Create/Load shader code ...
Created: ShaderCode[id=2, type=FRAGMENT_SHADER, valid=false, shader:  0, source]
--&gt;

glCreateProgram() = 1
glGetError() = 0
glCreateShader(&lt;int&gt; 0x8B31) = 2
glGetError() = 0
glShaderSource(&lt;int&gt; 0x2, &lt;int&gt; 0x1, &lt;[Ljava.lang.String;&gt;, &lt;java.nio.IntBuffer&gt; java.nio.DirectIntBufferU[pos=0 lim=1 cap=1])
glGetError() = 0
glCompileShader(&lt;int&gt; 0x2)
glGetError() = 0
glGetShaderiv(&lt;int&gt; 0x2, &lt;int&gt; 0x8B81, &lt;[I&gt;, &lt;int&gt; 0x0)
glAttachShader(&lt;int&gt; 0x1, &lt;int&gt; 0x2)
glGetError() = 0
glCreateShader(&lt;int&gt; 0x8B30) = 3
glGetError() = 0
glShaderSource(&lt;int&gt; 0x3, &lt;int&gt; 0x1, &lt;[Ljava.lang.String;&gt;, &lt;java.nio.IntBuffer&gt; java.nio.DirectIntBufferU[pos=0 lim=1 cap=1])
glGetError() = 0
glCompileShader(&lt;int&gt; 0x3)
glGetError() = 0
glGetShaderiv(&lt;int&gt; 0x3, &lt;int&gt; 0x8B81, &lt;[I&gt;, &lt;int&gt; 0x0)
glAttachShader(&lt;int&gt; 0x1, &lt;int&gt; 0x3)
glLinkProgram(&lt;int&gt; 0x1)
glIsProgram(&lt;int&gt; 0x1) = true
glGetProgramiv(&lt;int&gt; 0x1, &lt;int&gt; 0x8B82, &lt;[I&gt;, &lt;int&gt; 0x0)
glValidateProgram(&lt;int&gt; 0x1)
glGetProgramiv(&lt;int&gt; 0x1, &lt;int&gt; 0x8B83, &lt;[I&gt;, &lt;int&gt; 0x0)
glUseProgram(&lt;int&gt; 0x1)
glGetUniformLocation(&lt;int&gt; 0x1, &lt;java.lang.String&gt; pmvMatrix) = 22675456
glUniform(&lt;javax.media.opengl.GLUniformData&gt; GLUniformData[name pmvMatrix, location 22675456, size 4*4, count 6, matrix true, data java.nio.HeapFloatBuffer[pos=32 lim=96 cap=96]])</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1327</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-01-05 20:27:37 +0100</bug_when>
    <thetext>No rendering results with GLSL on Intel HD Graphics 3000 (i3 / Sandy Bridge) 

Turns out GLUniformData had a bug in calculating the &apos;count&apos; of matrices, ie. it did not respect the 
given position of the buffer. Instead of 4 * 4x4 it passed 6 * 4x4 (PMVMatrix data).

This was tolerated by NV, AMD, ARM, .. driver, but not on Intel HS Graphics 3000 / Windows 7.
(Good stuff)

Notes: 
  - V-Sync seems not to work (&gt;60fps, tearing)
  - Supports OpenGL 3.1
  - junit test result: All Passed (no failures)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>