mesa.git
13 years agonv50,nvc0: add some missing resource referencing
Christoph Bumiller [Sun, 13 Mar 2011 12:06:42 +0000 (13:06 +0100)]
nv50,nvc0: add some missing resource referencing

13 years agonvc0: mask out centroid bit for writing FP header
Christoph Bumiller [Sat, 12 Mar 2011 09:53:19 +0000 (10:53 +0100)]
nvc0: mask out centroid bit for writing FP header

It's only 2 bit per input, centroid is set in the instruction.

13 years agonvc0: identify VERTEX_QUARANTINE
Christoph Bumiller [Fri, 11 Mar 2011 10:03:33 +0000 (11:03 +0100)]
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.

13 years agonvc0: don't enable early-z if alpha test is enabled
Christoph Bumiller [Sun, 13 Mar 2011 12:05:14 +0000 (13:05 +0100)]
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.

13 years agonvc0: move sprite coord replace state into cso
Christoph Bumiller [Fri, 11 Mar 2011 09:00:32 +0000 (10:00 +0100)]
nvc0: move sprite coord replace state into cso

It's not dependent on any other state anymore now.

13 years agonvc0: s/nblocksx/nblocksy for height in resource_copy_region
Christoph Bumiller [Sat, 5 Mar 2011 21:29:49 +0000 (22:29 +0100)]
nvc0: s/nblocksx/nblocksy for height in resource_copy_region

13 years agonvc0: fix unitialized variable in TGSI sysval decl processing
Christoph Bumiller [Sat, 5 Mar 2011 21:28:46 +0000 (22:28 +0100)]
nvc0: fix unitialized variable in TGSI sysval decl processing

13 years agonvc0: update/fix supported instruction src modifiers
Christoph Bumiller [Sat, 5 Mar 2011 21:24:57 +0000 (22:24 +0100)]
nvc0: update/fix supported instruction src modifiers

13 years agoglsl: Document glsl_type::sampler_dimensionality
Chad Versace [Thu, 3 Mar 2011 22:07:42 +0000 (14:07 -0800)]
glsl: Document glsl_type::sampler_dimensionality

13 years agoRevert "mesa: Convert fixed function fragment program generator to GLSL IR."
Eric Anholt [Sat, 12 Mar 2011 23:00:55 +0000 (15:00 -0800)]
Revert "mesa: Convert fixed function fragment program generator to GLSL IR."

This reverts commit 7cb87dffce2c7a37f960f3a865cf92fd193dd8c5.
There were regressions (Bug #35244) and more review has been requested.

13 years agoRevert "mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program"
Eric Anholt [Sat, 12 Mar 2011 23:00:49 +0000 (15:00 -0800)]
Revert "mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program"

This reverts commit b4452c3baad6e0379eeb7f22f2e51d13999e1323.

13 years agoRevert "i965: Use the fixed function GLSL program instead of the ARB program."
Eric Anholt [Sat, 12 Mar 2011 23:00:14 +0000 (15:00 -0800)]
Revert "i965: Use the fixed function GLSL program instead of the ARB program."

This reverts commit 81b34a4e3a7aec9cdf2781757408dc5e9eec79cb.  There
were regressions in the core change that this depends on.

13 years agoi915g: fix transfer coherency
Daniel Vetter [Sat, 12 Mar 2011 21:57:17 +0000 (22:57 +0100)]
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>
13 years agoi915g: don't recalculate fb dimension
Daniel Vetter [Fri, 11 Mar 2011 23:16:35 +0000 (00:16 +0100)]
i915g: don't recalculate fb dimension

The statetracker should do this for us correctly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: use y-tiling when the blitter is not used
Daniel Vetter [Fri, 11 Mar 2011 15:08:11 +0000 (16:08 +0100)]
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>
13 years agoi915g: implement copy_region using u_blitter
Daniel Vetter [Fri, 11 Mar 2011 19:21:00 +0000 (20:21 +0100)]
i915g: implement copy_region using u_blitter

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>works
13 years agoi915g: fix use after free
Daniel Vetter [Fri, 11 Mar 2011 22:20:44 +0000 (23:20 +0100)]
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>
13 years agogallium: Delay the creation of simple helper shaders
Jakob Bornecrantz [Sat, 5 Mar 2011 12:27:00 +0000 (13:27 +0100)]
gallium: Delay the creation of simple helper shaders

13 years agor600g: Fix VS sampler view offsets for r600/r700.
Carl-Philip Hänsch [Sat, 12 Mar 2011 18:25:11 +0000 (19:25 +0100)]
r600g: Fix VS sampler view offsets for r600/r700.

077c448d184799e0d9ec962013ec784c6a5c1807 missed this.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Fix an unused variable warning.
Henri Verbeet [Wed, 9 Mar 2011 20:57:52 +0000 (21:57 +0100)]
r600g: Fix an unused variable warning.

13 years agou_blitter: Do blits in linear color space.
Henri Verbeet [Sat, 12 Mar 2011 15:33:50 +0000 (16:33 +0100)]
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.

13 years agor300/compiler: do not set TEX_IGNORE_UNCOVERED on r500
Marek Olšák [Sat, 12 Mar 2011 10:20:57 +0000 (11:20 +0100)]
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.

13 years agor300/compiler: TEX instructions don't support negation on source arguments
Marek Olšák [Sat, 12 Mar 2011 09:22:18 +0000 (10:22 +0100)]
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.

13 years agor300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)
Marek Olšák [Sat, 12 Mar 2011 09:18:45 +0000 (10:18 +0100)]
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.

