OpenGL-driven traps: Ati.

Source: Internet
Author: User
Document directory
  • Glblitframebufferext
  • Glclearbuffer *
  • Glbeginconditionalrender
  • Glcopyimagesubdatanv

Reprinted please indicate the source for the klayge game engine, this article address for http://www.klayge.org/2012/02/13/opengl%e9%a9%b1%e5%8a%a8%e7%9a%84%e9%99%b7%e9%98%b1%ef%bc%9aati%e7%af%87%ef%bc%8c%e5%86%8d%e7%bb%ad/

 

AMD has many problems with OpenGL driver, which is a well-known issue. In the past, I also wrote the OpenGL driver trap: ATI and the OpenGL driver trap: ATI, and later. The latest driver was the catalyst 10.10. After more than a year, AMD's driver and klayge Code have changed a lot. What is the situation?

Example of failure

Last year, three problems were found (ticket #58 ):

  1. In deferred rendering and Global illumination, the GI effect only appears at the first frame. No reason is found.
  2. In the detailed surface and judatex viewer, the texture is messy. No reason is found.
  3. In the GPU Particle System and particle Editor, particles are not displayed. GS compilation failed.

After it is updated to catalyst 12.1 (it may be updated in 11.12 or 11.11, but I did not test it), problem 1 is resolved directly, and the Gs of problem 3 can be compiled successfully, but there is still no particle display, in addition, when validate shader is used, too many components output by GS are printed. So I set gl_geometry_vertices_out_ext to 32 to solve the problem. Because glsl cannot be like HLSL, you must specify the maximum number of vertex outputs in the shader by calling glprogramparameteriext (glsl_program, gl_geometry_vertices_out_ext, n) in a way like [maxvertexcount (4. After setting n to 32, instead of a large number such as 1024, the link and validate of glsl program can pass smoothly. Of course, the final solution to this problem should be completed in the future HLSL bytecode to glsl compiler.

For question 2, I spent a lot of time not finding the cause. Later, we accidentally discovered that the maximum PS texture units returned by AMD drivers are only 16 (although its hardware supports at least 32), while Juda texture uses 17 texture units. Therefore, the shader of Juda texture is automatically adjusted based on the maximum number of texture units. This problem is solved.

Failed Functions

These functions were found traps in the original test and were re-tested this time.

Glblitframebufferext

The problem persists.

Glclearbuffer *

It's normal!

Glbeginconditionalrender

I thought that when all the examples could finally run again, deferred rendering and post processing went down again, and the driver lost response after several frames of rendering and the GPU was automatically restarted. Similar to the symptoms mentioned above, oglconditionalrender: beginconditionalrender and endconditionalrender are easily injected to solve the problem. So it is still the old problem of AMD driver. glbeginconditionalrender and glendconditionalrender must be paired for calling, otherwise they will definitely lose the response. In last year's driver, this will directly crash and must be forced to shut down. Now it is much better. Just wait a few seconds to restart the driver.

Glcopyimagesubdatanv

This is a new problem. Added support for the gl_nv_copy_image extension on the catalyst 12.1 (yes, the Nv extension may not be changed to ext or even ARB soon ). However, the test results are the same as those with glblitframebufferext, and the results are messy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.