mesa.git
16 years agoscons: Place the .sconsign file on the builddir too.
José Fonseca [Wed, 27 Feb 2008 11:13:16 +0000 (20:13 +0900)]
scons: Place the .sconsign file on the builddir too.

To avoid issues with different scons versions building the same source file

16 years agomesa: Add copyright headers.
José Fonseca [Wed, 27 Feb 2008 10:33:57 +0000 (19:33 +0900)]
mesa: Add copyright headers.

16 years agogallium: Make headers C++ friendly.
José Fonseca [Wed, 27 Feb 2008 09:39:57 +0000 (18:39 +0900)]
gallium: Make headers C++ friendly.

16 years agoscons: Move common code to a separate file.
José Fonseca [Wed, 27 Feb 2008 08:36:28 +0000 (17:36 +0900)]
scons: Move common code to a separate file.

16 years agoscons: Autodetect the default machine.
José Fonseca [Wed, 27 Feb 2008 07:53:52 +0000 (16:53 +0900)]
scons: Autodetect the default machine.

16 years agogallium: Replace // comments.
José Fonseca [Wed, 27 Feb 2008 07:42:15 +0000 (16:42 +0900)]
gallium: Replace // comments.

16 years agogallium: Remove // comments.
José Fonseca [Wed, 27 Feb 2008 07:23:50 +0000 (16:23 +0900)]
gallium: Remove // comments.

16 years agoscons: Fix winddk.py's decription and copyright.
José Fonseca [Wed, 27 Feb 2008 07:05:57 +0000 (16:05 +0900)]
scons: Fix winddk.py's decription and copyright.

16 years agogallium: update for new i915_screen.c file; fix some warnings.
José Fonseca [Wed, 27 Feb 2008 06:59:09 +0000 (15:59 +0900)]
gallium: update for new i915_screen.c file; fix some warnings.

16 years agogallium: Use stricter types.
José Fonseca [Wed, 27 Feb 2008 05:06:07 +0000 (14:06 +0900)]
gallium: Use stricter types.

VC++ won't silently convert a pointer to a function with typed pointer
arguments to one with void pointer arguments.

16 years agocell: insert a (disabled) call to spe_cpu_info_get()
Brian [Wed, 27 Feb 2008 03:12:29 +0000 (20:12 -0700)]
cell: insert a (disabled) call to spe_cpu_info_get()

Found on the Cell devel forum, but doesn't appear to be available in SDK 2.1.

16 years agogallium: introduce 'pipe_screen' for context-independent functions
Brian [Wed, 27 Feb 2008 03:15:14 +0000 (20:15 -0700)]
gallium: introduce 'pipe_screen' for context-independent functions

This will allow creating textures before a rendering context exists, for example.
Only implemented in i915 driver for now.  i915pipe->texture_create() just
dispatches through to the i915screen->texture_create() to avoid state tracker
changes for now.

16 years agogallium: use pipe_texture_reference() instead of pipe->texture_release()
Brian [Wed, 27 Feb 2008 02:35:08 +0000 (19:35 -0700)]
gallium: use pipe_texture_reference() instead of pipe->texture_release()

16 years agogallium: remove pipe parameter from pipe_texture_reference()
Brian [Wed, 27 Feb 2008 02:31:22 +0000 (19:31 -0700)]
gallium: remove pipe parameter from pipe_texture_reference()

Added pipe field to pipe_texture (temporary, see comments).
First step toward context-less texture creation...

16 years agoRevert "scons: Prefer MSVS 2003 (patch by Mark Mueller)."
José Fonseca [Wed, 27 Feb 2008 00:10:14 +0000 (09:10 +0900)]
Revert "scons: Prefer MSVS 2003 (patch by Mark Mueller)."

This reverts commit 19f6e1a975a098cf4ce935b50f7cf0c64d9db042.

16 years agogallium: #includes to silence warnings
Brian [Tue, 26 Feb 2008 21:34:19 +0000 (14:34 -0700)]
gallium: #includes to silence warnings

