Commit graph

13811 commits

Author SHA1 Message Date
Owain Ainsworth
0b5266ff64 intel: fix vblank crtc selection with DRI1 when only one pipe is enabled.
On Mobile chipsets, we often enable PipeB instead of PipeA, but the test
in here was insufficient, falling back to pipe A if the area
intersection returned zero. Therefore, in the case where a window went
off to the top of the left of the screen, it would freeze, waiting on
the wrong vblank.

Fix this mess by checking the sarea for a crtc being zero sized, and in
that case always default to the other one.
2009-01-23 12:58:49 -08:00
Owain G. Ainsworth
39b4061bb9 intel: Prevent an "irq is not working" printf when only pipe B is enabled.
intelMakeCurrent is called before intelWindowMoved (in fact, it calls
it), so calculation of the correct vblank crtc has not happened yet.
Fix this by making a function that fixes up a set of vblank flags and
call if from both functions.
2009-01-23 12:51:19 -08:00
Brian Paul
6f8896c599 docs: document improved stencil support and GL_EXT_vertex_array_bgra 2009-01-23 11:36:57 -07:00
Brian Paul
b8fc605cdb Merge branch 'vertex_array_bgra' 2009-01-23 11:29:05 -07:00
Brian Paul
dab586b075 i965: enable GL_EXT_vertex_array_bgra
Simply a matter of choosing the right surface/vertex format for GLubyte/GL_BGRA arrays.
2009-01-23 11:27:42 -07:00
Brian Paul
0bd6d48bce mesa: enable GL_EXT_vertex_array_bgra for sw drivers 2009-01-23 11:26:51 -07:00
Brian Paul
0791fdff6f mesa: update tnl module for GL_EXT_vertex_array_bgra
Add special case for GLubyte/GL_BGRA color arrays in _tnl_import_array()
2009-01-23 11:26:30 -07:00
Brian Paul
9cf594d698 mesa: improve array initialization code, and set the new array->Format field. 2009-01-23 11:25:13 -07:00
Brian Paul
76d27a6a1e mesa: update glColorPointer, etc for GL_EXT_vertex_array_bgra
Add new error checking, set array state appropriately.
2009-01-23 11:24:31 -07:00
Brian Paul
f7c1a2dacd mesa: initial bits for GL_EXT_vertex_array_bgra 2009-01-23 11:23:12 -07:00
Ian Romanick
42c07d1500 r300: Enable GL_ATI_separate_stencil in R300
At this point, GL_EXT_stencil_two_side should probably be disabled.
It may be worth leaving it enabled because it has GLX protocol while
GL_ATI_separate_stencil does not.  I'll leave it to one of the r300
maintainers to make the call.
2009-01-23 09:49:29 -08:00
Ian Romanick
f7265e7a57 965: Enable GL_EXT_stencil_two_side 2009-01-23 09:49:29 -08:00
Ian Romanick
b5fbdef7ec swrast: Enable GL_EXT_stencil_two_side 2009-01-23 09:49:29 -08:00
Ian Romanick
dde7cb9628 Track two sets of back-face stencil state
Track separate back-face stencil state for OpenGL 2.0 /
GL_ATI_separate_stencil and GL_EXT_stencil_two_side.  This allows all
three to be enabled in a driver.  One set of state is set via the 2.0
or ATI functions and is used when STENCIL_TEST_TWO_SIDE_EXT is
disabled.  The other is set by StencilFunc and StencilOp when the
active stencil face is set to BACK.  The GL_EXT_stencil_two_side spec has
more details.

http://opengl.org/registry/specs/EXT/stencil_two_side.txt
2009-01-23 09:49:29 -08:00
Brian Paul
af0e6336e9 i965: whitespace changes and reformatting 2009-01-22 16:34:27 -07:00
Brian Paul
fb88b6df82 docs: first 7.5 feature: GL_ARB_framebuffer_object 2009-01-22 15:51:12 -07:00
Brian Paul
a7f98f4c7e i965: enable GL_ARB_framebuffer_object 2009-01-22 15:43:50 -07:00
Brian Paul
6d2e1f6a2c intel: add GL_EXT_framebuffer blit extension
This functionality is required by GL_ARB_framebuffer_object.
For now, implement it in terms of glCopyPixels().  This will need to be
revisted though.
2009-01-22 15:43:40 -07:00
Brian Paul
f8a7e497ac intel: remove/disable the "paired depth/stencil" code
We only allow combined depth+stencil renderbuffers so the complicated code
for splitting and combining separate depth and stencil buffers is no longer
needed.
2009-01-22 15:34:16 -07:00
Brian Paul
b27057b381 intel: asst clean-ups, simplifications in intel_draw_buffer() 2009-01-22 15:33:12 -07:00
Brian Paul
3abf67c6b1 intel: remove unneeded call to ctx->Driver.DepthRange()
The preceeding call to intel_draw_buffer() does that.
2009-01-22 15:32:52 -07:00
Brian Paul
71b78149bd i965: disallow separate depth/stencil renderbuffers
Take advantage of the GL_FRAMEBUFFER_UNSUPPORTED feature to disallow separate
depth and stencil renderbuffers; only allow combined depth/stencil buffers.

Next up: remove/simplify a bunch of the depth/stencil renderbuffer code.