13 years agor300/compiler: fix translating the src negate bits in pair_translate
Marek Olšák [Sat, 12 Mar 2011 08:32:16 +0000 (09:32 +0100)]
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.

13 years agost/dri: fix warning: ‘bind’ may be used uninitialized in this function
Marek Olšák [Sat, 12 Mar 2011 07:49:54 +0000 (08:49 +0100)]
st/dri: fix warning: ‘bind’ may be used uninitialized in this function

13 years agollvmpipe: fix warning: ‘t0’ may be used uninitialized in this function
Marek Olšák [Sat, 12 Mar 2011 07:48:43 +0000 (08:48 +0100)]
llvmpipe: fix warning: ‘t0’ may be used uninitialized in this function

13 years agor300g: implement fragment color clamping in the shader
Marek Olšák [Sat, 12 Mar 2011 05:11:18 +0000 (06:11 +0100)]
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...

13 years agor300/compiler: fix the saturate modifier when applied to TEX instructions
Marek Olšák [Sat, 12 Mar 2011 05:07:24 +0000 (06:07 +0100)]
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.

13 years agor600g: revert unintentional commit
Adam Jackson [Fri, 11 Mar 2011 22:46:03 +0000 (17:46 -0500)]
r600g: revert unintentional commit

13 years agonouveau: Build fix
Adam Jackson [Fri, 11 Mar 2011 22:37:21 +0000 (17:37 -0500)]
nouveau: Build fix

nouveau_vieux_dri.so.tmp: undefined reference to `_mesa_need_secondary_color'

13 years agor600: Build fix
Adam Jackson [Fri, 11 Mar 2011 22:20:34 +0000 (17:20 -0500)]
r600: Build fix

r600_dri.so.tmp: undefined reference to `_mesa_rgba_logicop_enabled'

13 years agost/python: Remove flags from flush function.
Vinson Lee [Fri, 11 Mar 2011 22:00:32 +0000 (14:00 -0800)]
st/python: Remove flags from flush function.

13 years agost/python: Remove the geom_flags param from is_format_supported.
Vinson Lee [Fri, 11 Mar 2011 21:37:30 +0000 (13:37 -0800)]
st/python: Remove the geom_flags param from is_format_supported.

13 years agost/python: Clean up fence_finish.
Vinson Lee [Fri, 11 Mar 2011 21:35:06 +0000 (13:35 -0800)]
st/python: Clean up fence_finish.

13 years agoscons: Move texenvprogram.c to ff_fragment_shader.cpp.
Vinson Lee [Fri, 11 Mar 2011 21:32:41 +0000 (13:32 -0800)]
scons: Move texenvprogram.c to ff_fragment_shader.cpp.

13 years agoi965: Use the fixed function GLSL program instead of the ARB program.
Eric Anholt [Wed, 12 Jan 2011 20:37:08 +0000 (12:37 -0800)]
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.

13 years agomesa: Track a computed _CurrentFragmentProgram for current gl_shader_program
Eric Anholt [Wed, 12 Jan 2011 20:27:12 +0000 (12:27 -0800)]
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.

13 years agomesa: Convert fixed function fragment program generator to GLSL IR.
Eric Anholt [Mon, 1 Nov 2010 20:16:21 +0000 (13:16 -0700)]
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.

13 years agomesa: Add gl_MESAFogParamsOptimized for our special pre-computed fog params.
Eric Anholt [Tue, 23 Nov 2010 23:55:59 +0000 (15:55 -0800)]
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.

13 years agomesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.
Eric Anholt [Fri, 12 Nov 2010 20:04:09 +0000 (12:04 -0800)]
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.

13 years agomesa: Move texenvprogram.c to ff_fragment_shader.cpp.
Eric Anholt [Sun, 31 Oct 2010 17:51:59 +0000 (10:51 -0700)]
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.

13 years agoprog_cache: Add some support for shader_programs in prog_cache.
Eric Anholt [Fri, 5 Nov 2010 14:25:18 +0000 (07:25 -0700)]
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.

13 years agomesa: Don't try to remove an internal shader_program from the hash.
Eric Anholt [Fri, 5 Nov 2010 14:23:45 +0000 (07:23 -0700)]
mesa: Don't try to remove an internal shader_program from the hash.

It fails on assertions if the key isn't actually present.

13 years agoi965: Use ffs() on a 32-bit int value instad of ffsll().
Eric Anholt [Wed, 9 Mar 2011 17:31:09 +0000 (09:31 -0800)]
i965: Use ffs() on a 32-bit int value instad of ffsll().

13 years agogallium: remove flags from the flush function
Marek Olšák [Mon, 7 Mar 2011 23:57:48 +0000 (00:57 +0100)]
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.

13 years agogallium: remove the geom_flags param from is_format_supported
Marek Olšák [Mon, 7 Mar 2011 23:01:58 +0000 (00:01 +0100)]
gallium: remove the geom_flags param from is_format_supported

13 years agogallium: cleanup fence_signalled and fence_finish
Marek Olšák [Mon, 7 Mar 2011 21:57:54 +0000 (22:57 +0100)]
gallium: cleanup fence_signalled and fence_finish

So that they don't have the driver-specific param and return type.

13 years agogallium: kill is_resource_referenced
Marek Olšák [Mon, 7 Mar 2011 21:35:49 +0000 (22:35 +0100)]
gallium: kill is_resource_referenced

Only st/xorg used it and even incorrectly with regards to pipelined transfers.

13 years agoswrastg: Add __DRI_TEX_BUFFER support
Adam Jackson [Fri, 11 Mar 2011 19:49:28 +0000 (14:49 -0500)]
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>
13 years agomesa: test against MaxUniformComponents in check_resources()
Brian Paul [Fri, 11 Mar 2011 17:03:40 +0000 (10:03 -0700)]
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.

13 years agomesa: move location of some geometry program limits
Brian Paul [Fri, 11 Mar 2011 16:25:22 +0000 (09:25 -0700)]
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.

13 years agomesa: use check_resources() to check program against limits
Brian Paul [Fri, 11 Mar 2011 16:25:22 +0000 (09:25 -0700)]
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.

13 years agomesa: replace NEED_SECONDARY_COLOR(), RGBA_LOGICOP_ENABLED() with inlines
Brian Paul [Fri, 11 Mar 2011 16:25:21 +0000 (09:25 -0700)]
mesa: replace NEED_SECONDARY_COLOR(), RGBA_LOGICOP_ENABLED() with inlines

and rename them.

13 years agomesa: call FLUSH_VERTICES() before deleting shaders, buffers, query objects
Brian Paul [Fri, 11 Mar 2011 16:25:21 +0000 (09:25 -0700)]
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.

13 years agovega: remove unused pipe var
Brian Paul [Fri, 11 Mar 2011 16:25:21 +0000 (09:25 -0700)]
vega: remove unused pipe var

13 years agosvga: Propagate discard/unsynchronized flags to the host when doing texture DMAs.
José Fonseca [Fri, 11 Mar 2011 14:49:45 +0000 (14:49 +0000)]
svga: Propagate discard/unsynchronized flags to the host when doing texture DMAs.

13 years agoutil: Fix typo in u_upload_flush().
José Fonseca [Fri, 11 Mar 2011 11:28:53 +0000 (11:28 +0000)]
util: Fix typo in u_upload_flush().