16 years agogallium: updated prototype (missed in prev commit)
Brian [Tue, 26 Feb 2008 21:30:41 +0000 (14:30 -0700)]
gallium: updated prototype (missed in prev commit)

16 years agogallium: replace draw_convert_wide_points() with draw_wide_point_threshold()
Brian [Tue, 26 Feb 2008 21:29:35 +0000 (14:29 -0700)]
gallium: replace draw_convert_wide_points() with draw_wide_point_threshold()

Specifying a threshold size is a bit more flexible, and allows the option
of converting even 1-pixel points to triangles (set threshold=0).

Also, remove 0.25 pixel bias in wide_point().

16 years agogallium: fix zero-sized viewport bug
Brian [Tue, 26 Feb 2008 21:26:40 +0000 (14:26 -0700)]
gallium: fix zero-sized viewport bug

If st_create_framebuffer() is called with width=0, height=0 and the program
never called glViewport, the viewport wasn't properly initalized.  This fixes
that.

16 years agogallium: fix off by one rasterpos bug
Brian [Tue, 26 Feb 2008 21:25:36 +0000 (14:25 -0700)]
gallium: fix off by one rasterpos bug

16 years agogallium: Print texture target for short dumps.
Michal Krol [Tue, 26 Feb 2008 19:32:42 +0000 (20:32 +0100)]
gallium: Print texture target for short dumps.

16 years agocell: Multiple rendering contexts don't work yet
Ian Romanick [Tue, 26 Feb 2008 19:18:51 +0000 (11:18 -0800)]
cell: Multiple rendering contexts don't work yet

Log a message and forcibly exit.  This prevents silly fools from
thinking there's a bug...instead of just an unimplemented feature. :)

16 years agointel_winsys: Fix build failure due to DEBUG_IOCTL being undefined.
Michel Dänzer [Tue, 26 Feb 2008 18:48:13 +0000 (18:48 +0000)]
intel_winsys: Fix build failure due to DEBUG_IOCTL being undefined.

Include pipe/p_debug.h to consistently enable or disable the debugging code.

16 years agogallium/i915: Use tgsi_scan_shader() to collect shader info
Brian [Tue, 26 Feb 2008 17:47:42 +0000 (10:47 -0700)]
gallium/i915: Use tgsi_scan_shader() to collect shader info

No longer use semantic info in pipe_shader_state.
Also, remove redundant semantic info from i915_fp_compile struct.

16 years agogallium: remove unused var
Brian [Tue, 26 Feb 2008 17:44:44 +0000 (10:44 -0700)]
gallium: remove unused var

16 years agogallium: added tgsi_shader_field to sp_fragment_shader
Brian [Tue, 26 Feb 2008 17:13:39 +0000 (10:13 -0700)]
gallium: added tgsi_shader_field to sp_fragment_shader

Use the shader semantic info from there, instead of from pipe_shader_state.
Carry this idea to draw module and other drivers...

16 years agogallium: collect more shader info in tgsi_scan_shader()
Brian [Tue, 26 Feb 2008 17:12:17 +0000 (10:12 -0700)]
gallium: collect more shader info in tgsi_scan_shader()

Now getting input/output semantic info so we can eventually remove those
fields from pipe_shader_state.

16 years agogallium: remove input_map[] from pipe_shader_state
Brian [Tue, 26 Feb 2008 15:43:07 +0000 (08:43 -0700)]
gallium: remove input_map[] from pipe_shader_state

16 years agogallium: disable debug code
Brian [Tue, 26 Feb 2008 15:41:42 +0000 (08:41 -0700)]
gallium: disable debug code

16 years agoscons: Prefer MSVS 2003 (patch by Mark Mueller).
José Fonseca [Tue, 26 Feb 2008 14:59:53 +0000 (23:59 +0900)]
scons: Prefer MSVS 2003 (patch by Mark Mueller).

16 years agoscons: Properly generate PDB files on MSVC.
José Fonseca [Tue, 26 Feb 2008 13:31:03 +0000 (22:31 +0900)]
scons: Properly generate PDB files on MSVC.

16 years agogallium: Add missing copyright headers.
José Fonseca [Tue, 26 Feb 2008 05:05:31 +0000 (14:05 +0900)]
gallium: Add missing copyright headers.

