diff options
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/arbprogparse.c | 4 | ||||
-rw-r--r-- | src/mesa/program/prog_execute.c | 28 | ||||
-rw-r--r-- | src/mesa/program/prog_instruction.c | 12 | ||||
-rw-r--r-- | src/mesa/program/prog_optimize.c | 34 | ||||
-rw-r--r-- | src/mesa/program/prog_parameter.c | 6 | ||||
-rw-r--r-- | src/mesa/program/prog_statevars.c | 14 | ||||
-rw-r--r-- | src/mesa/program/program.c | 40 | ||||
-rw-r--r-- | src/mesa/program/program.h | 2 | ||||
-rw-r--r-- | src/mesa/program/program_parse.y | 12 | ||||
-rw-r--r-- | src/mesa/program/programopt.c | 2 |
10 files changed, 77 insertions, 77 deletions
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c index 53a6f37cb7a..3ddaeca8a71 100644 --- a/src/mesa/program/arbprogparse.c +++ b/src/mesa/program/arbprogparse.c @@ -73,7 +73,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target, struct asm_parser_state state; GLuint i; - ASSERT(target == GL_FRAGMENT_PROGRAM_ARB); + assert(target == GL_FRAGMENT_PROGRAM_ARB); memset(&prog, 0, sizeof(prog)); memset(&state, 0, sizeof(state)); @@ -166,7 +166,7 @@ _mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target, struct gl_program prog; struct asm_parser_state state; - ASSERT(target == GL_VERTEX_PROGRAM_ARB); + assert(target == GL_VERTEX_PROGRAM_ARB); memset(&prog, 0, sizeof(prog)); memset(&state, 0, sizeof(state)); diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index b2fbc808aad..8f83c311ece 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog_execute.c @@ -190,10 +190,10 @@ fetch_vector4(const struct prog_src_register *source, COPY_4V(result, src); } else { - ASSERT(GET_SWZ(source->Swizzle, 0) <= 3); - ASSERT(GET_SWZ(source->Swizzle, 1) <= 3); - ASSERT(GET_SWZ(source->Swizzle, 2) <= 3); - ASSERT(GET_SWZ(source->Swizzle, 3) <= 3); + assert(GET_SWZ(source->Swizzle, 0) <= 3); + assert(GET_SWZ(source->Swizzle, 1) <= 3); + assert(GET_SWZ(source->Swizzle, 2) <= 3); + assert(GET_SWZ(source->Swizzle, 3) <= 3); result[0] = src[GET_SWZ(source->Swizzle, 0)]; result[1] = src[GET_SWZ(source->Swizzle, 1)]; result[2] = src[GET_SWZ(source->Swizzle, 2)]; @@ -207,7 +207,7 @@ fetch_vector4(const struct prog_src_register *source, result[3] = FABSF(result[3]); } if (source->Negate) { - ASSERT(source->Negate == NEGATE_XYZW); + assert(source->Negate == NEGATE_XYZW); result[0] = -result[0]; result[1] = -result[1]; result[2] = -result[2]; @@ -265,7 +265,7 @@ fetch_vector4_deriv(struct gl_context * ctx, result[3] = FABSF(result[3]); } if (source->Negate) { - ASSERT(source->Negate == NEGATE_XYZW); + assert(source->Negate == NEGATE_XYZW); result[0] = -result[0]; result[1] = -result[1]; result[2] = -result[2]; @@ -556,12 +556,12 @@ _mesa_execute_program(struct gl_context * ctx, break; case OPCODE_BGNLOOP: /* no-op */ - ASSERT(program->Instructions[inst->BranchTarget].Opcode + assert(program->Instructions[inst->BranchTarget].Opcode == OPCODE_ENDLOOP); break; case OPCODE_ENDLOOP: /* subtract 1 here since pc is incremented by for(pc) loop */ - ASSERT(program->Instructions[inst->BranchTarget].Opcode + assert(program->Instructions[inst->BranchTarget].Opcode == OPCODE_BGNLOOP); pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ break; @@ -570,7 +570,7 @@ _mesa_execute_program(struct gl_context * ctx, case OPCODE_ENDSUB: /* end subroutine */ break; case OPCODE_BRK: /* break out of loop (conditional) */ - ASSERT(program->Instructions[inst->BranchTarget].Opcode + assert(program->Instructions[inst->BranchTarget].Opcode == OPCODE_ENDLOOP); if (eval_condition(machine, inst)) { /* break out of loop */ @@ -579,7 +579,7 @@ _mesa_execute_program(struct gl_context * ctx, } break; case OPCODE_CONT: /* continue loop (conditional) */ - ASSERT(program->Instructions[inst->BranchTarget].Opcode + assert(program->Instructions[inst->BranchTarget].Opcode == OPCODE_ENDLOOP); if (eval_condition(machine, inst)) { /* continue at ENDLOOP */ @@ -768,7 +768,7 @@ _mesa_execute_program(struct gl_context * ctx, case OPCODE_IF: { GLboolean cond; - ASSERT(program->Instructions[inst->BranchTarget].Opcode + assert(program->Instructions[inst->BranchTarget].Opcode == OPCODE_ELSE || program->Instructions[inst->BranchTarget].Opcode == OPCODE_ENDIF); @@ -797,7 +797,7 @@ _mesa_execute_program(struct gl_context * ctx, break; case OPCODE_ELSE: /* goto ENDIF */ - ASSERT(program->Instructions[inst->BranchTarget].Opcode + assert(program->Instructions[inst->BranchTarget].Opcode == OPCODE_ENDIF); assert(inst->BranchTarget >= 0); pc = inst->BranchTarget; @@ -1260,7 +1260,7 @@ _mesa_execute_program(struct gl_context * ctx, else if (swz == SWIZZLE_ONE) result[i] = 1.0; else { - ASSERT(swz <= 3); + assert(swz <= 3); result[i] = src[swz]; } if (source->Negate & (1 << i)) @@ -1357,7 +1357,7 @@ _mesa_execute_program(struct gl_context * ctx, fetch_vector4(&inst->SrcReg[0], machine, texcoord); /* Not so sure about this test - if texcoord[3] is - * zero, we'd probably be fine except for an ASSERT in + * zero, we'd probably be fine except for an assert in * IROUND_POS() which gets triggered by the inf values created. */ if (texcoord[3] != 0.0) { diff --git a/src/mesa/program/prog_instruction.c b/src/mesa/program/prog_instruction.c index 254c0128fcd..6a9bcb7b579 100644 --- a/src/mesa/program/prog_instruction.c +++ b/src/mesa/program/prog_instruction.c @@ -200,9 +200,9 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { GLuint _mesa_num_inst_src_regs(gl_inst_opcode opcode) { - ASSERT(opcode < MAX_OPCODE); - ASSERT(opcode == InstInfo[opcode].Opcode); - ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); + assert(opcode < MAX_OPCODE); + assert(opcode == InstInfo[opcode].Opcode); + assert(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); return InstInfo[opcode].NumSrcRegs; } @@ -213,9 +213,9 @@ _mesa_num_inst_src_regs(gl_inst_opcode opcode) GLuint _mesa_num_inst_dst_regs(gl_inst_opcode opcode) { - ASSERT(opcode < MAX_OPCODE); - ASSERT(opcode == InstInfo[opcode].Opcode); - ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); + assert(opcode < MAX_OPCODE); + assert(opcode == InstInfo[opcode].Opcode); + assert(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); return InstInfo[opcode].NumDstRegs; } diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index 65d427cb420..6d4485acb65 100644 --- a/src/mesa/program/prog_optimize.c +++ b/src/mesa/program/prog_optimize.c @@ -57,7 +57,7 @@ get_src_arg_mask(const struct prog_instruction *inst, GLuint read_mask, channel_mask; GLuint comp; - ASSERT(arg < _mesa_num_inst_src_regs(inst->Opcode)); + assert(arg < _mesa_num_inst_src_regs(inst->Opcode)); /* Form the dst register, find the written channels */ if (inst->CondUpdate) { @@ -133,7 +133,7 @@ get_dst_mask_for_mov(const struct prog_instruction *mov, GLuint src_mask) GLuint comp; GLuint updated_mask = 0x0; - ASSERT(mov->Opcode == OPCODE_MOV); + assert(mov->Opcode == OPCODE_MOV); for (comp = 0; comp < 4; ++comp) { GLuint src_comp; @@ -225,13 +225,13 @@ replace_regs(struct gl_program *prog, gl_register_file file, const GLint map[]) for (j = 0; j < numSrc; j++) { if (inst->SrcReg[j].File == file) { GLuint index = inst->SrcReg[j].Index; - ASSERT(map[index] >= 0); + assert(map[index] >= 0); inst->SrcReg[j].Index = map[index]; } } if (inst->DstReg.File == file) { const GLuint index = inst->DstReg.Index; - ASSERT(map[index] >= 0); + assert(map[index] >= 0); inst->DstReg.Index = map[index]; } } @@ -272,7 +272,7 @@ _mesa_remove_dead_code_global(struct gl_program *prog) if (inst->SrcReg[j].File == PROGRAM_TEMPORARY) { const GLuint index = inst->SrcReg[j].Index; GLuint read_mask; - ASSERT(index < REG_ALLOCATE_MAX_PROGRAM_TEMPS); + assert(index < REG_ALLOCATE_MAX_PROGRAM_TEMPS); read_mask = get_src_arg_mask(inst, j, NO_MASK); if (inst->SrcReg[j].RelAddr) { @@ -295,7 +295,7 @@ _mesa_remove_dead_code_global(struct gl_program *prog) /* check dst reg */ if (inst->DstReg.File == PROGRAM_TEMPORARY) { const GLuint index = inst->DstReg.Index; - ASSERT(index < REG_ALLOCATE_MAX_PROGRAM_TEMPS); + assert(index < REG_ALLOCATE_MAX_PROGRAM_TEMPS); if (inst->DstReg.RelAddr) { if (dbg) @@ -676,7 +676,7 @@ _mesa_merge_mov_into_inst(struct prog_instruction *inst, for (dst_comp = 0; dst_comp < 4; ++dst_comp) { if (mov->DstReg.WriteMask & (1 << dst_comp)) { const GLuint src_comp = GET_SWZ(mov->SrcReg[0].Swizzle, dst_comp); - ASSERT(src_comp < 4); + assert(src_comp < 4); dst_to_src_comp[dst_comp] = src_comp; } } @@ -692,9 +692,9 @@ _mesa_merge_mov_into_inst(struct prog_instruction *inst, if ((mov->DstReg.WriteMask & (1 << dst_comp)) == 0) continue; src_comp = dst_to_src_comp[dst_comp]; - ASSERT(src_comp < 4); + assert(src_comp < 4); arg_comp = GET_SWZ(arg_swz, src_comp); - ASSERT(arg_comp < 4); + assert(arg_comp < 4); inst->SrcReg[arg].Swizzle |= arg_comp << (3*dst_comp); } } @@ -871,7 +871,7 @@ insert_interval_by_end(struct interval_list *list, const struct interval *inv) { GLuint i; for (i = 0; i + 1 < list->Num; i++) { - ASSERT(list->Intervals[i].End <= list->Intervals[i + 1].End); + assert(list->Intervals[i].End <= list->Intervals[i + 1].End); } } #endif @@ -887,8 +887,8 @@ remove_interval(struct interval_list *list, const struct interval *inv) for (k = 0; k < list->Num; k++) { if (list->Intervals[k].Reg == inv->Reg) { /* found, remove it */ - ASSERT(list->Intervals[k].Start == inv->Start); - ASSERT(list->Intervals[k].End == inv->End); + assert(list->Intervals[k].Start == inv->Start); + assert(list->Intervals[k].End == inv->End); while (k < list->Num - 1) { list->Intervals[k] = list->Intervals[k + 1]; k++; @@ -924,7 +924,7 @@ sort_interval_list_by_start(struct interval_list *list) { GLuint i; for (i = 0; i + 1 < list->Num; i++) { - ASSERT(list->Intervals[i].Start <= list->Intervals[i + 1].Start); + assert(list->Intervals[i].Start <= list->Intervals[i + 1].Start); } } #endif @@ -966,9 +966,9 @@ update_interval(GLint intBegin[], GLint intEnd[], begin = loopStack[0].Start; } - ASSERT(index < REG_ALLOCATE_MAX_PROGRAM_TEMPS); + assert(index < REG_ALLOCATE_MAX_PROGRAM_TEMPS); if (intBegin[index] == -1) { - ASSERT(intEnd[index] == -1); + assert(intEnd[index] == -1); intBegin[index] = begin; intEnd[index] = end; } @@ -1176,7 +1176,7 @@ _mesa_reallocate_registers(struct gl_program *prog) else { /* Interval 'inv' has expired */ const GLint regNew = registerMap[inv->Reg]; - ASSERT(regNew >= 0); + assert(regNew >= 0); if (dbg) printf(" expire interval for reg %u\n", inv->Reg); @@ -1188,7 +1188,7 @@ _mesa_reallocate_registers(struct gl_program *prog) /* return register regNew to the free pool */ if (dbg) printf(" free reg %d\n", regNew); - ASSERT(usedRegs[regNew] == GL_TRUE); + assert(usedRegs[regNew] == GL_TRUE); usedRegs[regNew] = GL_FALSE; } } diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c index 0ef46415d9f..5939f6f72ec 100644 --- a/src/mesa/program/prog_parameter.c +++ b/src/mesa/program/prog_parameter.c @@ -241,8 +241,8 @@ _mesa_add_typed_unnamed_constant(struct gl_program_parameter_list *paramList, GLenum datatype, GLuint *swizzleOut) { GLint pos; - ASSERT(size >= 1); - ASSERT(size <= 4); + assert(size >= 1); + assert(size <= 4); if (swizzleOut && _mesa_lookup_parameter_constant(paramList, values, @@ -528,7 +528,7 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) GLuint size = MIN2(p->Size, 4); GLint j = _mesa_add_parameter(clone, p->Type, p->Name, size, p->DataType, list->ParameterValues[i], NULL); - ASSERT(j >= 0); + assert(j >= 0); pCopy = clone->Parameters + j; /* copy state indexes */ if (p->Type == PROGRAM_STATE_VAR) { diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index 7f5daf8c676..80708f4e5fb 100644 --- a/src/mesa/program/prog_statevars.c +++ b/src/mesa/program/prog_statevars.c @@ -58,9 +58,9 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], /* state[1] is either 0=front or 1=back side */ const GLuint face = (GLuint) state[1]; const struct gl_material *mat = &ctx->Light.Material; - ASSERT(face == 0 || face == 1); + assert(face == 0 || face == 1); /* we rely on tokens numbered so that _BACK_ == _FRONT_+ 1 */ - ASSERT(MAT_ATTRIB_FRONT_AMBIENT + 1 == MAT_ATTRIB_BACK_AMBIENT); + assert(MAT_ATTRIB_FRONT_AMBIENT + 1 == MAT_ATTRIB_BACK_AMBIENT); /* XXX we could get rid of this switch entirely with a little * work in arbprogparse.c's parse_state_single_item(). */ @@ -170,7 +170,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], const GLuint ln = (GLuint) state[1]; const GLuint face = (GLuint) state[2]; GLint i; - ASSERT(face == 0 || face == 1); + assert(face == 0 || face == 1); switch (state[3]) { case STATE_AMBIENT: for (i = 0; i < 3; i++) { @@ -295,8 +295,8 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], const gl_state_index modifier = state[4]; const GLfloat *m; GLuint row, i; - ASSERT(firstRow < 4); - ASSERT(lastRow < 4); + assert(firstRow < 4); + assert(lastRow < 4); if (mat == STATE_MODELVIEW_MATRIX) { matrix = ctx->ModelviewMatrixStack.Top; } @@ -307,11 +307,11 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], matrix = &ctx->_ModelProjectMatrix; } else if (mat == STATE_TEXTURE_MATRIX) { - ASSERT(index < Elements(ctx->TextureMatrixStack)); + assert(index < Elements(ctx->TextureMatrixStack)); matrix = ctx->TextureMatrixStack[index].Top; } else if (mat == STATE_PROGRAM_MATRIX) { - ASSERT(index < Elements(ctx->ProgramMatrixStack)); + assert(index < Elements(ctx->ProgramMatrixStack)); matrix = ctx->ProgramMatrixStack[index].Top; } else { diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 6e17fe65f7e..61a9e97c9f8 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -56,21 +56,21 @@ _mesa_init_program(struct gl_context *ctx) * If this assertion fails, we need to increase the field * size for register indexes (see INST_INDEX_BITS). */ - ASSERT(ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents / 4 + assert(ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents / 4 <= (1 << INST_INDEX_BITS)); - ASSERT(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents / 4 + assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents / 4 <= (1 << INST_INDEX_BITS)); - ASSERT(ctx->Const.Program[MESA_SHADER_VERTEX].MaxTemps <= (1 << INST_INDEX_BITS)); - ASSERT(ctx->Const.Program[MESA_SHADER_VERTEX].MaxLocalParams <= (1 << INST_INDEX_BITS)); - ASSERT(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTemps <= (1 << INST_INDEX_BITS)); - ASSERT(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxLocalParams <= (1 << INST_INDEX_BITS)); + assert(ctx->Const.Program[MESA_SHADER_VERTEX].MaxTemps <= (1 << INST_INDEX_BITS)); + assert(ctx->Const.Program[MESA_SHADER_VERTEX].MaxLocalParams <= (1 << INST_INDEX_BITS)); + assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTemps <= (1 << INST_INDEX_BITS)); + assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxLocalParams <= (1 << INST_INDEX_BITS)); - ASSERT(ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents <= 4 * MAX_UNIFORMS); - ASSERT(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents <= 4 * MAX_UNIFORMS); + assert(ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents <= 4 * MAX_UNIFORMS); + assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents <= 4 * MAX_UNIFORMS); - ASSERT(ctx->Const.Program[MESA_SHADER_VERTEX].MaxAddressOffset <= (1 << INST_INDEX_BITS)); - ASSERT(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAddressOffset <= (1 << INST_INDEX_BITS)); + assert(ctx->Const.Program[MESA_SHADER_VERTEX].MaxAddressOffset <= (1 << INST_INDEX_BITS)); + assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAddressOffset <= (1 << INST_INDEX_BITS)); /* If this fails, increase prog_instruction::TexSrcUnit size */ STATIC_ASSERT(MAX_TEXTURE_UNITS <= (1 << 5)); @@ -364,8 +364,8 @@ void _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog) { (void) ctx; - ASSERT(prog); - ASSERT(prog->RefCount==0); + assert(prog); + assert(prog->RefCount==0); if (prog == &_mesa_DummyProgram) return; @@ -414,12 +414,12 @@ _mesa_reference_program_(struct gl_context *ctx, if (*ptr && prog) { /* sanity check */ if ((*ptr)->Target == GL_VERTEX_PROGRAM_ARB) - ASSERT(prog->Target == GL_VERTEX_PROGRAM_ARB); + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); else if ((*ptr)->Target == GL_FRAGMENT_PROGRAM_ARB) - ASSERT(prog->Target == GL_FRAGMENT_PROGRAM_ARB || + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB || prog->Target == GL_FRAGMENT_PROGRAM_NV); else if ((*ptr)->Target == MESA_GEOMETRY_PROGRAM) - ASSERT(prog->Target == MESA_GEOMETRY_PROGRAM); + assert(prog->Target == MESA_GEOMETRY_PROGRAM); } #endif @@ -434,14 +434,14 @@ _mesa_reference_program_(struct gl_context *ctx, ((*ptr)->Target == MESA_GEOMETRY_PROGRAM ? "GP" : "FP")), (*ptr)->RefCount - 1); #endif - ASSERT((*ptr)->RefCount > 0); + assert((*ptr)->RefCount > 0); (*ptr)->RefCount--; deleteFlag = ((*ptr)->RefCount == 0); /*mtx_lock(&(*ptr)->Mutex);*/ if (deleteFlag) { - ASSERT(ctx); + assert(ctx); ctx->Driver.DeleteProgram(ctx, *ptr); } @@ -733,7 +733,7 @@ _mesa_combine_programs(struct gl_context *ctx, GLbitfield64 inputsB; GLuint i; - ASSERT(progA->Target == progB->Target); + assert(progA->Target == progB->Target); newInst = _mesa_alloc_instructions(newLength); if (!newInst) @@ -867,14 +867,14 @@ _mesa_find_used_registers(const struct gl_program *prog, const GLuint n = _mesa_num_inst_src_regs(inst->Opcode); if (inst->DstReg.File == file) { - ASSERT(inst->DstReg.Index < usedSize); + assert(inst->DstReg.Index < usedSize); if(inst->DstReg.Index < usedSize) used[inst->DstReg.Index] = GL_TRUE; } for (j = 0; j < n; j++) { if (inst->SrcReg[j].File == file) { - ASSERT(inst->SrcReg[j].Index < (GLint) usedSize); + assert(inst->SrcReg[j].Index < (GLint) usedSize); if (inst->SrcReg[j].Index < (GLint) usedSize) used[inst->SrcReg[j].Index] = GL_TRUE; } diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h index ef698242ffa..0b0d1ac6fee 100644 --- a/src/mesa/program/program.h +++ b/src/mesa/program/program.h @@ -210,7 +210,7 @@ _mesa_program_enum_to_shader_stage(GLenum v) case GL_COMPUTE_PROGRAM_NV: return MESA_SHADER_COMPUTE; default: - ASSERT(0); + assert(0); return ~0; } } diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y index 1664740b431..268ce05edee 100644 --- a/src/mesa/program/program_parse.y +++ b/src/mesa/program/program_parse.y @@ -2333,11 +2333,11 @@ set_dst_reg(struct prog_dst_register *r, gl_register_file file, GLint index) { const GLint maxIndex = 1 << INST_INDEX_BITS; const GLint minIndex = 0; - ASSERT(index >= minIndex); + assert(index >= minIndex); (void) minIndex; - ASSERT(index <= maxIndex); + assert(index <= maxIndex); (void) maxIndex; - ASSERT(file == PROGRAM_TEMPORARY || + assert(file == PROGRAM_TEMPORARY || file == PROGRAM_ADDRESS || file == PROGRAM_OUTPUT); memset(r, 0, sizeof(*r)); @@ -2375,10 +2375,10 @@ set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index, { const GLint maxIndex = (1 << INST_INDEX_BITS) - 1; const GLint minIndex = -(1 << INST_INDEX_BITS); - ASSERT(file < PROGRAM_FILE_MAX); - ASSERT(index >= minIndex); + assert(file < PROGRAM_FILE_MAX); + assert(index >= minIndex); (void) minIndex; - ASSERT(index <= maxIndex); + assert(index <= maxIndex); (void) maxIndex; memset(r, 0, sizeof(*r)); r->Base.File = file; diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c index fdaa4a465cb..e82c68a5305 100644 --- a/src/mesa/program/programopt.c +++ b/src/mesa/program/programopt.c @@ -335,7 +335,7 @@ _mesa_append_fog_code(struct gl_context *ctx, inst++; } else { - ASSERT(fog_mode == GL_EXP || fog_mode == GL_EXP2); + assert(fog_mode == GL_EXP || fog_mode == GL_EXP2); /* fogPRefOpt.z = d/ln(2), fogPRefOpt.w = d/sqrt(ln(2) */ /* EXP: MUL fogFactorTemp.x, fogPRefOpt.z, fragment.fogcoord.x; */ /* EXP2: MUL fogFactorTemp.x, fogPRefOpt.w, fragment.fogcoord.x; */ |