rpms/mesa/devel mesa.spec,1.226,1.227 radeon-rewrite.patch,1.4,1.5
Dave Airlie
airlied at fedoraproject.org
Thu Mar 5 08:20:05 UTC 2009
Author: airlied
Update of /cvs/pkgs/rpms/mesa/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8714
Modified Files:
mesa.spec radeon-rewrite.patch
Log Message:
* Thu Mar 05 2009 Dave Airlie <airlied at redhat.com> 7.3-10
- radeon-rewrite.patch: fixup link against libdrm_radeon
Index: mesa.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mesa/devel/mesa.spec,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -r1.226 -r1.227
--- mesa.spec 4 Mar 2009 07:00:36 -0000 1.226
+++ mesa.spec 5 Mar 2009 08:19:34 -0000 1.227
@@ -20,7 +20,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 7.3
-Release: 9%{?dist}
+Release: 10%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
@@ -427,6 +427,9 @@
%{_libdir}/mesa-demos-data
%changelog
+* Thu Mar 05 2009 Dave Airlie <airlied at redhat.com> 7.3-10
+- radeon-rewrite.patch: fixup link against libdrm_radeon
+
* Wed Mar 04 2009 Dave Airlie <airlied at redhat.com> 7.3-9
- try again: pull in 7.4 fixes, dri configs changes, new radeon-rewrite
radeon-rewrite.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.4 -r 1.5 radeon-rewrite.patch
Index: radeon-rewrite.patch
===================================================================
RCS file: /cvs/pkgs/rpms/mesa/devel/radeon-rewrite.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- radeon-rewrite.patch 4 Mar 2009 07:00:36 -0000 1.4
+++ radeon-rewrite.patch 5 Mar 2009 08:19:34 -0000 1.5
@@ -1,47 +1,19513 @@
-From c4030c794274b22ba6ccb7c919900b41f5c723f2 Mon Sep 17 00:00:00 2001
-From: Dave Airlie <airlied at redhat.com>
-Date: Wed, 4 Mar 2009 16:51:14 +1000
-Subject: [PATCH] radeon/r100/r200: import latest merge
+commit 263b887d85e3eac9a32673c8ed3004c3129ce997
+Author: Dave Airlie <airlied at redhat.com>
+Date: Sun Feb 15 17:03:47 2009 +1000
----
- src/mesa/drivers/dri/radeon/radeon_bo_drm.h | 182 ++++
- src/mesa/drivers/dri/radeon/radeon_bo_legacy.c | 825 +++++++++++++++++
- src/mesa/drivers/dri/radeon/radeon_bo_legacy.h | 47 +
- src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h | 67 ++
- src/mesa/drivers/dri/radeon/radeon_cmdbuf.h | 143 +++
- src/mesa/drivers/dri/radeon/radeon_common.c | 849 +++++++++++++++++
- src/mesa/drivers/dri/radeon/radeon_common.h | 55 ++
- .../drivers/dri/radeon/radeon_common_context.c | 589 ++++++++++++
- .../drivers/dri/radeon/radeon_common_context.h | 508 ++++++++++
- src/mesa/drivers/dri/radeon/radeon_cs_drm.h | 207 +++++
- src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 504 ++++++++++
- src/mesa/drivers/dri/radeon/radeon_cs_legacy.h | 40 +
- src/mesa/drivers/dri/radeon/radeon_dma.c | 323 +++++++
- src/mesa/drivers/dri/radeon/radeon_dma.h | 51 +
- src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | 360 ++++++++
- src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h | 97 ++
- src/mesa/drivers/dri/radeon/radeon_texture.c | 966 ++++++++++++++++++++
- src/mesa/drivers/dri/radeon/radeon_texture.h | 118 +++
- 18 files changed, 5931 insertions(+), 0 deletions(-)
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_bo_drm.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_bo_legacy.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_cmdbuf.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_common.c
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_common.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_common_context.c
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_common_context.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_cs_drm.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_cs_legacy.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_dma.c
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_dma.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_texture.c
- create mode 100644 src/mesa/drivers/dri/radeon/radeon_texture.h
+ radeon: add cflags to decide whether to link libdrm_radeon or not.
+
+ You don't need libdrm_radeon for the legacy driver to build,
+ only for the experimental mm/cs paths.
+commit 61e6b2aee3069700db397f26d7ae1384641367ff
+Author: Ian Romanick <idr at freedesktop.org>
+Date: Fri Jan 9 15:43:17 2009 -0800
+
+ 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
+
+commit 86691da4b5f43be625ec510b7fe40657b9985783
+Author: Dave Airlie <airlied at redhat.com>
+Date: Wed Mar 4 16:51:14 2009 +1000
+
+ radeon/r100/r200: import latest merge
+diff --git a/configs/autoconf.in b/configs/autoconf.in
+index 4a89716..f18d119 100644
+--- a/configs/autoconf.in
++++ b/configs/autoconf.in
+@@ -20,6 +20,8 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
+ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
+ LDFLAGS = @LDFLAGS@
+ EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
++RADEON_CFLAGS = @RADEON_CFLAGS@
++RADEON_LDFLAGS = @RADEON_LDFLAGS@
+
+ # Assembler
+ ASM_SOURCES = @ASM_SOURCES@
+diff --git a/configure.ac b/configure.ac
+index 73caf00..48f4eac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -413,6 +413,8 @@ AC_SUBST([SRC_DIRS])
+ AC_SUBST([GLU_DIRS])
+ AC_SUBST([DRIVER_DIRS])
+ AC_SUBST([WINDOW_SYSTEM])
++AC_SUBST([RADEON_CFLAGS])
++AC_SUBST([RADEON_LDFLAGS])
+
+ dnl
+ dnl User supplied program configuration
+@@ -540,6 +542,13 @@ dri)
+ GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
+ DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
+
++ PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
++
++ if test "$HAVE_LIBDRM_RADEON" = yes; then
++ RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
++ RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
++ fi
++
+ # find the DRI deps for libGL
+ if test "$x11_pkgconfig" = yes; then
+ # add xcb modules if necessary
+diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
+index fa8121e..abae4b3 100644
+--- a/src/mesa/drivers/dri/i965/brw_cc.c
++++ b/src/mesa/drivers/dri/i965/brw_cc.c
+@@ -84,6 +84,7 @@ static void
+ cc_unit_populate_key(struct brw_context *brw, struct brw_cc_unit_key *key)
+ {
+ struct gl_stencil_attrib *stencil = brw->attribs.Stencil;
++ const unsigned back = stencil->_BackFace;
+
+ memset(key, 0, sizeof(*key));
+
+@@ -100,13 +101,13 @@ cc_unit_populate_key(struct brw_context *brw, struct brw_cc_unit_key *key)
+ key->stencil_test_mask[0] = stencil->ValueMask[0];
+ }
+ if (key->stencil_two_side) {
+- key->stencil_func[1] = stencil->Function[1];
+- key->stencil_fail_op[1] = stencil->FailFunc[1];
+- key->stencil_pass_depth_fail_op[1] = stencil->ZFailFunc[1];
+- key->stencil_pass_depth_pass_op[1] = stencil->ZPassFunc[1];
+- key->stencil_ref[1] = stencil->Ref[1];
+- key->stencil_write_mask[1] = stencil->WriteMask[1];
+- key->stencil_test_mask[1] = stencil->ValueMask[1];
++ key->stencil_func[1] = stencil->Function[back];
++ key->stencil_fail_op[1] = stencil->FailFunc[back];
++ key->stencil_pass_depth_fail_op[1] = stencil->ZFailFunc[back];
++ key->stencil_pass_depth_pass_op[1] = stencil->ZPassFunc[back];
++ key->stencil_ref[1] = stencil->Ref[back];
++ key->stencil_write_mask[1] = stencil->WriteMask[back];
++ key->stencil_test_mask[1] = stencil->ValueMask[back];
+ }
+
+ if (brw->attribs.Color->_LogicOpEnabled)
+diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
+index c50b0d2..24149cf 100644
+--- a/src/mesa/drivers/dri/i965/brw_wm.c
++++ b/src/mesa/drivers/dri/i965/brw_wm.c
+@@ -189,8 +189,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
+ lookup |= IZ_STENCIL_TEST_ENABLE_BIT;
+
+ if (brw->attribs.Stencil->WriteMask[0] ||
+- (brw->attribs.Stencil->_TestTwoSide &&
+- brw->attribs.Stencil->WriteMask[1]))
++ brw->attribs.Stencil->WriteMask[brw->attribs.Stencil->_BackFace])
+ lookup |= IZ_STENCIL_WRITE_ENABLE_BIT;
+ }
+
+diff --git a/src/mesa/drivers/dri/r200/Makefile b/src/mesa/drivers/dri/r200/Makefile
+index e9144ac..e593ed9 100644
+--- a/src/mesa/drivers/dri/r200/Makefile
++++ b/src/mesa/drivers/dri/r200/Makefile
+@@ -3,6 +3,8 @@
+ TOP = ../../../../..
+ include $(TOP)/configs/current
+
++CFLAGS += $(RADEON_CFLAGS)
++
+ LIBNAME = r200_dri.so
+
+ MINIGLX_SOURCES = server/radeon_dri.c
+@@ -11,25 +13,35 @@ ifeq ($(USING_EGL), 1)
+ EGL_SOURCES = server/radeon_egl.c
+ endif
+
++RADEON_COMMON_SOURCES = \
++ radeon_texture.c \
++ radeon_common_context.c \
++ radeon_common.c \
++ radeon_dma.c \
++ radeon_lock.c \
++ radeon_bo_legacy.c \
++ radeon_cs_legacy.c \
++ radeon_mipmap_tree.c \
++ radeon_span.c
++
++
+ DRIVER_SOURCES = r200_context.c \
+ r200_ioctl.c \
+- r200_lock.c \
[...29303 lines suppressed...]
+ ctx->Stencil.ValueMask[face] == mask &&
+ ctx->Stencil.Ref[face] == ref)
+@@ -218,9 +202,12 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
+ ctx->Stencil.Function[face] = func;
+ ctx->Stencil.Ref[face] = ref;
+ ctx->Stencil.ValueMask[face] = mask;
+- if (ctx->Driver.StencilFuncSeparate) {
+- ctx->Driver.StencilFuncSeparate(ctx, face ? GL_BACK : GL_FRONT,
+- func, ref, mask);
++
++ /* Only propagate the change to the driver if EXT_stencil_two_side
++ * is enabled.
++ */
++ if (ctx->Driver.StencilFuncSeparate && ctx->Stencil.TestTwoSide) {
++ ctx->Driver.StencilFuncSeparate(ctx, GL_BACK, func, ref, mask);
+ }
+ }
+ else {
+@@ -237,7 +224,9 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
+ ctx->Stencil.Ref[0] = ctx->Stencil.Ref[1] = ref;
+ ctx->Stencil.ValueMask[0] = ctx->Stencil.ValueMask[1] = mask;
+ if (ctx->Driver.StencilFuncSeparate) {
+- ctx->Driver.StencilFuncSeparate(ctx, GL_FRONT_AND_BACK,
++ ctx->Driver.StencilFuncSeparate(ctx,
++ ((ctx->Stencil.TestTwoSide)
++ ? GL_FRONT : GL_FRONT_AND_BACK),
+ func, ref, mask);
+ }
+ }
+@@ -259,17 +248,23 @@ void GLAPIENTRY
+ _mesa_StencilMask( GLuint mask )
+ {
+ GET_CURRENT_CONTEXT(ctx);
++ const GLint face = ctx->Stencil.ActiveFace;
++
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+- if (ctx->Extensions.EXT_stencil_two_side) {
+- /* only set active face state */
+- const GLint face = ctx->Stencil.ActiveFace;
++ if (face != 0) {
++ /* Only modify the EXT_stencil_two_side back-face state.
++ */
+ if (ctx->Stencil.WriteMask[face] == mask)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_STENCIL);
+ ctx->Stencil.WriteMask[face] = mask;
+- if (ctx->Driver.StencilMaskSeparate) {
+- ctx->Driver.StencilMaskSeparate(ctx, face ? GL_BACK : GL_FRONT, mask);
++
++ /* Only propagate the change to the driver if EXT_stencil_two_side
++ * is enabled.
++ */
++ if (ctx->Driver.StencilMaskSeparate && ctx->Stencil.TestTwoSide) {
++ ctx->Driver.StencilMaskSeparate(ctx, GL_BACK, mask);
+ }
+ }
+ else {
+@@ -280,7 +275,10 @@ _mesa_StencilMask( GLuint mask )
+ FLUSH_VERTICES(ctx, _NEW_STENCIL);
+ ctx->Stencil.WriteMask[0] = ctx->Stencil.WriteMask[1] = mask;
+ if (ctx->Driver.StencilMaskSeparate) {
+- ctx->Driver.StencilMaskSeparate(ctx, GL_FRONT_AND_BACK, mask);
++ ctx->Driver.StencilMaskSeparate(ctx,
++ ((ctx->Stencil.TestTwoSide)
++ ? GL_FRONT : GL_FRONT_AND_BACK),
++ mask);
+ }
+ }
+ }
+@@ -304,6 +302,8 @@ void GLAPIENTRY
+ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+ {
+ GET_CURRENT_CONTEXT(ctx);
++ const GLint face = ctx->Stencil.ActiveFace;
++
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!validate_stencil_op(ctx, fail)) {
+@@ -319,9 +319,8 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+ return;
+ }
+
+- if (ctx->Extensions.EXT_stencil_two_side) {
++ if (face != 0) {
+ /* only set active face state */
+- const GLint face = ctx->Stencil.ActiveFace;
+ if (ctx->Stencil.ZFailFunc[face] == zfail &&
+ ctx->Stencil.ZPassFunc[face] == zpass &&
+ ctx->Stencil.FailFunc[face] == fail)
+@@ -330,9 +329,12 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+ ctx->Stencil.ZFailFunc[face] = zfail;
+ ctx->Stencil.ZPassFunc[face] = zpass;
+ ctx->Stencil.FailFunc[face] = fail;
+- if (ctx->Driver.StencilOpSeparate) {
+- ctx->Driver.StencilOpSeparate(ctx, face ? GL_BACK : GL_FRONT,
+- fail, zfail, zpass);
++
++ /* Only propagate the change to the driver if EXT_stencil_two_side
++ * is enabled.
++ */
++ if (ctx->Driver.StencilOpSeparate && ctx->Stencil.TestTwoSide) {
++ ctx->Driver.StencilOpSeparate(ctx, GL_BACK, fail, zfail, zpass);
+ }
+ }
+ else {
+@@ -349,7 +351,9 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+ ctx->Stencil.ZPassFunc[0] = ctx->Stencil.ZPassFunc[1] = zpass;
+ ctx->Stencil.FailFunc[0] = ctx->Stencil.FailFunc[1] = fail;
+ if (ctx->Driver.StencilOpSeparate) {
+- ctx->Driver.StencilOpSeparate(ctx, GL_FRONT_AND_BACK,
++ ctx->Driver.StencilOpSeparate(ctx,
++ ((ctx->Stencil.TestTwoSide)
++ ? GL_FRONT : GL_FRONT_AND_BACK),
+ fail, zfail, zpass);
+ }
+ }
+@@ -372,7 +376,7 @@ _mesa_ActiveStencilFaceEXT(GLenum face)
+
+ if (face == GL_FRONT || face == GL_BACK) {
+ FLUSH_VERTICES(ctx, _NEW_STENCIL);
+- ctx->Stencil.ActiveFace = (face == GL_FRONT) ? 0 : 1;
++ ctx->Stencil.ActiveFace = (face == GL_FRONT) ? 0 : 2;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glActiveStencilFaceEXT(face)");
+@@ -513,19 +517,16 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask)
+ void
+ _mesa_update_stencil(GLcontext *ctx)
+ {
+- if (ctx->Extensions.EXT_stencil_two_side) {
+- ctx->Stencil._TestTwoSide = ctx->Stencil.TestTwoSide;
+- }
+- else {
+- ctx->Stencil._TestTwoSide =
+- (ctx->Stencil.Function[0] != ctx->Stencil.Function[1] ||
+- ctx->Stencil.FailFunc[0] != ctx->Stencil.FailFunc[1] ||
+- ctx->Stencil.ZPassFunc[0] != ctx->Stencil.ZPassFunc[1] ||
+- ctx->Stencil.ZFailFunc[0] != ctx->Stencil.ZFailFunc[1] ||
+- ctx->Stencil.Ref[0] != ctx->Stencil.Ref[1] ||
+- ctx->Stencil.ValueMask[0] != ctx->Stencil.ValueMask[1] ||
+- ctx->Stencil.WriteMask[0] != ctx->Stencil.WriteMask[1]);
+- }
++ const GLint face = ctx->Stencil._BackFace;
++
++ ctx->Stencil._TestTwoSide =
++ (ctx->Stencil.Function[0] != ctx->Stencil.Function[face] ||
++ ctx->Stencil.FailFunc[0] != ctx->Stencil.FailFunc[face] ||
++ ctx->Stencil.ZPassFunc[0] != ctx->Stencil.ZPassFunc[face] ||
++ ctx->Stencil.ZFailFunc[0] != ctx->Stencil.ZFailFunc[face] ||
++ ctx->Stencil.Ref[0] != ctx->Stencil.Ref[face] ||
++ ctx->Stencil.ValueMask[0] != ctx->Stencil.ValueMask[face] ||
++ ctx->Stencil.WriteMask[0] != ctx->Stencil.WriteMask[face]);
+ }
+
+
+@@ -544,17 +545,24 @@ _mesa_init_stencil(GLcontext *ctx)
+ ctx->Stencil.ActiveFace = 0; /* 0 = GL_FRONT, 1 = GL_BACK */
+ ctx->Stencil.Function[0] = GL_ALWAYS;
+ ctx->Stencil.Function[1] = GL_ALWAYS;
++ ctx->Stencil.Function[2] = GL_ALWAYS;
+ ctx->Stencil.FailFunc[0] = GL_KEEP;
+ ctx->Stencil.FailFunc[1] = GL_KEEP;
++ ctx->Stencil.FailFunc[2] = GL_KEEP;
+ ctx->Stencil.ZPassFunc[0] = GL_KEEP;
+ ctx->Stencil.ZPassFunc[1] = GL_KEEP;
++ ctx->Stencil.ZPassFunc[2] = GL_KEEP;
+ ctx->Stencil.ZFailFunc[0] = GL_KEEP;
+ ctx->Stencil.ZFailFunc[1] = GL_KEEP;
++ ctx->Stencil.ZFailFunc[2] = GL_KEEP;
+ ctx->Stencil.Ref[0] = 0;
+ ctx->Stencil.Ref[1] = 0;
++ ctx->Stencil.Ref[2] = 0;
+ ctx->Stencil.ValueMask[0] = ~0U;
+ ctx->Stencil.ValueMask[1] = ~0U;
++ ctx->Stencil.ValueMask[2] = ~0U;
+ ctx->Stencil.WriteMask[0] = ~0U;
+ ctx->Stencil.WriteMask[1] = ~0U;
++ ctx->Stencil.WriteMask[2] = ~0U;
+ ctx->Stencil.Clear = 0;
+ }
+diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
+index c925922..2e84dde 100644
+--- a/src/mesa/swrast/s_stencil.c
++++ b/src/mesa/swrast/s_stencil.c
+@@ -997,10 +997,12 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
+ GLboolean
+ _swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span)
+ {
++ const GLuint face = (span->facing == 0) ? 0 : ctx->Stencil._BackFace;
++
+ if (span->arrayMask & SPAN_XY)
+- return stencil_and_ztest_pixels(ctx, span, span->facing);
++ return stencil_and_ztest_pixels(ctx, span, face);
+ else
+- return stencil_and_ztest_span(ctx, span, span->facing);
++ return stencil_and_ztest_span(ctx, span, face);
+ }
+
+
More information about the scm-commits
mailing list