Commit Graph

43155 Commits

Author SHA1 Message Date
Henri Verbeet f262ba26f0 r600g: Move r600_pipe_shader_ps() to r600_state.c.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-14 22:15:56 +01:00
Henri Verbeet c0ca43e507 r600g: Move r600_pipe_shader_vs() to r600_state.c.
The idea behind this is that anything touching registers should be in
r600_state.c or evergreen_state.c. This is also consistent with
evergreen_pipe_shader_vs().

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-14 22:15:56 +01:00
Rafael Monica 112ffdfd07 r600g: Evergreen add support for log opcode.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-14 22:15:56 +01:00
José Fonseca 202c345c7c autoconf/make: Don't specify individual llvm libraries.
We need more and more of these, and it is difficult and prone to version
incompatability issues trying to single out every one of them.

This mimicks what was done in SCons.
2011-03-14 20:05:56 +00:00
Kenneth Graunke 25e3114095 i965: Enable texture lookups whose return type is 'float'
This enables the new shadow texture functions in GLSL 1.30.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2011-03-14 13:03:50 -07:00
Chad Versace 1842b89f77 i965: Fix tex_swizzle when depth mode is GL_RED
Change swizzle from (x000) to (x001).

Signed-off-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-03-14 13:03:50 -07:00
Chad Versace e0cbb154f2 i965: Remove dead assignment
The assignment on line 368, `tex_swizzles[i] = SWIZZLE_NOOP`, is rendered
dead by the reassignment on line 392.

Signed-off-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-03-14 13:03:50 -07:00
Kenneth Graunke 233b88eab9 glsl: Explicitly specify a type when reading/printing ir_texture.
This is necessary for GLSL 1.30+ shadow sampling functions, which return
a single float rather than splatting the value to a vec4 based on
GL_DEPTH_TEXTURE_MODE.
2011-03-14 13:03:50 -07:00
Kenneth Graunke cb3317b85a texture_builtins.py: Add support for 130-style Shadow sampler variants. 2011-03-14 13:03:50 -07:00
Marek Olšák bb0910bfa6 mesa: rename _mesa_texstore_a8 -> _mesa_texstore_unorm8
It's a generic function capable of storing A8, L8, I8, R8.
2011-03-14 18:51:29 +01:00
Marek Olšák c0110d5450 mesa: fix up assertion in _mesa_source_buffer_exists
This was probably missed when implementing luminance and luminance alpha
render targets.

_mesa_get_format_bits checks for both GL_*_BITS and GL_TEXTURE_*_SIZE.

This fixes:
main/framebuffer.c:892: _mesa_source_buffer_exists: Assertion `....' failed.
2011-03-14 10:24:24 +01:00
Marek Olšák 23ccab39cd r300g: clamp after blending for fixed-point formats only 2011-03-14 10:09:34 +01:00
Dave Airlie 340e15c79b glx: the server still needs __GLXcontext.
This file generates code for the X server and it still uses
the __GLXcontext structure name.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-14 15:03:53 +10:00
Marek Olšák 0f84ddad29 ir_to_mesa: do not check the number of uniforms against hw limits
The r300 compiler can eliminate unused uniforms and remap uniform locations
if their number surpasses hardware limits, so the limit is actually
NumParameters + NumUnusedParameters. This is important for some apps
under Wine to run.

Wine sometimes declares a uniform array of 256 vec4's and some Wine-specific
constants on top of that, so in total there is more uniforms than r300 can
handle. This was the main motivation for implementing the elimination
of unused constants.

We should allow drivers to implement fail & recovery paths where it makes
sense, so giving up too early especially when comes to uniforms is not
so good idea, though I agree there should be some hard limit for all drivers.

This patch fixes:
- glsl-fs-uniform-array-5
- glsl-vs-large-uniform-array
on drivers which can eliminate unused uniforms.
2011-03-14 03:12:34 +01:00
Dave Airlie 110f5e2056 autoconf/llvm: fix build for disassembler
tested by okias on irc
2011-03-14 09:37:08 +10:00
José Fonseca c27e58c109 gallivm: Fix build with llvm 2.6 on 32bit platforms 2011-03-13 19:49:21 +00:00
José Fonseca e6314db0ac gallivm: Use LLVM MC disassembler, instead of udis86.
Included in LLVM 2.7+. Unlink udis86, should support all instructions that
LLVM can emit.
2011-03-13 19:24:26 +00:00
José Fonseca d2332569d2 util: Silence gcc unitialized member warning 2011-03-13 18:56:19 +00:00
José Fonseca b79b05e17e draw: Fix draw_variant_output::format's type. 2011-03-13 18:56:07 +00:00
Christoph Bumiller c448a556e9 nv50,nvc0: don't assert on cso with 0 vertex elements 2011-03-13 18:19:22 +01:00
Jakob Bornecrantz 07838ff990 rbug: Use the call mutex
Fixes crashes in [soft|llvm]pipe when replacing shaders
2011-03-13 18:13:55 +01:00
Mathias Fröhlich 0a6f09a76a r600g: Only update DB_SHADER_CONTROL once in r600_pipe_shader_ps().
Avoid setting the same gpu register several times in a r600_pipe_state.
Compute the final value of the register and set that one time. This avoids
some overhead in r600_context_pipe_state_set().

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-13 17:25:16 +01:00
Jakob Bornecrantz 629bc76b75 tgsi: Fix parsing of properties with digits in the name 2011-03-13 15:35:35 +01:00
Jakob Bornecrantz f4e6061d88 rbug: Skip drawing on disabled shaders 2011-03-13 13:36:21 +01:00
Jakob Bornecrantz dfac72208d rbug: Remove flags from flush 2011-03-13 13:36:21 +01:00
Jakob Bornecrantz c7894dfad9 i915g: Lie more so we get GLSL
Lots of piglit tests are lazy and wants GLSL
2011-03-13 13:36:21 +01:00
Jakob Bornecrantz c03be14d42 i915g: Point sprite cap could be supported 2011-03-13 13:36:21 +01:00
Jakob Bornecrantz 6d86429bd9 i915g: Sort cap list 2011-03-13 13:36:21 +01:00
Christoph Bumiller 07f73577af nvc0: support edge flags 2011-03-13 13:23:55 +01:00
Christoph Bumiller c0f53fe8aa nvc0: fix POLYGON_MODE_BACK macro copy/paste error 2011-03-13 13:23:55 +01:00
Christoph Bumiller e864ccb3f2 nv50,nvc0: fix pipe context switch 2011-03-13 13:23:55 +01:00
Christoph Bumiller 4388817a67 nv50,nvc0: clean up flushes 2011-03-13 13:23:55 +01:00
Christoph Bumiller 26a199efac nv50,nvc0: add some missing resource referencing 2011-03-13 13:23:55 +01:00
Christoph Bumiller 259efc90e7 nvc0: mask out centroid bit for writing FP header
It's only 2 bit per input, centroid is set in the instruction.
2011-03-13 13:23:55 +01:00
Christoph Bumiller 0abaaac872 nvc0: identify VERTEX_QUARANTINE
Well, not sure what exactly it is, but it certainly doesn't contain
the control flow stack, but vertex data.

Not sure about size, I've only seen the first few KiB written, but
the binary driver seems to allocate more.
2011-03-13 13:23:55 +01:00
Christoph Bumiller f0ee7d8bb4 nvc0: don't enable early-z if alpha test is enabled
Depth values are also written before the shader is executed, so if
early tests are enabled, fragments that failed the alpha test were
modifying the depth buffer, but they shouldn't.
2011-03-13 13:23:54 +01:00
Christoph Bumiller d9f1310e51 nvc0: move sprite coord replace state into cso
It's not dependent on any other state anymore now.
2011-03-13 13:23:54 +01:00
Christoph Bumiller 11f07a35f4 nvc0: s/nblocksx/nblocksy for height in resource_copy_region 2011-03-13 13:23:54 +01:00
Christoph Bumiller d7a23cfb88 nvc0: fix unitialized variable in TGSI sysval decl processing 2011-03-13 13:23:54 +01:00
Christoph Bumiller f10b2021c1 nvc0: update/fix supported instruction src modifiers 2011-03-13 13:23:54 +01:00
Chad Versace dedc81e1dc glsl: Document glsl_type::sampler_dimensionality 2011-03-12 17:39:48 -08:00
Eric Anholt 098f9c5325 Revert "mesa: Convert fixed function fragment program generator to GLSL IR."
This reverts commit 7cb87dffce.
There were regressions (Bug #35244) and more review has been requested.
2011-03-12 15:11:01 -08:00
Eric Anholt 07c420a3c6 Revert "mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program"
This reverts commit b4452c3baa.
2011-03-12 15:11:00 -08:00
Eric Anholt 403be11111 Revert "i965: Use the fixed function GLSL program instead of the ARB program."
This reverts commit 81b34a4e3a.  There
were regressions in the core change that this depends on.
2011-03-12 15:11:00 -08:00
Daniel Vetter 7735f8c6e5 i915g: fix transfer coherency
The kernel drm takes care of all coherency as long as we don't forget
to submit all outstanding commands in the batchbuffer ...

Also move batchbuffer initialization up because otherwise transfers
for some helper textures fail with a segmentation fault.

And kill the dead code, flushes should now be correct everywhere.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-12 22:58:19 +01:00
Daniel Vetter f608795588 i915g: don't recalculate fb dimension
The statetracker should do this for us correctly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-12 20:32:30 +01:00
Daniel Vetter d46c6084ce i915g: use y-tiling when the blitter is not used
The blitter is broken. Who'd have guessed?

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-12 20:32:29 +01:00
Daniel Vetter f0c56e2a23 i915g: implement copy_region using u_blitter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>works
2011-03-12 20:32:29 +01:00
Daniel Vetter 06713a4079 i915g: fix use after free
Pipe templates should be copied if still needed after the create
call completes.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-12 20:31:30 +01:00
Jakob Bornecrantz 1a79064da1 gallium: Delay the creation of simple helper shaders 2011-03-12 19:39:45 +01:00