Commit Graph

32272 Commits

Author SHA1 Message Date
Chia-I Wu d6262bdcfb st/glx: Sync the back buffer to the front buffer.
Consider this rendering sequence

  * render to the back buffer
  * swap buffers
  * read from the front buffer

The front buffer is expected to have the contents of the back buffer.
2010-03-14 13:16:24 +08:00
Chia-I Wu 48bc3cca89 st/glx: Add support for GLX_MESA_copy_sub_buffer.
Create a per-display pipe_context as needed to copy the contents between
framebuffer attachments.  This allows us to support
GLX_MESA_copy_sub_buffer.
2010-03-14 13:16:21 +08:00
Chia-I Wu 6632915e95 st/glx: Add xmesa_display to hold per-display variables.
This basically adds a static xmesa_display to collect per-display static
variables in xm_api.c.  Multiple display support is still missing, but
this is a step forward.
2010-03-14 11:27:53 +08:00
Chia-I Wu 4a30330b26 st/mesa: Fix handling of FBO.
FBOs are created by st_new_framebuffer and cannot be casted to
st_framebuffer.
2010-03-14 10:23:51 +08:00
Chia-I Wu 8c210c1b3b st/mesa: Validate the state in st_readpixels.
The front renderbuffer of a framebuffer is usually added as needed when
glReadBuffer(GL_FRONT) is called.  When the call is followed by
glReadPixels, we should validate the state before reading from the
renderbuffer.
2010-03-13 20:34:45 +08:00
Chia-I Wu 66cd38f465 st/glx: Fix framebuffer validation.
When xmesa_st_framebuffer_validate was called twice with different sets
of attachments, the second call was ignored.  Add a texture_mask to
remember which textures have been requested to make sure the missing
ones get created.
2010-03-13 17:41:45 +08:00
Chia-I Wu 418b9ac299 st/glx: Correctly set buffer_mask of a visual.
Stupid typos again..
2010-03-13 17:40:05 +08:00
Chia-I Wu f91d8c6885 st/mesa: Set revalidate in st_framebuffer_update_attachments.
There are two conditions that a validation is required.  One is when the
the framebuffer becomes invalid.  The other is when we request for
textures that we did not request before.
2010-03-13 17:01:27 +08:00
Chia-I Wu 813c58d77e st/glx: Make xmesa_create_st_api a callback of xm_driver.
Instead of guessing the API in st/glx, let the target decide how to
create st_api.
2010-03-13 16:05:09 +08:00
Chia-I Wu fecb97aab4 st/egl: Fix eglCopyBuffers.
Use a (real) pipe context to copy between pipe surfaces.  Fix a NULL
dereference of the temporary native surface created for copying.
2010-03-13 15:14:56 +08:00
Chia-I Wu 495bfb0ad2 st/glx: Fix leaks in xmesa_st_framebuffer.
The textures and surface of a framebuffer should be unreferenced when
the framebuffer is destroyed.
2010-03-13 13:06:00 +08:00
Chia-I Wu 9dae0e0ff8 st/glx: Add xm_st.c to SConscript. 2010-03-12 13:26:18 +08:00
Chia-I Wu 543a29f1a1 st/mesa: Check the format before adding depth/stencil buffers.
The format might have depth bits, stencil bits, or both.  Add the
renderbuffers as needed.
2010-03-12 11:30:46 +08:00
Chia-I Wu 3475e88442 st/glx: Return a better format in choose_depth_stencil_format.
Return a better format instead of an exact format in
choose_depth_stencil_format.  Also, prefer formats with stencil bits.
2010-03-12 11:20:57 +08:00
Chia-I Wu 72ed7eb15a st/glx: Fix an infinite recursion in flush_front.
It was a stupid typo by me when I refactored the code.
2010-03-12 10:05:39 +08:00
Chia-I Wu 576d9af505 st/glx: Use st_api.h instead of st_public.h. 2010-03-12 09:57:11 +08:00
Chia-I Wu a924dd18c3 st/egl: Use st_api.h instead of st_public.h.
Switch from st_public.h to st_api.h.  The latter has intrinsic multiple
APIs support and allows various EGLImage extensions to be supported.
2010-03-12 09:57:07 +08:00
Chia-I Wu 3a3a31bf88 winsys/xlib, st/es: Advertise st_api.h support.
This is done by defining one of st_module_OpenGL_ES1,
st_module_OpenGL_ES2, and st_module_OpenGL.
2010-03-12 09:57:07 +08:00
Chia-I Wu de8a879f5c st/mesa: Implement st_api.h.
There is currently no user of this new interface.  As the inteface can
coexist with st_public.h, everthing should work as before.