16 years agogallium: Fix build on Windows.
Michal Krol [Tue, 26 Feb 2008 10:49:25 +0000 (11:49 +0100)]
gallium: Fix build on Windows.

16 years agoimplement cache limits for cso
Zack Rusin [Tue, 26 Feb 2008 06:48:01 +0000 (01:48 -0500)]
implement cache limits for cso
by default set to 4096, which might be on the large side

16 years agoadd an explicit callback decleration and use it to silence warnings
Zack Rusin [Tue, 26 Feb 2008 05:18:54 +0000 (00:18 -0500)]
add an explicit callback decleration and use it to silence warnings

16 years agohide cso cache definition and add some initial code for size limiting
Zack Rusin [Tue, 26 Feb 2008 05:15:55 +0000 (00:15 -0500)]
hide cso cache definition and add some initial code for size limiting
the caches

16 years agoimplement deleting of driver side cached state in cso's
Zack Rusin [Tue, 26 Feb 2008 03:03:58 +0000 (22:03 -0500)]
implement deleting of driver side cached state in cso's

16 years agogallium: rewrite AA point fragment shader to use a CMP instruction instead of IF...
Brian [Tue, 26 Feb 2008 01:56:03 +0000 (18:56 -0700)]
gallium: rewrite AA point fragment shader to use a CMP instruction instead of IF/ELSE/ENDIF

Allows the shader to work on i915 hardware.

16 years agogallium/i915: plug in aapoint draw stage
Brian [Tue, 26 Feb 2008 01:53:57 +0000 (18:53 -0700)]
gallium/i915: plug in aapoint draw stage

16 years agogallium/i915: Fix emit_hw_vertex(): need to use vinfo->src_index[]
Brian [Tue, 26 Feb 2008 01:53:22 +0000 (18:53 -0700)]
gallium/i915: Fix emit_hw_vertex(): need to use vinfo->src_index[]

16 years agogallium/i915: remove debug code
Brian [Tue, 26 Feb 2008 01:00:14 +0000 (18:00 -0700)]
gallium/i915: remove debug code

16 years agogallium/i915: fix i915_emit_texld() to handle swizzled texcoords
Brian [Tue, 26 Feb 2008 00:59:51 +0000 (17:59 -0700)]
gallium/i915: fix i915_emit_texld() to handle swizzled texcoords

Allocate a temporary register, insert MOV instruction, etc.

16 years agocell: Additional changes to match changes in draw/draw_vertex_shader.c
Ian Romanick [Tue, 26 Feb 2008 00:15:59 +0000 (16:15 -0800)]
cell: Additional changes to match changes in draw/draw_vertex_shader.c

16 years agocell: Fix off-by-one error in spu_dcache_fetch_unaligned
Ian Romanick [Sat, 23 Feb 2008 01:51:55 +0000 (17:51 -0800)]
cell: Fix off-by-one error in spu_dcache_fetch_unaligned

This time the off-by-one error caused an extra qword to be fetched
under certain circumstances when the source ea was not qword aligned.

16 years agocell: Trivial compiler warning clean-ups.
Ian Romanick [Sat, 23 Feb 2008 00:27:39 +0000 (16:27 -0800)]
cell: Trivial compiler warning clean-ups.

16 years agoCell: Remove unnecessary include files
Ian Romanick [Fri, 22 Feb 2008 00:41:12 +0000 (16:41 -0800)]
Cell: Remove unnecessary include files

16 years agoCell: Use multiple DMA tags for the dcache.
Ian Romanick [Thu, 21 Feb 2008 19:01:35 +0000 (11:01 -0800)]
Cell: Use multiple DMA tags for the dcache.

16 years agogallium/i915: compute vertex size _after_ state validation in emit_prim().
Brian [Tue, 26 Feb 2008 00:01:20 +0000 (17:01 -0700)]
gallium/i915: compute vertex size _after_ state validation in emit_prim().

Fixes crash when drawing aa lines.

