projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: reference surfaces and sampler views in blitter when saving them
[mesa.git]
/
src
/
gallium
/
drivers
/
llvmpipe
/
lp_state_surface.c
diff --git
a/src/gallium/drivers/llvmpipe/lp_state_surface.c
b/src/gallium/drivers/llvmpipe/lp_state_surface.c
index 957e947fe029c92e1915a08f9d68cc37a98b85be..4b135aaf8ba575126c3eb8c607b9f57efcdf01c2 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_state_surface.c
+++ b/
src/gallium/drivers/llvmpipe/lp_state_surface.c
@@
-29,14
+29,18
@@
*/
#include "pipe/p_state.h"
*/
#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+#include "util/u_framebuffer.h"
#include "util/u_surface.h"
#include "lp_context.h"
#include "util/u_surface.h"
#include "lp_context.h"
+#include "lp_scene.h"
#include "lp_state.h"
#include "lp_state.h"
-#include "lp_surface.h"
#include "lp_setup.h"
#include "draw/draw_context.h"
#include "lp_setup.h"
#include "draw/draw_context.h"
+#include "util/u_format.h"
+
/**
* Set the framebuffer surface info: color buffers, zbuffer, stencil buffer.
/**
* Set the framebuffer surface info: color buffers, zbuffer, stencil buffer.
@@
-49,6
+53,9
@@
llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb);
boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb);
+ assert(fb->width <= LP_MAX_WIDTH);
+ assert(fb->height <= LP_MAX_HEIGHT);
+
if (changed) {
util_copy_framebuffer_state(&lp->framebuffer, fb);
if (changed) {
util_copy_framebuffer_state(&lp->framebuffer, fb);
@@
-57,8
+64,9
@@
llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
if (lp->framebuffer.zsbuf) {
int depth_bits;
double mrd;
if (lp->framebuffer.zsbuf) {
int depth_bits;
double mrd;
- depth_bits = pf_get_component_bits(lp->framebuffer.zsbuf->format,
- PIPE_FORMAT_COMP_Z);
+ depth_bits = util_format_get_component_bits(lp->framebuffer.zsbuf->format,
+ UTIL_FORMAT_COLORSPACE_ZS,
+ 0);
if (depth_bits > 16) {
mrd = 0.0000001;
}
if (depth_bits > 16) {
mrd = 0.0000001;
}