View Issue Details

IDProjectCategoryView StatusLast Update
0025758Open CASCADEOCCT:Visualizationpublic2015-05-14 15:32
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.8.0 
Target Version6.9.0Fixed in Version6.9.0 
Summary0025758: Visualization, TKOpenGl - texture initialization fails on Intel HD 4600 in ray tracing test
DescriptionOn a computer with Core i7-4790 which has Intel HD 4600 graphics, test v3d raytrace bug24819 fails on activation of ray tracing with message:

vrenderparams -raytrace
TKOpenGl | Type: Error | ID: 0 | Severity: High | Message:

  New texture intialization of size 16384x128 for textured font has failed.

All snapshots are empty.

vglinfo
OpenGL info:
  GLvendor = 'Intel'
  GLdevice = 'Intel(R) HD Graphics 4600'
  GLversion = '4.3.0 - Build 10.18.10.3960'
  GLSLversion = '4.30 - Build 10.18.10.3960'
  GLdebug = ON

Update of driver to the latest available (10.18.14.4080) does not help
Steps To Reproducetest v3d raytrace bug24819
TagsNo tags attached.
Test case numberv3d raytrace(014) bug24819

Relationships

related to 0025652 closedapn Open CASCADE Visualization, TKOpenGl - RayTracing initialization failures are not properly reported 
related to 0025306 closedbugmaster Open CASCADE Visualization, TKOpenGl - support texturing within RayTracing 

Activities

kgv

2015-01-28 12:35

developer   ~0036749

Last edited: 2015-01-28 12:36

The error message appears on the following system, but Ray-Tracing still works (on second frame):
  GLvendor    = 'Intel'
  GLdevice    = 'Intel(R) HD Graphics 2500'
  GLversion   = '4.0.0 - Build 10.18.10.3621'
  GLSLversion = '4.00 - Build 10.18.10.3621'


The minimum reproducing test case is to display point sprite in the scene:
pload MODELING VISUALIZATION
vvbo 0
vinit View1
box b 1 2 3
vsetdispmode 1
vdisplay b
vfit
vraytrace 1

vpoint p 0 0 0


On tested system GL_INVALID_OPERATION error appears within first call to glDrawArrays() of method OpenGl_Workspace::RunRaytraceShaders():
  myGlContext->core15fwd->glDrawArrays (GL_TRIANGLES, 0, 6);

However error is inadequate - the reasons listed in OpenGL documentation for GL_INVALID_OPERATION are not met in our case.

Empirically error message does not appear if GL_ARB_sampler_objects functionality is not used, or when sampler is set to Mipmap-based format (not GL_NEAREST or GL_LINEAR used for Mipmap-less textures) before rendering Ray-Tracing code (I suppose when FBO texture is drawn), e.g. add following line to OpenGl_Workspace::DisableTexture():
aSampler->SetParameter (*myGlContext, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR);


