mesa.git
17 years agor300: Moved some code around in r300_render.c and general clean up.
Oliver McFadden [Fri, 11 May 2007 19:57:07 +0000 (19:57 +0000)]
r300: Moved some code around in r300_render.c and general clean up.

17 years agouser-declared uniform structs not supported yet (see bug 10908)
Brian [Fri, 11 May 2007 21:35:12 +0000 (15:35 -0600)]
user-declared uniform structs not supported yet (see bug 10908)

17 years agodon't ignore return value of _slang_codegen_global_variable()
Brian [Fri, 11 May 2007 21:34:29 +0000 (15:34 -0600)]
don't ignore return value of _slang_codegen_global_variable()

17 years agoremove some unneeded code in init_machine()
Brian [Fri, 11 May 2007 21:12:40 +0000 (15:12 -0600)]
remove some unneeded code in init_machine()

17 years agor300: Removed some checking in r300NumVerts that is not needed.
Oliver McFadden [Fri, 11 May 2007 19:44:35 +0000 (19:44 +0000)]
r300: Removed some checking in r300NumVerts that is not needed.

According to Aapo Tahkola the OpenGL specification defines the behaviour when
there are not enough vertices for the primitive type, thus DRI drivers do not
need to perform verification on the number of vertices per primitive.

17 years agor300: Function naming correction in r300_texmem.c.
Oliver McFadden [Fri, 11 May 2007 19:28:35 +0000 (19:28 +0000)]
r300: Function naming correction in r300_texmem.c.

17 years agor300: Cleaned up function names in r300_state.c.
Oliver McFadden [Fri, 11 May 2007 19:21:08 +0000 (19:21 +0000)]
r300: Cleaned up function names in r300_state.c.

17 years agor300: Cleaned up function naming in r300_emit.c.
Oliver McFadden [Fri, 11 May 2007 17:10:59 +0000 (17:10 +0000)]
r300: Cleaned up function naming in r300_emit.c.

17 years agor300: Renamed r300_maos.c to r300_emit.c; it contains mostly emit code now.
Oliver McFadden [Fri, 11 May 2007 17:07:09 +0000 (17:07 +0000)]
r300: Renamed r300_maos.c to r300_emit.c; it contains mostly emit code now.

17 years agoRemove unused FB_* tokens, re-indent code.
Brian [Fri, 11 May 2007 14:41:34 +0000 (08:41 -0600)]
Remove unused FB_* tokens, re-indent code.

17 years agoWhen feeding back texcoords, don't divide by W. See bug 10913.
Brian [Fri, 11 May 2007 14:39:18 +0000 (08:39 -0600)]
When feeding back texcoords, don't divide by W.  See bug 10913.

17 years agoFix some bugs related to loop counters and conditional branching.
Patrick Baggett [Fri, 11 May 2007 14:19:33 +0000 (08:19 -0600)]
Fix some bugs related to loop counters and conditional branching.

17 years agomore indentation fixes, remove 'register' keywords
Brian [Thu, 10 May 2007 23:33:14 +0000 (17:33 -0600)]
more indentation fixes, remove 'register' keywords

17 years agore-indent some code
Brian [Thu, 10 May 2007 23:30:44 +0000 (17:30 -0600)]
re-indent some code

17 years agodocument exp(), mod() fixes
Brian [Thu, 10 May 2007 22:14:10 +0000 (16:14 -0600)]
document exp(), mod() fixes

17 years agoregenerated
Brian [Thu, 10 May 2007 20:49:06 +0000 (14:49 -0600)]
regenerated

17 years agoImplement exp() in terms of __asm float_power. Fix typo in mod(vec4) function.
Brian [Thu, 10 May 2007 20:48:55 +0000 (14:48 -0600)]
Implement exp() in terms of __asm float_power. Fix typo in mod(vec4) function.

exp() was using __asm float_exp (OPCODE_EXP) but that computes base two, not e.
See bug 10907.

17 years agoFix reversed enable logic in enable_texture
Ian Romanick [Thu, 10 May 2007 22:00:41 +0000 (15:00 -0700)]
Fix reversed enable logic in enable_texture

Fix bug inserted in commit c9e723e5013443df984cb3987ffa3a9ba3384b89.
Discovered by Oliver McFadden (z3ro).

