Age | Commit message (Collapse) | Author |
|
|
|
Set the _NEW_BUFFERS flag and remove the code which updated the
parent framebuffer size. Normal Mesa state validation will do that.
Fixes issues with Warsow on r300g and possibly other bugs.
|
|
The ST_SURFACE_x values should match the Mesa BUFFER_x values.
Added some assertions to prevent future mix-ups.
(cherry picked from commit 13cbb5fff68ef8831230638e9f0b29a217750e9d)
|
|
|
|
This should make things easier for drivers wanting to work with a
"subclass" of gl_framebuffer.
The complementary "_mesa_initialize_framebuffer" function is now
called "_mesa_initialize_window_framebuffer" for the sake of
symmetry.
Signed-off-by: Brian Paul <brianp@vmware.com>
|
|
|
|
|
|
Fixes bug 24426 for gallium.
|
|
Normally, the mesa/st would create a fake front buffer out of a
client-allocated surface.
In the DRI setting, however, st/dri provides a front buffer surface which is
created and maintained by the X server. Prefer to use this surface instead,
so that front buffer rendering and reading works correctly.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
|
|
|
|
Fixes potential crash when SwapBuffers is called but there's no back buffer.
|
|
The first time a context is bound to a drawable, the viewport and scissor
bounds are initialized to the buffer's size. This is actually a bit tricky.
A new _mesa_check_init_viewport() function is called in several places
to check if the viewport has been initialized. We also use a new
ctx->ViewportInitialized flag instead of the overloaded
ctx->FirstTimeCurrent flag.
|
|
Conflicts:
src/mesa/drivers/dri/i915/i915_tex_layout.c
src/mesa/drivers/dri/i965/brw_wm_glsl.c
src/mesa/drivers/dri/intel/intel_buffer_objects.c
src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
src/mesa/drivers/dri/intel/intel_pixel_draw.c
src/mesa/main/enums.c
src/mesa/main/texstate.c
src/mesa/vbo/vbo_exec_array.c
|
|
Conflicts:
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_framebuffer.c
|
|
The existing implementation was already implemented on software, but relied
on the pipe driver to always support the R16G16B16A16_SNORM format. This
patch eliminates that, without prejudice against a future hardware-only
implementation.
It also avoids some of the short <-> float conversions, and only does a read
transfer of the color buffer on GL_RETURN if absolutely necessary.
|
|
Furthermore, return pointer(s) to the front color buffer(s).
|
|
Indicates whether there's defined image contents, or garbage/don't care.
This is set when we draw into a renderbuffer and cleared when we resize/
reallocate a renderbuffer or do a buffer swap (back buffer becomes undefined).
We use this to determine whether the front color buffer has been drawn to,
and whether to display its contents upon glFlush/Finish(), when the new
st_swapbuffers() function is used.
|
|
The pointers to the front/back renderbuffers are exchanged.
This new function isn't actually used yet...
|
|
Before we always created the front color buffer, even if was never used.
This can save some memory.
|
|
|
|
A bit of refactoring with an eye toward ES2 and GL 3.1
|
|
|
|
|
|
|
|
to return TRUE/FALSE if the st_framebuffer is valid, and if it is
return the surface/texture in the passed pointer.
|
|
|
|
|
|
|
|
Marking all surfaces as undefined was wrong and cause some glean failures
because glReadPixels was used after SwapBuffers.
|
|
Conflicts:
src/gallium/auxiliary/rtasm/rtasm_execmem.c
src/mesa/shader/slang/slang_emit.c
src/mesa/shader/slang/slang_log.c
src/mesa/state_tracker/st_atom_framebuffer.c
|
|
|
|
Fixes some segfaults in low memory situations.
|
|
|
|
the width & height of the fb
|
|
|
|
|
|
The caller might be requesting 16-bit Z + 8-bit stencil be placed in a
PIPE_FORMAT_S8Z24 or PIPE_FORMAT_Z24S8 buffer.
|
|
|
|
|
|
|
|
|
|
This allows the winsys to explicitly specify gallium surfaces for a
framebuffer object.
|
|
|
|
This fixes the case where the app calls SwapBuffers then calls glReadPixels
to read the front color buffer. We now keep track of when the front buffer
is a _logically_ copy of the back buffer (after SwapBuffers) and read from
the back color buffer instead of the front.
|
|
If the driver can't create a PIPE_FORMAT_R16G16B16A16_SNORM surface, create
an accum surface using a shallower format and taller height. Since only the
accum buffer code accesses the surface the actual format doesn't really
matter, just that there's enough memory.
|
|
The cell driver still uses an internal CELL_FLUSH_WAIT flag, in the long run
proper fencing should be implemented for it.
|
|
|
|
If st_create_framebuffer() is called with width=0, height=0 and the program
never called glViewport, the viewport wasn't properly initalized. This fixes
that.
|
|
undefined state
|
|
|