Bug 13757 - [FBO]IsFramebufferEXT should return true for names created by GenFramebuffersEXT
Summary: [FBO]IsFramebufferEXT should return true for names created by GenFramebuffersEXT
Status: VERIFIED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-20 18:02 UTC by Shuang He
Modified: 2008-10-12 19:07 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
test case (1.45 KB, text/plain)
2007-12-20 18:04 UTC, Shuang He
Details

Description Shuang He 2007-12-20 18:02:47 UTC
System Environment:
--------------------------
--Mesa:e54329233522591bbe8aad8a3fd6bcdc1e430f03 

Bug detailed description:
--------------------------
IsFramebufferEXT return false for names created by GenFramebuffersEXT, before these names are bound
According to OpenGL spec,         
The command

            boolean IsFramebufferEXT( uint framebuffer );

        returns TRUE if <framebuffer> is the name of an framebuffer
        object.  If <framebuffer> is zero, or if <framebuffer> is a
        non-zero value that is not the name of an framebuffer object,
        IsFramebufferEXT return FALSE.

IsFramebufferEXT should return TRUE for names created by GenFramebuffersEXT
but the Mesa implementation is now depend this on whether this framebuffer name is bound.

Reproduce steps:
----------------
start X
compile and run the attached test case


Current result:
----------------
IsFramebufferEXT return false for names created by GenFramebuffersEXT, before these names are bound


Expected result:
----------------
IsFramebufferEXT should return true for names created by GenFramebuffersEXT, before these names are bound
Comment 1 Shuang He 2007-12-20 18:04:21 UTC
Created attachment 13260 [details]
test case
Comment 2 Brian Paul 2008-01-01 08:26:04 UTC
I believe Mesa is correct as-is.  The GL_EXT_framebuffer_object spec says:

"""
    The command

      void GenFramebuffersEXT(sizei n, uint *ids);

    returns <n> previously unused framebuffer object names in <ids>.
    These names are marked as used, for the purposes of
    GenFramebuffersEXT only, but they acquire state and type only when
    they are first bound, just as if they were unused.
"""

So the ID doesn't really name an FBO until the ID has been bound.
This is consistant with NVIDIA's GL.  It works the same way for texture objects too.
Comment 3 Shuang He 2008-01-01 17:25:43 UTC
(In reply to comment #2)
> I believe Mesa is correct as-is.  The GL_EXT_framebuffer_object spec says:
> 
> """
>     The command
> 
>       void GenFramebuffersEXT(sizei n, uint *ids);
> 
>     returns <n> previously unused framebuffer object names in <ids>.
>     These names are marked as used, for the purposes of
>     GenFramebuffersEXT only, but they acquire state and type only when
>     they are first bound, just as if they were unused.
> """
> 
> So the ID doesn't really name an FBO until the ID has been bound.
> This is consistant with NVIDIA's GL.  It works the same way for texture objects
> too.
> 

OK, you're right
Comment 4 Shuang He 2008-10-12 19:07:52 UTC
verified


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.