17 years agor300: Added TODO comment regarding texture tiling; I'm not sure about this.
Oliver McFadden [Thu, 10 May 2007 22:01:41 +0000 (22:01 +0000)]
r300: Added TODO comment regarding texture tiling; I'm not sure about this.

17 years agor300: Corrected a compile error introduced by one of the previous commits.
Oliver McFadden [Thu, 10 May 2007 21:40:20 +0000 (21:40 +0000)]
r300: Corrected a compile error introduced by one of the previous commits.

17 years agor300: Removed obsolete start_index16_packet/start_index32_packet.
Oliver McFadden [Thu, 10 May 2007 21:28:04 +0000 (21:28 +0000)]
r300: Removed obsolete start_index16_packet/start_index32_packet.

It's all in r300_render.c now.

17 years agor300: Moved some more emit code into r300_render.c.
Oliver McFadden [Thu, 10 May 2007 17:50:25 +0000 (17:50 +0000)]
r300: Moved some more emit code into r300_render.c.

17 years agor300: Moved some more of the emit code into r300_render.c.
Oliver McFadden [Thu, 10 May 2007 17:45:27 +0000 (17:45 +0000)]
r300: Moved some more of the emit code into r300_render.c.

17 years agodocument tex sampler bug fix, code changes
Brian [Thu, 10 May 2007 16:52:19 +0000 (10:52 -0600)]
document tex sampler bug fix, code changes

17 years agoReplace `pkg-config --cflags libdrm` with LIBDRM_CFLAGS, remove disabled lines, remov...
Brian [Thu, 10 May 2007 16:51:54 +0000 (10:51 -0600)]
Replace `pkg-config --cflags libdrm` with LIBDRM_CFLAGS, remove disabled lines, remove obsolete comments.

17 years agoConvert "bit" parameters to GLbitfield. Fix cut-and-paste bug in _mesa_IsEnabled
Ian Romanick [Thu, 10 May 2007 15:20:04 +0000 (08:20 -0700)]
Convert "bit" parameters to GLbitfield. Fix cut-and-paste bug in _mesa_IsEnabled

These changes are based on patch review comments from Brian Paul, Alan
Hourihane, and vehemens.

17 years agoRefactor the loop in unbind_texobj_from_texunits.
Ian Romanick [Thu, 10 May 2007 04:51:49 +0000 (21:51 -0700)]
Refactor the loop in unbind_texobj_from_texunits.

Common code was pulled out of the per-target if-statment and put at the end
of the for-loop.  The common code is guarded by a new variable, curr, that
is set to point to the unit's current target in each if-statement.

17 years agoRefactor queries of GL_(SOURCE|OPERAND)[012]_(ALPHA|RGB).
Ian Romanick [Thu, 10 May 2007 04:49:35 +0000 (21:49 -0700)]
Refactor queries of GL_(SOURCE|OPERAND)[012]_(ALPHA|RGB).

Most switch-statements that have cases for these enums already use code like:

    const GLuint idx = pname - GL_SOURCE0_RGB;
    ... texUnit->Combine.SourceRGB[idx] ...

This patch just brings the remaining bits up to speed.

17 years agoRefactor the way TestProxyTexImage is called in texture_error_check.
Ian Romanick [Thu, 10 May 2007 04:46:43 +0000 (21:46 -0700)]
Refactor the way TestProxyTexImage is called in texture_error_check.

17 years agoRefactor Enable / Disable and IsEnabled bits related to texture targets.
Ian Romanick [Thu, 10 May 2007 04:45:27 +0000 (21:45 -0700)]
Refactor Enable / Disable and IsEnabled bits related to texture targets.

17 years agor300: Name the render functions in r300_render.c consistently.
Oliver McFadden [Wed, 9 May 2007 22:16:18 +0000 (22:16 +0000)]
r300: Name the render functions in r300_render.c consistently.

17 years agor300: Return -1 for error.
Oliver McFadden [Wed, 9 May 2007 22:07:10 +0000 (22:07 +0000)]
r300: Return -1 for error.

17 years agor300: Probably a good idea to always check the vertices; it's a WARN_ONCE so the
Oliver McFadden [Wed, 9 May 2007 22:06:19 +0000 (22:06 +0000)]
r300: Probably a good idea to always check the vertices; it's a WARN_ONCE so the

performance impact is extremely minimal.

17 years agor300: Added some more Doxygen documentation and made some functions static.
Oliver McFadden [Wed, 9 May 2007 22:03:43 +0000 (22:03 +0000)]
r300: Added some more Doxygen documentation and made some functions static.

17 years agor300: Removed the "texmicrotile" variable; the tiling code is disabled via a
Oliver McFadden [Wed, 9 May 2007 21:44:07 +0000 (21:44 +0000)]
r300: Removed the "texmicrotile" variable; the tiling code is disabled via a

compiler conditional anyway; probably broken?

17 years agor300: Converted a few "if (0)" into "if (RADEON_DEBUG & DEBUG_TEXTURE)".
Oliver McFadden [Wed, 9 May 2007 21:41:03 +0000 (21:41 +0000)]
r300: Converted a few "if (0)" into "if (RADEON_DEBUG & DEBUG_TEXTURE)".

17 years agoTweak the shell scripting for descending into and building subdirs.
Brian [Wed, 9 May 2007 22:22:53 +0000 (16:22 -0600)]
Tweak the shell scripting for descending into and building subdirs.

In general, use this:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1; \
fi \
done

Basically, silently skip missing subdirs but generate an error and stop if
there's a compilation or install problem.
This was done inconsistantly before.  In once case, a missing subdir was
causing us to go into an infinte loop!

17 years agor300: Cleaned up radeon_context.h slightly; mostly Indent.
Oliver McFadden [Wed, 9 May 2007 21:06:28 +0000 (21:06 +0000)]
r300: Cleaned up radeon_context.h slightly; mostly Indent.

17 years agor300: radeon_span.h is now common code; radeon_span.c still needs some work.
Oliver McFadden [Wed, 9 May 2007 20:52:09 +0000 (20:52 +0000)]
r300: radeon_span.h is now common code; radeon_span.c still needs some work.

17 years agor300: Renamed the R300 memory manager from "radeon" to "r300"; it's R300
Oliver McFadden [Wed, 9 May 2007 20:49:49 +0000 (20:49 +0000)]
r300: Renamed the R300 memory manager from "radeon" to "r300"; it's R300
specific.

17 years agor300: Indented radeon_span.h
Oliver McFadden [Wed, 9 May 2007 20:41:27 +0000 (20:41 +0000)]
r300: Indented radeon_span.h

17 years agor300: Further reduced the radeon_span.c diff.
Oliver McFadden [Wed, 9 May 2007 20:36:48 +0000 (20:36 +0000)]
r300: Further reduced the radeon_span.c diff.

17 years agor300: I have no idea why this was forced on, but it seems to work fine when
Oliver McFadden [Wed, 9 May 2007 19:30:59 +0000 (19:30 +0000)]
r300: I have no idea why this was forced on, but it seems to work fine when
restored to the previous behaviour.

17 years agor300: Removed the dangerous R300_SPAN_DISABLE_LOCKING flag.
Oliver McFadden [Wed, 9 May 2007 19:24:59 +0000 (19:24 +0000)]
r300: Removed the dangerous R300_SPAN_DISABLE_LOCKING flag.

Enabling R300_SPAN_DISABLE_LOCKING would probably cause more lockups; I think
there are a couple of other little bugs in this code, too. It's best to remove
it.

17 years agor300: Removed a bit of disabled code.
Oliver McFadden [Wed, 9 May 2007 18:44:56 +0000 (18:44 +0000)]
r300: Removed a bit of disabled code.

17 years agor300: Don't need to include the deprecated r300_program.h in some files.
Oliver McFadden [Wed, 9 May 2007 18:37:46 +0000 (18:37 +0000)]
r300: Don't need to include the deprecated r300_program.h in some files.

The only file that still requires r300_program.h is r300_ioctl.c; and it should
use the new defines in r300_reg.h!

17 years agor300; Indent would destroy r300_reg.h, so add *INDENT-OFF*.
Oliver McFadden [Wed, 9 May 2007 18:31:04 +0000 (18:31 +0000)]
r300; Indent would destroy r300_reg.h, so add *INDENT-OFF*.

17 years agor300: Added a few more Doxygen comments.
Christoph Bill [Wed, 9 May 2007 18:25:12 +0000 (18:25 +0000)]
r300: Added a few more Doxygen comments.

17 years agor300: Added some Doxygen comments.
Christoph Bill [Wed, 9 May 2007 18:24:06 +0000 (18:24 +0000)]
r300: Added some Doxygen comments.

17 years agor300: Converted "rp" variables (r300_fragment_program) to "fp".
Oliver McFadden [Wed, 9 May 2007 18:14:42 +0000 (18:14 +0000)]
r300: Converted "rp" variables (r300_fragment_program) to "fp".

17 years agor300: Don't need to sleep here; might cause performance problems the first time.
Oliver McFadden [Wed, 9 May 2007 18:11:38 +0000 (18:11 +0000)]
r300: Don't need to sleep here; might cause performance problems the first time.

17 years agor300: Removed the obsolete GLX_DIRECT_RENDERING define.
Oliver McFadden [Wed, 9 May 2007 18:07:16 +0000 (18:07 +0000)]
r300: Removed the obsolete GLX_DIRECT_RENDERING define.

17 years agor300: Further reduced the diff between radeon_span.[ch].
Oliver McFadden [Wed, 9 May 2007 18:06:10 +0000 (18:06 +0000)]
r300: Further reduced the diff between radeon_span.[ch].

17 years agor300: Indented both copies of radeon_span.[ch] in preparation for merging.
Oliver McFadden [Wed, 9 May 2007 18:01:43 +0000 (18:01 +0000)]
r300: Indented both copies of radeon_span.[ch] in preparation for merging.

17 years agor300: Removed the deprecated VTXFMT code.
Oliver McFadden [Wed, 9 May 2007 16:10:08 +0000 (16:10 +0000)]
r300: Removed the deprecated VTXFMT code.

This was okayed by Jerome Glisse and Keith Whitwell on the dri-devel IRC channel
and list, respectively.

17 years agor300: The empty check_space doesn't and never has done anything; removed it.
Oliver McFadden [Wed, 9 May 2007 15:57:30 +0000 (15:57 +0000)]
r300: The empty check_space doesn't and never has done anything; removed it.

17 years agor300: Fix a couple of static errors.
Oliver McFadden [Wed, 9 May 2007 15:38:18 +0000 (15:38 +0000)]
r300: Fix a couple of static errors.

17 years agor300: Fixed indenting from previous commit
Oliver McFadden [Wed, 9 May 2007 15:28:38 +0000 (15:28 +0000)]
r300: Fixed indenting from previous commit
d28f6d91760374e2eb71b541b0f259f81dd73c69.

17 years agor300: Added R300_PRIM_NUM_VERTICES_MASK suggested by Jerome Glisse.
Oliver McFadden [Wed, 9 May 2007 15:21:13 +0000 (15:21 +0000)]
r300: Added R300_PRIM_NUM_VERTICES_MASK suggested by Jerome Glisse.

17 years agor300: Fixed some more function names.
Oliver McFadden [Wed, 9 May 2007 15:19:05 +0000 (15:19 +0000)]
r300: Fixed some more function names.

Note there might be some calls to the old function names in conditionally
disabled code, but I think I've got them all.

17 years agor300: Changed r300_run_vb_render calls to r300RunRender in some conditionally
Oliver McFadden [Wed, 9 May 2007 15:07:34 +0000 (15:07 +0000)]
r300: Changed r300_run_vb_render calls to r300RunRender in some conditionally
disabled code.

17 years agor300: Added a "not implemented yet" comment back.
Oliver McFadden [Wed, 9 May 2007 14:45:42 +0000 (14:45 +0000)]
r300: Added a "not implemented yet" comment back.

17 years agoMerge branch 'master' of git://anongit.freedesktop.org/git/mesa/mesa
Oliver McFadden [Wed, 9 May 2007 14:23:22 +0000 (14:23 +0000)]
Merge branch 'master' of git://anongit.freedesktop.org/git/mesa/mesa

17 years agor300: Last of the indent changes. :)
Oliver McFadden [Wed, 9 May 2007 14:19:45 +0000 (14:19 +0000)]
r300: Last of the indent changes. :)

17 years agoadd pointers to git repo for drm/libpciaccess, replace & with &
Brian [Wed, 9 May 2007 14:17:57 +0000 (08:17 -0600)]
add pointers to git repo for drm/libpciaccess, replace & with &

17 years agor300: Indented r300_cmdbuf.[ch].
Oliver McFadden [Wed, 9 May 2007 14:17:16 +0000 (14:17 +0000)]
r300: Indented r300_cmdbuf.[ch].

17 years agor300: Indented r300_state.[ch].
Oliver McFadden [Wed, 9 May 2007 14:12:34 +0000 (14:12 +0000)]
r300: Indented r300_state.[ch].

17 years agor300: Indented r300_texmem.[ch].
Oliver McFadden [Wed, 9 May 2007 14:11:17 +0000 (14:11 +0000)]
r300: Indented r300_texmem.[ch].

17 years agor300: Indented r300_texstate.[ch]
Oliver McFadden [Wed, 9 May 2007 14:09:35 +0000 (14:09 +0000)]
r300: Indented r300_texstate.[ch]

17 years agoClean-up in I830AllocVidMem(), s/int/unsigned long/ for ret variable.
Brian [Wed, 9 May 2007 14:07:10 +0000 (08:07 -0600)]
Clean-up in I830AllocVidMem(), s/int/unsigned long/ for ret variable.

17 years agoCheck that texture units/samplers specified with glUniform1i() are legal.
Brian [Wed, 9 May 2007 14:04:32 +0000 (08:04 -0600)]
Check that texture units/samplers specified with glUniform1i() are legal.

17 years agor300: Indented r300_tex.[ch].
Oliver McFadden [Wed, 9 May 2007 13:59:28 +0000 (13:59 +0000)]
r300: Indented r300_tex.[ch].

17 years agor300: Indented r300_context.[ch].
Oliver McFadden [Wed, 9 May 2007 13:55:14 +0000 (13:55 +0000)]
r300: Indented r300_context.[ch].

17 years agor300: Removed the unused immediate vertices mode macro.
Oliver McFadden [Wed, 9 May 2007 04:30:16 +0000 (04:30 +0000)]
r300: Removed the unused immediate vertices mode macro.

Immediate vertices mode hasn't been supported since early CVS versions of the
R300 driver.

17 years agor300: Removed a disabled/obsolete e32 in the AOS function.
Oliver McFadden [Wed, 9 May 2007 04:27:31 +0000 (04:27 +0000)]
r300: Removed a disabled/obsolete e32 in the AOS function.

17 years agor300: Removed some disabled R200 code from the R300 driver.
Oliver McFadden [Wed, 9 May 2007 04:25:27 +0000 (04:25 +0000)]
r300: Removed some disabled R200 code from the R300 driver.

17 years agor300: Don't indent the tables in r300_texstate.c.
Oliver McFadden [Wed, 9 May 2007 04:20:35 +0000 (04:20 +0000)]
r300: Don't indent the tables in r300_texstate.c.

17 years agor300: Indented r300_vertprog.[ch].
Oliver McFadden [Wed, 9 May 2007 04:12:04 +0000 (04:12 +0000)]
r300: Indented r300_vertprog.[ch].

17 years agor300: Indented r300_fragprog.[ch].
Oliver McFadden [Wed, 9 May 2007 04:08:27 +0000 (04:08 +0000)]
r300: Indented r300_fragprog.[ch].

17 years agor300: Cleaned up the R300 Makefile.
Oliver McFadden [Wed, 9 May 2007 03:44:40 +0000 (03:44 +0000)]
r300: Cleaned up the R300 Makefile.

17 years agor300: Corrected a couple of "control reaches end of non-void function" warnings.
Oliver McFadden [Wed, 9 May 2007 03:40:06 +0000 (03:40 +0000)]
r300: Corrected a couple of "control reaches end of non-void function" warnings.

17 years agor300: Corrected an error in r300_vertprog.c.
Oliver McFadden [Wed, 9 May 2007 03:38:45 +0000 (03:38 +0000)]
r300: Corrected an error in r300_vertprog.c.

Cannot use _mesa_warning here because we don't have a context pointer; perhaps
R300 specific warning and error functions are needed.

17 years agor300: Corrected the exit codes for consistency; they are all -1 for error now.
Oliver McFadden [Wed, 9 May 2007 03:36:28 +0000 (03:36 +0000)]
r300: Corrected the exit codes for consistency; they are all -1 for error now.

The one exception is 300FlushCmdBuf.

17 years agor300: Converted exit calls to _mesa_exit calls.
Oliver McFadden [Wed, 9 May 2007 03:32:15 +0000 (03:32 +0000)]
r300: Converted exit calls to _mesa_exit calls.

Note that the exit codes are inconsistent and should be fixed.

17 years agor300: Converted a few fprintf calls to _mesa_warning calls.
Oliver McFadden [Wed, 9 May 2007 03:25:33 +0000 (03:25 +0000)]
r300: Converted a few fprintf calls to _mesa_warning calls.

17 years agor300: Added a warning when texture state update fails.
Oliver McFadden [Wed, 9 May 2007 03:22:37 +0000 (03:22 +0000)]
r300: Added a warning when texture state update fails.

17 years agor300: Removed some obsolete code from r300_tex.c.
Oliver McFadden [Wed, 9 May 2007 03:18:14 +0000 (03:18 +0000)]
r300: Removed some obsolete code from r300_tex.c.

17 years agomesa: Added Vim swap files to .gitignore.
Oliver McFadden [Wed, 9 May 2007 03:14:08 +0000 (03:14 +0000)]
mesa: Added Vim swap files to .gitignore.

17 years agor300: Updated .gitignore.
Oliver McFadden [Wed, 9 May 2007 03:12:51 +0000 (03:12 +0000)]
r300: Updated .gitignore.

17 years agor300: Added the Linux Kernel indent script.
Oliver McFadden [Wed, 9 May 2007 03:12:22 +0000 (03:12 +0000)]
r300: Added the Linux Kernel indent script.

17 years agor300: Indented r300_state.[ch].
Oliver McFadden [Wed, 9 May 2007 02:59:11 +0000 (02:59 +0000)]
r300: Indented r300_state.[ch].

17 years agor300: Indented r300_emit.h.
Oliver McFadden [Wed, 9 May 2007 02:52:37 +0000 (02:52 +0000)]
r300: Indented r300_emit.h.

17 years agor300: Indented r300_cmdbuf.[ch].
Oliver McFadden [Wed, 9 May 2007 02:51:13 +0000 (02:51 +0000)]
r300: Indented r300_cmdbuf.[ch].

17 years agor300: Indented r300_shader.[ch].
Oliver McFadden [Wed, 9 May 2007 02:50:13 +0000 (02:50 +0000)]
r300: Indented r300_shader.[ch].

17 years agor300: Indented r300_maos.[ch].
Oliver McFadden [Wed, 9 May 2007 02:49:14 +0000 (02:49 +0000)]
r300: Indented r300_maos.[ch].

17 years agor300: Indented r300_ioctl.[ch].
Oliver McFadden [Wed, 9 May 2007 02:46:57 +0000 (02:46 +0000)]
r300: Indented r300_ioctl.[ch].

17 years agor300: Removed the obsolete pfs_reg_t type from r300_fragprog.h.
Oliver McFadden [Wed, 9 May 2007 02:41:38 +0000 (02:41 +0000)]
r300: Removed the obsolete pfs_reg_t type from r300_fragprog.h.

17 years agor300: Use an array for the vertex program sources and corrected an error from
Oliver McFadden [Wed, 9 May 2007 02:35:07 +0000 (02:35 +0000)]
r300: Use an array for the vertex program sources and corrected an error from
4960af08ad50a3a6ea039145de2698234c2cc892.

17 years agor300: Removed the ugly CARD32 type.
Oliver McFadden [Wed, 9 May 2007 02:27:08 +0000 (02:27 +0000)]
r300: Removed the ugly CARD32 type.

17 years agor300: Renamed vertex_shader.h to r300_vertprog.h
Oliver McFadden [Wed, 9 May 2007 02:24:59 +0000 (02:24 +0000)]
r300: Renamed vertex_shader.h to r300_vertprog.h