summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-06-14 17:58:30 +0200
committerMarek Olšák <[email protected]>2014-06-19 00:17:36 +0200
commit6a2b38381ee90b7fc9584b05b84284c0e609bb6d (patch)
treef54d113d9f784d93c07fc1b0ccbc56ee83639f09 /src/gallium/drivers/radeonsi/si_shader.c
parent1df7199fc933facf2e74304976c3798e474929a1 (diff)
radeonsi: pass ARB_conservative_depth parameters to the hardware
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 4ed5906d178..4c23090e2a0 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2745,10 +2745,29 @@ int si_pipe_shader_create(
}
break;
}
- case TGSI_PROCESSOR_FRAGMENT:
+ case TGSI_PROCESSOR_FRAGMENT: {
+ int i;
+
si_shader_ctx.radeon_bld.load_input = declare_input_fs;
bld_base->emit_epilogue = si_llvm_emit_fs_epilogue;
+ shader->shader.ps_conservative_z = V_02880C_EXPORT_ANY_Z;
+
+ for (i = 0; i < shader_info.num_properties; i++) {
+ switch (shader_info.properties[i].name) {
+ case TGSI_PROPERTY_FS_DEPTH_LAYOUT:
+ switch (shader_info.properties[i].data[0]) {
+ case TGSI_FS_DEPTH_LAYOUT_GREATER:
+ shader->shader.ps_conservative_z = V_02880C_EXPORT_GREATER_THAN_Z;
+ break;
+ case TGSI_FS_DEPTH_LAYOUT_LESS:
+ shader->shader.ps_conservative_z = V_02880C_EXPORT_LESS_THAN_Z;
+ break;
+ }
+ break;
+ }
+ }
break;
+ }
default:
assert(!"Unsupported shader type");
return -1;