diff options
author | Dave Airlie <[email protected]> | 2011-12-10 17:30:37 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-12-10 17:30:37 +0000 |
commit | 72cb103cf518c86d8d094380d9f8e16650a0060b (patch) | |
tree | ca4c1175655a03e2106a45c1d93e0a38e41f4570 /src/mesa | |
parent | b1a8b7b0196c73bcfe488cbfc9e9fcd1d7ce7d9b (diff) |
st/mesa: move frag depth up a level.
This fixes the segfault, and seems to put this closer to where other
properties are being set. Hopefully it still conforms.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 19 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 19 |
2 files changed, 19 insertions, 19 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index cd4db255f54..6cc655d70cf 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4557,25 +4557,6 @@ st_translate_program( interpMode[i]); } - if (program->shader_program->FragDepthLayout != FRAG_DEPTH_LAYOUT_NONE) { - switch (program->shader_program->FragDepthLayout) { - case FRAG_DEPTH_LAYOUT_ANY: - ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_ANY); - break; - case FRAG_DEPTH_LAYOUT_GREATER: - ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_GREATER); - break; - case FRAG_DEPTH_LAYOUT_LESS: - ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_LESS); - break; - case FRAG_DEPTH_LAYOUT_UNCHANGED: - ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_UNCHANGED); - break; - default: - assert(0); - } - } - if (proginfo->InputsRead & FRAG_BIT_WPOS) { /* Must do this after setting up t->inputs, and before * emitting constant references, below: diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 768da5114e6..04d3ef60f51 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -649,6 +649,25 @@ st_translate_fragment_program(struct st_context *st, if (write_all == GL_TRUE) ureg_property_fs_color0_writes_all_cbufs(ureg, 1); + if (stfp->Base.FragDepthLayout != FRAG_DEPTH_LAYOUT_NONE) { + switch (stfp->Base.FragDepthLayout) { + case FRAG_DEPTH_LAYOUT_ANY: + ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_ANY); + break; + case FRAG_DEPTH_LAYOUT_GREATER: + ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_GREATER); + break; + case FRAG_DEPTH_LAYOUT_LESS: + ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_LESS); + break; + case FRAG_DEPTH_LAYOUT_UNCHANGED: + ureg_property_fs_depth_layout(ureg, TGSI_FS_DEPTH_LAYOUT_UNCHANGED); + break; + default: + assert(0); + } + } + if (stfp->glsl_to_tgsi) st_translate_program(st->ctx, TGSI_PROCESSOR_FRAGMENT, |