Commit Graph

258 Commits

Author SHA1 Message Date
Brian Paul
13041da714 mesa: fix texture/renderbuffer mix-up in test_attachment_completeness() 2008-03-28 13:10:16 -06:00
Brian
c3395f4473 Remove unused texunit parameter to ctx->Driver.GenerateMipmap() 2008-02-08 15:13:48 -07:00
Brian
4c2f3dbca9 Added ctx->Driver.GenerateMipmap() driver hook 2008-02-06 09:35:39 -07:00
Brian
8b36166d29 check for texture and renderbuffer in check_end_texture_render() 2007-11-09 08:56:05 -07:00
Brian
98c539d337 in check_end_texture_render(), test for presence of a renderbuffer and texobj 2007-11-08 09:14:43 -07:00
Brian
95e84a09ce remove dead code left over after fixing GL_READ/DRAW_BUFFER state issues 2007-08-18 16:11:31 +01:00
Brian
32d86eb28a Rework the GL_READ_BUFFER, GL_DRAW_BUFFER state repairs that Roland previously did.
Basically, in update_framebuffer() (which should be called after an FBO is bound
with MakeCurrent or BindFramebuffer) we check if the FBO is a window-system FBO.
If it is, update the FBO's GL_READ/DRAW_BUFFER state according to the context state.
Old code still in place but disabled with #if 0 / #endif.
2007-08-16 18:52:48 +01:00
Brian
9e01b915f1 Implement mutex/locking around texture object reference counting.
Use new _mesa_reference_texobj() function for referencing/unreferencing
textures.  Add new assertions/tests to try to detect invalid usage of
deleted textures.
2007-08-13 11:29:46 +01:00
Roland Scheidegger
a1bc0d0f51 fix mesa's handling of fbo's / window fb (again)
Make sure the relevant fields in window fbs get updated at appropriate time
(those are NOT the same as fbos!!!), and fix up related code accordingly.
This is a bit ugly, but there's a reason the issues section in EXT_fbo is
a couple hundred pages long...
Hopefully correct now.
2007-07-19 17:59:59 +02:00
Roland Scheidegger
6075df53b5 more fixes for mesa's fbo handling (fixes tests/fbotest1/2) 2007-07-19 17:59:31 +02:00
Roland Scheidegger
dbfb375805 fix mesa fb binding
Make sure that we bind the right buffer (draw or read) when rebinding
the window framebuffer (the api doesn't allow binding different draw and
read buffers at the same time, but the default window framebuffer is basically
2 fb objects, one for read, one for write, which can be different). Pass both
of these two down the driver api (no driver uses this right now).
2007-07-19 17:47:14 +02:00
Ian Romanick
bb372f1c9b Initial implementation of MESA_texture_array
Shadow sampling from texture arrays is still not implemented.  Everything
else should be there, though.
2007-05-16 15:34:22 -07:00
Ian Romanick
b0fe0d8a55 Bring framebuffer_texture's error checking more in-line with the spec. 2007-05-15 13:42:25 -07:00
Brian
dccd9c4f4d use _mesa_reference_renderbuffer() in a few more places 2007-04-02 09:57:27 -06:00
Brian
42aaa548a1 Fix some renderbuffer reference counting issues. Also fixes a mem leak. 2007-03-25 10:39:36 -06:00
Brian
e69da9d02e explicit calls to _mesa_unreference_framebuffer() not always needed now 2007-03-06 16:26:22 -07:00
Brian
a510bc3ee1 Fix/improve framebuffer object reference counting.
Use _mesa_reference_framebuffer() and _mesa_unreference_framebuffer() functions
to be sure reference counting is done correctly.  Additional assertions are
done too.  Note _mesa_dereference_framebuffer() renamed to "unreference" as
that's more accurate.
2007-03-06 10:07:59 -07:00
Brian
a8ba888a35 move oldFb decl into tighter scopes 2007-03-01 09:40:21 -07:00
Keith Whitwell
5ac93f8621 Merge texmem-0-3-branch. 2006-11-01 14:21:57 +00:00
Brian Paul
24edd90159 Move mipmap generation functions, texture scaling functions into new
mipmap.c file.
2006-09-29 01:24:26 +00:00
Keith Whitwell
df058298e1 Flush driver, not just tnl module. 2006-09-22 11:40:35 +00:00
Brian Paul
7ac5b7b934 use new _mesa_dereference_frame/renderbuffer() functions 2006-05-20 15:08:25 +00:00
Brian Paul
13abf91b42 casts to fix some -pedantic warnings 2006-04-13 19:17:13 +00:00
Brian Paul
f08f233d6f Remove the code that checks for duplicated framebuffer attachments (which
generated the error GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT).
This was removed in version 117 of the GL_EXT_framebuffer_object spec.
2006-04-05 19:58:10 +00:00
Brian Paul
28b014ee25 Silence minor compiler warnings (-Wextra). 2006-04-05 03:05:17 +00:00
Brian Paul
9f6ff49650 update conditional for render to GL_DEPTH_STENCIL texture, check for valid teximage before calling ctx->Driver.RenderTexture() 2006-03-28 15:24:50 +00:00
Brian Paul
ea4fe661d7 merge from texman branch 2006-03-26 05:22:17 +00:00
Brian Paul
519b23b21f Lots of changes/fixes for rendering to framebuffer objects.
- When deleting texture objects, unbind from FBOs if necessary.
- Changed driver hooks for starting/ending render to texture.
- Now properly handle case where gl[Copy]TexImage() is called after
  glFramebufferTexture[123]D().  That didn't work before.
