Commit Graph

43014 Commits

Author SHA1 Message Date
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
Marek Olšák bfe88e6998 gallium: cleanup fence_signalled and fence_finish
So that they don't have the driver-specific param and return type.
2011-03-11 21:39:30 +01:00
Marek Olšák 25485f4b69 gallium: kill is_resource_referenced
Only st/xorg used it and even incorrectly with regards to pipelined transfers.
2011-03-11 21:39:30 +01:00
Adam Jackson 2b64886c81 swrastg: Add __DRI_TEX_BUFFER support
Without this, EXT_texture_from_pixmap is trivially broken.  With it,
it's merely subtly broken.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-11 14:49:28 -05:00
Brian Paul d7db14ab7d mesa: test against MaxUniformComponents in check_resources()
Since we're compiling/linking GLSL shaders we should check against
the shader uniform limits, not the legacy vertex/fragment program
parameter limits which are usually lower.
2011-03-11 10:04:17 -07:00
Brian Paul e0e94026a0 mesa: move location of some geometry program limits
The gl_program_constants struct is for limits that are applicable to
any/all shader stages.  Move the geometry shader-only fields into the
gl_constants struct.
Remove redundant MaxGeometryUniformComponents field too.
2011-03-11 09:25:22 -07:00
Brian Paul 8cc84b3e45 mesa: use check_resources() to check program against limits
Without these checks we could create shaders with more samplers,
constants than the driver could handle.  Fail linking rather than
dying later.
2011-03-11 09:25:22 -07:00
Brian Paul decc6e2a32 mesa: replace NEED_SECONDARY_COLOR(), RGBA_LOGICOP_ENABLED() with inlines
and rename them.
2011-03-11 09:25:21 -07:00
Brian Paul 4293a12c7f mesa: call FLUSH_VERTICES() before deleting shaders, buffers, query objects
Need to flush rendering (or at least indicate that the rug might be getting
pulled out from underneath us) when a shader, buffer object or query object
is about to be deleted.

Also, this helps to tell the VBO module to unmap its current vertex buffer.
2011-03-11 09:25:21 -07:00
Brian Paul a4a5d7e0dd vega: remove unused pipe var 2011-03-11 09:25:21 -07:00
José Fonseca 530ad1ff6f svga: Propagate discard/unsynchronized flags to the host when doing texture DMAs. 2011-03-11 15:03:21 +00:00
José Fonseca f0ea6395b6 util: Fix typo in u_upload_flush().
upload->offset is how much we used. upload->size is the whole buffer size.
2011-03-11 11:54:26 +00:00
Nicolas Peninguy b6c9c78bff r300g: fix alignement for NPOT values in hyperz setup
With 3 pipes cards we need to align with NPOT values. This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=32945

Signed-off-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-03-11 04:36:37 +01:00