Commit Graph

258 Commits

Author SHA1 Message Date
Brian Paul
e67f6ee96e mesa: simplify fbo format checking code 2010-10-23 10:19:29 -06:00
Brian Paul
f9288540ec mesa: 80-column wrapping 2010-10-23 10:19:29 -06:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Ian Romanick
421f4d8dc1 ARB_texture_rg: Allow RED and RG textures as FBO color buffer attachments 2010-10-01 15:49:13 -07:00
Kristian Høgsberg
144356f992 mesa: Don't reuse DummyFramebuffer as the incomplete framebuffer
Binding framebuffer 0 on a context that doesn't have a winsys drawable
will try to bind the incomplete framebuffer.  That fails when that's
also the dummy framebuffer.
2010-09-09 17:08:12 -04:00
Eric Anholt
50a3349bee mesa: Set the base format of GL_ALPHA FBOs and teach swrast about it.
Fixes assertion failures in fbo-alpha with a debug build of Mesa.
Bug #29781.
2010-09-07 14:34:23 -07:00
Vinson Lee
c5dde53f4e mesa: Fix printf-like warnings. 2010-09-02 16:03:32 -07:00
Vladimir Vukicevic
0731701236 mesa: initialize dummy framebuffer and renderbuffer mutexes
See fd.o bug 29909.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-01 08:54:23 -06:00
Kristian Høgsberg
9456e22c7a intel: Implement EGL_KHR_surfaceless extension 2010-07-28 23:07:09 -04:00
Zack Rusin
da7bd6a90e mesa: initial support for ARB_geometry_shader4
laying down the foundation for everything and implementing most of the
stuff.
linking, gl_VerticesIn and multidimensional inputs are left.
2010-06-28 22:53:21 -04:00
Brian Paul
61ec205816 mesa: fix attachment error checking for glGetFramebufferAttachmentParameteriv()
This is a follow-on to commit 80dfec3e53.

The valid attachments for glGetFramebufferAttachmentParameteriv() depends
on whether we're querying the default FBO or a user-created FBO.
2010-06-22 21:55:51 -06:00
Kristian Høgsberg
80dfec3e53 mesa: Allow querying the system FBO in GetFramebufferAttachmentParameteriv
If the default framebuffer is bound to <target>, then
        <attachment> must be one of FRONT_LEFT, FRONT_RIGHT, BACK_LEFT,
        BACK_RIGHT, AUXi, DEPTH_BUFFER, or STENCIL_BUFFER, identifying a
        color buffer, the depth buffer, or the stencil buffer, and
        <pname> may be FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE or
        FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.

as well as these <pname> values

        FRAMEBUFFER_ATTACHMENT_RED_SIZE,
        FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,
        FRAMEBUFFER_ATTACHMENT_BLUE_SIZE,
        FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,
        FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE,
        FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE,
        FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE, or
        FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING.

https://bugs.freedesktop.org/show_bug.cgi?id=28551
2010-06-15 13:28:38 -04:00
Eric Anholt
262cdbd957 mesa: Allow GL_ALPHA FBOs with ARB_framebuffer_object.
Drivers still reject them today, but cairo would like to use these.
2010-06-10 00:22:01 -07:00
Brian Paul
23c5b21c16 mesa: whitespace and 80 column wrapping 2010-06-02 15:34:49 -06:00
Brian Paul
a504f2387e mesa: fix incorrect GL_DEPTH_STENCIL_ATTACHMENT format check
We want to check the incoming renderbuffer format, not the (potentially
non-existant) current attachment.

Fixes segfault w/ fbotexture -ds2.

