Commit Graph

43176 Commits

Author SHA1 Message Date
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
Carl-Philip Hänsch 7339915a4b r600g: Fix VS sampler view offsets for r600/r700.
077c448d18 missed this.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-12 19:33:16 +01:00
Henri Verbeet 656c314573 r600g: Fix an unused variable warning. 2011-03-12 16:43:58 +01:00
Henri Verbeet ab21147c89 u_blitter: Do blits in linear color space.
Blits between sRGB and linear formats should happen in linear color space.
This fixes piglit fbo/fbo-srgb-blit.
2011-03-12 16:43:58 +01:00
Marek Olšák 6da4866ffd r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500
The docs say it can be set for direct texture lookups, but even that
causes problems.

This fixes the wireframe bug:
https://bugs.freedesktop.org/show_bug.cgi?id=32688

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-03-12 11:54:23 +01:00
Marek Olšák 1e97b4dd10 r300/compiler: TEX instructions don't support negation on source arguments
This fixes piglit:
- glsl-fs-texture2d-dependent-4

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-03-12 10:22:18 +01:00
Marek Olšák 589d835dfd r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)
NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-03-12 10:18:45 +01:00
Marek Olšák d96305e4fc r300/compiler: fix translating the src negate bits in pair_translate
(1, -_, ...) was converted to (-1, ...) because of the negation
in the second component.
Masking out the unused bits fixes this.

Piglit:
- glsl-fs-texture2d-branching

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-03-12 09:39:46 +01:00
Marek Olšák 1868d21c8e st/dri: fix warning: ‘bind’ may be used uninitialized in this function 2011-03-12 08:49:54 +01:00
Marek Olšák f1e160f89b llvmpipe: fix warning: ‘t0’ may be used uninitialized in this function 2011-03-12 08:48:43 +01:00
Marek Olšák 4b92c688a4 r300g: implement fragment color clamping in the shader
This finishes the implementation of the fragment color clamp control
for ARB_color_buffer_float. I don't wanna keep this stuff in a branch...
2011-03-12 07:56:33 +01:00
Marek Olšák e4707604ab r300/compiler: fix the saturate modifier when applied to TEX instructions
This bug can only be triggered if the source texture is either signed or float.
2011-03-12 07:54:23 +01:00
Adam Jackson cbcb84fccf r600g: revert unintentional commit 2011-03-11 17:46:03 -05:00
Adam Jackson 02725bc8b0 nouveau: Build fix
nouveau_vieux_dri.so.tmp: undefined reference to `_mesa_need_secondary_color'
2011-03-11 17:37:21 -05:00
Adam Jackson b5872cdda0 r600: Build fix
r600_dri.so.tmp: undefined reference to `_mesa_rgba_logicop_enabled'
2011-03-11 17:24:47 -05:00
Vinson Lee 4faa95e74d st/python: Remove flags from flush function. 2011-03-11 14:00:32 -08:00
Vinson Lee 9c366ceedb st/python: Remove the geom_flags param from is_format_supported. 2011-03-11 13:37:30 -08:00
Vinson Lee d17ef8636d st/python: Clean up fence_finish. 2011-03-11 13:35:06 -08:00
Vinson Lee dee6eafbd2 scons: Move texenvprogram.c to ff_fragment_shader.cpp. 2011-03-11 13:32:41 -08:00
Eric Anholt 81b34a4e3a i965: Use the fixed function GLSL program instead of the ARB program.
This gets one more piece of the pipeline onto the new codegen backend.
Once ARB_fragment_program can generate GLSL programs, we can nuke the
old backend.
2011-03-11 12:55:14 -08:00
Eric Anholt b4452c3baa mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program
This is like how we track FragmentProgram._Current for the computed
ARB fragment program for fixed function texenv, but this gives direct
access to the gl_shader_program for drivers to codegen from, skipping
ARB_fp.
2011-03-11 12:55:14 -08:00
Eric Anholt 7cb87dffce mesa: Convert fixed function fragment program generator to GLSL IR.
This is a step towards providing a direct route for drivers accepting
GLSL IR for codegen.  Perhaps more importantly, it runs the fixed
function fragment program through the GLSL IR optimization.  Having
seen how easy it is to make ugly fixed function texenv code that can
do unnecessary work, this may improve real applicatinos.
2011-03-11 12:55:14 -08:00
Eric Anholt 29e013e58b mesa: Add gl_MESAFogParamsOptimized for our special pre-computed fog params.
It would be nice if we handled optimized uniform math like this in
some generic way, since people often end up doing uniform expressions
in shaders, but for now keep this hard-coded like it was in the
texenvprogram code.
2011-03-11 12:55:14 -08:00
Eric Anholt 20f7a6f11a mesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.
For fixed function fragment processing in GLSL IR, we want to be able
to reference this state value.  gl_* not explicitly permitted is
reserved, so using this variable name internally shouldn't be any
issue.
2011-03-11 12:55:14 -08:00
Eric Anholt cdacca4868 mesa: Move texenvprogram.c to ff_fragment_shader.cpp.
This file is about to change to generating a shader program instead of
a fragment program.
2011-03-11 12:55:13 -08:00
Eric Anholt e1cb12bfff prog_cache: Add some support for shader_programs in prog_cache.
This is used in the upcoming fixed function shader_program generation,
and shader_program and ARB programs are together in this code until
both fragment and vertex ff get converted.
2011-03-11 12:55:13 -08:00
Eric Anholt 9c7231c1d9 mesa: Don't try to remove an internal shader_program from the hash.
It fails on assertions if the key isn't actually present.
2011-03-11 12:55:13 -08:00
Eric Anholt 5ae1d19506 i965: Use ffs() on a 32-bit int value instad of ffsll(). 2011-03-11 12:55:13 -08:00
Marek Olšák 7e02303497 gallium: remove flags from the flush function
The drivers have been changed so that they behave as if all of the flags
were set. This is already implicit in most hardware drivers and required
for multiple contexts.

Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag
to decide whether flush_frontbuffer should be called.
New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
2011-03-11 21:39:31 +01:00
Marek Olšák e968975cb5 gallium: remove the geom_flags param from is_format_supported 2011-03-11 21:39:30 +01:00