X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fshader%2Fnvvertparse.c;h=08538c0ee4fbec8907de60dff6063d3868f60cf4;hb=a6880ace4ca4a3cfde1a7a7578a8134e8f32d31d;hp=fb546a0217b2c1fab0e581185988358432a14559;hpb=885afd59ec358135ca6121cd65c397c9766afa7a;p=mesa.git diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index fb546a0217b..08538c0ee4f 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -37,10 +37,10 @@ * including any use thereof or modifications thereto. */ -#include "glheader.h" -#include "context.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/imports.h" +#include "main/macros.h" #include "nvprogram.h" #include "nvvertparse.h" #include "prog_instruction.h" @@ -684,13 +684,13 @@ Parse_SwizzleSrcReg(struct parse_state *parseState, struct prog_src_register *sr if (token[1] == 0) { /* single letter swizzle */ if (token[0] == 'x') - srcReg->Swizzle = MAKE_SWIZZLE4(0, 0, 0, 0); + srcReg->Swizzle = SWIZZLE_XXXX; else if (token[0] == 'y') - srcReg->Swizzle = MAKE_SWIZZLE4(1, 1, 1, 1); + srcReg->Swizzle = SWIZZLE_YYYY; else if (token[0] == 'z') - srcReg->Swizzle = MAKE_SWIZZLE4(2, 2, 2, 2); + srcReg->Swizzle = SWIZZLE_ZZZZ; else if (token[0] == 'w') - srcReg->Swizzle = MAKE_SWIZZLE4(3, 3, 3, 3); + srcReg->Swizzle = SWIZZLE_WWWW; else RETURN_ERROR1("Expected x, y, z, or w"); } @@ -1378,8 +1378,7 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, _mesa_free(programString); return; /* out of memory */ } - _mesa_memcpy(newInst, instBuffer, - parseState.numInst * sizeof(struct prog_instruction)); + _mesa_copy_instructions(newInst, instBuffer, parseState.numInst); /* install the program */ program->Base.Target = target;