2006-03-20 18:51:57 +00:00
Brian Paul
4991888fa0 additional assertions and debug code for testing FBO completeness 2006-03-20 15:27:55 +00:00
Brian Paul
59e0faaa5c sync with texmem branch 2006-03-15 17:48:00 +00:00
Brian Paul
2e01918b55 call _mesa_update_framebuffer_visual() in _mesa_FramebufferRenderbufferEXT() to fix some minor glitches 2006-03-07 01:43:52 +00:00
Brian Paul
9974540c73 remove temporary tokens, more error checks for blit function 2006-03-01 02:02:43 +00:00
Brian Paul
0e31e02aef Added FinishRenderTexture() device driver function to indicate when
rendering to a texture has likely completed.
Fixed refcount issue in texture renderbuffer wrapper.
2005-12-01 00:25:00 +00:00
Brian Paul
311bcf5090 In _mesa_RenderbufferStorageEXT(), try to avoid needless reallocation.
Simplify _mesa_GetRenderbufferParameterivEXT() queries.
2005-11-18 02:24:14 +00:00
Brian Paul
847160466c Support for combined depth/stencil renderbuffers (GL_EXT_packed_depth_stencil).
depthstencil.c provides wrappers for treating depth/stencil buffers either
as regular depth or stencil renderbuffers.
2005-11-16 04:05:54 +00:00
Brian Paul
0bffb1192a some initial work on upcoming GL_EXT_framebuffer_blit extension 2005-11-08 14:45:48 +00:00
Brian Paul
474f28e57c Fix some issues with state updates and renderbuffers. Querying GL_RED_BITS,
etc. after calling glRenderBufferStorageEXT gave undefined results.
2005-10-08 14:41:17 +00:00
Brian Paul
a9fc8ba756 In gl_texture_image replace IntFormat with InternalFormat and Format with
_BaseFormat to be consistant with gl_renderbuffer.
2005-10-05 01:48:07 +00:00
Brian Paul
91802fdf73 check if deleting currently bound frame/renderbuffer object 2005-10-04 16:01:02 +00:00
Brian Paul
bc6cced479 fix behaviour of glIsFrame/Renderbuffer() 2005-10-04 15:01:27 +00:00
Brian Paul
071b30aba1 added a few calls to _mesa_update_framebuffer_visual() 2005-10-03 16:11:35 +00:00
Brian Paul
1ad7b99925 Initial work for GL_EXT_packed_depth_stencil extension.
glReadPixels done, glDrawPixels mostly done.
2005-09-28 02:29:50 +00:00
Brian Paul
676d0accf5 Replace gl_renderbuffer.ComponentSizes[] with separate RedBits, GreenBits,
BlueBits, etc fields.
2005-09-22 05:19:57 +00:00
Brian Paul
ab8ef280ec new comment 2005-09-07 23:21:59 +00:00
Brian Paul
eba4ff6e0a minor formatting fix 2005-09-06 21:22:16 +00:00
Brian Paul
ed7f3aead8 fix GL_ALPHA render-to-texture problem (Jon Smirl) 2005-06-07 15:03:40 +00:00
Brian Paul
c7264415b6 added code to detect GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT error 2005-06-01 00:50:23 +00:00
Brian Paul
1b93953fbc add support for GL_RENDERBUFFER_RED/GREEN/BLUE/etc_SIZE_EXT querie 2005-05-31 23:55:21 +00:00
Brian Paul
e4b2356c07 Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts:
- new code for creating the Mesa GLframebuffer
- new span/pixel read/write code
Some drivers not yet updated/tested.
2005-05-04 20:11:35 +00:00
Brian Paul
6c0c91714c silence warnings 2005-02-27 16:23:41 +00:00