mesa/main: Add support for GL_ARB_cull_distance (v2)
airlied: v2: rename LowerClipDistance to LowerCombinedClipCullDistnace. I don't think we want any other behaviour with any current hw. Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
f2a2e08e01
commit
eb18fea707
@@ -627,7 +627,7 @@ tfeedback_decl::init(struct gl_context *ctx, const void *mem_ctx,
|
||||
* class must behave specially to account for the fact that gl_ClipDistance
|
||||
* is converted from a float[8] to a vec4[2].
|
||||
*/
|
||||
if (ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].LowerClipDistance &&
|
||||
if (ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].LowerCombinedClipCullDistance &&
|
||||
strcmp(this->var_name, "gl_ClipDistance") == 0) {
|
||||
this->lowered_builtin_array_variable = clip_distance;
|
||||
}
|
||||
|
@@ -4560,7 +4560,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
if (!prog->LinkStatus)
|
||||
goto done;
|
||||
|
||||
if (ctx->Const.ShaderCompilerOptions[i].LowerClipDistance) {
|
||||
if (ctx->Const.ShaderCompilerOptions[i].LowerCombinedClipCullDistance) {
|
||||
lower_clip_distance(prog->_LinkedShaders[i]);
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@
|
||||
*
|
||||
* Since some hardware may not internally represent gl_ClipDistance as a pair
|
||||
* of vec4's, this lowering pass is optional. To enable it, set the
|
||||
* LowerClipDistance flag in gl_shader_compiler_options to true.
|
||||
* LowerCombinedClipCullDistance flag in gl_shader_compiler_options to true.
|
||||
*/
|
||||
|
||||
#include "glsl_symbol_table.h"
|
||||
|
Reference in New Issue
Block a user