Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20622 Discussions

glReadPixels fails on RenderBuffer

John_H_4
Beginner
866 Views

This is a re-post using the requested layout

System Setup Information:
-----------------------------------------

System Used: Dell Alienware 17
CPU SKU: Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
GPU SKU: HD4600
Processor Line:
System BIOS Version: Alienware A01
CMOS settings:
Graphics Driver Version: 10.18.10.3960
GOP/VBIOS Version:
Operating System: Windows 8.1 64bit
OS Version: 6.2.9200
API: OpenGL
Occurs on non-Intel GPUs?: NO

 

Steps to Reproduce:
-------------------------------
Setup the Frame Buffer

  

   // Create the FBO

      glGenFramebuffers(1, @fFBOHandle);

      glBindFramebuffer(GL_FRAMEBUFFER, fFBOHandle);

 

  // Create the texture object for the primitive information buffer

      glGenRenderBuffers(fColBufSize, @fColorBuffer[0]);

 

      for I := 0 to fColBufSize-1 do

      Begin

        glBindRenderBuffer(GL_RENDERBUFFER, fColorBuffer);

        glRenderBufferStorage( GL_RENDERBUFFER, GL_RGBA32F,  SizeX, SizeY );

        glFramebufferRenderBuffer (GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + I, GL_RENDERBUFFER, fColorBuffer );

        fBuffer :=  GL_COLOR_ATTACHMENT0 + I;

      end;

  

  // depth

      if fIncDepthBuffer then

      Begin

        glGenRenderBuffers(1, @fDepthBuff);

        glBindRenderBuffer(GL_RENDERBUFFER, fDepthBuff);

        glRenderBufferStorage( GL_RENDERBUFFER, GL_DEPTH_COMPONENT24,  SizeX, SizeY );

        glFramebufferRenderBuffer(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, fDepthBuff);

      end;

 

       glDrawBuffers(fColBufSize, @fBuffer[0]);

 

 

 // Verify that the FBO is correct

      aStatus := glCheckFramebufferStatus(GL_FRAMEBUFFER);

      CheckForGLErrors('Float Buffer Set Size');

 

 

  // Restore the default framebuffer

      glReadBuffer(GL_NONE);    //for older hardware

 

      glBindRenderbuffer(GL_RENDERBUFFER, 0);

      glBindFramebuffer(GL_FRAMEBUFFER, 0);

 

 

Read the Pixels from the FramBuffer.  The PixelID is a local array and X,Y is the mouse location.

 

 

      glBindFramebuffer(GL_READ_FRAMEBUFFER, fFBOHandle);

      glReadBuffer(GL_COLOR_ATTACHMENT0);

      glReadPixels(x, y, 1, 1, GL_RGBA,   GL_FLOAT, @PixelID[0]);

      glReadBuffer(GL_NONE);

 

Expected Results:
-------------------------------

glReadPixels should return data from the current glReadBuffer without an error.

Actual Results:
-------------------------------

The glReadPixels call generates and OpenGL debug message (Source: OpenGL ; Type : Error ; Severity : HIGH ; Message : Error has been generated. GL error GL_INVALID_OPERATION) and an OpenGL Error 1282 is on the OpenGL error stack. 

No errors exist on the OpenGLK Error stack before the glReadPixels.

Additional Information:
-------------------------------

DXDiag Report

 

Time of this report: 11/26/2014, 06:49:50

       Machine name: DBS040

   Operating System: Windows 8.1 Pro 64-bit (6.3, Build 9600) (9600.winblue_r3.140827-1500)

           Language: English (Regional Setting: English)

System Manufacturer: Alienware

       System Model: Alienware 17

               BIOS: A01

          Processor: Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz (8 CPUs), ~2.7GHz

             Memory: 32768MB RAM

Available OS Memory: 32486MB RAM

          Page File: 10880MB used, 54372MB available

        Windows Dir: C:\WINDOWS

    DirectX Version: DirectX 11

DX Setup Parameters: Not found

   User DPI Setting: 96 DPI (100 percent)

 System DPI Setting: 96 DPI (100 percent)

    DWM DPI Scaling: Disabled

     DxDiag Version: 6.03.9600.16384 64bit Unicode

 

---------------

Display Devices

---------------

          Card name: Intel(R) HD Graphics 4600

       Manufacturer: Intel Corporation

          Chip type: Intel(R) HD Graphics Family

           DAC type: Internal

        Device Type: Full Device

         Device Key: Enum\PCI\VEN_8086&DEV_0416&SUBSYS_05AA1028&REV_06

     Display Memory: 1792 MB

   Dedicated Memory: 32 MB

      Shared Memory: 1760 MB

       Current Mode: 1920 x 1080 (32 bit) (60Hz)

       Monitor Name: Generic PnP Monitor

      Monitor Model: unknown

         Monitor Id: LGD02DA

        Native Mode: 1920 x 1080(p) (60.012Hz)

        Output Type: Internal

        Driver Name: igdumdim64.dll,igd10iumd64.dll,igd10iumd64.dll,igdumdim32,igd10iumd32,igd10iumd32

Driver File Version: 10.18.0010.3960 (English)

     Driver Version: 10.18.10.3960

        DDI Version: 11.1

     Feature Levels: 11.1,11.0,10.1,10.0,9.3,9.2,9.1

       Driver Model: WDDM 1.3

Graphics Preemption: Primitive

 Compute Preemption: Thread group

           Miracast: Supported

Hybrid Graphics GPU: Integrated

     Power P-states: Not Supported

  Driver Attributes: Final Retail

   Driver Date/Size: 10/3/2014 17:36:50, 24185400 bytes

        WHQL Logo'd: Yes

    WHQL Date Stamp:

  Device Identifier: {D7B78E66-4756-11CF-E362-A725BBC2C435}

          Vendor ID: 0x8086

          Device ID: 0x0416

          SubSys ID: 0x05AA1028

        Revision ID: 0x0006

 Driver Strong Name: oem27.inf:5f63e534dd929195:iHSWM_w81:10.18.10.3960:pci\ven_8086&dev_0416

     Rank Of Driver: 00DA2001

        Video Accel: ModeMPEG2_A ModeMPEG2_C ModeWMV9_C ModeVC1_C

        DXVA2 Modes: DXVA2_ModeMPEG2_VLD  DXVA2_ModeMPEG2_IDCT  DXVA2_ModeWMV9_IDCT  DXVA2_ModeVC1_IDCT  DXVA2_ModeH264_VLD_NoFGT 

   Deinterlace Caps: {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

                     {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(UYVY,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(UYVY,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(UYVY,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

                     {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(YV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

                     {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(NV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(NV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(NV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

                     {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC1,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC1,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC1,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

                     {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC2,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

                     {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC3,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC3,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC3,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

                     {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC4,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering

                     {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC4,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch

                     {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC4,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend

       D3D9 Overlay: Supported

            DXVA-HD: Supported

       DDraw Status: Enabled

         D3D Status: Enabled

         AGP Status: Enabled

0 Kudos
2 Replies
Michael_C_Intel2
Employee
866 Views

Thanks John. I have created an internal ticket and am talking with our OpenGL driver developers. I will update you once they have had a chance to look at the issue

0 Kudos
John_H_4
Beginner
866 Views

Further to this problem, I have found that when I try and rebuild the buffers after a WMSize message (ie window size change) the problem will get worse.

The 1282 error is generated continuously for every glReadPixels.

Any feedback on this?  Would you like a copy of the executable?

0 Kudos
Reply