<commit_before>/* Copyright (c) 2001, Stanford University
 * All rights reserved
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#include "unpacker.h"
#include "cr_error.h"
#include "cr_protocol.h"
#include "cr_mem.h"
#include "cr_version.h"


void crUnpackExtendProgramParameter4dvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLdouble params[4];
	params[0] = READ_DOUBLE( 16 );
	params[1] = READ_DOUBLE( 24 );
	params[2] = READ_DOUBLE( 32 );
	params[3] = READ_DOUBLE( 40 );
	cr_unpackDispatch.ProgramParameter4dvNV( target, index, params );
}


void crUnpackExtendProgramParameter4fvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLfloat params[4];
	params[0] = READ_DATA( 16, GLfloat );
	params[1] = READ_DATA( 20, GLfloat );
	params[2] = READ_DATA( 24, GLfloat );
	params[3] = READ_DATA( 28, GLfloat );
	cr_unpackDispatch.ProgramParameter4fvNV( target, index, params );
}


void crUnpackExtendProgramParameters4dvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLuint num = READ_DATA( 16, GLuint);
	GLdouble *params = (GLdouble *) crAlloc(num * 4 * sizeof(GLdouble));
	if (params) {
		GLuint i;
		for (i = 0; i < 4 * num; i++) {
			params[i] = READ_DATA( 20 + i * 8, GLdouble );
		}
		cr_unpackDispatch.ProgramParameters4dvNV( target, index, num, params );
		crFree(params);
	}
}


void crUnpackExtendProgramParameters4fvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLuint num = READ_DATA( 16, GLuint);
	GLfloat *params = (GLfloat *) crAlloc(num * 4 * sizeof(GLfloat));
	if (params) {
		GLuint i;
		for (i = 0; i < 4 * num; i++) {
			params[i] = READ_DATA( 20 + i * 4, GLfloat );
		}
		cr_unpackDispatch.ProgramParameters4fvNV( target, index, num, params );
		crFree(params);
	}
}


void crUnpackExtendAreProgramsResidentNV(void)
{
	GLsizei n = READ_DATA( 8, GLsizei );
	const GLuint *programs = DATA_POINTER( 12, const GLuint );
	SET_RETURN_PTR(12 + n * sizeof(GLuint));
	SET_WRITEBACK_PTR(20 + n * sizeof(GLuint));
	(void) cr_unpackDispatch.AreProgramsResidentNV( n, programs, NULL );
}


void crUnpackExtendLoadProgramNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint id = READ_DATA( 12, GLuint );
	GLsizei len = READ_DATA( 16, GLsizei );
	GLvoid *program = DATA_POINTER( 20, GLvoid );
	cr_unpackDispatch.LoadProgramNV( target, id, len, program );
}


void crUnpackExtendExecuteProgramNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint id = READ_DATA( 12, GLuint );
	crError( "ExecuteProgramNV needs to be special cased!" );
	cr_unpackDispatch.ExecuteProgramNV( target, id, NULL );
}

void crUnpackExtendRequestResidentProgramsNV(void)
{
	GLsizei n = READ_DATA( 8, GLsizei );
	crError( "RequestResidentProgramsNV needs to be special cased!" );
	cr_unpackDispatch.RequestResidentProgramsNV( n, NULL );
}


void crUnpackExtendProgramLocalParameter4fvARB(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLfloat params[4];
	params[0] = READ_DATA( 16, GLfloat );
	params[1] = READ_DATA( 20, GLfloat );
	params[2] = READ_DATA( 24, GLfloat );
	params[3] = READ_DATA( 28, GLfloat );
	cr_unpackDispatch.ProgramLocalParameter4fvARB( target, index, params );
}


void crUnpackExtendProgramLocalParameter4dvARB(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLdouble params[4];<commit_msg>special cased unpacking ExecuteProgramNV<commit_after>/* Copyright (c) 2001, Stanford University
 * All rights reserved
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#include "unpacker.h"
#include "cr_error.h"
#include "cr_protocol.h"
#include "cr_mem.h"
#include "cr_version.h"


void crUnpackExtendProgramParameter4dvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLdouble params[4];
	params[0] = READ_DOUBLE( 16 );
	params[1] = READ_DOUBLE( 24 );
	params[2] = READ_DOUBLE( 32 );
	params[3] = READ_DOUBLE( 40 );
	cr_unpackDispatch.ProgramParameter4dvNV( target, index, params );
}


void crUnpackExtendProgramParameter4fvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLfloat params[4];
	params[0] = READ_DATA( 16, GLfloat );
	params[1] = READ_DATA( 20, GLfloat );
	params[2] = READ_DATA( 24, GLfloat );
	params[3] = READ_DATA( 28, GLfloat );
	cr_unpackDispatch.ProgramParameter4fvNV( target, index, params );
}


void crUnpackExtendProgramParameters4dvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLuint num = READ_DATA( 16, GLuint);
	GLdouble *params = (GLdouble *) crAlloc(num * 4 * sizeof(GLdouble));
	if (params) {
		GLuint i;
		for (i = 0; i < 4 * num; i++) {
			params[i] = READ_DATA( 20 + i * 8, GLdouble );
		}
		cr_unpackDispatch.ProgramParameters4dvNV( target, index, num, params );
		crFree(params);
	}
}


void crUnpackExtendProgramParameters4fvNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLuint num = READ_DATA( 16, GLuint);
	GLfloat *params = (GLfloat *) crAlloc(num * 4 * sizeof(GLfloat));
	if (params) {
		GLuint i;
		for (i = 0; i < 4 * num; i++) {
			params[i] = READ_DATA( 20 + i * 4, GLfloat );
		}
		cr_unpackDispatch.ProgramParameters4fvNV( target, index, num, params );
		crFree(params);
	}
}


void crUnpackExtendAreProgramsResidentNV(void)
{
	GLsizei n = READ_DATA( 8, GLsizei );
	const GLuint *programs = DATA_POINTER( 12, const GLuint );
	SET_RETURN_PTR(12 + n * sizeof(GLuint));
	SET_WRITEBACK_PTR(20 + n * sizeof(GLuint));
	(void) cr_unpackDispatch.AreProgramsResidentNV( n, programs, NULL );
}


void crUnpackExtendLoadProgramNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint id = READ_DATA( 12, GLuint );
	GLsizei len = READ_DATA( 16, GLsizei );
	GLvoid *program = DATA_POINTER( 20, GLvoid );
	cr_unpackDispatch.LoadProgramNV( target, id, len, program );
}


void crUnpackExtendExecuteProgramNV(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint id = READ_DATA( 12, GLuint );
	GLfloat params[4];
	params[0] = READ_DATA( 16, GLfloat );
	params[1] = READ_DATA( 20, GLfloat );
	params[2] = READ_DATA( 24, GLfloat );
	params[3] = READ_DATA( 28, GLfloat );
	cr_unpackDispatch.ExecuteProgramNV( target, id, params );
}

void crUnpackExtendRequestResidentProgramsNV(void)
{
	GLsizei n = READ_DATA( 8, GLsizei );
	crError( "RequestResidentProgramsNV needs to be special cased!" );
	cr_unpackDispatch.RequestResidentProgramsNV( n, NULL );
}


void crUnpackExtendProgramLocalParameter4fvARB(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLfloat params[4];
	params[0] = READ_DATA( 16, GLfloat );
	params[1] = READ_DATA( 20, GLfloat );
	params[2] = READ_DATA( 24, GLfloat );
	params[3] = READ_DATA( 28, GLfloat );
	cr_unpackDispatch.ProgramLocalParameter4fvARB( target, index, params );
}


void crUnpackExtendProgramLocalParameter4dvARB(void)
{
	GLenum target = READ_DATA( 8, GLenum );
	GLuint index = READ_DATA( 12, GLuint );
	GLdouble params[4];
{'fraction_non_alphanumeric': 0.12799442896935934, 'fraction_numerical': 0.03161559888579387, 'mean_word_length': 5.014237855946399, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5970868', 'n_tokens_mistral': 2871, 'n_tokens_neox': 2661, 'n_words': 663}