Also: restore the previously disabled GL_DEPTH_COMPONENT16 case
2009-01-22 15:32:38 -07:00
Brian Paul
d1eca7f558 i965: minor reformatting 2009-01-22 15:31:50 -07:00
Brian Paul
3c98d3cf32 intel: plug in stub intel_validate_framebuffer() function 2009-01-22 15:31:20 -07:00
Brian Paul
f8b00806d8 intel: inline some renderbuffer functions 2009-01-22 15:30:57 -07:00
Brian Paul
0906f47c1f demos: revamp the fbotexture.c demo
Try making depth/stencil attachments in two different ways.
Check for GL errors and GL_FRAMEBUFFER_UNSUPPORTED status to be more robust.
Reorganize the code a bit to make it clearer.
Added -arb option to test GL_ARB_fbo's mixed renderbuffer sizes
Added -ds2 option to test GL_DEPTH_STENCIL_ATTACHMENT
2009-01-22 15:25:10 -07:00
Brian Paul
aed7403f32 demos: updated FBO tests to for ARB_fbo
Some things that were not errors in EXT_fbo are errors in ARB_fbo.
2009-01-22 15:22:54 -07:00
Brian Paul
1b199101ff mesa: enable ARB_fbo for s/w drivers 2009-01-22 15:22:08 -07:00
Brian Paul
7296636ad0 mesa: avoid calling _mesa_test_framebuffer_completeness() more than needed
When we change a FBO's attachments, set _Status=0.
Before using an FBO, check if status != GL_FRAMEBUFFER_COMPLETE.
Also, fix missing GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE status.
2009-01-22 15:21:17 -07:00
Brian Paul
d0f13fa7d7 mesa: fix some renderbuffer/framebuffer delete semantics
Need to unbind buffers if referenced by the current read/draw pointers when
being deleted.
2009-01-22 15:20:45 -07:00
Brian Paul
3059007f0c mesa: add support for GL_DEPTH_STENCIL_ATTACHMENT point.
Used to set both the depth and stencil attachment points to one renderbuffer
of texture.
2009-01-22 15:20:36 -07:00
Brian Paul
722d976283 mesa: additional FBO error checking for multisample-related things
Plus some new comments.
2009-01-22 15:20:22 -07:00
Brian Paul
23524e8733 mesa: update Visual.samples field in _mesa_update_framebuffer_visual() 2009-01-22 15:20:09 -07:00
Brian Paul
4f3514e410 mesa: refactor glRenderbufferStorage(), glRenderbufferStorageMultisample() code
Use a common helper routine for both functions.
2009-01-22 15:19:56 -07:00
Brian Paul
8fb8855b4d mesa: init MaxSamples = 0 (no multisampling) 2009-01-22 15:19:22 -07:00
Brian Paul
5ca24eaf56 mesa: add ARB_framebuffer_object.xml to API_XML 2009-01-22 15:18:56 -07:00
Brian Paul
515c118a7e mesa: added GL_MAX_SAMPLES query for GL_ARB_fbo 2009-01-22 15:18:24 -07:00
Brian Paul
4fc16fb7e9 mesa: added NumSamples, MaxSamples for ARB_fbo 2009-01-22 15:18:06 -07:00
Brian Paul
777a2efc77 mesa: stub for _mesa_RenderbufferStorageMultisample() 2009-01-22 15:17:42 -07:00
Brian Paul
1f32c410dd mesa: call fbo_incomplete() if driver marks FBO as incomplete (debug only) 2009-01-22 15:16:17 -07:00
Brian Paul
283edbe311 mesa: update update_framebuffer_size() for ARB_fbo and mixed renderbuffer sizes 2009-01-22 15:14:45 -07:00
Brian Paul
3528f69ce4 mesa: added ctx->Driver.ValidateFramebuffer() callback
Called from the _mesa_test_framebuffer_completeness() function to give the
driver the chance to make a framebuffer as incomplete if it doesn't meet
some specific hardware restriction.
2009-01-22 15:13:18 -07:00
Brian Paul
1bc59bf4f8 mesa: add new ARB_fbo queries, fix some error tests 2009-01-22 15:07:34 -07:00
Brian Paul
d9a2cf9246 mesa: add new ColorEncoding and ComponentType to gl_renderbuffer 2009-01-22 15:07:10 -07:00
Brian Paul
06f3b2e679 mesa: additional FBO/RB id error checking for ARB_fbo
It's illegal to bind a FBO/RB id that didn't come from glGenRender/Framebuffer().
2009-01-22 15:06:17 -07:00
Brian Paul
989edea409 mesa: for ARB_fbo, lift restriction that all FBO attachments are same size and color format 2009-01-22 15:05:13 -07:00
Brian Paul
7d98f5ab6e mesa: initial extension bits for GL_ARB_framebuffer_object 2009-01-22 15:04:11 -07:00
Brian Paul
27d08f0ed2 mesa: regenerated GL API files 2009-01-22 15:02:00 -07:00
Brian Paul
4397974662 glapi: include ARB_framebuffer_object.xml 2009-01-22 14:56:14 -07:00
Brian Paul
d61b8896bc glapi: XML spec for GL_ARB_framebuffer_object 2009-01-22 14:55:20 -07:00