NOTE: this will be applied to the 7.8 branch too.
2010-05-27 13:11:08 -06:00
Kristian Høgsberg
e88cef3c9d mesa: Reenable check for GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT
The check was disabled when FEATURE_OES_framebuffer_object was enabled,
since that used to mean we weren't implementing regular OpenGL semantics.
Now that we can compile in support for multiple APIs, change the #ifdef to
compile the check in when FEATURE_GL is enabled and enable the check for
contexts that implement OpenGL at runtime.
2010-05-24 16:56:56 -04:00
Brian Paul
8ea614832d mesa: use GL_RGBA16_SNORM for accum buffer 2010-05-09 21:19:42 -06:00
Kristian Høgsberg
61d94dd207 mesa: Move GL_RGB565 workaround into fbobject.c 2010-04-27 19:28:10 -04:00
Chia-I Wu
2002e4d06e mesa: Add OES_EGL_image to extension list. 2010-04-06 18:01:41 +08:00
Chia-I Wu
066477ab22 mesa: Add missing features.
Add features tested in the code but missing from mfeatures.h.

This also fixes some tests of features.  They should be tested with
"#if", not "#ifdef".
2010-03-30 15:39:17 +08:00
Brian Paul
8829e063aa mesa: added GL3 buffer attachment aliases 2010-03-20 12:06:35 -06:00
Brian Paul
7a2e32d684 mesa: raise an error when trying to bind non-existant texture to FBO
If the user calls glRenderBufferTexture(texture=N) but texture N
doesn't name an existing texture, raise GL_INVALID_ENUM.

Plus, add a comment about some questionable error checking code in
framebuffer_texture().  Ian?
2010-03-10 10:54:29 -07:00
Brian Paul
a8dafe713f mesa: remove redundant call to _mesa_base_fbo_format() 2010-02-25 20:11:54 -07:00
Brian Paul
51b799288a mesa: put declaration before code 2010-02-24 11:57:26 -07:00
Kristian Høgsberg
d1dc5b124e core: Implement GL_OES_EGL_image entry points 2010-02-24 13:38:56 -05:00
Kristian Høgsberg
298be2b028 Replace the _mesa_*printf() wrappers with the plain libc versions 2010-02-19 12:32:24 -05:00
Brian Paul
ca0d048e4e mesa: fix int/uint comparison warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Brian Paul
43867acb6a Merge branch 'mesa_7_7_branch'
Merging was easier than cherry picking in this instance.
2010-01-26 13:25:53 -07:00
Erik Wien
68ca19afd7 mesa: Don't bind DRAW/READ_FRAMEBUFFER separately without FBO blit support
If GL_EXT_framebuffer_blit was not supported _mesa_DeleteFramebuffersEXT
would raise an error when deleting the currently bound framebuffer. This
because it tried to bind the default DRAW- and READ_FRAMEBUFFER separately.
This patch binds the default FRAMEBUFFER instead in that case.

Encountered in the fbo/fbo-copyteximage piglit test on R600.

Patch cleaned up a bit by Brian Paul.
2010-01-26 13:19:32 -07:00
Brian Paul
cd8614b028 Merge branch 'mesa_7_7_branch'
Conflicts:
	src/gallium/auxiliary/draw/draw_context.c
	src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
	src/gallium/auxiliary/pipebuffer/Makefile
	src/gallium/auxiliary/pipebuffer/SConscript
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/gallium/auxiliary/tgsi/tgsi_scan.c
	src/gallium/drivers/i915/i915_surface.c
	src/gallium/drivers/i915/i915_texture.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/softpipe/sp_prim_vbuf.c
	src/gallium/state_trackers/xorg/xorg_dri2.c
	src/gallium/winsys/drm/intel/gem/intel_drm_api.c
	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
	src/gallium/winsys/drm/radeon/core/radeon_drm.c
	src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
	src/mesa/state_tracker/st_cb_clear.c