Dear Andrey,
could you please check if you have the same issue on your system. Comment out the line "if (theContext.core33 == NULL)" in the OpenGl_Sampler.cxx and try test case:
Standard_Boolean OpenGl_Sampler::Init (OpenGl_Context& theContext)
{
  if (theContext.core33 == NULL)
  {


abv

2015-01-29 07:01

manager   ~0036790

Hello Kirill,

1. Your "minimum reproducing test case" is working: after command "vpoint p 0 0 0" the box disappears

2. Commenting out line 71 in OpenGl_Sampler.cxx resolves the problem

3. I do not see anything like aSampler variable in OpenGl_Workspace::DisableTexture(), thus could not try using SetParameter()...

git

2015-01-29 15:07

administrator   ~0036829

Branch CR25758 has been created by kgv.

SHA-1: e294e1913dbd80fe31366819ed87ad7315c7c193


Detailed log of new commits:

Author: kgv
Date: Thu Jan 29 15:07:23 2015 +0300

    0025758: Visualization, TKOpenGl - texture initialization fails on Intel HD 4600 in ray tracing test
    
    Unbind global texture sampler right after its usage.

git

2015-01-29 15:16

administrator   ~0036830

Branch CR25758 has been updated forcibly by kgv.

SHA-1: eb0b727897827a26d939074cffb71026f8ba95d7

kgv

2015-01-29 15:23

developer   ~0036831

Please test the patch in branch CR25758.

abv

2015-01-29 22:00

manager   ~0036862

I confirm that the original problem is fixed and I see no regressions on my machine

git

2015-01-30 16:57

administrator   ~0036916

Branch CR25758 has been updated forcibly by apv.

SHA-1: 94cc7cf14feda17dac5049c2384c7be48ac6e6bc

apv

2015-01-30 16:58

tester   ~0036917

Branch CR25758 has been rebased on the current master

apv

2015-02-02 18:47

tester   ~0036999

Dear BugMaster,

Branch CR25758 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 94cc7cf14feda17dac5049c2384c7be48ac6e6bc

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component :
   Linux: 11 (11 on master)
   Windows: 1 (1 on master)

Regressions/Differences:
Not detected

Testing cases:
v3d raytrace(014) bug24819 - OK
http://occt-tests/CR25758-master-occt/Debian60-64/v3d/raytrace/bug24819.html
http://occt-tests/CR25758-master-occt/Windows-32-VC10/v3d/raytrace/bug24819.html

Testing on Linux:
Total MEMORY difference: 369519092 / 370076844
Total CPU difference: 54480.249999999985 / 49863.81000000002

Testing on Windows:
Total MEMORY difference: 275765020 / 276276616
Total CPU difference: 36784.890625 / 36894.0

git

2015-02-13 10:28

administrator   ~0037485

Branch CR25758 has been deleted by kgv.

SHA-1: 94cc7cf14feda17dac5049c2384c7be48ac6e6bc

Related Changesets

occt: master e3414ada

2015-01-29 12:16:09

kgv


Committer: bugmaster Details Diff
0025758: Visualization, TKOpenGl - texture initialization fails on Intel HD 4600 in ray tracing test

Unbind global texture sampler right after its usage.
Affected Issues
0025758
mod - src/OpenGl/OpenGl_Text.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.cxx Diff File

Issue History

Date Modified Username Field Change
2015-01-28 06:29 abv New Issue
2015-01-28 06:29 abv Assigned To => kgv
2015-01-28 08:44 kgv Relationship added related to 0025652
2015-01-28 12:35 kgv Note Added: 0036749
2015-01-28 12:35 kgv Assigned To kgv => abv
2015-01-28 12:35 kgv Status new => feedback
2015-01-28 12:36 kgv Note Edited: 0036749
2015-01-29 07:01 abv Note Added: 0036790
2015-01-29 07:01 abv Assigned To abv => kgv
2015-01-29 14:58 kgv Summary Texture initialization fails on Intel HD 4600 in ray tracing test => Visualization, TKOpenGl - texture initialization fails on Intel HD 4600 in ray tracing test
2015-01-29 15:07 git Note Added: 0036829
2015-01-29 15:16 git Note Added: 0036830
2015-01-29 15:23 kgv Note Added: 0036831
2015-01-29 15:23 kgv Assigned To kgv => bugmaster
2015-01-29 15:23 kgv Status feedback => resolved
2015-01-29 15:23 kgv Status resolved => reviewed
2015-01-29 15:23 kgv Product Version 6.9.0 => 6.8.0
2015-01-29 22:00 abv Note Added: 0036862
2015-01-30 10:11 kgv Relationship added related to 0025306
2015-01-30 14:34 mkv Assigned To bugmaster => apv
2015-01-30 16:57 git Note Added: 0036916
2015-01-30 16:58 apv Note Added: 0036917
2015-02-02 14:01 apv Test case number => v3d raytrace(014) bug24819
2015-02-02 18:47 apv Note Added: 0036999
2015-02-02 18:47 apv Assigned To apv => bugmaster
2015-02-02 18:47 apv Status reviewed => tested
2015-02-06 15:38 bugmaster Changeset attached => occt master e3414ada
2015-02-06 15:38 bugmaster Status tested => verified
2015-02-06 15:38 bugmaster Resolution open => fixed
2015-02-13 10:28 git Note Added: 0037485
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:32 aiv Fixed in Version => 6.9.0