upload->offset is how much we used. upload->size is the whole buffer size.

13 years agor300g: fix alignement for NPOT values in hyperz setup
Nicolas Peninguy [Thu, 10 Mar 2011 21:48:44 +0000 (21:48 +0000)]
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>
13 years agodraw: remove unnecessary flush
Marek Olšák [Mon, 7 Mar 2011 23:45:41 +0000 (00:45 +0100)]
draw: remove unnecessary flush

13 years agost/vega: remove unnecessary flushes
Marek Olšák [Mon, 7 Mar 2011 23:31:06 +0000 (00:31 +0100)]
st/vega: remove unnecessary flushes

I don't see a reason we need them.

13 years agost/mesa: remove unnecessary flushes
Marek Olšák [Mon, 7 Mar 2011 23:28:33 +0000 (00:28 +0100)]
st/mesa: remove unnecessary flushes

The framebuffer cache flush should be implicit when calling
set_framebuffer_state.

There is no need to flush the command stream either.

13 years agoRevert "gallium/svga: Only upload parts of vertexarrays that are actually used"
Thomas Hellstrom [Thu, 10 Mar 2011 22:29:03 +0000 (23:29 +0100)]
Revert "gallium/svga: Only upload parts of vertexarrays that are actually used"

This reverts commit 6d4e337f3890105c7d8a2f132412c137d2570d25.

The commit is incorrect. I'll rework it. Revert for now.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoi915g: implement surface clear functions using hw-clear
Daniel Vetter [Sun, 6 Mar 2011 11:36:46 +0000 (12:36 +0100)]
i915g: implement surface clear functions using hw-clear

Tested by temporarily using util_clear even when not using the blitter.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: make set_framebuffer_state more robust
Daniel Vetter [Sun, 6 Mar 2011 10:44:06 +0000 (11:44 +0100)]
i915g: make set_framebuffer_state more robust

u_blitter is lazy and doesn't fully clear it's stack-allocated fb.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: implement hw clear
Daniel Vetter [Thu, 10 Mar 2011 22:04:10 +0000 (23:04 +0100)]
i915g: implement hw clear

Benefits:
- spares us a relocation.
- needed for zone rendering (if that ever happens).
- just awesome.

v2: Rename the debug option. Completely disabling the blitter is
required for Y tiling to work, so this option will cover other
code paths in the future.

v3: Implement suggestions by Jakob Bornecrantz.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: blitter handles overlapping blits
Daniel Vetter [Sun, 6 Mar 2011 11:05:23 +0000 (12:05 +0100)]
i915g: blitter handles overlapping blits

No need to assert.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: enable separate depth/stencil clears
Daniel Vetter [Sun, 6 Mar 2011 00:30:46 +0000 (01:30 +0100)]
i915g: enable separate depth/stencil clears

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: streamline derived state updates of the driver pipeline
Daniel Vetter [Sat, 5 Mar 2011 23:30:12 +0000 (00:30 +0100)]
i915g: streamline derived state updates of the driver pipeline

Flushing the batch/hw backend doesn't invalidate the derived state.
So kill the unnecessary function calls and add an assert in
emit_hardware_state for paranoia.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: don't validate a NULL vbo
Daniel Vetter [Sat, 5 Mar 2011 22:17:56 +0000 (23:17 +0100)]
i915g: don't validate a NULL vbo

With the new clear code this is possible (if the app call glClear
before drawing the first primitive).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agogallium/util: new polygon stipple utility helper
Brian Paul [Thu, 10 Mar 2011 16:44:30 +0000 (09:44 -0700)]
gallium/util: new polygon stipple utility helper

