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 <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2011-12-10 17:30:37 +00:00
parent b1a8b7b019
commit 72cb103cf5
2 changed files with 19 additions and 19 deletions

View File

@@ -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,