Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
|
|
|
|
If an app never called glViewport, the viewport size was always 0 by 0 pixels.
Now pass initial size to st_create_framebuffer() and initialize the viewport
and scissor bounds in st_make_current().
This could also be fixed by ensuring the gl_framebuffers passed to
_mesa_make_current() were initialized to the right size. But that involves
allocating the renderbuffers/pipe_surfaces earlier and that runs into some
other issues ATM.
Also remove obsolete createRenderbuffers param to st_create_framebuffer().
|
|
st_create_framebuffer() now takes pipe_formats for the color, depth, stencil
buffers.
This avoids a round-about chain of calls to pipe->is_format_supported() for
window renderbuffers (their format never changes).
Renderbuffer format selection code in st_format.c is simpler now too.
|
|
surface, etc.
Additional types may be added in the future.
|
|
|
|
The state tracker doesn't have to directly call winsys->wait_idle() anymore.
glFlush and glFinish both go through pipe->flush() now.
|
|
|
|
|
|
|