mirror of
https://src.fedoraproject.org/rpms/mesa.git
synced 2024-12-01 12:10:53 +00:00
- Don't install header files for APIs that we don't provide. (#247390)
This commit is contained in:
parent
a54c0f7c40
commit
7700ba6760
2 changed files with 229 additions and 13 deletions
218
mesa-6.5.2-via-respect-my-cliplist.patch
Normal file
218
mesa-6.5.2-via-respect-my-cliplist.patch
Normal file
|
@ -0,0 +1,218 @@
|
||||||
|
From: Miguel Marte <miguelmarte@gmail.com>
|
||||||
|
Date: Sun, 18 Mar 2007 17:08:29 +0000 (-0600)
|
||||||
|
Subject: screen offset changes, bug 9965
|
||||||
|
X-Git-Tag: pre-merge-glsl-compiler-1
|
||||||
|
X-Git-Url: http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commitdiff;h=c41d6ab6f062ebce1076ca79f9ad0c7368a0e2d0
|
||||||
|
|
||||||
|
screen offset changes, bug 9965
|
||||||
|
---
|
||||||
|
|
||||||
|
--- a/src/mesa/drivers/dri/unichrome/via_context.c
|
||||||
|
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
|
||||||
|
@@ -768,9 +768,7 @@ void viaXMesaWindowMoved(struct via_cont
|
||||||
|
drawable);
|
||||||
|
}
|
||||||
|
|
||||||
|
- draw_buffer->drawXoff = (GLuint)(((drawable->x * bytePerPixel) & 0x1f) /
|
||||||
|
- bytePerPixel);
|
||||||
|
- draw_buffer->drawX = drawable->x - draw_buffer->drawXoff;
|
||||||
|
+ draw_buffer->drawX = drawable->x;
|
||||||
|
draw_buffer->drawY = drawable->y;
|
||||||
|
draw_buffer->drawW = drawable->w;
|
||||||
|
draw_buffer->drawH = drawable->h;
|
||||||
|
@@ -782,9 +780,7 @@ void viaXMesaWindowMoved(struct via_cont
|
||||||
|
readable);
|
||||||
|
}
|
||||||
|
|
||||||
|
- read_buffer->drawXoff = (GLuint)(((readable->x * bytePerPixel) & 0x1f) /
|
||||||
|
- bytePerPixel);
|
||||||
|
- read_buffer->drawX = readable->x - read_buffer->drawXoff;
|
||||||
|
+ read_buffer->drawX = readable->x;
|
||||||
|
read_buffer->drawY = readable->y;
|
||||||
|
read_buffer->drawW = readable->w;
|
||||||
|
read_buffer->drawH = readable->h;
|
||||||
|
@@ -795,13 +791,24 @@ void viaXMesaWindowMoved(struct via_cont
|
||||||
|
draw_buffer->drawX * bytePerPixel);
|
||||||
|
|
||||||
|
vmesa->front.origMap = (vmesa->front.map +
|
||||||
|
- draw_buffer->drawY * vmesa->front.pitch +
|
||||||
|
- draw_buffer->drawX * bytePerPixel);
|
||||||
|
+ draw_buffer->drawY * vmesa->front.pitch +
|
||||||
|
+ draw_buffer->drawX * bytePerPixel);
|
||||||
|
+
|
||||||
|
+ vmesa->back.orig = (vmesa->back.offset +
|
||||||
|
+ draw_buffer->drawY * vmesa->back.pitch +
|
||||||
|
+ draw_buffer->drawX * bytePerPixel);
|
||||||
|
|
||||||
|
- vmesa->back.orig = vmesa->back.offset;
|
||||||
|
- vmesa->depth.orig = vmesa->depth.offset;
|
||||||
|
- vmesa->back.origMap = vmesa->back.map;
|
||||||
|
- vmesa->depth.origMap = vmesa->depth.map;
|
||||||
|
+ vmesa->back.origMap = (vmesa->back.map +
|
||||||
|
+ draw_buffer->drawY * vmesa->back.pitch +
|
||||||
|
+ draw_buffer->drawX * bytePerPixel);
|
||||||
|
+
|
||||||
|
+ vmesa->depth.orig = (vmesa->depth.offset +
|
||||||
|
+ draw_buffer->drawY * vmesa->depth.pitch +
|
||||||
|
+ draw_buffer->drawX * bytePerPixel);
|
||||||
|
+
|
||||||
|
+ vmesa->depth.origMap = (vmesa->depth.map +
|
||||||
|
+ draw_buffer->drawY * vmesa->depth.pitch +
|
||||||
|
+ draw_buffer->drawX * bytePerPixel);
|
||||||
|
|
||||||
|
viaCalcViewport(vmesa->glCtx);
|
||||||
|
}
|
||||||
|
--- a/src/mesa/drivers/dri/unichrome/via_context.h
|
||||||
|
+++ b/src/mesa/drivers/dri/unichrome/via_context.h
|
||||||
|
@@ -104,11 +104,6 @@ struct via_renderbuffer {
|
||||||
|
int drawW;
|
||||||
|
int drawH;
|
||||||
|
|
||||||
|
- int drawXoff; /* drawX is 32byte aligned - this is
|
||||||
|
- * the delta to the real origin, in
|
||||||
|
- * pixel units.
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
__DRIdrawablePrivate *dPriv;
|
||||||
|
};
|
||||||
|
|
||||||
|
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.c
|
||||||
|
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c
|
||||||
|
@@ -187,7 +187,7 @@ static void viaFillBuffer(struct via_con
|
||||||
|
int w = pbox[i].x2 - pbox[i].x1;
|
||||||
|
int h = pbox[i].y2 - pbox[i].y1;
|
||||||
|
|
||||||
|
- int offset = (buffer->orig +
|
||||||
|
+ int offset = (buffer->offset +
|
||||||
|
y * buffer->pitch +
|
||||||
|
x * bytePerPixel);
|
||||||
|
|
||||||
|
@@ -276,7 +276,7 @@ static void viaClear(GLcontext *ctx, GLb
|
||||||
|
|
||||||
|
/* flip top to bottom */
|
||||||
|
cy = dPriv->h - cy - ch;
|
||||||
|
- cx += vrb->drawX + vrb->drawXoff;
|
||||||
|
+ cx += vrb->drawX;
|
||||||
|
cy += vrb->drawY;
|
||||||
|
|
||||||
|
if (!all) {
|
||||||
|
@@ -359,8 +359,8 @@ static void viaDoSwapBuffers(struct via_
|
||||||
|
GLint w = b->x2 - b->x1;
|
||||||
|
GLint h = b->y2 - b->y1;
|
||||||
|
|
||||||
|
- GLuint src = back->orig + y * back->pitch + x * bytePerPixel;
|
||||||
|
- GLuint dest = front->orig + y * front->pitch + x * bytePerPixel;
|
||||||
|
+ GLuint src = back->offset + y * back->pitch + x * bytePerPixel;
|
||||||
|
+ GLuint dest = front->offset + y * front->pitch + x * bytePerPixel;
|
||||||
|
|
||||||
|
viaBlit(vmesa,
|
||||||
|
bytePerPixel << 3,
|
||||||
|
@@ -747,7 +747,7 @@ static void via_emit_cliprect(struct via
|
||||||
|
: HC_HDBFM_RGB565);
|
||||||
|
|
||||||
|
GLuint pitch = buffer->pitch;
|
||||||
|
- GLuint offset = buffer->orig;
|
||||||
|
+ GLuint offset = buffer->offset;
|
||||||
|
|
||||||
|
if (0)
|
||||||
|
fprintf(stderr, "emit cliprect for box %d,%d %d,%d\n",
|
||||||
|
@@ -768,7 +768,7 @@ static void via_emit_cliprect(struct via
|
||||||
|
vb[4] = (HC_SubA_HDBBasL << 24) | (offset & 0xFFFFFF);
|
||||||
|
vb[5] = (HC_SubA_HDBBasH << 24) | ((offset & 0xFF000000) >> 24);
|
||||||
|
|
||||||
|
- vb[6] = (HC_SubA_HSPXYOS << 24) | ((31 - buffer->drawXoff) << HC_HSPXOS_SHIFT);
|
||||||
|
+ vb[6] = (HC_SubA_HSPXYOS << 24);
|
||||||
|
vb[7] = (HC_SubA_HDBFM << 24) | HC_HDBLoc_Local | format | pitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -887,22 +887,18 @@ void viaFlushDmaLocked(struct via_contex
|
||||||
|
struct via_renderbuffer *const vrb =
|
||||||
|
(struct via_renderbuffer *) dPriv->driverPrivate;
|
||||||
|
|
||||||
|
-
|
||||||
|
for (i = 0; i < vmesa->numClipRects; i++) {
|
||||||
|
drm_clip_rect_t b;
|
||||||
|
|
||||||
|
- b.x1 = pbox[i].x1 - (vrb->drawX + vrb->drawXoff);
|
||||||
|
- b.x2 = pbox[i].x2 - (vrb->drawX + vrb->drawXoff);
|
||||||
|
- b.y1 = pbox[i].y1 - vrb->drawY;
|
||||||
|
- b.y2 = pbox[i].y2 - vrb->drawY;
|
||||||
|
+ b.x1 = pbox[i].x1;
|
||||||
|
+ b.x2 = pbox[i].x2;
|
||||||
|
+ b.y1 = pbox[i].y1;
|
||||||
|
+ b.y2 = pbox[i].y2;
|
||||||
|
|
||||||
|
if (vmesa->scissor &&
|
||||||
|
!intersect_rect(&b, &b, &vmesa->scissorRect))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- b.x1 += vrb->drawXoff;
|
||||||
|
- b.x2 += vrb->drawXoff;
|
||||||
|
-
|
||||||
|
via_emit_cliprect(vmesa, &b);
|
||||||
|
|
||||||
|
if (fire_buffer(vmesa) != 0) {
|
||||||
|
--- a/src/mesa/drivers/dri/unichrome/via_span.c
|
||||||
|
+++ b/src/mesa/drivers/dri/unichrome/via_span.c
|
||||||
|
@@ -46,7 +46,7 @@
|
||||||
|
GLuint pitch = vrb->pitch; \
|
||||||
|
GLuint height = dPriv->h; \
|
||||||
|
GLint p = 0; \
|
||||||
|
- char *buf = (char *)(vrb->origMap + vrb->drawXoff * vrb->bpp); \
|
||||||
|
+ char *buf = (char *)(vrb->origMap); \
|
||||||
|
(void) p;
|
||||||
|
|
||||||
|
/* ================================================================
|
||||||
|
@@ -82,7 +82,7 @@
|
||||||
|
__DRIdrawablePrivate *dPriv = vrb->dPriv; \
|
||||||
|
GLuint depth_pitch = vrb->pitch; \
|
||||||
|
GLuint height = dPriv->h; \
|
||||||
|
- char *buf = (char *)(vrb->map + (vrb->drawXoff * vrb->bpp/8))
|
||||||
|
+ char *buf = (char *)(vrb->map)
|
||||||
|
|
||||||
|
#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS
|
||||||
|
|
||||||
|
--- a/src/mesa/drivers/dri/unichrome/via_state.c
|
||||||
|
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
|
||||||
|
@@ -500,10 +500,8 @@ void viaEmitState(struct via_context *vm
|
||||||
|
|
||||||
|
OUT_RING( HC_HEADER2 );
|
||||||
|
OUT_RING( (HC_ParaType_NotTex << 16) );
|
||||||
|
- OUT_RING( (HC_SubA_HSPXYOS << 24) |
|
||||||
|
- (((32- vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT));
|
||||||
|
- OUT_RING( (HC_SubA_HSPXYOS << 24) |
|
||||||
|
- (((32 - vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT));
|
||||||
|
+ OUT_RING( (HC_SubA_HSPXYOS << 24) );
|
||||||
|
+ OUT_RING( (HC_SubA_HSPXYOS << 24) );
|
||||||
|
|
||||||
|
ADVANCE_RING();
|
||||||
|
}
|
||||||
|
@@ -712,12 +710,8 @@ static void viaColorMask(GLcontext *ctx,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-/* =============================================================
|
||||||
|
- */
|
||||||
|
|
||||||
|
-
|
||||||
|
-/* Using drawXoff like this is incorrect outside of locked regions.
|
||||||
|
- * This hardware just isn't capable of private back buffers without
|
||||||
|
+/* This hardware just isn't capable of private back buffers without
|
||||||
|
* glitches and/or a hefty locking scheme.
|
||||||
|
*/
|
||||||
|
void viaCalcViewport(GLcontext *ctx)
|
||||||
|
@@ -729,12 +723,10 @@ void viaCalcViewport(GLcontext *ctx)
|
||||||
|
const GLfloat *v = ctx->Viewport._WindowMap.m;
|
||||||
|
GLfloat *m = vmesa->ViewportMatrix.m;
|
||||||
|
|
||||||
|
- /* See also via_translate_vertex.
|
||||||
|
- */
|
||||||
|
m[MAT_SX] = v[MAT_SX];
|
||||||
|
- m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X + vrb->drawXoff;
|
||||||
|
+ m[MAT_TX] = v[MAT_TX] + vrb->drawX + SUBPIXEL_X;
|
||||||
|
m[MAT_SY] = - v[MAT_SY];
|
||||||
|
- m[MAT_TY] = - v[MAT_TY] + dPriv->h + SUBPIXEL_Y;
|
||||||
|
+ m[MAT_TY] = - v[MAT_TY] + vrb->drawY + SUBPIXEL_Y + vrb->drawH;
|
||||||
|
m[MAT_SZ] = v[MAT_SZ] * (1.0 / vmesa->depth_max);
|
||||||
|
m[MAT_TZ] = v[MAT_TZ] * (1.0 / vmesa->depth_max);
|
||||||
|
}
|
24
mesa.spec
24
mesa.spec
|
@ -31,7 +31,7 @@
|
||||||
Summary: Mesa graphics libraries
|
Summary: Mesa graphics libraries
|
||||||
Name: mesa
|
Name: mesa
|
||||||
Version: 6.5.2
|
Version: 6.5.2
|
||||||
Release: 10%{?dist}
|
Release: 12%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.mesa3d.org
|
URL: http://www.mesa3d.org
|
||||||
|
@ -51,6 +51,7 @@ Patch21: mesa-6.5.2-picify-dri-drivers.patch
|
||||||
Patch22: mesa-6.5.2-hush-synthetic-visual-warning.patch
|
Patch22: mesa-6.5.2-hush-synthetic-visual-warning.patch
|
||||||
Patch23: mesa-6.5.2-bindcontext-paranoia.patch
|
Patch23: mesa-6.5.2-bindcontext-paranoia.patch
|
||||||
Patch24: mesa-6.5.2-radeon-backports-231787.patch
|
Patch24: mesa-6.5.2-radeon-backports-231787.patch
|
||||||
|
Patch25: mesa-6.5.2-via-respect-my-cliplist.patch
|
||||||
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
%if %{with_dri}
|
%if %{with_dri}
|
||||||
|
@ -169,6 +170,7 @@ The glx-utils package provides the glxinfo and glxgears utilities.
|
||||||
%patch22 -p1 -b .visual-warning
|
%patch22 -p1 -b .visual-warning
|
||||||
%patch23 -p1 -b .bindcontext
|
%patch23 -p1 -b .bindcontext
|
||||||
%patch24 -p1 -b .radeon-231787
|
%patch24 -p1 -b .radeon-231787
|
||||||
|
%patch25 -p1 -b .via-cliplist
|
||||||
|
|
||||||
# WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT
|
# WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT
|
||||||
# license and are not open source/free software, so we remove them.
|
# license and are not open source/free software, so we remove them.
|
||||||
|
@ -214,7 +216,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
# handpick and manually install the parts we want.
|
# handpick and manually install the parts we want.
|
||||||
|
|
||||||
install -d $RPM_BUILD_ROOT%{_includedir}/GL
|
install -d $RPM_BUILD_ROOT%{_includedir}/GL
|
||||||
install -m 644 include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
|
install -m 644 include/GL/{gl,o,x}*.h $RPM_BUILD_ROOT%{_includedir}/GL
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_includedir}/GL/glfbdev.h
|
||||||
|
|
||||||
install -d $RPM_BUILD_ROOT%{_libdir}
|
install -d $RPM_BUILD_ROOT%{_libdir}
|
||||||
cp -d -f %{_lib}/lib* $RPM_BUILD_ROOT%{_libdir}
|
cp -d -f %{_lib}/lib* $RPM_BUILD_ROOT%{_libdir}
|
||||||
|
@ -275,23 +278,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files libGL-devel
|
%files libGL-devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_includedir}/GL/amesa.h
|
|
||||||
%{_includedir}/GL/dmesa.h
|
|
||||||
%{_includedir}/GL/fxmesa.h
|
|
||||||
%{_includedir}/GL/ggimesa.h
|
|
||||||
%{_includedir}/GL/gl.h
|
%{_includedir}/GL/gl.h
|
||||||
%{_includedir}/GL/gl_mangle.h
|
%{_includedir}/GL/gl_mangle.h
|
||||||
%{_includedir}/GL/glext.h
|
%{_includedir}/GL/glext.h
|
||||||
%{_includedir}/GL/glfbdev.h
|
|
||||||
%{_includedir}/GL/glx.h
|
%{_includedir}/GL/glx.h
|
||||||
%{_includedir}/GL/glx_mangle.h
|
%{_includedir}/GL/glx_mangle.h
|
||||||
%{_includedir}/GL/glxext.h
|
%{_includedir}/GL/glxext.h
|
||||||
%{_includedir}/GL/mesa_wgl.h
|
|
||||||
%{_includedir}/GL/mglmesa.h
|
|
||||||
%{_includedir}/GL/svgamesa.h
|
|
||||||
%{_includedir}/GL/uglmesa.h
|
|
||||||
%{_includedir}/GL/vms_x_fix.h
|
|
||||||
%{_includedir}/GL/wmesa.h
|
|
||||||
%{_includedir}/GL/xmesa.h
|
%{_includedir}/GL/xmesa.h
|
||||||
%{_includedir}/GL/xmesa_x.h
|
%{_includedir}/GL/xmesa_x.h
|
||||||
%{_includedir}/GL/xmesa_xf86.h
|
%{_includedir}/GL/xmesa_xf86.h
|
||||||
|
@ -338,6 +330,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_bindir}/glxinfo
|
%{_bindir}/glxinfo
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 09 2007 Adam Jackson <ajax@redhat.com> 6.5.2-12
|
||||||
|
- Don't install header files for APIs that we don't provide. (#247390)
|
||||||
|
|
||||||
|
* Fri Jul 06 2007 Adam Jackson <ajax@redhat.com> 6.5.2-11
|
||||||
|
- mesa-6.5.2-via-respect-my-cliplist.patch: Backport a via fix. (#247254)
|
||||||
|
|
||||||
* Tue Apr 10 2007 Adam Jackson <ajax@redhat.com> 6.5.2-10
|
* Tue Apr 10 2007 Adam Jackson <ajax@redhat.com> 6.5.2-10
|
||||||
- mesa-6.5.2-radeon-backports-231787.patch: Backport various radeon bugfixes
|
- mesa-6.5.2-radeon-backports-231787.patch: Backport various radeon bugfixes
|
||||||
from git. (#231787)
|
from git. (#231787)
|
||||||
|
|
Loading…
Reference in a new issue