ST_TEXTURE_2D is both defined by st_public.h and st_api.h.  Reorder the
headers in st/dri to avoid conflicts.
2010-03-12 09:57:07 +08:00
Chia-I Wu 8bcd616a3f st/vega: Implement st_api.h.
There is currently no user of this new interface.  As the inteface can
coexist with st_public.h, everthing should work as before.
2010-03-12 09:57:03 +08:00
Chia-I Wu d2083056d5 gallium: Add st_api.h.
This is a new interface to be implemented by st/mesa, st/vesa, and the
window system APIs such as EGL or GLX.
2010-03-12 09:49:55 +08:00
Brian Paul e574b79485 gallivm: checkpoint WIP cubemap code 2010-03-11 16:26:52 -07:00
Brian Paul 0b3bb6318e gallivm: added lp_build_sum_vector() 2010-03-11 16:26:12 -07:00
Brian Paul c72a3b4f2f softpipe: further tighen up sample_cube()
The code can fairly easily be translated to llvm...
2010-03-11 16:23:37 -07:00
Brian Paul 9ffdc78d1a softpipe: tighten up the code in sample_cube() 2010-03-11 15:37:35 -07:00
Brian Paul 26ae4aab6a gallivm: enable 3D texture sampling 2010-03-11 14:49:01 -07:00
Brian Paul e9f654d2fb progs/demos: added 'f' key to toggle filtering mode in stex3d.c 2010-03-11 14:49:01 -07:00
Brian Paul 53efb634a0 gallivm/llvmpipe: replace 'int stride' with 'int row_stride[MAX_LEVELS]'
The stride depends on the mipmap level.  Rename to row_stride to
distinguish from img_stride for 3D textures.

Fixes incorrect texel addressing in small mipmap levels.
2010-03-11 14:49:01 -07:00
Brian Paul 272f399434 llvmpipe: fix comment typo 2010-03-11 14:49:00 -07:00
Brian Paul 489af2a3ba gallivm/llvmpipe: include os_llvm.h instead of llvm-c/Core.h 2010-03-11 14:49:00 -07:00
Brian Paul 4833b0f199 gallium/os: wrapper for llvm-c/Core.h and #define HAVE_LLVM if needed 2010-03-11 14:49:00 -07:00
Alex Deucher 644a05c6cb r200: support additional blit formats
swizzle in the pixel shader
2010-03-11 13:49:57 -05:00
Brian Paul d645119098 gallivm: fix some bugs on the 1D texture paths 2010-03-11 11:17:37 -07:00
Roland Scheidegger ed1c69710c st/mesa: don't enable extensions which aren't actually supported
don't enable APPLE_client_storage, TDFX_texture_compression_FXT1,
EXT_cull_vertex, NV_vertex_program, NV_vertex_program1_1 -
the latter two might work somewhat with some luck.
Also don't enable ARB_imaging.
2010-03-11 18:54:14 +01:00
Karl Schultz 560d375006 windows: Add new file to project file. 2010-03-11 09:17:30 -07:00
Brian Paul 2410125d07 gallivm: include tgsi_dump.h to silence warning 2010-03-11 08:52:03 -07:00
Brian Paul 7b42379b71 gallivm: move declarations to silence unused var warnings 2010-03-11 08:51:44 -07:00
Brian Paul 0c92dfe7f3 gallium/util: use memset() to initialize vars to avoid warnings 2010-03-11 08:51:18 -07:00
Brian Paul 25ba04c891 svga: use memset() to initialize u to avoid warnings 2010-03-11 08:50:39 -07:00
José Fonseca e24e5324ed gallivm: Use bitmasks for scalar masks.
We could use single 1 bit conditions for scalar masks, but a lot of code
expects masks. The compiler easily optimzes away masks
extensions/truncations so consistency is preferable.

We can revisit this when LLVM backends have more support for vector
conditions.
2010-03-11 15:42:41 +00:00
José Fonseca 99f11f6530 gallivm: Handle scalar types in lp_build_*_type. 2010-03-11 15:42:41 +00:00
Chia-I Wu 021cdd698b mesa/es: Validate the state in st_DrawTex.
Without the validation, the function might draw with outdated textures.
2010-03-11 23:31:18 +08:00
Chia-I Wu 9f5de23d0a mesa/es: Fix GL_OES_draw_texture support.
st_DrawTex calls util_draw_vertex_buffer.  Since
ac4abaecd5, the caller is expected to set
vertex elements before calling.
2010-03-11 23:31:11 +08:00
José Fonseca 4c5c442f12 softpipe: Dummy fence functions. 2010-03-11 12:24:56 +00:00
Marek Olšák a0ae2ca033 st/dri: move extension initilization to st/mesa completely
Extensions were enabled in both st/mesa and st/dri, with st/dri completely
overriding the decisions of st/mesa and exposing even the extensions claimed
to be unsupported by a pipe driver.

This commit moves the differences between the two to st/mesa and removes
the responsibilty of advertising extensions from st/dri.
2010-03-11 12:28:51 +01:00
Michel Dänzer fc1dd5ce1d Merge remote branch 'origin/7.8' 2010-03-11 12:14:05 +01:00
Vinson Lee aa311ae616 winsys/xlib: Fix memory leak.
Memory for xm_dt was allocated twice.
2010-03-11 00:18:09 -08:00
Vinson Lee 8f7e06ddf6 progs/fpglsl: Fix GLSL compilation failures on Mac OS X. 2010-03-11 00:10:26 -08:00
Marek Olšák 40adcd611f st/mesa: always advertise texture_rectangle 2010-03-11 02:32:08 +01:00
Brian Paul 67a2f98be7 gallivm: overhaul of texture sampling code
The new lp_build_sample_general() function will handle all sampling
modes for all texture types.  Still incomplete, but a few additional
sampling modes are now supported.

1D textures should work and most of the code for 3D textures is in place.
No support for cube maps yet.  No support for different min/mag filters.
2010-03-10 18:09:49 -07:00