mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
include proper header file, remove local extern declarations
This commit is contained in:
parent
cebad151a1
commit
7b6fd8a0c6
2 changed files with 7 additions and 17 deletions
|
|
@ -31,11 +31,8 @@
|
|||
#include "s_arbshader.h"
|
||||
#include "s_context.h"
|
||||
#include "shaderobjects.h"
|
||||
#include "shaderobjects_3dlabs.h"
|
||||
|
||||
int _slang_fetch_vec4_f (struct gl2_fragment_shader_intf **, const char *, GLfloat *,
|
||||
GLuint, int);
|
||||
int _slang_fetch_discard (struct gl2_fragment_shader_intf **, GLboolean *);
|
||||
void exec_fragment_shader (struct gl2_fragment_shader_intf **);
|
||||
|
||||
static void fetch_input_vec4 (const char *name, GLfloat *vec, GLuint index,
|
||||
struct gl2_fragment_shader_intf **fs)
|
||||
|
|
@ -99,13 +96,13 @@ void _swrast_exec_arbshader (GLcontext *ctx, struct sw_span *span)
|
|||
fetch_input_vec4 ("gl_TexCoord", vec, j, fs);
|
||||
}
|
||||
|
||||
exec_fragment_shader (fs);
|
||||
_slang_exec_fragment_shader (fs);
|
||||
|
||||
_slang_fetch_discard (fs, &kill);
|
||||
if (kill)
|
||||
{
|
||||
span->array->mask[i] = GL_FALSE;
|
||||
span->writeAll = GL_FALSE;
|
||||
span->writeAll = GL_FALSE;
|
||||
}
|
||||
fetch_output_vec4 ("gl_FragColor", vec, 0, fs);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][RCOMP], vec[0]);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "imports.h"
|
||||
#include "macros.h"
|
||||
#include "shaderobjects.h"
|
||||
#include "shaderobjects_3dlabs.h"
|
||||
#include "t_pipeline.h"
|
||||
#include "slang_utility.h"
|
||||
|
||||
|
|
@ -89,19 +90,11 @@ static void validate_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stag
|
|||
{
|
||||
}
|
||||
|
||||
/* XXX */
|
||||
extern void exec_vertex_shader (struct gl2_vertex_shader_intf **vs);
|
||||
extern int _slang_fetch_float (struct gl2_vertex_shader_intf **, const char *, GLfloat *, int);
|
||||
extern int _slang_fetch_vec3 (struct gl2_vertex_shader_intf **, const char *, GLfloat *, int);
|
||||
extern int _slang_fetch_vec4 (struct gl2_vertex_shader_intf **, const char *, GLfloat *, GLuint, int);
|
||||
extern int _slang_fetch_mat3 (struct gl2_vertex_shader_intf **, const char *, GLfloat *, GLuint, int);
|
||||
extern int _slang_fetch_mat4 (struct gl2_vertex_shader_intf **, const char *, GLfloat *, GLuint, int);
|
||||
|
||||
static void fetch_input_float (const char *name, GLuint attr, GLuint i, struct vertex_buffer *vb,
|
||||
struct gl2_vertex_shader_intf **vs)
|
||||
{
|
||||
const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data;
|
||||
const GLuint size = vb->AttribPtr[attr]->size;
|
||||
/*const GLuint size = vb->AttribPtr[attr]->size;*/
|
||||
const GLuint stride = vb->AttribPtr[attr]->stride;
|
||||
const GLfloat *data = (const GLfloat *) (ptr + stride * i);
|
||||
float vec[1];
|
||||
|
|
@ -114,7 +107,7 @@ static void fetch_input_vec3 (const char *name, GLuint attr, GLuint i, struct ve
|
|||
struct gl2_vertex_shader_intf **vs)
|
||||
{
|
||||
const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data;
|
||||
const GLuint size = vb->AttribPtr[attr]->size;
|
||||
/*const GLuint size = vb->AttribPtr[attr]->size;*/
|
||||
const GLuint stride = vb->AttribPtr[attr]->stride;
|
||||
const GLfloat *data = (const GLfloat *) (ptr + stride * i);
|
||||
float vec[3];
|
||||
|
|
@ -298,7 +291,7 @@ static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stag
|
|||
fetch_input_vec4 ("gl_MultiTexCoord6", _TNL_ATTRIB_TEX6, i, vb, vs);
|
||||
fetch_input_vec4 ("gl_MultiTexCoord7", _TNL_ATTRIB_TEX7, i, vb, vs);
|
||||
|
||||
exec_vertex_shader (vs);
|
||||
_slang_exec_vertex_shader (vs);
|
||||
|
||||
fetch_output_vec4 ("gl_Position", VERT_RESULT_HPOS, i, 0, store, vs);
|
||||
fetch_output_vec4 ("gl_FrontColor", VERT_RESULT_COL0, i, 0, store, vs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue