projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: remove pipe_surface::usage
[mesa.git]
/
src
/
gallium
/
drivers
/
svga
/
svga_pipe_misc.c
diff --git
a/src/gallium/drivers/svga/svga_pipe_misc.c
b/src/gallium/drivers/svga/svga_pipe_misc.c
index 58cb1e6e23055800fdb3419183d628d8da463fc6..7884b6d236b6aba69c019a96332e3c29f0fb5229 100644
(file)
--- a/
src/gallium/drivers/svga/svga_pipe_misc.c
+++ b/
src/gallium/drivers/svga/svga_pipe_misc.c
@@
-25,14
+25,10
@@
#include "svga_cmd.h"
#include "svga_cmd.h"
-#include "svga_context.h"
-#include "svga_screen_texture.h"
-#include "svga_state.h"
-#include "svga_winsys.h"
-
-#include "svga_hw_reg.h"
-
+#include "util/u_inlines.h"
+#include "svga_context.h"
+#include "svga_surface.h"
static void svga_set_scissor_state( struct pipe_context *pipe,
static void svga_set_scissor_state( struct pipe_context *pipe,
@@
-79,13
+75,13
@@
static void svga_set_framebuffer_state(struct pipe_context *pipe,
struct svga_context *svga = svga_context(pipe);
struct pipe_framebuffer_state *dst = &svga->curr.framebuffer;
boolean propagate = FALSE;
struct svga_context *svga = svga_context(pipe);
struct pipe_framebuffer_state *dst = &svga->curr.framebuffer;
boolean propagate = FALSE;
-
int
i;
+
unsigned
i;
dst->width = fb->width;
dst->height = fb->height;
dst->nr_cbufs = fb->nr_cbufs;
dst->width = fb->width;
dst->height = fb->height;
dst->nr_cbufs = fb->nr_cbufs;
- /* check if we need to propag
et
any of the target surfaces */
+ /* check if we need to propag
ate
any of the target surfaces */
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
if (dst->cbufs[i] && dst->cbufs[i] != fb->cbufs[i])
if (svga_surface_needs_propagation(dst->cbufs[i]))
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
if (dst->cbufs[i] && dst->cbufs[i] != fb->cbufs[i])
if (svga_surface_needs_propagation(dst->cbufs[i]))
@@
-98,7
+94,7
@@
static void svga_set_framebuffer_state(struct pipe_context *pipe,
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
if (dst->cbufs[i] && dst->cbufs[i] != fb->cbufs[i])
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
if (dst->cbufs[i] && dst->cbufs[i] != fb->cbufs[i])
- svga_propagate_surface(
pipe
, dst->cbufs[i]);
+ svga_propagate_surface(
svga
, dst->cbufs[i]);
}
/* XXX: Actually the virtual hardware may support rendertargets with
}
/* XXX: Actually the virtual hardware may support rendertargets with
@@
-111,8
+107,10
@@
static void svga_set_framebuffer_state(struct pipe_context *pipe,
}
}
}
}
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
- pipe_surface_reference(&dst->cbufs[i], fb->cbufs[i]);
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
+ pipe_surface_reference(&dst->cbufs[i],
+ (i < fb->nr_cbufs) ? fb->cbufs[i] : NULL);
+ }
pipe_surface_reference(&dst->zsbuf, fb->zsbuf);
pipe_surface_reference(&dst->zsbuf, fb->zsbuf);
@@
-122,10
+120,10
@@
static void svga_set_framebuffer_state(struct pipe_context *pipe,
case PIPE_FORMAT_Z16_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D16;
break;
case PIPE_FORMAT_Z16_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D16;
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D24S8;
break;
case PIPE_FORMAT_Z32_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D24S8;
break;
case PIPE_FORMAT_Z32_UNORM: