Commit graph

18607 commits

Author SHA1 Message Date
Brian Paul
f8baad2d25 mesa: set FRAG_BIT_FOGC bit in InputsUsed if FogOption!=GL_NONE 2008-10-06 12:29:29 -06:00
Stephane Marchesin
8e8208d6db Mesa: fix the case where there are no vertex attributes. 2008-10-06 19:48:57 +02:00
Brian Paul
6e34fc0d37 mesa: adjust texcoords for swrast sprite points.
Fixes glean pointSprite test w/ software rendering
2008-10-06 11:34:01 -06:00
Brian Paul
145d49838f mesa: fix static library construction
If the .a is made of other .a files, extract the objects from the later.
2008-10-06 11:01:31 -06:00
Brian Paul
b0ca50bd38 mesa: updated _mesa_delete_query() comments 2008-10-06 09:32:33 -06:00
Brian Paul
f362788eae mesa: add missing GLcontext param to _mesa_delete_query().
Fixes vtk crash and others.
2008-10-06 09:27:31 -06:00
Brian Paul
382911bdbc mesa: add missing GLcontext param to _mesa_delete_query().
Fixes vtk crash and others.
2008-10-06 09:26:45 -06:00
Michal Krol
9b82701813 draw: Fix compiler errors on Windows. 2008-10-06 13:23:56 +02:00
Keith Whitwell
7053f8c902 rtasm: fix debug build 2008-10-06 11:54:22 +01:00
Keith Whitwell
53d4706c6c make draw's vertex_info struct smaller/quicker to compare with memcmp() 2008-10-06 11:49:42 +01:00
Eric Anholt
91d0020eec i915: Refine the texture indirect lookup accounting.
Without this, we would reject programs which sampled multiple times from
registers defined in the same phase (block of instructions with the same
texture indirection count), as each sample would count as a new phase
beginning.  Instead, keep track of which phases registers were written in,
and only bump phase when we're reading from one generated in this phase.

On the other hand, we failed to count oC or oD texture samples as being new
phases.

Bug #17865.
2008-10-04 18:40:32 -07:00
Keith Whitwell
0370d6b359 mesa: handle vertex program enabled case also in texenvprogram.c 2008-10-04 12:41:56 +01:00
Robert Ellison
afaa53040b CELL: changes to generate SPU code for stenciling
This set of code changes are for stencil code generation
support.  Both one-sided and two-sided stenciling are supported.
In addition to the raw code generation changes, these changes had
to be made elsewhere in the system:

- Added new "register set" feature to the SPE assembly generation.
  A "register set" is a way to allocate multiple registers and free
  them all at the same time, delegating register allocation management
  to the spe_function unit.  It's quite useful in complex register
  allocation schemes (like stenciling).

- Added and improved SPE macro calculations.
  These are operations between registers and unsigned integer
  immediates.  In many cases, the calculation can be performed
  with a single instruction; the macros will generate the
  single instruction if possible, or generate a register load
  and register-to-register operation if not.  These macro
  functions are: spe_load_uint() (which has new ways to
  load a value in a single instruction), spe_and_uint(),
  spe_xor_uint(), spe_compare_equal_uint(), and spe_compare_greater_uint().

- Added facing to fragment generation.  While rendering, the rasterizer
  needs to be able to determine front- and back-facing fragments, in order
  to correctly apply two-sided stencil.  That requires these changes:
  - Added front_winding field to the cell_command_render block, so that
    the state tracker could communicate to the rasterizer what it
    considered to be the front-facing direction.
  - Added fragment facing as an input to the fragment function.
  - Calculated facing is passed during emit_quad().
2008-10-03 18:05:14 -06:00
Ian Romanick
db9ba91971 intel: Don't advertise unsupported extensions on pre-965 hardware
Move GL_ARB_texture_non_power_of_two and GL_ATI_separate_stencil
from the generic extension list to the 965-specific list.  Neither
extension is supported on i830-class hardware, and
GL_ATI_separate_stencil is not supported on i915-class hardare.
GL_ARB_texture_non_power_of_two is supported on i915-class hardare and
is already in the i915-specific list.
2008-10-03 12:16:04 -07:00
Keith Whitwell
1680ef8696 mesa: avoid generating constant vertex attributes in fixedfunc programs
Keep track of enabled/active vertex attributes.
Keep track of potential vertex program outputs.

When generating fragment program, replace references to fragment attributes
which are effectively non-varying and non-computed passthrough attributes with
references to the new CURRENT_ATTRIB tracked state value.

Only downside is slight ugliness in VBO code where we need to validate state
twice in succession.
2008-10-03 17:30:59 +01:00
Keith Whitwell
d63a36ef3a Mesa: short-circuit case when looking up the same program twice in cache 2008-10-03 16:50:26 +01:00
Keith Whitwell
fa1b533012 mesa: add new internal state for tracking current vertex attribs 2008-10-03 16:49:52 +01:00
Keith Whitwell
0e008d3797 mesa: add missing state dependencies for various tracked constants 2008-10-03 13:53:07 +01:00
Keith Whitwell
6280e33570 mesa: shrink texenvprogram state key struct 2008-10-03 13:51:56 +01:00
Keith Whitwell
6965532e14 rtasm: add sse_movntps 2008-10-03 13:50:34 +01:00
Keith Whitwell
22eb067c88 draw: modify prefetching slightly 2008-10-02 10:19:48 -04:00
Keith Whitwell
21f98ad30a draw: don't keep refetching constant inputs 2008-10-02 10:19:48 -04:00
Keith Whitwell
66d4beb874 rtasm: add prefetch instructions 2008-10-02 10:19:48 -04:00
Keith Whitwell
a15699c3f5 draw: add streamlined paths for fetching linear verts 2008-10-02 10:19:48 -04:00
Michal Krol
a77976d2ee mesa: Fix compiler warnings on Windows. 2008-10-02 10:19:48 -04:00
Stephane Marchesin
8bdb4d2b2f Gallivm: add slt. glxgears should be running, except it isn't. 2008-10-02 10:19:47 -04:00
Stephane Marchesin
3f4b67f5d7 Gallivm: port to llvm 2.4. 2008-10-02 10:19:47 -04:00
Stephane Marchesin
fdcaf569d4 Gallivm: fix off-by-one. 2008-10-02 10:19:47 -04:00
Stephane Marchesin
9859edc606 Gallivm: need to link with libstdc++ for llvm. 2008-10-02 10:19:47 -04:00
Stephane Marchesin
0116ea34e1 Gallivm: more instructions. 2008-10-02 10:19:47 -04:00
Stephane Marchesin
3f477e111a Gallivm: make it compile again, add some opcodes. 2008-10-02 10:19:47 -04:00
Brian Paul
5620c20b24 mesa: fix temp register allocation problems.
Complex texcombine modes were running out of registers (>32 registers for 8 tex units).
2008-10-02 10:19:47 -04:00
Brian Paul
2cb213ff23 egl: check for null ptr/name 2008-10-02 10:19:46 -04:00
Brian Paul
5b60d6d07b egl: remove space after -L flag 2008-10-02 10:19:46 -04:00
Keith Whitwell
918a444913 draw: modify prefetching slightly 2008-10-02 12:59:15 +01:00
Keith Whitwell
af9cfea9cc draw: don't keep refetching constant inputs 2008-10-02 12:59:15 +01:00
Keith Whitwell
102daee1b8 rtasm: add prefetch instructions 2008-10-02 12:59:14 +01:00
Keith Whitwell
dd7e5a4980 draw: add streamlined paths for fetching linear verts 2008-10-02 12:59:14 +01:00
Ian Romanick
4741dbcbbc Unify ARB_depth_texture and SGIX_depth_texture
The ARB extension is a superset of the older SGIX extension.  Any
hardware that can support the SGIX version can also support the ARB
version.  In Mesa, any driver that supports one also supports the
other.  This unification just simplifies some bits of code.
2008-10-01 20:38:10 -07:00
Eric Anholt
17fdd1ab3b i965: sampler default color ends up in texture cache, not instructions.
See volume 4, SAMPLER_BORDER_COLOR_STATE programming notes.
2008-10-01 16:59:16 -07:00
Eric Anholt
df6ae3f0a3 i965: Fix overwriting of depth override for SetTexOffset.
Fixes black borders around windows in compiz.  Bug #17233.
2008-10-01 14:15:17 -07:00
Michal Krol
266c5f5ccb mesa: Fix compiler warnings on Windows. 2008-10-01 19:36:04 +02:00
José Fonseca
23e325e55a Add -msse and -msse2 to the *-x86 configs. 2008-10-01 10:25:41 +09:00
José Fonseca
cb8a3ba433 util: No-op u_sse.h outside PIPE_ARCH_X86/X86_64. 2008-10-01 08:28:05 +09:00
José Fonseca
cbfce4175b tgsi: Include p_config.h. 2008-10-01 08:27:20 +09:00
Stephane Marchesin
a6ff215777 Gallivm: add slt. glxgears should be running, except it isn't. 2008-10-01 00:00:58 +02:00
Jonathan White
e3378790bb cell: Fixed usage of MAX_INSTRUCTIONS to use new MAX_PROGRAM_INSTRUCTIONS instead of old MAX_NV_XXX definitions in order to allow Cell TGSI fragment program generator to work again. 2008-09-30 15:38:38 -06:00
Jonathan White
5e585719eb cell: Moved X86 checks to wrap #include section so that Cell targets will compile again. 2008-09-30 14:07:09 -06:00
Stephane Marchesin
4ae161e940 Gallivm: port to llvm 2.4. 2008-09-30 20:50:49 +02:00
José Fonseca
8415d06d90 util: Fix util_fast_pow/exp2/log2.
- Use a lookup table for log2.

- Compute (float) (1 << ipart) by tweaking with the exponent directly to
avoid integer overflow and float conversion.

- Also table negative exponents to avoid float division and branching.

- Implement util_fast_exp as function of util_fast_exp2.
2008-10-01 01:13:40 +09:00