Intel® ARC™ Graphics
Get answers to your questions or issues when gaming on the world’s best discrete video cards with the latest news surrounding Intel® ARC™ Graphics
1535 Discussions

Issue with gl_PrimitiveID (OpenGL)

Fabrice_Fr
Beginner
2,146 Views

Using the current Intel ARC 770 (with driver 31.0.101.4032)

I have an issue using the gl_PrimitiveID in a fragment shader.
I can't read it with glReadPixels(..., GL_RGBA_INTEGER, ...)

Its value seems casted to char capacity, because I read always value inf to 128.

(gl_PrimitiveID is binded to the Alpha channel.)


For instance, when I draw more than 10k pts and then I will write the ID 9863, then I read the value 7 (== 9863%128)

Eveything works fine on other graphics cards:

For instance, it works fine for Intel Iris Xe I tested some times ago (or any UHD ones).

 

A workaround using gl_VertexID does not work also, because this value is always 0.

Labels (1)
0 Kudos
12 Replies
Fabrice_Fr
Beginner
2,141 Views

EDIT:
I can write and read testing values superior to 128 to the GL_RGBA_INTEGER. No issue with the buffer.

So the issue is only writing and reading gl_PrimitiveID.

0 Kudos
LuisGustav_A_Intel
2,115 Views

Hello Fabrice_Fr,  

 

Thank you for contacting Intel Technical Support for graphics.  

 

We are sorry to hear you experience writing and reading gl_PrimitiveID problems with Intel® Arc™ A770 Graphics. We are glad to assist.  

 

Let me check this further and provide an update.

 

Thank you for choosing Intel. 

 

Best regards, 

 

Luis A. 

Intel Customer Support Technician.  


0 Kudos
LuisGustav_A_Intel
2,101 Views

Hello Fabrice_Fr,

 

I require to collect the system environment information so we can provide proper assistance.

 

Please download, run and reply back attaching the .txt file of the tool Intel® System Support and a graphics

report (For download go the link

https://www.intel.com/content/www/us/en/download/18377/25293/intel-system-support-utility-for-windows.html?product=91600).  

 

Please provide the program application/version/configuration and concern example video for better understanding.


Best regards, 

 

Luis A. 

Intel Customer Support Technician. 


0 Kudos
Fabrice_Fr
Beginner
2,086 Views

Attached is the report file.
I'm the 3D developper of the CAD program where we found the graphics issue and checking the fragment shader output, I found that gl_PrimitiveID was not returning the right value, as described in my previous post.
I hope that the description will be enough but I may provide additional info if you want.

Additional note: if using also a geometry shader, there is no issue !

Moreover, the gl_VertexID seems to return always 0.

0 Kudos
LuisGustav_A_Intel
2,069 Views

Hello Fabrice_Fr, 


I appreciate the information, allow some time to investigate this concern. 


Best regards, 


Luis A. 

Intel Customer Support Technician. 



0 Kudos
LuisGustav_A_Intel
1,996 Views

Hello Fabrice_Fr,


  • In order to reproduce the problem, may I know if you can share the software, version?


  • May we get steps to reproduce the issue  
  • Debug results showing the issue (video/screenshots, memory dump, for DirectX apps debug layer captured via dxpl)


Best regards,


Luis A.

Intel Customer Support Technician.


0 Kudos
Fabrice_Fr
Beginner
1,980 Views

I build a sample demo, provided in attached zip file.


The fragment shader 8.red.fs contains an example of the use of gl_PrimitiveID.

Running the exe with Intel.ARC gives only red points (some are darker, but always red).
When running the same exe on Intel.Iris Xe, you have plenty colors from red to green.

 

 

0 Kudos
LuisGustav_A_Intel
1,972 Views

Hello Fabrice_Fr,


Thank you for the update, though there is some important information I require to gather too.

·        In order to reproduce the problem, may I know if you can share the software, version?

·        Debug results showing the issue (video/screenshots, memory dump, for DirectX apps debug layer captured via dxpl)


Best regards,


Luis A.

Intel Customer Support Technician.


0 Kudos
Fabrice_Fr
Beginner
1,960 Views

Here the provided demo works fine:

Results-ok-intel-iris-xe-LearnOpenGL.png

And here the provided demo under ARC:

Issue-with-intel-arc-LearnOpenGL.png

 

the demo exe is inside the zip file of my previous post.

You can share the exe to developers to track the issue.

(name is 4.advanced_opengl__8.advanced_glsl_ubo.exe and it has been generated thanks to LearnOpenGL tutorials, with a modified shader to demonstrate the gl_PrimitiveID issue)

0 Kudos
LuisGustav_A_Intel
1,935 Views

Hello Fabrice_Fr,


Thank you for the information provided, let me check into this for additional support.


Best regards,


Luis A.

Intel Customer Support Technician.



0 Kudos
Fabrice_Fr
Beginner
1,833 Views

Hi Luis,

any update on this issue ?

0 Kudos
Fabrice_Fr
Beginner
1,660 Views

Hi,

13 april : any update ? (we are releasing soon)

0 Kudos
Reply