diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-12-05 14:01:01 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-12-05 14:01:01 +1100 |
commit | 47b418b8fa5fd242e9021503d6ec329ac3d56fb0 (patch) | |
tree | 571c916747acd4abc3072e03a071fea7bb080c55 /src/mesa/pipe/nv40 | |
parent | 97f8c39d916e80c0dbb0eae9a6c5109555a1f1b5 (diff) |
nv50: 3d driver skeleton
Diffstat (limited to 'src/mesa/pipe/nv40')
-rw-r--r-- | src/mesa/pipe/nv40/nv40_context.h | 1 | ||||
-rw-r--r-- | src/mesa/pipe/nv40/nv40_state.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/nv40/nv40_vbo.c | 1 | ||||
-rw-r--r-- | src/mesa/pipe/nv40/nvgl_pipe.h | 198 |
4 files changed, 1 insertions, 201 deletions
diff --git a/src/mesa/pipe/nv40/nv40_context.h b/src/mesa/pipe/nv40/nv40_context.h index ec07a88370..65a197ae2f 100644 --- a/src/mesa/pipe/nv40/nv40_context.h +++ b/src/mesa/pipe/nv40/nv40_context.h @@ -8,6 +8,7 @@ #include "pipe/draw/draw_vertex.h" #include "pipe/nouveau/nouveau_winsys.h" +#include "pipe/nouveau/nouveau_gldefs.h" #include "nv40_state.h" diff --git a/src/mesa/pipe/nv40/nv40_state.c b/src/mesa/pipe/nv40/nv40_state.c index 1e7513c0bb..937de7face 100644 --- a/src/mesa/pipe/nv40/nv40_state.c +++ b/src/mesa/pipe/nv40/nv40_state.c @@ -6,8 +6,6 @@ #include "nv40_dma.h" #include "nv40_state.h" -#include "nvgl_pipe.h" - static void * nv40_alpha_test_state_create(struct pipe_context *pipe, const struct pipe_alpha_test_state *cso) diff --git a/src/mesa/pipe/nv40/nv40_vbo.c b/src/mesa/pipe/nv40/nv40_vbo.c index cc71fb99de..5e919c5ca9 100644 --- a/src/mesa/pipe/nv40/nv40_vbo.c +++ b/src/mesa/pipe/nv40/nv40_vbo.c @@ -5,7 +5,6 @@ #include "nv40_context.h" #include "nv40_dma.h" #include "nv40_state.h" -#include "nvgl_pipe.h" boolean nv40_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start, diff --git a/src/mesa/pipe/nv40/nvgl_pipe.h b/src/mesa/pipe/nv40/nvgl_pipe.h deleted file mode 100644 index 15ff318023..0000000000 --- a/src/mesa/pipe/nv40/nvgl_pipe.h +++ /dev/null @@ -1,198 +0,0 @@ -#ifndef __NVGL_PIPE_H__ -#define __NVGL_PIPE_H__ - -#include <GL/gl.h> - -static INLINE unsigned -nvgl_blend_func(unsigned factor) -{ - switch (factor) { - case PIPE_BLENDFACTOR_ONE: - return GL_ONE; - case PIPE_BLENDFACTOR_SRC_COLOR: - return GL_SRC_COLOR; - case PIPE_BLENDFACTOR_SRC_ALPHA: - return GL_SRC_ALPHA; - case PIPE_BLENDFACTOR_DST_ALPHA: - return GL_DST_ALPHA; - case PIPE_BLENDFACTOR_DST_COLOR: - return GL_DST_COLOR; - case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE: - return GL_SRC_ALPHA_SATURATE; - case PIPE_BLENDFACTOR_CONST_COLOR: - return GL_CONSTANT_COLOR; - case PIPE_BLENDFACTOR_CONST_ALPHA: - return GL_CONSTANT_ALPHA; - case PIPE_BLENDFACTOR_ZERO: - return GL_ZERO; - case PIPE_BLENDFACTOR_INV_SRC_COLOR: - return GL_ONE_MINUS_SRC_COLOR; - case PIPE_BLENDFACTOR_INV_SRC_ALPHA: - return GL_ONE_MINUS_SRC_ALPHA; - case PIPE_BLENDFACTOR_INV_DST_ALPHA: - return GL_ONE_MINUS_DST_ALPHA; - case PIPE_BLENDFACTOR_INV_DST_COLOR: - return GL_ONE_MINUS_DST_COLOR; - case PIPE_BLENDFACTOR_INV_CONST_COLOR: - return GL_ONE_MINUS_CONSTANT_COLOR; - case PIPE_BLENDFACTOR_INV_CONST_ALPHA: - return GL_ONE_MINUS_CONSTANT_ALPHA; - default: - return GL_ONE; - } -} - -static INLINE unsigned -nvgl_blend_eqn(unsigned func) -{ - switch (func) { - case PIPE_BLEND_ADD: - return GL_FUNC_ADD; - case PIPE_BLEND_SUBTRACT: - return GL_FUNC_SUBTRACT; - case PIPE_BLEND_REVERSE_SUBTRACT: - return GL_FUNC_REVERSE_SUBTRACT; - case PIPE_BLEND_MIN: - return GL_MIN; - case PIPE_BLEND_MAX: - return GL_MAX; - default: - return GL_FUNC_ADD; - } -} - -static INLINE unsigned -nvgl_logicop_func(unsigned func) -{ - switch (func) { - case PIPE_LOGICOP_CLEAR: - return GL_CLEAR; - case PIPE_LOGICOP_NOR: - return GL_NOR; - case PIPE_LOGICOP_AND_INVERTED: - return GL_AND_INVERTED; - case PIPE_LOGICOP_COPY_INVERTED: - return GL_COPY_INVERTED; - case PIPE_LOGICOP_AND_REVERSE: - return GL_AND_REVERSE; - case PIPE_LOGICOP_INVERT: - return GL_INVERT; - case PIPE_LOGICOP_XOR: - return GL_XOR; - case PIPE_LOGICOP_NAND: - return GL_NAND; - case PIPE_LOGICOP_AND: - return GL_AND; - case PIPE_LOGICOP_EQUIV: - return GL_EQUIV; - case PIPE_LOGICOP_NOOP: - return GL_NOOP; - case PIPE_LOGICOP_OR_INVERTED: - return GL_OR_INVERTED; - case PIPE_LOGICOP_COPY: - return GL_COPY; - case PIPE_LOGICOP_OR_REVERSE: - return GL_OR_REVERSE; - case PIPE_LOGICOP_OR: - return GL_OR; - case PIPE_LOGICOP_SET: - return GL_SET; - default: - return GL_CLEAR; - } -} - -static INLINE unsigned -nvgl_comparison_op(unsigned op) -{ - switch (op) { - case PIPE_FUNC_NEVER: - return GL_NEVER; - case PIPE_FUNC_LESS: - return GL_LESS; - case PIPE_FUNC_EQUAL: - return GL_EQUAL; - case PIPE_FUNC_LEQUAL: - return GL_LEQUAL; - case PIPE_FUNC_GREATER: - return GL_GREATER; - case PIPE_FUNC_NOTEQUAL: - return GL_NOTEQUAL; - case PIPE_FUNC_GEQUAL: - return GL_GEQUAL; - case PIPE_FUNC_ALWAYS: - return GL_ALWAYS; - default: - return GL_NEVER; - } -} - -static INLINE unsigned -nvgl_polygon_mode(unsigned mode) -{ - switch (mode) { - case PIPE_POLYGON_MODE_FILL: - return GL_FILL; - case PIPE_POLYGON_MODE_LINE: - return GL_LINE; - case PIPE_POLYGON_MODE_POINT: - return GL_POINT; - default: - return GL_FILL; - } -} - -static INLINE unsigned -nvgl_stencil_op(unsigned op) -{ - switch (op) { - case PIPE_STENCIL_OP_KEEP: - return GL_KEEP; - case PIPE_STENCIL_OP_ZERO: - return GL_ZERO; - case PIPE_STENCIL_OP_REPLACE: - return GL_REPLACE; - case PIPE_STENCIL_OP_INCR: - return GL_INCR; - case PIPE_STENCIL_OP_DECR: - return GL_DECR; - case PIPE_STENCIL_OP_INCR_WRAP: - return GL_INCR_WRAP; - case PIPE_STENCIL_OP_DECR_WRAP: - return GL_DECR_WRAP; - case PIPE_STENCIL_OP_INVERT: - return GL_INVERT; - default: - return GL_KEEP; - } -} - -static INLINE unsigned -nvgl_primitive(unsigned prim) { - switch (prim) { - case PIPE_PRIM_POINTS: - return GL_POINTS + 1; - case PIPE_PRIM_LINES: - return GL_LINES + 1; - case PIPE_PRIM_LINE_LOOP: - return GL_LINE_LOOP + 1; - case PIPE_PRIM_LINE_STRIP: - return GL_LINE_STRIP + 1; - case PIPE_PRIM_TRIANGLES: - return GL_TRIANGLES + 1; - case PIPE_PRIM_TRIANGLE_STRIP: - return GL_TRIANGLE_STRIP + 1; - case PIPE_PRIM_TRIANGLE_FAN: - return GL_TRIANGLE_FAN + 1; - case PIPE_PRIM_QUADS: - return GL_QUADS + 1; - case PIPE_PRIM_QUAD_STRIP: - return GL_QUAD_STRIP + 1; - case PIPE_PRIM_POLYGON: - return GL_POLYGON + 1; - default: - return GL_POINTS + 1; - } -} - -#endif |