summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_atifragshader.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-10-21 23:21:35 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-10-21 23:21:35 +0000
commit919cd2c3ba39bf4d8d2ffcea0daec7bab8645d34 (patch)
tree7137f45686df057a06220b4405b637e1e9aa21f2 /src/mesa/swrast/s_atifragshader.c
parented324db249d068f14646eced55d106b5fe6b889c (diff)
move/improve comments, clean up code in a few places
Diffstat (limited to 'src/mesa/swrast/s_atifragshader.c')
-rw-r--r--src/mesa/swrast/s_atifragshader.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c
index f195b6ee55..75df50b0ba 100644
--- a/src/mesa/swrast/s_atifragshader.c
+++ b/src/mesa/swrast/s_atifragshader.c
@@ -242,17 +242,6 @@ finish_pass(struct atifs_machine *machine)
}
}
-/**
- * Execute the given fragment shader
- * NOTE: we do everything in single-precision floating point; we don't
- * currently observe the single/half/fixed-precision qualifiers.
- * \param ctx - rendering context
- * \param program - the fragment program to execute
- * \param machine - machine state (register file)
- * \param maxInst - max number of instructions to execute
- * \return GL_TRUE if program completed or GL_FALSE if program executed KIL.
- */
-
struct ati_fs_opcode_st ati_fs_opcodes[] = {
{GL_ADD_ATI, 2},
{GL_SUB_ATI, 2},
@@ -316,11 +305,21 @@ do { \
COPY_4V(src[optype][i], x); \
} while (0)
-static GLboolean
-execute_shader(GLcontext * ctx,
- const struct ati_fragment_shader *shader, GLuint maxInst,
+
+
+/**
+ * Execute the given fragment shader.
+ * NOTE: we do everything in single-precision floating point
+ * \param ctx - rendering context
+ * \param shader - the shader to execute
+ * \param machine - virtual machine state
+ * \param span - the SWspan we're operating on
+ * \param column - which pixel [i] we're operating on in the span
+ */
+static void
+execute_shader(GLcontext *ctx, const struct ati_fragment_shader *shader,
struct atifs_machine *machine, const SWspan *span,
- GLuint column)
+ GLuint column)
{
GLuint pc;
struct atifs_instruction *inst;
@@ -554,7 +553,6 @@ execute_shader(GLcontext * ctx,
}
}
}
- return GL_TRUE;
}
@@ -598,11 +596,8 @@ _swrast_exec_fragment_shader(GLcontext * ctx, SWspan *span)
for (i = 0; i < span->end; i++) {
if (span->array->mask[i]) {
init_machine(ctx, &machine, shader, span, i);
- /* can't really happen... */
- if (!execute_shader(ctx, shader, ~0, &machine, span, i)) {
- span->array->mask[i] = GL_FALSE;
- span->writeAll = GL_FALSE;
- }
+
+ execute_shader(ctx, shader, &machine, span, i);
/* store result color */
{