View Issue Details

IDProjectCategoryView StatusLast Update
0027606CommunityOCCT:Visualizationpublic2016-12-09 16:37
ReporterTimo Assigned Tobugmaster  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version7.0.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027606: Visualization - view is blocking when MSAA has been overridden in graphics driver settings
DescriptionWhen changing the number of MSAA samples, then rotating or fitting the view and then changing the number of MSAA samples again, the view is blocking and cannot be rotated anymore.

I don't know whether it is a general problem or related to my graphics driver:
OpenGL info:
  GLvendor = 'ATI Technologies Inc.'
  GLdevice = 'ATI FirePro V5800 (FireGL) Graphics Adapter'
  GLversion = '4.5.13399 Compatibility Profile Context FireGL 15.200.1062.1004'
  GLSLversion = '4.40'

I was able to reproduce it with the official OpenCASCADE7.0.0-vc10-64 setup on Windows 10 (64 bit).

NVIDIA
TKOpenGl.OpenGL | Type: Error | ID: 1282 | Severity: High | Message:
  GL_INVALID_OPERATION error generated. The SAMPLES values of the read and draw framebuffers should match.


AMD
TKOpenGl.OpenGL | Type: Error | ID: 3010 | Severity: High | Message:
  glBlitFramebuffer failed because the framebuffer configurations require that the source and destination formats and sample counts match (GL_INVALID_OPERATION)
Steps To Reproduce- Set MSAA settings to 4x "Override any application setting" in graphics driver.
- Execute script:
pload MODELING VISUALIZATION
vgldebug 1
box b 10 20 10
vclear
vinit View1
vdisplay b
vfit
vrenderparams -msaa 2

Bug: antialiasing does not change and view is blocking, cannot be rotated
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • blocking view.png (83,342 bytes)

Relationships

related to 0026711 closedbugmaster Open CASCADE Visualization, TKOpenGl - support creation of multisampling off-screen FBOs 

Activities

Timo

2016-06-15 12:38

developer  

blocking view.png (83,342 bytes)

kgv

2016-06-15 13:46

developer   ~0055004

Last edited: 2016-06-15 13:46

It is better reporting issue to your graphics driver vendor - there is nothing we can do with driver bugs at application level.
Although your card designed in '2010 is already in legacy list of AMD (not based on GCN architecture) as far as I can see.

MSAA in OCCT works fine on AMD Radeon HD 7700, AMD Radon R9 290, NVIDIA GeForce GTX 650, Intel HD Graphics 2500 and many other GPUs with up-to-date drivers.
OpenGL info:
  GLvendor    = 'ATI Technologies Inc.'
  GLdevice    = 'AMD Radeon HD 7700 Series'
  GLversion   = '4.5.13431 Compatibility Profile Context 16.150.2211.1001'
  GLSLversion = '4.50'


abv

2016-06-15 14:02

manager   ~0055007

Hello Timo, please check that you have the newest version of drivers for your card.

Timo

2016-06-15 14:16

developer   ~0055013

After updating my graphics driver, the problem is still there.

OpenGL info:
  GLvendor = 'ATI Technologies Inc.'
  GLdevice = 'ATI FirePro V5800 (FireGL) Graphics Adapter'
  GLversion = '4.5.13411 Compatibility Profile Context FireGL 15.201.2401.0'
  GLSLversion = '4.40'

Timo

2016-06-15 14:28

developer   ~0055021

If I leave out the vfit, then there is no problem in changing the number of samples.

Timo

2016-06-15 16:19

developer   ~0055036

After checking on another computer, we found out that the problem is related to the settings of the graphics card driver.

If the driver overrides the application settings, defining a lower number of samples, e.g. 4, compared to the number of samples defined via OCC then the problem occurs.
If the driver uses the application settings, there is no problem.

This behaviour does not seem to be correct. If the driver settings override the application settings, the view should use the number of samples defined by the driver settings.

Can you reproduce the problem now?
Is there a way to find out, whether the driver ovverrides the application settings?

