From: Brian Paul Date: Fri, 12 Dec 2008 23:02:31 +0000 (-0700) Subject: mesa: remove unneeded swizzle init code in glsl compiler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=240e211c711b0ebfe6c3daa6cb70a3fa8fc8b656;p=mesa.git mesa: remove unneeded swizzle init code in glsl compiler --- diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index cf58e2f9f26..bf7966dc136 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2707,24 +2707,6 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var, store->Size = sz; } - /* setup default swizzle for storing the variable */ - /* XXX this may not be needed anymore - remove & test */ - switch (store->Size) { - case 2: - store->Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, - SWIZZLE_NIL, SWIZZLE_NIL); - break; - case 3: - store->Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, - SWIZZLE_Z, SWIZZLE_NIL); - break; - default: - /* Note that float-sized vars may be allocated in any x/y/z/w - * slot, but that won't be determined until code emit time. - */ - store->Swizzle = SWIZZLE_NOOP; - } - /* if there's an initializer, generate IR for the expression */ if (initializer) { const char *varName = (const char *) var->a_name;