2010-01-22 12:17:02 -07:00
Brian Paul
031f23ac3a mesa: added comment about future FBO formats 2010-01-19 18:01:02 -07:00
Vinson Lee
536e3c9168 mesa: Remove unnecessary headers from fbobject.c. 2010-01-18 21:14:04 -08:00
Brian Paul
652828ec0e mesa: check BaseLevel, MaxLevel in _mesa_GenerateMipmapEXT() 2009-11-16 08:25:17 -07:00
Brian Paul
a719395b45 mesa: use _mesa_get_current_tex_object() 2009-11-16 08:21:28 -07:00
brian
a65b84d955 mesa: fix some begin/end render-to-texture logic
Before, we weren't aggressive enough in checking for the start or end
of render-to-texture.  In particular, if only the ctx->ReadBuffer had
texture attachments, we were treating that as a render-to-texture case.

This fixes a regression from commit 75bdbdd90b
"intel: Don't validate in a texture image used as a render target."
2009-11-10 18:09:13 -07:00
brian
bc569cd6be mesa: move check_begin/end_texture_render() calls 2009-11-10 18:09:13 -07:00
brian
d96e55fa7b mesa: new vars: oldDrawFb, oldReadFb in _mesa_BindFramebufferEXT() 2009-11-10 18:09:13 -07:00
brian
e6f60d3037 mesa: rename vars in _mesa_BindFramebufferEXT() 2009-11-10 18:09:13 -07:00
brian
a492ab765a mesa: added comment for check_begin_texture_render() 2009-11-10 18:09:12 -07:00
Eric Anholt
6b68482e68 mesa: Attempt to pair up Driver.RenderTexture and FinishRenderTexture()
This is probably not 100% complete (bind vs unbind may still not pair up
exactly), but it should help out drivers which are relying on
FinishRenderTexture to be called when we're done rendering to a particular
texture level, not just when we're done rendering to the object at all.
This is the case for the one consumer of FinishRenderTexture() so far: the
gallium state tracker.  Noticed when trying to make use of FRT() in the intel
driver.
2009-11-06 11:37:32 -08:00
Brian Paul
800e553e7a mesa: clean-up, remove some flushing in FBO functions
Remove some unneeded flushes.
Replace FLUSH_CURRENT w/ FLUSH_VERTICES in other places.
2009-11-03 09:52:25 -07:00
Brian Paul
4de18fb093 mesa: fix indentation 2009-11-03 09:52:25 -07:00
Brian Paul
18af75e501 mesa: avoid extraneous _NEW_BUFFER changes in _mesa_BindFramebufferEXT() 2009-11-03 09:52:25 -07:00
Chia-I Wu
9927d7f31c mesa: Fix compilation errors and warnings when features are disabled.
Some of the fixes are cherry-picked from opengl-es branch.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-29 07:52:58 -06:00
Brian Paul
1f196b786d Merge branch 'texformat-rework'
Conflicts:
	src/mesa/drivers/dri/radeon/radeon_fbo.c
	src/mesa/drivers/dri/s3v/s3v_tex.c
	src/mesa/drivers/dri/s3v/s3v_xmesa.c
	src/mesa/drivers/dri/trident/trident_context.c
	src/mesa/main/debug.c
	src/mesa/main/mipmap.c
	src/mesa/main/texformat.c
	src/mesa/main/texgetimage.c
2009-10-28 21:24:11 -06:00
Brian Paul
21f8d31cfd mesa: debug code for glBlitFramebuffer() 2009-10-27 17:00:31 -06:00
Brian Paul
46a784b7fd Merge branch 'mesa_7_6_branch' 2009-10-23 18:38:43 -06:00
Brian Paul
26f1ad65b9 mesa: simplify att->CubeMapFace assignment 2009-10-23 18:31:03 -06:00
Brian Paul
9b50ceac03 mesa: more detailed error messages in fbo code 2009-10-23 18:31:02 -06:00
Brian Paul
dc8b139aa2 mesa: remove FBO texture depth/stencil test
The texture format should not be checked until validation time since
the format might be changed by a subsequent glTexImage() call.
2009-10-23 18:22:41 -06:00