The old approach works fine, and this approach isn't necessarily better.
But it at least has the advantage that Vulkan and GL use the same
approach. I originally wrote it to gain additional testing for the
new paths.
shader-db statistics show 0 instruction count changes.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
compiler->glsl_compiler_options[i].EmitNoMainReturn = true;
compiler->glsl_compiler_options[i].EmitNoIndirectInput = true;
compiler->glsl_compiler_options[i].EmitNoIndirectUniform = false;
- compiler->glsl_compiler_options[i].LowerCombinedClipCullDistance = true;
bool is_scalar = compiler->scalar_stage[i];
/* Get rid of split copies */
nir = nir_optimize(nir, is_scalar);
+ OPT_V(nir_lower_clip_cull_distance_arrays);
+
OPT(nir_remove_dead_variables, nir_var_local);
return nir;