Makefile | 14 configs/autoconf.in | 10 configs/default | 14 configure.ac | 505 +++++++--------- debian/changelog | 9 docs/egl.html | 45 - docs/opengles.html | 19 docs/openvg.html | 10 docs/relnotes-7.11.html | 2 include/EGL/eglplatform.h | 6 include/GL/internal/dri_interface.h | 5 src/egl/drivers/dri2/Makefile | 9 src/egl/drivers/dri2/egl_dri2.c | 78 +- src/egl/drivers/dri2/egl_dri2.h | 16 src/egl/drivers/dri2/platform_drm.c | 99 ++- src/egl/drivers/dri2/platform_wayland.c | 143 +++- src/egl/drivers/dri2/platform_x11.c | 9 src/egl/main/Makefile | 4 src/egl/wayland/wayland-drm/wayland-drm.c | 4 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 src/gallium/auxiliary/indices/u_unfilled_gen.py | 4 src/gallium/auxiliary/indices/u_unfilled_indices.c | 7 src/gallium/auxiliary/util/u_vbuf_mgr.c | 58 - src/gallium/auxiliary/util/u_vbuf_mgr.h | 12 src/gallium/drivers/i915/Makefile | 1 src/gallium/drivers/i915/SConscript | 1 src/gallium/drivers/i915/i915_clear.c | 2 src/gallium/drivers/i915/i915_context.c | 23 src/gallium/drivers/i915/i915_context.h | 3 src/gallium/drivers/i915/i915_fpc_translate.c | 2 src/gallium/drivers/i915/i915_query.c | 85 ++ src/gallium/drivers/i915/i915_query.h | 36 + src/gallium/drivers/i915/i915_resource.c | 4 src/gallium/drivers/i915/i915_resource.h | 12 src/gallium/drivers/i915/i915_resource_texture.c | 201 +++++- src/gallium/drivers/i915/i915_screen.c | 11 src/gallium/drivers/i915/i915_screen.h | 6 src/gallium/drivers/i915/i915_state.c | 3 src/gallium/drivers/i915/i915_state_emit.c | 73 ++ src/gallium/drivers/i915/i915_state_sampler.c | 2 src/gallium/drivers/i915/i915_state_static.c | 9 src/gallium/drivers/nouveau/nouveau_screen.c | 14 src/gallium/drivers/nouveau/nouveau_screen.h | 2 src/gallium/drivers/nv50/nv50_context.c | 8 src/gallium/drivers/nv50/nv50_context.h | 2 src/gallium/drivers/nv50/nv50_screen.h | 2 src/gallium/drivers/nv50/nv50_vbo.c | 15 src/gallium/drivers/nvc0/nvc0_context.c | 8 src/gallium/drivers/nvc0/nvc0_context.h | 2 src/gallium/drivers/nvc0/nvc0_screen.h | 2 src/gallium/drivers/nvc0/nvc0_vbo.c | 15 src/gallium/drivers/nvfx/nvfx_context.c | 16 src/gallium/drivers/nvfx/nvfx_screen.c | 7 src/gallium/drivers/nvfx/nvfx_screen.h | 1 src/gallium/drivers/r300/r300_render.c | 102 +-- src/gallium/drivers/r300/r300_texture.c | 21 src/gallium/drivers/r600/eg_state_inlines.h | 1 src/gallium/drivers/r600/evergreen_state.c | 8 src/gallium/drivers/r600/r600_asm.c | 2 src/gallium/drivers/r600/r600_blit.c | 3 src/gallium/drivers/r600/r600_pipe.c | 8 src/gallium/drivers/r600/r600_pipe.h | 15 src/gallium/drivers/r600/r600_shader.c | 200 ++++-- src/gallium/drivers/r600/r600_shader.h | 2 src/gallium/drivers/r600/r600_state.c | 59 + src/gallium/drivers/r600/r600_state_common.c | 101 +-- src/gallium/drivers/r600/r600_texture.c | 11 src/gallium/drivers/r600/r600d.h | 3 src/gallium/state_trackers/dri/drm/dri2.c | 19 src/gallium/state_trackers/egl/Makefile | 3 src/gallium/state_trackers/egl/SConscript | 4 src/gallium/state_trackers/egl/common/egl_g3d.c | 18 src/gallium/state_trackers/egl/common/egl_g3d.h | 8 src/gallium/state_trackers/egl/common/egl_g3d_api.c | 14 src/gallium/state_trackers/egl/common/egl_g3d_image.c | 70 -- src/gallium/state_trackers/egl/common/egl_g3d_loader.h | 1 src/gallium/state_trackers/egl/common/native.h | 3 src/gallium/state_trackers/egl/common/native_buffer.h | 31 src/gallium/state_trackers/egl/common/native_helper.c | 72 ++ src/gallium/state_trackers/egl/common/native_helper.h | 9 src/gallium/state_trackers/egl/drm/modeset.c | 36 + src/gallium/state_trackers/egl/drm/native_drm.c | 100 +-- src/gallium/state_trackers/egl/drm/native_drm.h | 4 src/gallium/state_trackers/egl/wayland/native_drm.c | 23 src/gallium/state_trackers/egl/wayland/native_wayland.c | 8 src/gallium/state_trackers/gbm/Makefile | 46 + src/gallium/state_trackers/gbm/gbm_drm.c | 226 +++++++ src/gallium/state_trackers/gbm/gbm_gallium_drmint.h | 74 ++ src/gallium/state_trackers/wgl/stw_ext_pbuffer.c | 2 src/gallium/state_trackers/xorg/xorg_composite.c | 6 src/gallium/state_trackers/xorg/xorg_crtc.c | 1 src/gallium/targets/Makefile.xorg | 2 src/gallium/targets/egl-static/Makefile | 201 ++++++ src/gallium/targets/egl-static/egl.c | 85 ++ src/gallium/targets/egl-static/egl_st.c | 127 +++- src/gallium/targets/egl-static/egl_st.h | 3 src/gallium/targets/egl-static/st_GL.c | 35 + src/gallium/targets/egl/Makefile | 242 ------- src/gallium/targets/egl/egl.c | 495 --------------- src/gallium/targets/egl/egl.h | 44 - src/gallium/targets/egl/pipe_i915.c | 27 src/gallium/targets/egl/pipe_i965.c | 30 src/gallium/targets/egl/pipe_nouveau.c | 21 src/gallium/targets/egl/pipe_r300.c | 27 src/gallium/targets/egl/pipe_r600.c | 27 src/gallium/targets/egl/pipe_swrast.c | 22 src/gallium/targets/egl/pipe_vmwgfx.c | 27 src/gallium/targets/egl/st_GL.c | 8 src/gallium/targets/egl/st_OpenVG.c | 8 src/gallium/targets/gbm/Makefile | 156 ++++ src/gallium/targets/gbm/gbm.c | 61 + src/gallium/targets/gbm/pipe_i915.c | 27 src/gallium/targets/gbm/pipe_i965.c | 30 src/gallium/targets/gbm/pipe_loader.c | 192 ++++++ src/gallium/targets/gbm/pipe_loader.h | 48 + src/gallium/targets/gbm/pipe_nouveau.c | 21 src/gallium/targets/gbm/pipe_r300.c | 27 src/gallium/targets/gbm/pipe_r600.c | 27 src/gallium/targets/gbm/pipe_swrast.c | 22 src/gallium/targets/gbm/pipe_vmwgfx.c | 27 src/gallium/targets/xorg-nouveau/Makefile | 5 src/gallium/targets/xorg-nouveau/nouveau_xorg.c | 75 +- src/gallium/tests/trivial/Makefile | 11 src/gallium/tests/trivial/quad-tex.c | 4 src/gallium/tests/trivial/tri.c | 4 src/gallium/winsys/r600/drm/r600_drm.c | 15 src/gallium/winsys/sw/wayland/wayland_sw_winsys.h | 1 src/gbm/Makefile | 14 src/gbm/backends/Makefile | 14 src/gbm/backends/Makefile.template | 65 ++ src/gbm/backends/dri/Makefile | 22 src/gbm/backends/dri/driver_name.c | 89 ++ src/gbm/backends/dri/gbm_dri.c | 378 +++++++++++ src/gbm/backends/dri/gbm_driint.h | 78 ++ src/gbm/main/Makefile | 90 ++ src/gbm/main/backend.c | 128 ++++ src/gbm/main/backend.h | 36 + src/gbm/main/common.c | 88 ++ src/gbm/main/common.h | 42 + src/gbm/main/common_drm.h | 48 + src/gbm/main/gbm.c | 190 ++++++ src/gbm/main/gbm.h | 100 +++ src/gbm/main/gbm.pc.in | 12 src/gbm/main/gbmint.h | 82 ++ src/glsl/linker.cpp | 41 + src/glsl/main.cpp | 1 src/glw/GLwDrawA.h | 8 src/glw/GLwDrawAP.h | 4 src/glx/applegl_glx.c | 9 src/glx/dri2_glx.c | 1 src/glx/dri_glx.c | 1 src/glx/drisw_glx.c | 1 src/glx/glxclient.h | 2 src/glx/glxcmds.c | 6 src/glx/glxcurrent.c | 41 - src/glx/indirect_glx.c | 1 src/mapi/glapi/gen/ARB_geometry_shader4.xml | 2 src/mesa/drivers/dri/i915/i830_vtbl.c | 8 src/mesa/drivers/dri/i915/i915_vtbl.c | 13 src/mesa/drivers/dri/i965/brw_clip.c | 24 src/mesa/drivers/dri/i965/brw_clip_state.c | 19 src/mesa/drivers/dri/i965/brw_context.c | 2 src/mesa/drivers/dri/i965/brw_context.h | 56 + src/mesa/drivers/dri/i965/brw_draw.c | 3 src/mesa/drivers/dri/i965/brw_draw_upload.c | 5 src/mesa/drivers/dri/i965/brw_fs.cpp | 11 src/mesa/drivers/dri/i965/brw_fs.h | 2 src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 7 src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 9 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 216 +++++- src/mesa/drivers/dri/i965/brw_gs.c | 24 src/mesa/drivers/dri/i965/brw_gs_state.c | 19 src/mesa/drivers/dri/i965/brw_misc_state.c | 39 + src/mesa/drivers/dri/i965/brw_sf.c | 22 src/mesa/drivers/dri/i965/brw_sf_state.c | 15 src/mesa/drivers/dri/i965/brw_state.h | 30 src/mesa/drivers/dri/i965/brw_state_cache.c | 227 ++++--- src/mesa/drivers/dri/i965/brw_state_dump.c | 26 src/mesa/drivers/dri/i965/brw_state_upload.c | 17 src/mesa/drivers/dri/i965/brw_vs.c | 22 src/mesa/drivers/dri/i965/brw_vs_emit.c | 2 src/mesa/drivers/dri/i965/brw_vs_state.c | 30 src/mesa/drivers/dri/i965/brw_vtbl.c | 21 src/mesa/drivers/dri/i965/brw_wm.c | 23 src/mesa/drivers/dri/i965/brw_wm.h | 12 src/mesa/drivers/dri/i965/brw_wm_state.c | 40 - src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 src/mesa/drivers/dri/i965/gen6_gs_state.c | 5 src/mesa/drivers/dri/i965/gen6_urb.c | 2 src/mesa/drivers/dri/i965/gen6_vs_state.c | 7 src/mesa/drivers/dri/i965/gen6_wm_state.c | 28 src/mesa/drivers/dri/i965/gen7_disable.c | 2 src/mesa/drivers/dri/i965/gen7_urb.c | 2 src/mesa/drivers/dri/i965/gen7_vs_state.c | 2 src/mesa/drivers/dri/i965/gen7_wm_state.c | 20 src/mesa/drivers/dri/intel/intel_batchbuffer.c | 72 ++ src/mesa/drivers/dri/intel/intel_batchbuffer.h | 2 src/mesa/drivers/dri/intel/intel_buffers.c | 84 +- src/mesa/drivers/dri/intel/intel_context.c | 7 src/mesa/drivers/dri/intel/intel_context.h | 3 src/mesa/drivers/dri/intel/intel_extensions.c | 1 src/mesa/drivers/dri/intel/intel_fbo.c | 182 ++++- src/mesa/drivers/dri/intel/intel_fbo.h | 70 ++ src/mesa/drivers/dri/intel/intel_screen.c | 27 src/mesa/drivers/dri/intel/intel_span.c | 20 src/mesa/drivers/dri/intel/intel_tex.c | 9 src/mesa/drivers/dri/intel/intel_tex_image.c | 153 ++++ src/mesa/drivers/dri/intel/intel_tex_obj.h | 30 src/mesa/drivers/dri/r200/r200_cmdbuf.c | 6 src/mesa/drivers/dri/r600/r700_render.c | 68 -- src/mesa/drivers/dri/radeon/radeon_screen.c | 3 src/mesa/main/fbobject.c | 4 src/mesa/main/mtypes.h | 3 src/mesa/main/pack.c | 15 src/mesa/main/renderbuffer.c | 23 src/mesa/main/renderbuffer.h | 3 src/mesa/main/state.c | 65 +- src/mesa/main/teximage.c | 2 src/mesa/main/texobj.c | 2 src/mesa/main/texstore.c | 9 src/mesa/state_tracker/st_atom_pixeltransfer.c | 2 src/mesa/state_tracker/st_cb_drawpixels.c | 10 src/mesa/state_tracker/st_cb_texture.c | 3 src/mesa/state_tracker/st_draw.c | 18 src/mesa/state_tracker/st_format.c | 106 +++ src/mesa/state_tracker/st_format.h | 1 src/mesa/state_tracker/st_manager.c | 69 +- src/mesa/vbo/vbo_rebase.c | 6 228 files changed, 6223 insertions(+), 2615 deletions(-)
New commits: commit 9724e5a016bb088b380c1cae2e398a4dc54a06f7 Author: Cyril Brulebois <k...@debian.org> Date: Tue Jun 28 12:09:45 2011 +0200 Bump changelog, close #631516, thank Martin Steigerwald. diff --git a/debian/changelog b/debian/changelog index 9cca73d..3f3620b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +mesa (7.11~1-1) UNRELEASED; urgency=low + + * New upstream snapshot from the 7.11 branch (up to 1ad06c7a25): + - Fix regression from 7.10, missing characters in text display with + intel drivers (Closes: #631516). Thanks to Martin Steigerwald for + the report and the tests. + + -- Cyril Brulebois <k...@debian.org> Tue, 28 Jun 2011 12:06:59 +0200 + mesa (7.11~0-2) experimental; urgency=low * Thank you sbuild for giving a green light when that's not actually the commit ebc884d3dd1c67e7f2eaa8ea56815de446a1f8ec Author: Marek Olšák <mar...@gmail.com> Date: Sat Jun 25 07:20:20 2011 +0200 r300g: drop support for ARGB, ABGR, XRGB, XBGR render targets Blending and maybe even alpha-test don't work with those formats. Only supporting RGBA, BGRA, RGBX, BGRX. NOTE: This is a candidate for the 7.10 and 7.11 branches. (cherry picked from commit bc517d64dad41bc66ab5cc1c82d8d8111145d8a1) diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 38ca9a2..62c2f1f 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -447,16 +447,8 @@ static uint32_t r300_translate_colorformat(enum pipe_format format) /*case PIPE_FORMAT_B8G8R8A8_SNORM:*/ case PIPE_FORMAT_B8G8R8X8_UNORM: /*case PIPE_FORMAT_B8G8R8X8_SNORM:*/ - case PIPE_FORMAT_A8R8G8B8_UNORM: - /*case PIPE_FORMAT_A8R8G8B8_SNORM:*/ - case PIPE_FORMAT_X8R8G8B8_UNORM: - /*case PIPE_FORMAT_X8R8G8B8_SNORM:*/ - case PIPE_FORMAT_A8B8G8R8_UNORM: - /*case PIPE_FORMAT_A8B8G8R8_SNORM:*/ case PIPE_FORMAT_R8G8B8A8_UNORM: case PIPE_FORMAT_R8G8B8A8_SNORM: - case PIPE_FORMAT_X8B8G8R8_UNORM: - /*case PIPE_FORMAT_X8B8G8R8_SNORM:*/ case PIPE_FORMAT_R8G8B8X8_UNORM: /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/ /* These formats work fine with ARGB8888 if US_OUT_FMT is set @@ -662,10 +654,6 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) R300_C2_SEL_R | R300_C3_SEL_A; /* ARGB outputs. */ - case PIPE_FORMAT_A8R8G8B8_UNORM: - /*case PIPE_FORMAT_A8R8G8B8_SNORM:*/ - case PIPE_FORMAT_X8R8G8B8_UNORM: - /*case PIPE_FORMAT_X8R8G8B8_SNORM:*/ case PIPE_FORMAT_A16_UNORM: case PIPE_FORMAT_A16_SNORM: case PIPE_FORMAT_A16_FLOAT: @@ -674,15 +662,6 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) R300_C0_SEL_A | R300_C1_SEL_R | R300_C2_SEL_G | R300_C3_SEL_B; - /* ABGR outputs. */ - case PIPE_FORMAT_A8B8G8R8_UNORM: - /*case PIPE_FORMAT_A8B8G8R8_SNORM:*/ - case PIPE_FORMAT_X8B8G8R8_UNORM: - /*case PIPE_FORMAT_X8B8G8R8_SNORM:*/ - return modifier | - R300_C0_SEL_A | R300_C1_SEL_B | - R300_C2_SEL_G | R300_C3_SEL_R; - /* RGBA outputs. */ case PIPE_FORMAT_R8G8B8X8_UNORM: /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/ commit 9383cfb4ba7f221939f3ecd93b915b8133d62b58 Author: Brian Paul <bri...@vmware.com> Date: Sat Jun 25 06:20:32 2011 -0600 Revert "Fix 24bpp software rendering" This reverts commit c0c0bb6cb140825f5bab3c40c0c9c0ec575fbc76. diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 90b5ef0..719b406 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -233,17 +233,10 @@ choose_pixel_format(const struct gl_config *v) && v->blueMask == 0x0000ff) return PF_A8R8G8B8; else if (depth == 24 - && v->depthBits == 32 - && v->redMask == 0xff0000 - && v->greenMask == 0x00ff00 - && v->blueMask == 0x0000ff) - return PF_X8R8G8B8; - else if (depth == 24 - && v->depthBits == 24 - && v->redMask == 0xff0000 - && v->greenMask == 0x00ff00 - && v->blueMask == 0x0000ff) - return PF_R8G8B8; + && v->redMask == 0xff0000 + && v->greenMask == 0x00ff00 + && v->blueMask == 0x0000ff) + return PF_X8R8G8B8; else if (depth == 16 && v->redMask == 0xf800 && v->greenMask == 0x07e0 @@ -351,13 +344,6 @@ swrast_new_renderbuffer(const struct gl_config *visual, GLboolean front) xrb->Base.DataType = GL_UNSIGNED_BYTE; xrb->bpp = 32; break; - case PF_R8G8B8: - xrb->Base.Format = MESA_FORMAT_RGB888; - xrb->Base.InternalFormat = GL_RGB; - xrb->Base._BaseFormat = GL_RGB; - xrb->Base.DataType = GL_UNSIGNED_BYTE; - xrb->bpp = 24; - break; case PF_R5G6B5: xrb->Base.Format = MESA_FORMAT_RGB565; xrb->Base.InternalFormat = GL_RGB; diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h index 40f787f..bdb52ef 100644 --- a/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -123,7 +123,6 @@ swrast_renderbuffer(struct gl_renderbuffer *rb) #define PF_R5G6B5 2 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */ #define PF_R3G3B2 3 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */ #define PF_X8R8G8B8 4 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */ -#define PF_R8G8B8 5 /**< 24bpp TrueColor: 8-R, 8-G, 8-B bits */ /* swrast_span.c */ diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c index 71aafbb..c7d0bfd 100644 --- a/src/mesa/drivers/dri/swrast/swrast_span.c +++ b/src/mesa/drivers/dri/swrast/swrast_span.c @@ -81,22 +81,6 @@ static const GLubyte kernel[16] = { DST[BCOMP] = *SRC & 0xff -/* 24-bit BGR */ -#define STORE_PIXEL_R8G8B8(DST, X, Y, VALUE) \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] -#define STORE_PIXEL_RGB_R8G8B8(DST, X, Y, VALUE) \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] -#define FETCH_PIXEL_R8G8B8(DST, SRC) \ - DST[ACOMP] = 0xff; \ - DST[RCOMP] = (*SRC >> 16) & 0xff; \ - DST[GCOMP] = (*SRC >> 8) & 0xff; \ - DST[BCOMP] = *SRC & 0xff - - /* 16-bit BGR */ #define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \ do { \ @@ -173,24 +157,6 @@ static const GLubyte kernel[16] = { #include "swrast/s_spantemp.h" -/* 24-bit BGR */ -#define NAME(FUNC) FUNC##_R8G8B8 -#define RB_TYPE GLubyte -#define SPAN_VARS \ - struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (3*X); -#define INC_PIXEL_PTR(P) P+=3 -#define STORE_PIXEL(DST, X, Y, VALUE) \ - STORE_PIXEL_R8G8B8(DST, X, Y, VALUE) -#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ - STORE_PIXEL_RGB_R8G8B8(DST, X, Y, VALUE) -#define FETCH_PIXEL(DST, SRC) \ - FETCH_PIXEL_R8G8B8(DST, SRC) - -#include "swrast/s_spantemp.h" - - /* 16-bit BGR */ #define NAME(FUNC) FUNC##_R5G6B5 #define RB_TYPE GLubyte @@ -263,24 +229,6 @@ static const GLubyte kernel[16] = { #include "swrast_spantemp.h" -/* 24-bit BGR */ -#define NAME(FUNC) FUNC##_R8G8B8_front -#define RB_TYPE GLubyte -#define SPAN_VARS \ - struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)row; -#define INC_PIXEL_PTR(P) P+=3 -#define STORE_PIXEL(DST, X, Y, VALUE) \ - STORE_PIXEL_R8G8B8(DST, X, Y, VALUE) -#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ - STORE_PIXEL_RGB_R8G8B8(DST, X, Y, VALUE) -#define FETCH_PIXEL(DST, SRC) \ - FETCH_PIXEL_R8G8B8(DST, SRC) - -#include "swrast_spantemp.h" - - /* 16-bit BGR */ #define NAME(FUNC) FUNC##_R5G6B5_front #define RB_TYPE GLubyte @@ -342,15 +290,6 @@ swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb, xrb->Base.PutValues = put_values_X8R8G8B8; xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8; break; - case PF_R8G8B8: - xrb->Base.GetRow = get_row_R8G8B8; - xrb->Base.GetValues = get_values_R8G8B8; - xrb->Base.PutRow = put_row_R8G8B8; - xrb->Base.PutRowRGB = put_row_rgb_R8G8B8; - xrb->Base.PutMonoRow = put_mono_row_R8G8B8; - xrb->Base.PutValues = put_values_R8G8B8; - xrb->Base.PutMonoValues = put_mono_values_R8G8B8; - break; case PF_R5G6B5: xrb->Base.GetRow = get_row_R5G6B5; xrb->Base.GetValues = get_values_R5G6B5; @@ -407,15 +346,6 @@ swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb, xrb->Base.PutValues = put_values_X8R8G8B8_front; xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8_front; break; - case PF_R8G8B8: - xrb->Base.GetRow = get_row_R8G8B8_front; - xrb->Base.GetValues = get_values_R8G8B8_front; - xrb->Base.PutRow = put_row_R8G8B8_front; - xrb->Base.PutRowRGB = put_row_rgb_R8G8B8_front; - xrb->Base.PutMonoRow = put_mono_row_R8G8B8_front; - xrb->Base.PutValues = put_values_R8G8B8_front; - xrb->Base.PutMonoValues = put_mono_values_R8G8B8_front; - break; case PF_R5G6B5: xrb->Base.GetRow = get_row_R5G6B5_front; xrb->Base.GetValues = get_values_R5G6B5_front; commit ac8f59b23ed8256bcce40c47b5773669b00ba78a Author: Stéphane Marchesin <marc...@chromium.org> Date: Fri Jun 24 19:51:25 2011 -0700 i915g: always upload the vs constants. This fixes a crash in llvm draw. diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index 6d2e104..0d18c7a 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -73,15 +73,13 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) mapped_indices = i915_buffer(i915->index_buffer.buffer)->data; draw_set_mapped_index_buffer(draw, mapped_indices); - if (cbuf_dirty) { - if (i915->constants[PIPE_SHADER_VERTEX]) - draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, - i915_buffer(i915->constants[PIPE_SHADER_VERTEX])->data, - (i915->current.num_user_constants[PIPE_SHADER_VERTEX] * - 4 * sizeof(float))); - else - draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0); - } + if (i915->constants[PIPE_SHADER_VERTEX]) + draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, + i915_buffer(i915->constants[PIPE_SHADER_VERTEX])->data, + (i915->current.num_user_constants[PIPE_SHADER_VERTEX] * + 4 * sizeof(float))); + else + draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0); /* * Do the drawing commit 773556e0f537eba82d9d68d618e229140f413620 Author: Eric Anholt <e...@anholt.net> Date: Fri Jun 24 15:40:51 2011 -0700 i965/gen5: Fix grf_used calculation for 16-wide. If we happened to allocate a texture result (or other vector) to the highest hardware register slot, and we were in 16-wide, we would under-count the registers used and potentially wrap around to g0 if that allocation crossed a 16-register block boundary. Bad rendering and hangs ensued. Tested-by: Ian Romanick <i...@freedesktop.org> diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index f88b131..b4689d2 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -101,7 +101,6 @@ fs_visitor::assign_regs() * for reg_width == 2. */ int reg_width = c->dispatch_width / 8; - int last_grf = 0; int hw_reg_mapping[this->virtual_grf_next + 1]; int first_assigned_grf = ALIGN(this->first_non_payload_grf, reg_width); int base_reg_count = (BRW_MAX_GRF - first_assigned_grf) / reg_width; @@ -263,6 +262,7 @@ fs_visitor::assign_regs() * regs in the register classes back down to real hardware reg * numbers. */ + this->grf_used = first_assigned_grf; hw_reg_mapping[0] = 0; /* unused */ for (int i = 1; i < this->virtual_grf_next; i++) { int reg = ra_get_node_reg(g, i); @@ -278,8 +278,9 @@ fs_visitor::assign_regs() assert(hw_reg >= 0); hw_reg_mapping[i] = first_assigned_grf + hw_reg * reg_width; - last_grf = MAX2(last_grf, - hw_reg_mapping[i] + this->virtual_grf_sizes[i] - 1); + this->grf_used = MAX2(this->grf_used, + hw_reg_mapping[i] + this->virtual_grf_sizes[i] * + reg_width); } foreach_iter(exec_list_iterator, iter, this->instructions) { @@ -290,8 +291,6 @@ fs_visitor::assign_regs() assign_reg(hw_reg_mapping, &inst->src[1], reg_width); } - this->grf_used = last_grf + reg_width; - ralloc_free(g); ralloc_free(regs); commit 7b44830ef40b6d4644c3f55189ed2457e6822428 Author: Stéphane Marchesin <marc...@chromium.org> Date: Fri Jun 24 17:18:12 2011 -0700 i915g: add fake occlusion queries. Those always return 0, but at least we don't crash when exposing GL 2.0. diff --git a/src/gallium/drivers/i915/Makefile b/src/gallium/drivers/i915/Makefile index b3f387f..7781247 100644 --- a/src/gallium/drivers/i915/Makefile +++ b/src/gallium/drivers/i915/Makefile @@ -21,6 +21,7 @@ C_SOURCES = \ i915_screen.c \ i915_prim_emit.c \ i915_prim_vbuf.c \ + i915_query.c \ i915_resource.c \ i915_resource_texture.c \ i915_resource_buffer.c \ diff --git a/src/gallium/drivers/i915/SConscript b/src/gallium/drivers/i915/SConscript index 8f5deed..9837060 100644 --- a/src/gallium/drivers/i915/SConscript +++ b/src/gallium/drivers/i915/SConscript @@ -16,6 +16,7 @@ i915 = env.ConvenienceLibrary( 'i915_fpc_translate.c', 'i915_prim_emit.c', 'i915_prim_vbuf.c', + 'i915_query.c', 'i915_screen.c', 'i915_state.c', 'i915_state_derived.c', diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index ab4ea9a..6d2e104 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -29,6 +29,7 @@ #include "i915_state.h" #include "i915_screen.h" #include "i915_surface.h" +#include "i915_query.h" #include "i915_batch.h" #include "i915_resource.h" @@ -172,6 +173,7 @@ i915_create_context(struct pipe_screen *screen, void *priv) i915_init_state_functions(i915); i915_init_flush_functions(i915); i915_init_resource_functions(i915); + i915_init_query_functions(i915); draw_install_aaline_stage(i915->draw, &i915->base); draw_install_aapoint_stage(i915->draw, &i915->base); diff --git a/src/gallium/drivers/i915/i915_query.c b/src/gallium/drivers/i915/i915_query.c new file mode 100644 index 0000000..77ed946 --- /dev/null +++ b/src/gallium/drivers/i915/i915_query.c @@ -0,0 +1,85 @@ +/************************************************************************** + * + * Copyright 2011 The Chromium OS authors. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL GOOGLE AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +/* Fake occlusion queries which return 0, it's better than crashing */ + +#include "pipe/p_compiler.h" + +#include "util/u_memory.h" + +#include "i915_context.h" +#include "i915_query.h" + +struct i915_query +{ + unsigned query; +}; + +static struct pipe_query *i915_create_query(struct pipe_context *ctx, + unsigned query_type) +{ + struct i915_query *query = CALLOC_STRUCT( i915_query ); + + return (struct pipe_query *)query; +} + +static void i915_destroy_query(struct pipe_context *ctx, + struct pipe_query *query) +{ + FREE(query); +} + +static void i915_begin_query(struct pipe_context *ctx, + struct pipe_query *query) +{ +} + +static void i915_end_query(struct pipe_context *ctx, struct pipe_query *query) +{ +} + +static boolean i915_get_query_result(struct pipe_context *ctx, + struct pipe_query *query, + boolean wait, + void *vresult) +{ + uint64_t *result = (uint64_t*)vresult; + + *result = 0; + return TRUE; +} + +void +i915_init_query_functions(struct i915_context *i915) +{ + i915->base.create_query = i915_create_query; + i915->base.destroy_query = i915_destroy_query; + i915->base.begin_query = i915_begin_query; + i915->base.end_query = i915_end_query; + i915->base.get_query_result = i915_get_query_result; +} + diff --git a/src/gallium/drivers/i915/i915_query.h b/src/gallium/drivers/i915/i915_query.h new file mode 100644 index 0000000..2c689ea --- /dev/null +++ b/src/gallium/drivers/i915/i915_query.h @@ -0,0 +1,36 @@ +/************************************************************************** + * + * Copyright 2011 The Chromium OS authors. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL GOOGLE AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef I915_QUERY_H +#define I915_QUERY_H + +struct i915_context; +struct pipe_context; + +void i915_init_query_functions( struct i915_context *i915 ); + +#endif /* I915_QUERY_H */ commit 3a7953910a7c3babebd6479bbefe9a1032bd8299 Author: Stéphane Marchesin <marc...@chromium.org> Date: Fri Jun 24 16:41:09 2011 -0700 i915g: Don't do shader fixup if no surface is bound. diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c index b7ccba8..55399a9 100644 --- a/src/gallium/drivers/i915/i915_state_emit.c +++ b/src/gallium/drivers/i915/i915_state_emit.c @@ -355,8 +355,14 @@ static const struct { PIPE_FORMAT_NONE, 0x00000000}, }; -static boolean need_fixup(enum pipe_format f) +static boolean need_fixup(struct pipe_surface* p) { + enum pipe_format f; + /* if we don't have a surface bound yet, we don't need to fixup the shader */ + if (!p) + return FALSE; + + f = p->format; for(int i=0; fixup_formats[i].format != PIPE_FORMAT_NONE; i++) if (fixup_formats[i].format == f) return TRUE; @@ -379,14 +385,14 @@ validate_program(struct i915_context *i915, unsigned *batch_space) struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0]; /* we need more batch space if we want to emulate rgba framebuffers */ - *batch_space = i915->fs->program_len + (need_fixup(cbuf_surface->format) ? 3 : 0); + *batch_space = i915->fs->program_len + (need_fixup(cbuf_surface) ? 3 : 0); } static void emit_program(struct i915_context *i915) { struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0]; - boolean need_format_fixup = need_fixup(cbuf_surface->format); + boolean need_format_fixup = need_fixup(cbuf_surface); uint i; /* we should always have, at least, a pass-through program */ commit 1a69b50b3b441ce8f7a00af3a7f02c37df50f6c3 Author: Stéphane Marchesin <marc...@chromium.org> Date: Fri Jun 24 16:18:58 2011 -0700 i915g: Fix point sprites. diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index 0217db9..ab4ea9a 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -106,7 +106,7 @@ static void i915_destroy(struct pipe_context *pipe) if (i915->blitter) util_blitter_destroy(i915->blitter); - + if(i915->batch) i915->iws->batchbuffer_destroy(i915->batch); @@ -150,6 +150,8 @@ i915_create_context(struct pipe_screen *screen, void *priv) /* init this before draw */ util_slab_create(&i915->transfer_pool, sizeof(struct pipe_transfer), 16, UTIL_SLAB_SINGLETHREADED); + util_slab_create(&i915->texture_transfer_pool, sizeof(struct i915_transfer), + 16, UTIL_SLAB_SINGLETHREADED); /* Batch stream debugging is a bit hacked up at the moment: */ diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h index 964948e..c964208 100644 --- a/src/gallium/drivers/i915/i915_context.h +++ b/src/gallium/drivers/i915/i915_context.h @@ -102,6 +102,8 @@ struct i915_fragment_shader struct tgsi_shader_info info; + struct draw_fragment_shader *draw_data; + uint *program; uint program_len; @@ -260,6 +262,7 @@ struct i915_context { int num_validation_buffers; struct util_slab_mempool transfer_pool; + struct util_slab_mempool texture_transfer_pool; /** blitter/hw-clear */ struct blitter_context* blitter; diff --git a/src/gallium/drivers/i915/i915_resource.c b/src/gallium/drivers/i915/i915_resource.c index 7f52ba1..b4719af 100644 --- a/src/gallium/drivers/i915/i915_resource.c +++ b/src/gallium/drivers/i915/i915_resource.c @@ -7,12 +7,12 @@ static struct pipe_resource * i915_resource_create(struct pipe_screen *screen, - const struct pipe_resource *template) + const struct pipe_resource *template) { if (template->target == PIPE_BUFFER) return i915_buffer_create(screen, template); else - return i915_texture_create(screen, template); + return i915_texture_create(screen, template, FALSE); } diff --git a/src/gallium/drivers/i915/i915_resource.h b/src/gallium/drivers/i915/i915_resource.h index c15ecdf..14eed2c 100644 --- a/src/gallium/drivers/i915/i915_resource.h +++ b/src/gallium/drivers/i915/i915_resource.h @@ -45,6 +45,15 @@ struct i915_buffer { boolean free_on_destroy; }; + +/* Texture transfer. */ +struct i915_transfer { + /* Base class. */ + struct pipe_transfer b; + struct pipe_resource *staging_texture; +}; + + #define I915_MAX_TEXTURE_2D_LEVELS 12 /* max 2048x2048 */ #define I915_MAX_TEXTURE_3D_LEVELS 9 /* max 256x256x256 */ @@ -101,7 +110,8 @@ static INLINE struct i915_buffer *i915_buffer(struct pipe_resource *resource) struct pipe_resource * i915_texture_create(struct pipe_screen *screen, - const struct pipe_resource *template); + const struct pipe_resource *template, + boolean force_untiled); struct pipe_resource * i915_texture_from_handle(struct pipe_screen * screen, diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c index b74b19d..3a00d08 100644 --- a/src/gallium/drivers/i915/i915_resource_texture.c +++ b/src/gallium/drivers/i915/i915_resource_texture.c @@ -37,6 +37,7 @@ #include "util/u_format.h" #include "util/u_math.h" #include "util/u_memory.h" +#include "util/u_rect.h" #include "i915_context.h" #include "i915_resource.h" @@ -710,7 +711,7 @@ i915_texture_destroy(struct pipe_screen *screen, FREE(tex); } -static struct pipe_transfer * +static struct pipe_transfer * i915_texture_get_transfer(struct pipe_context *pipe, struct pipe_resource *resource, unsigned level, @@ -719,19 +720,44 @@ i915_texture_get_transfer(struct pipe_context *pipe, { struct i915_context *i915 = i915_context(pipe); struct i915_texture *tex = i915_texture(resource); - struct pipe_transfer *transfer = util_slab_alloc(&i915->transfer_pool); + struct i915_transfer *transfer = util_slab_alloc(&i915->texture_transfer_pool); + boolean use_staging_texture = FALSE; if (transfer == NULL) return NULL; - transfer->resource = resource; - transfer->level = level; - transfer->usage = usage; - transfer->box = *box; - transfer->stride = tex->stride; - /* FIXME: layer_stride */ + transfer->b.resource = resource; + transfer->b.level = level; + transfer->b.usage = usage; + transfer->b.box = *box; + transfer->b.stride = tex->stride; + transfer->staging_texture = NULL; + /* XXX: handle depth textures everyhwere*/ + transfer->b.layer_stride = 0; + transfer->b.data = NULL; + + /* only support textures we can render to, because we need that for u_blitter */ + if (i915->blitter && + i915_is_format_supported(NULL, /* screen */ + transfer->b.resource->format, + 0, /* target */ + 1, /* sample count */ + PIPE_BIND_RENDER_TARGET) && + (usage & PIPE_TRANSFER_WRITE) && + !(usage & (PIPE_TRANSFER_READ | PIPE_TRANSFER_DONTBLOCK | PIPE_TRANSFER_UNSYNCHRONIZED))) + use_staging_texture = TRUE; + + use_staging_texture = FALSE; + + if (use_staging_texture) { + /* + * Allocate the untiled staging texture. + * If the alloc fails, transfer->staging_texture is NULL and we fallback to a map() + */ + transfer->staging_texture = i915_texture_create(pipe->screen, resource, TRUE); + } - return transfer; + return (struct pipe_transfer*)transfer; } static void @@ -739,17 +765,33 @@ i915_transfer_destroy(struct pipe_context *pipe, struct pipe_transfer *transfer) { struct i915_context *i915 = i915_context(pipe); - util_slab_free(&i915->transfer_pool, transfer); + struct i915_transfer *itransfer = (struct i915_transfer*)transfer; + + if ((itransfer->staging_texture) && + (transfer->usage & PIPE_TRANSFER_WRITE)) { + struct pipe_box sbox; + + u_box_origin_2d(itransfer->b.box.width, itransfer->b.box.height, &sbox); + pipe->resource_copy_region(pipe, itransfer->b.resource, itransfer->b.level, + itransfer->b.box.x, itransfer->b.box.y, itransfer->b.box.z, + itransfer->staging_texture, + 0, &sbox); + pipe->flush(pipe, NULL); + pipe_resource_reference(&itransfer->staging_texture, NULL); + } -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1qbvfv-0000uy...@vasks.debian.org