The polygon stipple fallback does not have to be implemented in the
draw module (it doesn't need window coords, etc).  Drivers can use
this utility and avoid sw vertex fallbacks if pstipple is enabled.
Note: this is WIP and not used by any driver yet.

13 years agoglsl: silence warning in printf() with a cast
Brian Paul [Thu, 10 Mar 2011 16:29:00 +0000 (09:29 -0700)]
glsl: silence warning in printf() with a cast

13 years agoglx: fix null pointer deref in __glXGenerateError()
Brian Paul [Thu, 10 Mar 2011 15:50:52 +0000 (08:50 -0700)]
glx: fix null pointer deref in __glXGenerateError()

The gc var would be NULL if called from line 238.  Instead, get
the opcode from __glXSetupForCommand(dpy) as done in other places.
And remove the unused gc parameter.

Fixes a bug reported by "John Doe" on 3/9/2011.

NOTE: This is a candidate for the 7.10 branch.

13 years agogallium/svga: Only upload parts of vertexarrays that are actually used
Thomas Hellstrom [Wed, 9 Mar 2011 11:39:14 +0000 (12:39 +0100)]
gallium/svga: Only upload parts of vertexarrays that are actually used

Make sure we only upload parts of vertex arrays that are actually used
by a draw command.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agor600: don't close fd on failed load
Dave Airlie [Thu, 10 Mar 2011 02:01:43 +0000 (12:01 +1000)]
r600: don't close fd on failed load

This fd gets passed in from outside, closing it causes the X.org server
to crap out when the driver doesn't identify the chipset.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agointel: Don't complain when getparam fails due to a missing param.
Eric Anholt [Wed, 9 Mar 2011 20:54:14 +0000 (12:54 -0800)]
intel: Don't complain when getparam fails due to a missing param.

This is an expected behavior when we're testing for the presence of
new kernel features.

13 years agoi965: Pack the tracked state atoms into separate arrays for prepare/emit.
Chris Wilson [Tue, 8 Mar 2011 00:43:45 +0000 (16:43 -0800)]
i965: Pack the tracked state atoms into separate arrays for prepare/emit.

Improves performance of a hacked-up scissor-many (to reuse a small set
of scissors instead of blowing out the cache, and then to run 100x
more iterations so it actually took some time) by 3.6% +/- 1.2% (n=10)

13 years agonv50: add back initialization of redefine_user_buffer
Christoph Bumiller [Wed, 9 Mar 2011 16:25:08 +0000 (17:25 +0100)]
nv50: add back initialization of redefine_user_buffer

Got lost in f80c03e1875fe96ff2f4c022e3cb76357828140d.

13 years agor600g: remove some now unneeded code from r600_bc_vtx_build
Christian König [Wed, 9 Mar 2011 12:54:35 +0000 (13:54 +0100)]
r600g: remove some now unneeded code from r600_bc_vtx_build

13 years agor600g: R700+ can do more than 8 tex and vtx clause in one CF inst
Christian König [Wed, 9 Mar 2011 12:11:10 +0000 (13:11 +0100)]
r600g: R700+ can do more than 8 tex and vtx clause in one CF inst

Reviewed-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: split R600 and R700 CF generation for VTX and TEX
Christian König [Wed, 9 Mar 2011 12:03:50 +0000 (13:03 +0100)]
r600g: split R600 and R700 CF generation for VTX and TEX

Reviewed-by: Henri Verbeet <hverbeet@gmail.com>
13 years agosvga: Add a new winsys entry point to query the hw version.
José Fonseca [Wed, 23 Feb 2011 18:30:27 +0000 (18:30 +0000)]
svga: Add a new winsys entry point to query the hw version.

13 years agoutil: Use PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in pipe_buffer_write.
José Fonseca [Thu, 10 Feb 2011 20:54:18 +0000 (20:54 +0000)]
util: Use PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in pipe_buffer_write.

13 years agoutil: add ensure_sanity checks, fix a bug
Keith Whitwell [Sun, 9 Jan 2011 15:03:16 +0000 (15:03 +0000)]
util: add ensure_sanity checks, fix a bug

Add ensure_sanity checks.
Fix a bug which caused us to misplace entries adding to a full cache.

13 years agoutil: improve cache collision behaviour
Keith Whitwell [Wed, 22 Dec 2010 12:10:02 +0000 (12:10 +0000)]
util: improve cache collision behaviour

Add linear probing on collisions.

Expand entry array by a fixed scale (currently 2) to help avoid
collisions.

Use a LRU approach to ensure that the number of entries stored in the
cache doesn't exceed the requested size.

13 years agoutil: Add remove to util_cache
Alex Corscadden [Thu, 6 Jan 2011 18:59:13 +0000 (10:59 -0800)]
util: Add remove to util_cache

I need to be able to remove entries from util_cache caches.  This change
enables that functionality.

13 years agoutil: Allow util_draw_texquad to draw quads with non-integer coordinates.
Alex Corscadden [Wed, 9 Mar 2011 11:12:09 +0000 (11:12 +0000)]
util: Allow util_draw_texquad to draw quads with non-integer coordinates.

13 years agowgl: Force framebuffer validation on glViewport.
José Fonseca [Tue, 8 Mar 2011 20:08:35 +0000 (20:08 +0000)]
wgl: Force framebuffer validation on glViewport.

13 years agogallium/svga: Don't replace user vertex buffer with uploaded copy
Thomas Hellstrom [Mon, 7 Mar 2011 09:40:26 +0000 (10:40 +0100)]
gallium/svga: Don't replace user vertex buffer with uploaded copy

Do that later on when we set up the hwtnl state instead.
This addresses a problem when we drop the uploaded copy due to a vb
size change, it will remain referenced in svga->curr.vb[], and the
new contents of the vb will never be uploaded.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoscons: Fix immediate Python exceptions with SCons on SunOS.
Vinson Lee [Wed, 9 Mar 2011 01:59:57 +0000 (17:59 -0800)]
scons: Fix immediate Python exceptions with SCons on SunOS.

The build still fails.

13 years agost/python: Add timeout parameter to fence_finish.
Vinson Lee [Wed, 9 Mar 2011 00:18:16 +0000 (16:18 -0800)]
st/python: Add timeout parameter to fence_finish.

This is a follow-up to commit b39bccbd4ed71e9585da4cf5acf7b887b2e90899.

Fixes Linux SCons build.

13 years agor300g: handle timeout parameter in fence_finish
Marek Olšák [Sat, 5 Mar 2011 20:46:06 +0000 (21:46 +0100)]
r300g: handle timeout parameter in fence_finish

13 years agogallium: add timeout parameter to fence_finish
Marek Olšák [Sat, 5 Mar 2011 20:23:54 +0000 (21:23 +0100)]
gallium: add timeout parameter to fence_finish

This is a follow-up to the ARB_sync patch for st/mesa and completes
the ARB_sync implementation.

13 years agost/mesa: implement ARB_sync
Marek Olšák [Sat, 5 Mar 2011 19:32:28 +0000 (20:32 +0100)]
st/mesa: implement ARB_sync

The ServerWaitSync implementation matches Intel's driver.

The extension is advertised when pipe_screen::fence_finish is set.

13 years agor300g: add LATC support
Marek Olšák [Mon, 7 Mar 2011 01:25:22 +0000 (02:25 +0100)]
r300g: add LATC support

13 years agost/mesa: cleanup checking for signed compressed formats in generate_mipmaps
Marek Olšák [Mon, 7 Mar 2011 19:23:05 +0000 (20:23 +0100)]
st/mesa: cleanup checking for signed compressed formats in generate_mipmaps

13 years agost/mesa: add LATC and 3DC support
Marek Olšák [Mon, 7 Mar 2011 01:24:43 +0000 (02:24 +0100)]
st/mesa: add LATC and 3DC support

softpipe passes all tests.

13 years agogallium/util: add LATC support
Marek Olšák [Mon, 7 Mar 2011 01:21:58 +0000 (02:21 +0100)]
gallium/util: add LATC support

Again, a lot of code is shared with RGTC.

The layout is UTIL_FORMAT_LAYOUT_RGTC, because LATC is just swizzled RGTC.

13 years agomesa: add ATI_texture_compression_3dc
Marek Olšák [Mon, 7 Mar 2011 01:18:49 +0000 (02:18 +0100)]
mesa: add ATI_texture_compression_3dc

LUMINANCE_ALPHA_LATC2 = LUMINANCE_ALPHA_3DC, so this is easy.

Note that there is no specification for 3DC, just a few white papers
from ATI.

13 years agomesa: add EXT_texture_compression_latc
Marek Olšák [Mon, 7 Mar 2011 01:03:52 +0000 (02:03 +0100)]
mesa: add EXT_texture_compression_latc

The encoding/decoding algorithms are shared with RGTC.
Thanks to some magic with the base format, the RGTC texstore functions work
for LATC too.

swrast passes the related piglit tests besides two things:
- The alpha channel is wrong (it's always 1), however the incorrect alpha
  channel makes some other tests fail too, so I guess it's unrelated to LATC.
- Signed LATC fetches aren't correct yet (signed values are clamped to [0,1]),
  however RGTC has the same problem.

Further testing (with other of my patches) shows that hardware drivers
and softpipe work.

BTW, ETQW uses this extension.