DiscussionsIssue archiveOCCT:Visualization

Archived issue #0025758

Visualization, TKOpenGl - texture initialization fails on Intel HD 4600 in ray tracing test

Open CASCADEOCCT:Visualizationclosed10 public notes

Search issues

Description

On 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 reproduce

test v3d raytrace bug24819

Public activity

10 archived notes

Participants are labeled by their role within this record.

01Commenter 3
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)
  {


02Commenter 2
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()...
03Commenter 4
Branch [archived branch] has been created by Commenter 3.

[revision removed]


Detailed log of new commits:

Author: Commenter 3
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.
04Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 3.

[revision removed]
05Commenter 3
Please test the patch in branch CR25758.
06Commenter 6
I confirm that the original problem is fixed and I see no regressions on my machine
07Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
08Commenter 8
Branch [archived branch] has been rebased on the current master
09Commenter 9
Dear Commenter 1,

Branch CR25758 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

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
10Commenter 4
Branch [archived branch] has been deleted by Commenter 3.

[revision removed]

Related records