The other computer had the following graphics card:
OpenGL info:
  GLvendor = 'NVIDIA Corporation'
  GLdevice = 'GeForce GTX 950/PCIe/SSE2'
  GLversion = '4.5.0 NVIDIA 358.91'
  GLSLversion = '4.50 NVIDIA'

So, it does not seem to be a driver bug.

git

2016-06-16 12:00

administrator   ~0055063

Branch CR27606 has been created by kgv.

SHA-1: ffacecf941c74c1011958948c19ea4ed86d5be5e


Detailed log of new commits:

Author: kgv
Date: Thu Jun 16 12:00:49 2016 +0300

    0027606: Visualization - view is blocking when MSAA has been overridden in graphics driver settings
    
    OpenGl_View::blitBuffers() - try disabling MSAA on glBlitFramebuffer() failure

kgv

2016-06-16 12:14

developer   ~0055064

Last edited: 2016-06-16 12:19

> If the driver settings override the application settings, the view should use the number of samples defined by the driver settings.
Driver options overriding application settings is a terrible hack for applications that are not aware of some features - like MSAA at the moment when it was introduced - graphics vendors wanted to advertise their feature to users on existing applications.

This worked fine for old applications which rendered directly to the window (driver just needs to create MSAA window buffer) but became totally unusable nowadays with using off-screen buffers in rendering algorithms. You can find a lot of articles on the web concluding that overriding MSAA settings in driver settings has no effect on majority of modern games and for some of them causing graphical issues (depending on driver); for example http://www.tomshardware.com/reviews/anti-aliasing-nvidia-geforce-amd-radeon,2868-7.html

OCCT is an example of these applications - it uses offscreen FBOs and driver is unable to override them properly. And since this is _overriding_ on driver level - graphics API does not report to application actual configuration of window format (e.g. WGL_SAMPLES_ARB), driver intentionally _lies_ to application! Therefore application is unable to handle this situation correctly (and technically does not have to - this is a hack in driver, its a driver responsibility to make it working or at least harmless).

So in general, user should not expect that overriding application settings in driver settings should be harmless / should have effect, and therefore should avoid using such settings (use per-application profile instead).

kgv

2016-06-16 12:16

developer   ~0055065

Last edited: 2016-06-16 12:17

Patch is ready for review in branch CR27606.
Test case is not needed (scenario depends on driver settings).

git

2016-06-16 12:58

administrator   ~0055068

Branch CR27606 has been updated forcibly by kgv.

SHA-1: 451d14c066253ff89133cb1b8c5ca87964c94f8b

san

2016-06-16 13:02

developer   ~0055071

Branch CR27606 reviewed without remarks, ready for testing.

git

2016-06-16 18:20

administrator   ~0055102

Branch CR27606 has been updated forcibly by mkv.

SHA-1: 5d0846282fbdf5e73b70dcaabef8ad7862822742

mkv

2016-06-17 15:19

tester   ~0055191

Dear BugMaster,
Branch CR27606 was rebased on IR-2016-06-16 branch of occt git-repository.
SHA-1: 5d0846282fbdf5e73b70dcaabef8ad7862822742

mkv

2016-06-17 15:20

tester   ~0055192

