projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bc1d38
)
i965: if source depth to render target is set,
author
Xiang, Haihao
<haihao.xiang@intel.com>
Fri, 30 Nov 2007 04:04:04 +0000
(12:04 +0800)
committer
Xiang, Haihao
<haihao.xiang@intel.com>
Fri, 30 Nov 2007 04:04:04 +0000
(12:04 +0800)
it should be handled in fb_write.
src/mesa/drivers/dri/i965/brw_wm_glsl.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 4b273fefe92e37e6920fcd261de79b625a6e9e29..e738086fefb06fe43b445892a05117bc0f3302be 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/
src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@
-324,6
+324,20
@@
static void emit_fb_write(struct brw_wm_compile *c,
nr += 8;
brw_pop_insn_state(p);
}
+
+ if (c->key.source_depth_to_render_target)
+ {
+ if (c->key.computes_depth) {
+ src0 = get_src_reg(c, &inst->SrcReg[2], 2, 1);
+ brw_MOV(p, brw_message_reg(nr), src0);
+ } else {
+ src0 = get_src_reg(c, &inst->SrcReg[1], 1, 1);
+ brw_MOV(p, brw_message_reg(nr), src0);
+ }
+
+ nr += 2;
+ }
+
fire_fb_write(c, 0, nr);
}