aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-31 09:02:27 -0700
committerBrian Paul <[email protected]>2009-12-31 09:02:27 -0700
commit25024d948298a9f3f3210a0b91486f79a3917b0f (patch)
tree5647623b9781193b7ed55c8d9233404938aeb853 /src/gallium/state_trackers
parentd14beea534dcb2b3ae2ae1f7ee0ba5dcdef3dba3 (diff)
parent195e7657e2f15f7ad8b22042b86bcf33c5bba76b (diff)
Merge branch 'mesa_7_7_branch'
Conflicts: configs/darwin src/gallium/auxiliary/util/u_clear.h src/gallium/state_trackers/xorg/xorg_exa_tgsi.c src/mesa/drivers/dri/i965/brw_draw_upload.c
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c4
-rw-r--r--src/gallium/state_trackers/egl/egl_tracker.c3
-rw-r--r--src/gallium/state_trackers/glx/xlib/glx_api.c1
-rw-r--r--src/gallium/state_trackers/vega/api_path.c3
-rw-r--r--src/gallium/state_trackers/vega/arc.c2
-rw-r--r--src/gallium/state_trackers/vega/bezier.c1
-rw-r--r--src/gallium/state_trackers/vega/stroker.c4
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c7
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c26
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c4
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa_tgsi.c33
-rw-r--r--src/gallium/state_trackers/xorg/xorg_renderer.c1
12 files changed, 62 insertions, 27 deletions
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index 0b60b5be059..d55aa51b82d 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -171,9 +171,9 @@ drm_takedown_shown_screen(_EGLDisplay *dpy, struct drm_screen *screen)
drmModeSetCrtc(
dev->drmFD,
screen->crtcID,
- 0, // FD
+ 0, /* FD */
0, 0,
- NULL, 0, // List of output ids
+ NULL, 0, /* List of output ids */
NULL);
drmModeRmFB(dev->drmFD, screen->fbID);
diff --git a/src/gallium/state_trackers/egl/egl_tracker.c b/src/gallium/state_trackers/egl/egl_tracker.c
index 745803c7eb0..9345b0f4908 100644
--- a/src/gallium/state_trackers/egl/egl_tracker.c
+++ b/src/gallium/state_trackers/egl/egl_tracker.c
@@ -152,6 +152,7 @@ drm_initialize(_EGLDriver *drv, _EGLDisplay *disp, EGLint *major, EGLint *minor)
int num_screens = 0;
EGLint i;
int fd;
+ _EGLConfig *config;
dev = (struct drm_device *) calloc(1, sizeof(struct drm_device));
if (!dev)
@@ -206,7 +207,7 @@ drm_initialize(_EGLDriver *drv, _EGLDisplay *disp, EGLint *major, EGLint *minor)
disp->DriverData = dev;
/* for now we only have one config */
- _EGLConfig *config = calloc(1, sizeof(*config));
+ config = calloc(1, sizeof(*config));
memset(config, 1, sizeof(*config));
_eglInitConfig(config, 1);
_eglSetConfigAttrib(config, EGL_RED_SIZE, 8);
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index f2881b9a31e..228ac9a20e9 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -644,6 +644,7 @@ register_with_display(Display *dpy)
XExtCodes *c = XAddExtension(dpy);
ext = dpy->ext_procs; /* new extension is at head of list */
assert(c->extension == ext->codes.extension);
+ (void) c;
ext->name = _mesa_strdup(extName);
ext->close_display = close_display_callback;
}
diff --git a/src/gallium/state_trackers/vega/api_path.c b/src/gallium/state_trackers/vega/api_path.c
index a6b7a2bb93a..15ac1900f4b 100644
--- a/src/gallium/state_trackers/vega/api_path.c
+++ b/src/gallium/state_trackers/vega/api_path.c
@@ -164,8 +164,7 @@ void vgAppendPathData(VGPath dstPath,
return;
}
for (i = 0; i < numSegments; ++i) {
- if (pathSegments[i] < VG_CLOSE_PATH ||
- pathSegments[i] > VG_LCWARC_TO_REL) {
+ if (pathSegments[i] > VG_LCWARC_TO_REL) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
diff --git a/src/gallium/state_trackers/vega/arc.c b/src/gallium/state_trackers/vega/arc.c
index 8b04d21ea76..2d123408702 100644
--- a/src/gallium/state_trackers/vega/arc.c
+++ b/src/gallium/state_trackers/vega/arc.c
@@ -528,7 +528,6 @@ static INLINE int num_beziers_needed(struct arc *arc)
double threshold = 0.05;
VGboolean found = VG_FALSE;
int n = 1;
- int i;
double min_eta, max_eta;
min_eta = MIN2(arc->eta1, arc->eta2);
@@ -538,6 +537,7 @@ static INLINE int num_beziers_needed(struct arc *arc)
double d_eta = (max_eta - min_eta) / n;
if (d_eta <= 0.5 * M_PI) {
double eta_b = min_eta;
+ int i;
found = VG_TRUE;
for (i = 0; found && (i < n); ++i) {
double etaA = eta_b;
diff --git a/src/gallium/state_trackers/vega/bezier.c b/src/gallium/state_trackers/vega/bezier.c
index 0d5504004cc..5769e8ea868 100644
--- a/src/gallium/state_trackers/vega/bezier.c
+++ b/src/gallium/state_trackers/vega/bezier.c
@@ -256,7 +256,6 @@ static enum shift_result good_offset(const struct bezier *b1,
const float max_dist_normal = threshold*offset;
const float spacing = 0.25;
float i;
-
for (i = spacing; i < 0.99; i += spacing) {
float p1[2],p2[2], d, l;
float normal[2];
diff --git a/src/gallium/state_trackers/vega/stroker.c b/src/gallium/state_trackers/vega/stroker.c
index 1b92d2b5c62..68a52029db0 100644
--- a/src/gallium/state_trackers/vega/stroker.c
+++ b/src/gallium/state_trackers/vega/stroker.c
@@ -476,7 +476,7 @@ static enum intersection_type line_intersect(const VGfloat *l1,
const VGfloat *l2,
float *intersection_point)
{
- VGfloat isect[2];
+ VGfloat isect[2] = { 0 };
enum intersection_type type;
VGboolean dx_zero, ldx_zero;
@@ -649,7 +649,7 @@ static void create_joins(struct stroker *stroker,
VGfloat prev_line[] = {stroker->back2_x, stroker->back2_y,
stroker->back1_x, stroker->back1_y};
- VGfloat isect[2];
+ VGfloat isect[2] = { 0 };
enum intersection_type type = line_intersect(prev_line, next_line, isect);
if (join == SquareJoin) {
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index c776faa53f8..e390ce29aea 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -71,6 +71,8 @@ struct crtc_private
static void
crtc_dpms(xf86CrtcPtr crtc, int mode)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
+
switch (mode) {
case DPMSModeOn:
case DPMSModeStandby:
@@ -147,18 +149,23 @@ crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, CARD16 * blue,
static void *
crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
+
return NULL;
}
static PixmapPtr
crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
+
return NULL;
}
static void
crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
}
/*
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 8a24aa10a3c..4d169a1d14c 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -220,6 +220,12 @@ static Bool
drv_init_resource_management(ScrnInfoPtr pScrn)
{
modesettingPtr ms = modesettingPTR(pScrn);
+ /*
+ ScreenPtr pScreen = pScrn->pScreen;
+ PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
+ Bool fbAccessDisabled;
+ CARD8 *fbstart;
+ */
if (ms->screen || ms->kms)
return TRUE;
@@ -249,9 +255,19 @@ static Bool
drv_close_resource_management(ScrnInfoPtr pScrn)
{
modesettingPtr ms = modesettingPTR(pScrn);
+ int i;
- if (ms->screen)
+ if (ms->screen) {
+ assert(ms->ctx == NULL);
+
+ for (i = 0; i < XORG_NR_FENCES; i++) {
+ if (ms->fence[i]) {
+ ms->screen->fence_finish(ms->screen, ms->fence[i], 0);
+ ms->screen->fence_reference(ms->screen, &ms->fence[i], NULL);
+ }
+ }
ms->screen->destroy(ms->screen);
+ }
ms->screen = NULL;
if (ms->api && ms->api->destroy)
@@ -461,7 +477,7 @@ static void drv_block_handler(int i, pointer blockData, pointer pTimeout,
* quite small. Let us get a fair way ahead of hardware before
* throttling.
*/
- for (j = 0; j < XORG_NR_FENCES; j++)
+ for (j = 0; j < XORG_NR_FENCES - 1; j++)
ms->screen->fence_reference(ms->screen,
&ms->fence[j],
ms->fence[j+1]);
@@ -915,6 +931,12 @@ drv_destroy_front_buffer_kms(ScrnInfoPtr pScrn)
ScreenPtr pScreen = pScrn->pScreen;
PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
+ /* XXX Do something with the rootPixmap.
+ * This currently works fine but if we are getting crashes in
+ * the fb functions after VT switches maybe look more into it.
+ */
+ (void)rootPixmap;
+
if (!ms->root_bo)
return TRUE;
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index d5c005ebadd..aa68570b9c0 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -516,6 +516,7 @@ ExaCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY,
#endif
debug_assert(priv == exa->copy.dst);
+ (void) priv;
if (exa->copy.use_surface_copy) {
/* XXX: consider exposing >1 box in surface_copy interface.
@@ -1019,6 +1020,9 @@ xorg_exa_close(ScrnInfoPtr pScrn)
if (exa->pipe)
exa->pipe->destroy(exa->pipe);
+ exa->pipe = NULL;
+ /* Since this was shared be proper with the pointer */
+ ms->ctx = NULL;
exaDriverFini(pScrn->pScreen);
xfree(exa);
diff --git a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
index 89b794a09ac..bed17caab77 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
@@ -47,22 +47,22 @@ static void
print_fs_traits(int fs_traits)
{
const char *strings[] = {
- "FS_COMPOSITE", /* = 1 << 0 */
- "FS_MASK", /* = 1 << 1 */
- "FS_SOLID_FILL", /* = 1 << 2 */
- "FS_LINGRAD_FILL", /* = 1 << 3 */
- "FS_RADGRAD_FILL", /* = 1 << 4 */
- "FS_CA_FULL", /* = 1 << 5 - src.rgba * mask.rgba */
- "FS_CA_SRCALPHA", /* = 1 << 6 - src.aaaa * mask.rgba */
- "FS_YUV", /* = 1 << 7 */
- "FS_SRC_REPEAT_NONE", /* = 1 << 8 */
- "FS_MASK_REPEAT_NONE",/* = 1 << 9 */
- "FS_SRC_SWIZZLE_RGB", /* = 1 << 10 */
- "FS_MASK_SWIZZLE_RGB",/* = 1 << 11 */
- "FS_SRC_SET_ALPHA", /* = 1 << 12 */
- "FS_MASK_SET_ALPHA", /* = 1 << 13 */
- "FS_SRC_LUMINANCE", /* = 1 << 14 */
- "FS_MASK_LUMINANCE", /* = 1 << 15 */
+ "FS_COMPOSITE", /* = 1 << 0, */
+ "FS_MASK", /* = 1 << 1, */
+ "FS_SOLID_FILL", /* = 1 << 2, */
+ "FS_LINGRAD_FILL", /* = 1 << 3, */
+ "FS_RADGRAD_FILL", /* = 1 << 4, */
+ "FS_CA_FULL", /* = 1 << 5, */ /* src.rgba * mask.rgba */
+ "FS_CA_SRCALPHA", /* = 1 << 6, */ /* src.aaaa * mask.rgba */
+ "FS_YUV", /* = 1 << 7, */
+ "FS_SRC_REPEAT_NONE", /* = 1 << 8, */
+ "FS_MASK_REPEAT_NONE",/* = 1 << 9, */
+ "FS_SRC_SWIZZLE_RGB", /* = 1 << 10, */
+ "FS_MASK_SWIZZLE_RGB",/* = 1 << 11, */
+ "FS_SRC_SET_ALPHA", /* = 1 << 12, */
+ "FS_MASK_SET_ALPHA", /* = 1 << 13, */
+ "FS_SRC_LUMINANCE", /* = 1 << 14, */
+ "FS_MASK_LUMINANCE", /* = 1 << 15, */
};
int i, k;
debug_printf("%s: ", __func__);
@@ -492,6 +492,7 @@ create_fs(struct pipe_context *pipe,
/* it has to be either a fill, a composite op or a yuv conversion */
debug_assert((is_fill ^ is_composite) ^ is_yuv);
+ (void) is_yuv;
out = ureg_DECL_output(ureg,
TGSI_SEMANTIC_COLOR,
diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c
index ba15f8a7845..d80f341e6c2 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.c
@@ -438,6 +438,7 @@ void renderer_copy_prepare(struct xorg_renderer *r,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_RENDER_TARGET,
0));
+ (void) screen;
/* set misc state we care about */