Dear BugMaster,
Branch CR27606 from occt git-repository (and IR-2016-06-16 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 5d0846282fbdf5e73b70dcaabef8ad7862822742

Number of compiler warnings:

occt component :
Linux: 0 (0 on IR-2016-06-16)
Windows: 0 (0 on IR-2016-06-16)
MacOS : 0 (0 on IR-2016-06-16)

products component :
Linux: 68 (68 on IR-2016-06-16)
Windows: 0 (0 on IR-2016-06-16)
MacOS : 1135

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 87937428 / 89141601 [-1.35%]
Total CPU difference: 19430.329999999998 / 19458.52999999997 [-0.14%]
products component :
Total MEMORY difference: 27460618 / 27412842 [+0.17%]
Total CPU difference: 5156.479999999995 / 5165.429999999985 [-0.17%]

Testing on Windows:
occt component :
Total MEMORY difference: 55894770 / 55903796 [-0.02%]
Total CPU difference: 18325.15666819888 / 18535.758018198954 [-1.14%]
products component :
Total MEMORY difference: 18649467 / 18614185 [+0.19%]
Total CPU difference: 4984.840353899948 / 4998.802443399952 [-0.28%]

There are no differences in images found by testdiff.

mkv

2016-06-17 15:20

tester   ~0055193

Dear BugMaster,
Branch CR27606 is TESTED.

git

2016-06-24 12:58

administrator   ~0055430

Branch CR27606 has been deleted by inv.

SHA-1: 5d0846282fbdf5e73b70dcaabef8ad7862822742

Related Changesets

occt: master 7ccf8676

2016-06-16 09:58:05

kgv


Committer: bugmaster Details Diff
0027606: Visualization - view is blocking when MSAA has been overridden in graphics driver settings

OpenGl_View::blitBuffers() - try disabling MSAA on glBlitFramebuffer() failure
Affected Issues
0027606
mod - src/OpenGl/OpenGl_View.cxx Diff File
mod - src/OpenGl/OpenGl_View.hxx Diff File
mod - src/OpenGl/OpenGl_View_Redraw.cxx Diff File

Issue History

Date Modified Username Field Change
2016-06-15 12:35 Timo New Issue
2016-06-15 12:35 Timo Assigned To => kgv
2016-06-15 12:38 Timo File Added: blocking view.png
2016-06-15 12:38 Timo Description Updated
2016-06-15 12:39 Timo Description Updated
2016-06-15 13:46 kgv Note Added: 0055004
2016-06-15 13:46 kgv Assigned To kgv => Timo
2016-06-15 13:46 kgv Status new => feedback
2016-06-15 13:46 kgv Resolution open => unable to reproduce
2016-06-15 13:46 kgv Note Edited: 0055004
2016-06-15 14:02 abv Note Added: 0055007
2016-06-15 14:16 Timo Note Added: 0055013
2016-06-15 14:28 Timo Note Added: 0055021
2016-06-15 16:19 Timo Note Added: 0055036
2016-06-15 16:20 Timo Assigned To Timo => kgv
2016-06-16 11:30 kgv Priority normal => low
2016-06-16 11:30 kgv Status feedback => assigned
2016-06-16 11:30 kgv Resolution unable to reproduce => open
2016-06-16 11:30 kgv Summary View is blocking after number of MSAA samples was changed => Visualization - view is blocking when MSAA has been overridden in graphics driver settings
2016-06-16 11:30 kgv Steps to Reproduce Updated
2016-06-16 11:52 kgv Relationship added related to 0026711
2016-06-16 12:00 git Note Added: 0055063
2016-06-16 12:14 kgv Note Added: 0055064
2016-06-16 12:16 kgv Note Edited: 0055064
2016-06-16 12:16 kgv Note Added: 0055065
2016-06-16 12:16 kgv Assigned To kgv => san
2016-06-16 12:16 kgv Status assigned => resolved
2016-06-16 12:17 kgv Note Edited: 0055065
2016-06-16 12:19 kgv Note Edited: 0055064
2016-06-16 12:58 git Note Added: 0055068
2016-06-16 13:02 san Note Added: 0055071
2016-06-16 13:02 san Assigned To san => bugmaster
2016-06-16 13:02 san Status resolved => reviewed
2016-06-16 14:12 mkv Test case number => Not needed
2016-06-16 14:18 mkv Assigned To bugmaster => mkv
2016-06-16 17:06 kgv Description Updated
2016-06-16 17:15 kgv Description Updated
2016-06-16 18:20 git Note Added: 0055102
2016-06-17 15:19 mkv Note Added: 0055191
2016-06-17 15:20 mkv Note Added: 0055192
2016-06-17 15:20 mkv Note Added: 0055193
2016-06-17 15:20 mkv Assigned To mkv => bugmaster
2016-06-17 15:20 mkv Status reviewed => tested
2016-06-24 12:41 bugmaster Changeset attached => occt master 7ccf8676
2016-06-24 12:41 bugmaster Status tested => verified
2016-06-24 12:41 bugmaster Resolution open => fixed
2016-06-24 12:58 git Note Added: 0055430
2016-12-09 16:31 aiv Status verified => closed
2016-12-09 16:37 aiv Fixed in Version => 7.1.0