16 years agoAdded line smooth test
Brian [Mon, 25 Feb 2008 23:26:37 +0000 (16:26 -0700)]
Added line smooth test

16 years agogallium: clamp line width when creating raster state object
Brian [Mon, 25 Feb 2008 23:25:24 +0000 (16:25 -0700)]
gallium: clamp line width when creating raster state object

16 years agogallium/i915: plug in aaline draw stage
Brian [Mon, 25 Feb 2008 23:24:47 +0000 (16:24 -0700)]
gallium/i915: plug in aaline draw stage

16 years agogallium/i915: make sure state is up to date in i915_vbuf_render_get_vertex_info(...
Brian [Mon, 25 Feb 2008 23:22:58 +0000 (16:22 -0700)]
gallium/i915: make sure state is up to date in i915_vbuf_render_get_vertex_info(), also disable bogus assertion

16 years agogallium/i915: need to recompute vertex info if vertex shader changes
Brian [Mon, 25 Feb 2008 23:20:04 +0000 (16:20 -0700)]
gallium/i915: need to recompute vertex info if vertex shader changes

16 years agogallium/i915: call draw_flush() in i915_flush()
Brian [Mon, 25 Feb 2008 23:16:07 +0000 (16:16 -0700)]
gallium/i915: call draw_flush() in i915_flush()

16 years agogallium: fix bad ptr assignment
Brian [Mon, 25 Feb 2008 22:34:46 +0000 (15:34 -0700)]
gallium: fix bad ptr assignment

16 years agogallium/i915: use draw_find_vs_output() directly, fix broken fogcoords.
Brian [Mon, 25 Feb 2008 21:48:31 +0000 (14:48 -0700)]
gallium/i915: use draw_find_vs_output() directly, fix broken fogcoords.

We now produce the correct 915 vertex layout regardless of the order in
which fragment shader inputs are declared.

16 years agosoftpipe: use draw_find_vs_output() directly
Brian [Mon, 25 Feb 2008 21:47:13 +0000 (14:47 -0700)]
softpipe: use draw_find_vs_output() directly

16 years agogallium: modify draw_find_vs_output() to search vertex shader outputs
Brian [Mon, 25 Feb 2008 21:46:42 +0000 (14:46 -0700)]
gallium: modify draw_find_vs_output() to search vertex shader outputs

This simplifies drivers using the draw module and removes the last dependency
on vertex-shader "internals".  Since the draw module is producing the
post-transformed vertices, it makes sense to ask it where specific vertex
attributes are located.

This could also simplify some things in the state tracker code for selection,
feedback, rasterpos...

16 years agogallium/i915: Use hardware rendering, unless INTEL_SP env var is set
Brian [Mon, 25 Feb 2008 18:21:03 +0000 (11:21 -0700)]
gallium/i915: Use hardware rendering, unless INTEL_SP env var is set

16 years agogallium/i915: added SGT/SLE opcodes
Brian [Mon, 25 Feb 2008 18:13:58 +0000 (11:13 -0700)]
gallium/i915: added SGT/SLE opcodes

16 years agoMake the pipe headers C++ friendly.
José Fonseca [Mon, 25 Feb 2008 11:05:41 +0000 (20:05 +0900)]
Make the pipe headers C++ friendly.

16 years agoGet more debugging info out of MSVC.
José Fonseca [Mon, 25 Feb 2008 08:55:45 +0000 (17:55 +0900)]
Get more debugging info out of MSVC.

16 years agoRemove files of unsupported build systems.
José Fonseca [Mon, 25 Feb 2008 08:11:28 +0000 (17:11 +0900)]
Remove files of unsupported build systems.

16 years agoUpdate git ignores.
José Fonseca [Mon, 25 Feb 2008 08:05:15 +0000 (17:05 +0900)]
Update git ignores.

16 years agoReplace standand library functions by portable ones.
José Fonseca [Mon, 25 Feb 2008 07:39:39 +0000 (16:39 +0900)]
Replace standand library functions by portable ones.

16 years agoAdd Zack's comments about CSOs.
José Fonseca [Mon, 25 Feb 2008 06:18:33 +0000 (15:18 +0900)]
Add Zack's comments about CSOs.

16 years agoCleanup scons files.
José Fonseca [Mon, 25 Feb 2008 05:46:53 +0000 (14:46 +0900)]
Cleanup scons files.

16 years agoUpdate some msvc compiler flags.
José Fonseca [Sun, 24 Feb 2008 08:58:18 +0000 (17:58 +0900)]
Update some msvc compiler flags.

16 years agoAdd new files.
José Fonseca [Sun, 24 Feb 2008 08:58:05 +0000 (17:58 +0900)]
Add new files.

16 years agoA few more tweaks to get correct WINDDK compilation.
José Fonseca [Sun, 24 Feb 2008 07:43:07 +0000 (16:43 +0900)]
A few more tweaks to get correct WINDDK compilation.

16 years agogallium: Fix MSVC warnings.
José Fonseca [Sat, 23 Feb 2008 17:46:46 +0000 (02:46 +0900)]
gallium: Fix MSVC warnings.

16 years agogallium: disable early Z test if fragment shader contains KIL instruction.
Brian [Sat, 23 Feb 2008 23:17:17 +0000 (16:17 -0700)]
gallium: disable early Z test if fragment shader contains KIL instruction.

Use tgsi_scan_shader() to determine if the fragment shader uses KIL or
writes fragment.z

16 years agogallium: added TGSI_FILE_COUNT
Brian [Sat, 23 Feb 2008 23:15:54 +0000 (16:15 -0700)]
gallium: added TGSI_FILE_COUNT

16 years agogallium: added new tgsi_scan.c / tgsi_scan_shader() function
Brian [Sat, 23 Feb 2008 23:15:29 +0000 (16:15 -0700)]
gallium: added new tgsi_scan.c / tgsi_scan_shader() function

Used to get information about registers, instructions used in a shader.

16 years agogallium: MSVC fixes.
José Fonseca [Sat, 23 Feb 2008 17:16:28 +0000 (02:16 +0900)]
gallium: MSVC fixes.

16 years agoRevamp scons usage.
José Fonseca [Sat, 23 Feb 2008 10:49:08 +0000 (19:49 +0900)]
Revamp scons usage.

16 years agoBring in several forgotten MSVC fixes.
José Fonseca [Sat, 23 Feb 2008 05:14:54 +0000 (14:14 +0900)]
Bring in several forgotten MSVC fixes.

16 years agoFix typo.
José Fonseca [Sat, 23 Feb 2008 05:14:20 +0000 (14:14 +0900)]
Fix typo.

16 years agogallium: fix a state validation bug found w/ pointblast.c
Brian [Sat, 23 Feb 2008 01:34:31 +0000 (18:34 -0700)]
gallium: fix a state validation bug found w/ pointblast.c

16 years agogallium: fix bug in which wide point stage overrode the aapoint stage
Brian [Sat, 23 Feb 2008 00:22:10 +0000 (17:22 -0700)]
gallium: fix bug in which wide point stage overrode the aapoint stage

Also, simplify the logic a bit.

16 years agogallium/i915: overhaul of fragment shader compilation, constant/immediate allocation
Brian [Fri, 22 Feb 2008 23:48:05 +0000 (16:48 -0700)]
gallium/i915: overhaul of fragment shader compilation, constant/immediate allocation

Before, fragment shaders were translated to i915 hw code at bind time, rather
than create time.  Now there's an i915_fragment_shader struct with the expected
contents that's created by i915_create_fs_state().  Translation to i915 code
takes place there too.

Immediates are handled correctly now.  During program translation we keep
track of which constant buffer slots are free (i.e. not referenced by the
shader).  Then the TGSI immediates and ancillary immediates (introduced for
SIN/COS/etc) are put into those free slots.

When it's time to upload the constant buffer, use the fp->constant_flags[]
array to determine if we should grab an immediate from the shader, or a
user-defined parameter from the gallium constant buffer.

16 years agoi915: include stdio.h
Brian [Fri, 22 Feb 2008 21:07:33 +0000 (14:07 -0700)]
i915: include stdio.h

16 years agoi915: include p_debug.h (resolves undefined assert())
Brian [Fri, 22 Feb 2008 21:07:12 +0000 (14:07 -0700)]
i915: include p_debug.h (resolves undefined assert())

16 years agogallium: fix brokenb build
Brian [Fri, 22 Feb 2008 15:56:55 +0000 (08:56 -0700)]
gallium: fix brokenb build

16 years agocell: added function prototypes to silence warnings
Brian [Fri, 22 Feb 2008 15:52:24 +0000 (08:52 -0700)]
cell: added function prototypes to silence warnings

16 years agocell: fix build: s/dest/vertex/
Brian [Fri, 22 Feb 2008 15:50:37 +0000 (08:50 -0700)]
cell: fix build: s/dest/vertex/

16 years agogallium: Countour MSVC's pickyness for structures returned by value.
José Fonseca [Fri, 22 Feb 2008 09:45:20 +0000 (18:45 +0900)]
gallium: Countour MSVC's pickyness for structures returned by value.

16 years agogallium: Wrap decls in extern "C".
José Fonseca [Fri, 22 Feb 2008 09:28:30 +0000 (18:28 +0900)]
gallium: Wrap decls in extern "C".

16 years agogallium: Add cso convenience routine (from Keith's patch).
José Fonseca [Fri, 22 Feb 2008 08:22:32 +0000 (17:22 +0900)]
gallium: Add cso convenience routine (from Keith's patch).

16 years agogallium: MSVC fixes.
José Fonseca [Fri, 22 Feb 2008 07:22:41 +0000 (16:22 +0900)]
gallium: MSVC fixes.

16 years agogallium: Fix build on Windows.
Michal Krol [Wed, 20 Feb 2008 21:25:18 +0000 (22:25 +0100)]
gallium: Fix build on Windows.

16 years agogallium: Silence compiler warnings on Windows.
Michal Krol [Wed, 20 Feb 2008 21:10:27 +0000 (22:10 +0100)]
gallium: Silence compiler warnings on Windows.

16 years agogallium: Silence compiler warnings on Windows.
Michal Krol [Wed, 20 Feb 2008 21:05:52 +0000 (22:05 +0100)]
gallium: Silence compiler warnings on Windows.

16 years agogallium: Define intptr_t for Windows platform.
Michal Krol [Wed, 20 Feb 2008 21:05:06 +0000 (22:05 +0100)]
gallium: Define intptr_t for Windows platform.

16 years agogallium: Move align_pointer() to p_pointer.h.
Michal Krol [Wed, 20 Feb 2008 21:04:32 +0000 (22:04 +0100)]
gallium: Move align_pointer() to p_pointer.h.

16 years agogallium: New file.
Michal Krol [Wed, 20 Feb 2008 21:03:59 +0000 (22:03 +0100)]
gallium: New file.

16 years agoAvoid building problematic module/drivers on windows.
José Fonseca [Fri, 22 Feb 2008 15:46:40 +0000 (00:46 +0900)]
Avoid building problematic module/drivers on windows.

16 years agoDon't parse mesa's rtasm asm module.
José Fonseca [Wed, 20 Feb 2008 09:57:45 +0000 (18:57 +0900)]
Don't parse mesa's rtasm asm module.

16 years agogallium: new draw stage for polygon stipple.
Brian [Thu, 21 Feb 2008 23:56:32 +0000 (16:56 -0700)]
gallium: new draw stage for polygon stipple.

For hardware without native polygon stipple.  Create a 32x32 alpha texture
that encodes the stipple pattern.  Modify the user's fragment program to
sample the texture (with gl_FragCoord) and kill the fragment according to
the texel value.
Temporarily enabled in softpipe driver, replacing the sp_quad_stipple.c step.

16 years agogallium: new AA point drawing stage
Brian [Thu, 21 Feb 2008 23:18:05 +0000 (16:18 -0700)]
gallium: new AA point drawing stage

AA points are drawn by converting the point to a quad, then modifying the
user's fragment shader to compute a coverage value.  The final fragment
color's alpha is modulated by the coverage value.  Fragments outside the
point's radius are killed.