Commit Graph

36440 Commits

Author SHA1 Message Date
Ben Skeggs 5b0e5e7389 drm/nvc0: don't un-bind every subchannel on init
The initial values in the grctx are 0x0000 anyway, and re-binding them
all to 0x0000 destroys some init done by the nouveau drm.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-30 12:34:12 +10:00
Marek Olšák 76db330e2c util: add a way to store translated indices to a user memory in u_index_modify
I am about to use the upload buffer in r300g instead.
2010-12-29 18:32:41 +01:00
Marek Olšák 48ed458e87 r300g: support user buffers as constant buffers 2010-12-29 18:32:41 +01:00
Eric Anholt df4d83dca4 i965: Do lowering of array indexing of a vector in the FS.
Fixes a regression in ember since switching to the native FS backend,
and the new piglit tests glsl-fs-vec4-indexing-{2,3} for catching this.
2010-12-28 17:32:20 -08:00
Eric Anholt 54df8e48bc i965: Fix regression in FS comparisons on original gen4 due to gen6 changes.
Fixes 26 piglit cases on my GM965.
2010-12-28 15:35:00 -08:00
Eric Anholt 74dffb39c3 i965: Factor out the ir comparision to BRW_CONDITIONAL_* code. 2010-12-28 14:23:52 -08:00
Vinson Lee f3319561a4 glcpp: Add negative tests for redefintions with valueless macros. 2010-12-27 23:20:35 -08:00
Dave Airlie 17004b3954 tgsi_dump: fix assert due to missing property name. 2010-12-28 16:52:19 +10:00
Marek Olšák 33e0b726e8 r300g: rename aos to vertex arrays 2010-12-28 04:52:36 +01:00
Marek Olšák d9b84017e0 r300g: mark vertex arrays as dirty after a buffer_offset change
We shouldn't hit this bug in theory.

NOTE: This is a candidate for the 7.10 branch.
2010-12-28 04:40:05 +01:00
Zhenyu Wang 689aca7822 i965: Fix occlusion query on sandybridge
Clear target query buffer fixed occlusion query on sandybridge.

https://bugs.freedesktop.org/show_bug.cgi?id=32167
2010-12-28 11:11:40 +08:00
Zhenyu Wang 59fa8600d8 Revert "i965: upload multisample state for fragment program change"
This reverts commit de6fd527a5.

Revert this workaround as it seems the real trouble is caused by
lineloop, which doesn't require GS convert on sandybridge actually.
2010-12-28 09:36:43 +08:00
Kenneth Graunke 6bb1e4541e i965: Internally enable GL_NV_blend_square on ES2.
Hopefully should fix bug #32520.
2010-12-27 15:44:52 -08:00
Christoph Bumiller 0cb6d1a4eb nvc0: reference the vertex buffers 2010-12-27 21:00:40 +01:00
Christoph Bumiller 4fa429c876 nvc0: reenable some shader optimizations
CSE and constants folding.
2010-12-27 20:59:53 +01:00
Christoph Bumiller a10b1c1204 nvc0: use VTX_ATTR for stride 0 vertex attributes 2010-12-27 13:59:43 +01:00
Christoph Bumiller e4349027f6 nvc0: implement VRAM buffer transfers with bounce buffers 2010-12-27 13:57:46 +01:00
Christoph Bumiller abd08f4c01 nvc0: init miptree transfer layer stride 2010-12-27 13:29:10 +01:00
Xiang, Haihao b832ae8a4a i965: don't spawn GS thread for LINELOOP on Sandybridge
LINELOOP is converted to LINESTRIP at the beginning of the 3D pipeline.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=32596
2010-12-27 17:05:58 +08:00
Kenneth Graunke 634a7dce9c i965: Flatten if-statements beyond depth 16 on pre-gen6.
Gen4 and Gen5 hardware can have a maximum supported nesting depth of 16.
Previously, shaders with control flow nested 17 levels deep would
cause a driver assertion or segmentation fault.

Gen6 (Sandybridge) hardware no longer has this restriction.

Fixes fd.o bug #31967.
2010-12-27 00:59:31 -08:00
Kenneth Graunke 9ac6a9b2fa glsl: Support if-flattening beyond a given maximum nesting depth.
This adds a new optional max_depth parameter (defaulting to 0) to
lower_if_to_cond_assign, and makes the pass only flatten if-statements
nested deeper than that.

By default, all if-statements will be flattened, just like before.

This patch also renames do_if_to_cond_assign to lower_if_to_cond_assign,
to match the new naming conventions.
2010-12-27 00:59:31 -08:00
Christoph Bumiller 780fbecc20 nvc0: respond please inline to PIPE_SHADER_CAP_SUBROUTINES 2010-12-23 15:22:00 +01:00
Christoph Bumiller 96def0c314 nvc0: fix layer stride state 2010-12-23 15:21:36 +01:00
Christoph Bumiller 2c20aae233 nvc0: use most defs/decls from nouveau_pushbuf.h 2010-12-23 15:19:22 +01:00
Ben Skeggs 82e0a38eed nvc0: remove unused 'buf' parameter in pipe_buffer_unmap 2010-12-21 06:41:09 +10:00
Ben Skeggs 317a1445c8 nvc0: BEGIN_RING->BEGIN_RING_NI in a couple of places 2010-12-21 06:33:17 +10:00
Ben Skeggs e4e1a85bf8 nvc0: fence.bo is mappable, mark it as such 2010-12-21 06:32:13 +10:00
Ben Skeggs e52ebd6e85 Merge remote branch 'origin/master' into nvc0-new
Conflicts:
	src/gallium/drivers/nouveau/nouveau_winsys.h
2010-12-21 06:30:39 +10:00
Ben Skeggs 5c102dd94f nouveau: fix includes for latest libdrm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-21 06:28:08 +10:00
Jerome Glisse abe9ffc25c r600g: properly unset vertex buffer
Fix bug http://bugs.freedesktop.org/show_bug.cgi?id=32455

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-20 15:33:28 -05:00
Vinson Lee a14f79f801 st/python: remove unused 'buf' parameter in pipe_buffer_unmap
This is a follow-up to commit ec51092a72.

Fixes SCons build.
2010-12-20 11:40:54 -08:00
Marek Olšák ec51092a72 gallium: remove unused 'buf' parameter in pipe_buffer_unmap 2010-12-20 17:42:55 +01:00
Vinson Lee c451aade88 st/mesa: Remove comment cruft from st_context.h.
This was unintentionally added by commit
1525fb4afe.
2010-12-20 01:24:26 -08:00
Vinson Lee 2dd788663a st/mesa: Clean up header file inclusion in st_cb_texture.h. 2010-12-20 01:15:04 -08:00
Vinson Lee 10eb0c39d5 st/mesa: Clean up header file inclusion in st_cb_readpixels.h. 2010-12-20 01:00:26 -08:00
Christoph Bumiller 9f2cf89957 nvc0: s/INLIN_RING/IMMED_RING 2010-12-19 22:53:47 +01:00
Christoph Bumiller 608b3c4432 nvc0: improve shader support for texturing
Fixed shadow and cube texture fetches, add array texture fetches.
2010-12-19 21:49:32 +01:00
Christoph Bumiller ca5deb0c35 nvc0: adapt to array textures interface change 2010-12-19 21:48:39 +01:00
Christoph Bumiller 0f68236a24 Merge remote branch 'origin/master' into nvc0-new 2010-12-19 21:46:33 +01:00
Christoph Bumiller d047168d81 nvc0: fix clipping with scissors/viewport
Also setup optional path to use proper primitive clipping instead,
which is probably slower.
2010-12-19 21:42:00 +01:00
Christoph Bumiller e9de2a31a5 nvc0: use BIND_RING to set subchannel classes 2010-12-19 21:40:24 +01:00
Christoph Bumiller f0f1cce962 nvc0: switch to the proper constants upload path
Makes things suddenly go surprisingly fast.
2010-12-19 21:38:42 +01:00
Christoph Bumiller 99f9a9727c nvc0: add the index buffer offset where missing 2010-12-19 21:33:37 +01:00
Marek Olšák 237880463d r300g: optimize the fallback for misaligned ushort indices 2010-12-19 04:05:34 +01:00
Vinson Lee c87f82bc40 st/mesa: Clean up header file inclusion in st_cb_program.h. 2010-12-18 01:44:52 -08:00
Vinson Lee ac09685d2a st/mesa: Clean up header file inclusion in st_cb_accum.h. 2010-12-18 01:28:18 -08:00
Vinson Lee 488e994ba9 mesa: Clean up header file inclusion in prog_statevars.h. 2010-12-18 01:16:53 -08:00
Dave Airlie aa4d311873 mesa: fix queryobj whitespace.
Had done this before pushing but forgot to amend, doh.
2010-12-18 17:48:21 +10:00
Dave Airlie ff7aa554a1 mesa/swrast/st: add ARB_occlusion_query2 support.
This gets my vote for most pointless extension of all time, I'm guessing
some driver could possibly optimise for this instead of counting it might
just get a true/false, but I'm not really sure.

need this to eventually advertise 3.3 despite its total uselessness.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-18 17:33:25 +10:00
Chia-I Wu 7048095513 mapi: Clean up sources.mk.
Rename MAPI_GLAPI_SOURCES to MAPI_UTIL_SOURCES.  Rename macro
MAPI_GLAPI_CURRENT to MAPI_MODE_UTIL.  Update the comments to make it
clear that mapi may be used in two ways and how.
2010-12-18 15:05:58 +08:00
Chia-I Wu c17d4999f1 mapi: Clean up u_current interface.
Try not to use macros to make u_current.h appear to be glapi.h.  Use
u_current.h to implement glapi.h instead whenever possible.
2010-12-18 15:05:52 +08:00
Chia-I Wu c7119e281b mapi: Add ABI-tag note.
TLS requires kernel >= 2.4.20.  Per glapi.
2010-12-18 14:46:10 +08:00
Kenneth Graunke a954dbeb8c Refresh autogenerated file builtin_function.cpp.
NOTE: The 7.9 and 7.10 branches will need their builtins refreshed too.
Rather than cherry-picking this commit, run 'make builtins'.
2010-12-17 19:40:56 -08:00
Kenneth Graunke d7423a6531 glsl/builtins: Compute the correct value for smoothstep(vec, vec, vec).
These mistakenly computed 't' instead of t * t * (3.0 - 2.0 * t).

Also, properly vectorize the smoothstep(float, float, vec) variants.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2010-12-17 19:29:22 -08:00
José Fonseca 3f94d96fce gallivm: Cleanup util_format_xxx_fetch_xxx call generation.
No need to register function prototypes in the module now that we call
the C function pointer directly -- less LLVM objects lying around.

Limited testing with lp_test_format.
2010-12-17 20:14:31 +00:00
Kenneth Graunke 5c229e5fbd glsl: Expose a public glsl_type::void_type const pointer.
This is analogous to glsl_type::int_type and all the others.
2010-12-17 10:55:17 -08:00
Marek Olšák daffaca53e r300g: finally fix the texture corruption on r3xx-r4xx
Even though a bound texture stays bound when calling set_fragment_sampler_views,
it must be assigned a new cache region depending on the occupancy of other
texture units.

This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28800

Thanks to Álmos <aaalmosss@gmail.com> for finding the bug in the code.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
2010-12-17 13:17:52 +01:00
Kenneth Graunke d0f8eea9a0 Remove OES_compressed_paletted_texture from the ES2 extension list.
We don't support it.
2010-12-16 17:40:50 -08:00
Brian Paul 42a0967a36 softpipe: remove sp_tex_tile_cache_border_color()
With swizzling done at the end of texture sampling, we can greatly
simplify swizzling of the border color.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32460
2010-12-16 18:18:57 -07:00
Brian Paul 9d9f8aba0a softpipe: fix depth texture sampling regression
We need to keep using the pipe_get_tile_swizzle() even though there's
no swizzling because we need to explicitly pass in the surface format.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32459
2010-12-16 17:40:09 -07:00
Brian Paul 3ecf47af12 gallivm: fix copy&paste error from previous commit
Fixes piglit regression, http://bugs.freedesktop.org/show_bug.cgi?id=32452

NOTE: This is a candidate for the 7.10 branch
2010-12-16 14:30:39 -07:00
richard fcc7024afe r600c : inline vertex format is not updated in an app, switch to use vfetch constants. For the 7.9 and 7.10 branches as well. 2010-12-16 15:52:55 -05:00
Eric Anholt 290a1141bc intel: Support glCopyTexImage() from XRGB8888 to ARGB8888.
The only mismatch between the two is that we have to clear the
destination's alpha to 1.0.  Fixes WOW performance on my Ironlake,
from a few frames a second to almost playable.
2010-12-16 10:48:19 -08:00
Eric Anholt ec03b316b4 intel: Try to sanely check that formats match for CopyTexImage.
Before, we were going off of a couple of known (hopeful) matches
between internalFormats and the cpp of the read buffer.  Instead, we
can now just look at the gl_format of the two to see if they match.
We should avoid bad blits that might have been possible before, but
also allow different internalFormats to work without having to
enumerate each one.
2010-12-16 10:48:19 -08:00
Eric Anholt e65c643792 intel: Drop commented intel_flush from copy_teximage.
The blit that follows appears in the command stream so it's serialized
with previous rendering.  Any queued vertices in the tnl layer were
already flushed up in mesa/main/.
2010-12-16 10:48:19 -08:00
Eric Anholt 99c7840b0c intel: Update renderbuffers before looking up CopyTexImage's read buffer.
Not fixing a particular bug, just noticed by code inspection.
2010-12-16 10:48:19 -08:00
Brian Paul ee16e97ed1 gallivm: work around LLVM 2.6 bug when calling C functions
Create a constant int pointer to the C function, then cast it to the
function's type.  This avoids using trampoline code which seem to be
inadvertantly freed by LLVM in some situations (which leads to segfaults).
The root issue and work-around were found by José.

NOTE: This is a candidate for the 7.10 branch
2010-12-16 10:19:16 -07:00
Brian Paul b7e150605d draw: s/varient/variant/ 2010-12-16 10:18:24 -07:00
Brian Paul 2bd9b386e6 svga: s/varient/variant/ 2010-12-16 10:18:24 -07:00
Brian Paul bd75e4b8be i965g: s/varient/variant/ 2010-12-16 10:18:24 -07:00
Brian Paul a185d439bd i915g: s/varient/variant/ 2010-12-16 10:18:24 -07:00
Brian Paul f3955f6fcd softpipe: s/varient/variant 2010-12-16 10:18:23 -07:00
Brian Paul aa5ba96d29 st/mesa: s/varient/variant 2010-12-16 10:18:23 -07:00
Eric Anholt c52adfc2e1 i965: Set the alternative floating point mode on gen6 VS and WM.
This matches how we did the math instructions pre-gen6, though it
applies to non-math as well.

Fixes vp1-LIT test 2 (degenerate case: 0 ^ 0 -> 1)
2010-12-16 09:01:14 -08:00
Shuang He 2bd11ea119 i915: Fix INTEL_DEBUG=wm segmentation fault
The program should be disassembled after it's uploaded
2010-12-16 09:01:14 -08:00
Jakob Bornecrantz 23aa3c552c svga, glhd: Remove incorrect assert and add note
Stride can be lower then the size of the attribute.
But should probably be aligned to component size atleast for floats.
2010-12-16 09:44:02 +01:00
Jakob Bornecrantz 1138775d79 svga: Minor debug text fix 2010-12-16 09:44:02 +01:00
Jakob Bornecrantz c28debbf6f svga: Remove debug print in winsys 2010-12-16 09:44:02 +01:00
Jakob Bornecrantz 486da2cfc0 svga: Correct spelling in swtnl backend 2010-12-16 09:44:01 +01:00
Jakob Bornecrantz d7ff6dd09c svga: Fix newline at EOF 2010-12-16 09:36:51 +01:00
Jakob Bornecrantz f75549a9d8 svga: Add Galahad and Softpipe to scons build 2010-12-16 08:53:26 +01:00
Jakob Bornecrantz 0967d77a9a wrapper: Flush pipe on unmap
For drivers that does DMA transfers instead of mapping directly
2010-12-16 08:53:26 +01:00
Jakob Bornecrantz 8b60bf4e9f wrapper: Fix width and height given to map and remove uneeded fields 2010-12-16 08:53:26 +01:00
Jakob Bornecrantz b7a73c72a6 i915g: Ignore color0 writes all cbufs tgsi property 2010-12-27 00:18:55 +01:00
Chia-I Wu 9f2062fb12 st/egl: Fix eglChooseConfig when configs is NULL.
When configs is NULL, the app wants to know the number of matching
configs.
2010-12-26 23:35:50 +08:00
Vinson Lee aa68dd9a49 swrast: Clean up header file inclusion in ss_vb.h. 2010-12-25 20:53:27 -08:00
Vinson Lee da0bdc7cd5 swrast: Clean up header file inclusion in ss_triangle.h. 2010-12-25 20:48:29 -08:00
Vinson Lee 77d1d35163 swrast: Clean up header file inclusion in s_texfilter.h. 2010-12-25 20:28:17 -08:00
Vinson Lee 06fa986112 swrast: Clean up header file inclusion in s_texcombine.h. 2010-12-25 20:12:06 -08:00
Vinson Lee 77aaaf5fd5 swrast: Clean up header file inclusion in s_masking.h. 2010-12-25 20:03:33 -08:00
Vinson Lee 8ca0aca8dd nvfx: Remove unused variable.
Fixes this GCC warning.
nvfx_vbo.c: In function 'nvfx_idxbuf_emit':
nvfx_vbo.c:410: warning: unused variable 'eng3d'
2010-12-25 19:09:54 -08:00
Xavier Chantry 5f0f9f0486 nvfx: restore BEGIN_RING usage
Michel Hermier reported libdrm segfault (and kernel crash) on nv40 using
gallium :
http://www.mail-archive.com/nouveau@lists.freedesktop.org/msg06563.html

It turns out these were caused by some missing WAIT_RING (or wrong
computation of the WAIT_RING sizes). Unlike all other libdrm_nouveau users,
nvfx gallium tried to use a mininum calls of WAIT_RING, one WAIT_RING could
apply to many methods for different code paths and spread across several
functions. This made it too tricky to find out what the missing or wrong
WAIT_RING was.

By restoring BEGIN_RING, we force one WAIT_RING per method, and it's much
easier to check if the free size required in the pushbuffer is correct.  As
curro said, "let's keep it simple for the maintainers until the big
bottlenecks are gone"

Benchmarked on nv35 with openarena, nexuiz and ut2004 and no performance
regression.

The core of this patch was made with Coccinelle, with minor manual fixes
made on top.

Tested-by: Michel Hermier <hermier@frugalware.org>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-12-25 20:37:39 +01:00
Eric Anholt b01b73c482 intel: Only do frame throttling at glFlush time when using frontbuffer.
This is the hack for input interactivity of frontbuffer rendering
(like we do for backbuffer at intelDRI2Flush()) by waiting for the n-2
frame to complete before starting a new one.  However, for an
application doing multiple contexts or regular rebinding of a single
context, this would end up lockstepping the CPU to the GPU because
every unbind was considered the end of a frame.

Improves WOW performance on my Ironlake by 48.8% (+/- 2.3%, n=5)
2010-12-25 09:06:52 -08:00
Marek Olšák b606c8a015 r300g: simplify buffer_transfer_inline_write 2010-12-25 16:07:13 +01:00
Marek Olšák 7e752760d4 r300g: simplify the code for buffer uploads 2010-12-25 16:07:13 +01:00
Marek Olšák 9c448817f7 r300g: user index buffers are always aligned 2010-12-25 16:07:13 +01:00
Marek Olšák b10bff1135 r300g: increase the size of upload buffers 2010-12-25 16:07:13 +01:00
Vinson Lee ecc6b7c002 swrast: Clean up header file inclusion in s_logic.h. 2010-12-24 20:43:35 -08:00
Vinson Lee 8dfeb98eb1 swrast: Clean up header file inclusion in s_fragprog.h. 2010-12-24 20:34:53 -08:00
Vinson Lee 3e2ea145b1 swrast: Clean up header file inclusion in s_span.h. 2010-12-24 20:17:18 -08:00
Vinson Lee 7d5f5d3843 swrast: Clean up header file inclusion in s_fog.h. 2010-12-24 20:11:44 -08:00
Vinson Lee ec891d78a0 swrast: Clean up header file inclusion in s_depth.h. 2010-12-24 20:06:11 -08:00
Vinson Lee b3c59acca6 swrast: Clean up header file inclusion in s_blend.h. 2010-12-24 19:55:42 -08:00
Vinson Lee c9a0e25919 swrast: Clean up header file inclusion in s_atifragshader.h. 2010-12-24 19:47:54 -08:00
Vinson Lee eadb90f045 swrast: Clean up header file inclusion in s_alpha.h. 2010-12-24 19:30:38 -08:00
Vinson Lee ebe95d3796 swrast: Clean up header file inclusion in s_accum.h. 2010-12-24 19:25:30 -08:00
Vinson Lee 775e373dd9 swrast: Clean up header file inclusion in s_aatriangle.h. 2010-12-24 18:48:00 -08:00
Vinson Lee d59075303a swrast: Clean up header file inclusion in s_aaline.h. 2010-12-24 18:35:10 -08:00
Vinson Lee 499c77edf1 st/mesa: Clean up header file inclusion in st_mesa_to_tgsi.h. 2010-12-24 18:27:55 -08:00
Vinson Lee b20dac4e2d st/mesa: Clean up header file inclusion in st_gen_mipmap.h. 2010-12-24 18:06:20 -08:00
Marek Olšák 88550083b3 r300g/swtcl: re-enable LLVM
Based on a patch from Drill <drill87@gmail.com>.

NOTE: This is a candidate for the 7.10 branch.
2010-12-24 18:38:03 +01:00
Henri Verbeet 8fc6c5fb36 r600g: r600_blit_uncompress_depth() can't fail. 2010-12-24 11:41:26 +01:00
Henri Verbeet 878519b73e r600g: Get rid of r600_blit_uncompress_depth_ptr. 2010-12-24 11:41:25 +01:00
Chia-I Wu a91a337a7d mapi: Move mapi_func typedef to entry.h.
Make it clear that entry.h does not depend on stub.h.
2010-12-24 17:33:50 +08:00
Chia-I Wu a33e9f049d mapi: Define MAPI_TMP_DEFINES only when needed.
Since struct mapi_table is opaque, MAPI_TMP_DEFINES is not needed in
table.h.
2010-12-24 17:33:49 +08:00
Chia-I Wu e6a7ef3ca6 mapi: Add and use entry_get_public.
Given a dispatch slot, entry_get_public returns the address of the
corresponding public entry point.  There may be more than one of them.
But since they are all equivalent, it is fine to return any one of them.

With entry_get_public, the address of any public entry point can be
calculated at runtime when an assembly dispatcher is used.  There is no
need to have a mapping table in such case.  This omits the unnecessary
relocations from the binary.
2010-12-24 17:33:49 +08:00
Chia-I Wu 897bff6773 mapi: Make struct mapi_stub opaque.
Add accessors for struct mapi_stub and make it opaque.
2010-12-24 17:28:52 +08:00
Chia-I Wu 0c205484bf mapi: Allow blocks to be disabled from the output.
For example, a printer may ask not to output noop dispatch table.
2010-12-24 17:28:52 +08:00
Chia-I Wu b765b1269f mapi: Fix hidden entries.
Hidden entries are just like normal entries except that they are not
exported.  Since it is not always possible to hide them, and two hidden
aliases can share the same entry, the name of hidden aliases are mangled
to '_dispatch_stub_<slot>'.
2010-12-24 17:28:52 +08:00
Chia-I Wu 52ca153349 mapi: Add "handcode" attribute to the script.
Entries with handcode attribute will be handled normally, except no
entry point will be generated for them.
2010-12-24 17:28:52 +08:00
Chia-I Wu 8eee1d522e mapi: Minor ABIPrinter refactoring.
Split out function name generation from _c_decl to _c_function, and use
it everywhere.  Add an optional 'export' argument to _cdecl.  It is
prepended to the returned string.
2010-12-24 17:28:51 +08:00
Chia-I Wu 86d29eab48 mapi: Store alias entry instead of alias name.
An entry can hold more info than plain name.
2010-12-24 17:28:51 +08:00
Dave Airlie 876effb0e7 r600g: hack around property unknown issues.
should fix https://bugs.freedesktop.org/show_bug.cgi?id=32619

Need to add proper support for properties later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-24 17:34:40 +10:00
Dave Airlie ac38ad6156 r300g: turn back on rv530 hiz.
still needs RADEON_HYPERZ=y env var.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-24 15:46:12 +10:00
Dave Airlie 7a5fac56b2 r300g: hyperz fixing typo.
Really no idea why I didn't see this before, but these values were opposite
the register spec.

this seems to fix rv530 HiZ on my laptop, will reenable in next commit.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-24 15:46:11 +10:00
Vinson Lee a57e2c436b mesa: Assert format is not MESA_FORMAT_COUNT in _mesa_format_to_type_and_comps.
The case of format being MESA_FORMAT_COUNT should never occur.
2010-12-23 18:19:42 -08:00
Xiang, Haihao dc987adc9f i965: use align1 access mode for instructions with execSize=1 in VS
All operands must be 16-bytes aligned in aligh16 mode. This fixes l_xxx.c
in oglconform.
2010-12-24 09:51:44 +08:00
Xiang, Haihao 8249321604 i965: fix register region description
This fixes
 brw_eu_emit.c:179: validate_reg: Assertion `width == 1' failed.
2010-12-24 09:51:22 +08:00
Vinson Lee 1039f36c47 r600g: Rearrange print order of outputs of R600_ERR. 2010-12-23 17:26:36 -08:00
Vinson Lee 38eff56f7e mesa: Assert _mesa_DeleteFragmentShaderATI doesn't ever free static DummyShader. 2010-12-23 16:44:42 -08:00
Vinson Lee 7f178ffbf1 st/egl: Remove unnecessary header. 2010-12-23 16:23:53 -08:00
Vinson Lee 070f5da96d libgl-xlib: Remove unnecessary header. 2010-12-23 16:19:11 -08:00
Vinson Lee 075a807f43 r300g: Remove unnecessary header. 2010-12-23 16:05:28 -08:00
Dave Airlie aaccb73276 tgsi_text: just parse as an integer (value is a boolean).
fixes warning reported by vlee on irc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-24 09:29:19 +10:00
Vinson Lee 0b76255714 mapi: Remove unnecessary header. 2010-12-23 15:25:38 -08:00
Vinson Lee bf4dffb8ef intel: Remove unnecessary headers. 2010-12-23 15:08:53 -08:00
Dave Airlie 4e52e8f746 r300g: add support for color0 writes to all bound color buffers.
Thanks to Marek Olšák for making my initial attempt actually work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-24 07:19:58 +10:00
Dave Airlie 07498075b5 mesa/st: set the color write cbuf property for fragColor writes 2010-12-24 07:19:58 +10:00
Dave Airlie 2f4860f2ab softpipe: add support for color writes all color bufs property 2010-12-24 07:19:57 +10:00
Dave Airlie c9c8a5ed02 gallium: add fragment shader property for color writes to all buffers. (v2)
For GL fragColor semantics we need to tell the pipe drivers that the fragment
shader color result is to be replicated to all bound color buffers, this
adds the basic TGSI + documentation.

v2: fix missing comma pointed out by Tilman on mesa-dev.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-24 07:19:57 +10:00
Vinson Lee eccffe2328 i965: Remove unnecessary headers. 2010-12-23 11:54:29 -08:00
Vinson Lee 280750c5ca mesa: Fix #ifdef typo in _mesa_format_to_type_and_comps.
According to the comment, the warning should be for debug builds.
2010-12-23 11:32:16 -08:00
Marek Olšák aedbf05d31 r300g: use a simpler fallback for misaligned ushort indices with triangles
If 'start' is odd, render the first triangle with indices embedded
in the command stream, which adds 3 to 'start' and makes it even.
Then continue with the fast path.
2010-12-23 16:54:59 +01:00
Marek Olšák c420c0e7d6 r300g: add support for B2G3R3 texturing 2010-12-23 16:54:59 +01:00
Marek Olšák bf7b6f60ae mesa: fix texel store functions for some float formats
These are copy-paste errors obviously.
2010-12-23 16:54:58 +01:00
Marek Olšák 4a710469e0 st/mesa: do not require all texture formats to be renderable
This is a bandaid on the problem that if some formats were not renderable
(like luminance_alpha), st/mesa fell back to some RGBA format, so basically
some non-renderable formats were actually not used at all. This is only
a problem with hardware drivers, softpipe can render to anything.

Instead, require only RGB8/RGBA8 to be renderable.
2010-12-23 16:54:58 +01:00
Marek Olšák 998657112b st/mesa: use the formats RGB233, ARGB2101010, AL44, AL1616, A16, L16, I16 2010-12-23 16:54:58 +01:00
Marek Olšák a780490374 gallium: add new formats L16A16_UNORM, A16_UNORM, I16_UNORM, B2G3R3_UNORM 2010-12-23 16:54:58 +01:00
Marek Olšák fd8aa7ac71 mesa: implement new texture format I16 2010-12-23 16:54:58 +01:00
Marek Olšák bb5ace68ce mesa: implement new texture format L16 2010-12-23 16:54:58 +01:00
Marek Olšák eb31837a0d mesa: implement new texture format A16 2010-12-23 16:54:58 +01:00
Marek Olšák bae9d511f3 mesa: implement new texture format AL44
Radeon GPUs can do this. R600 can even do render-to-texture.
Packing and extracting aren't implemented, but we shouldn't hit them (I think).
Tested with swrast, softpipe, and r300g.
2010-12-23 16:54:58 +01:00
Marek Olšák 621e5254ef mesa: implement new texture format ARGB2101010
Radeon GPUs do support GL_RGB10_A2.
2010-12-23 16:54:58 +01:00
Marek Olšák 0a7b60f7ed st/mesa: if Z32 is unsupported, prefer Z24 to Z16 2010-12-23 16:54:58 +01:00
Marek Olšák 888e59fce8 st/mesa: use RGBA16 for RGB12 and RGB16
To provide enough precision if a user wants it.
2010-12-23 16:54:58 +01:00
Marek Olšák 3f9e78ac39 st/mesa: use DXT SRGB formats for COMPRESSED_SRGB
And also check if the formats are supported to return something meaningful
if compression cannot be used.
2010-12-23 16:54:57 +01:00
Eric Anholt bf15ad3782 i965: Keep around a copy of the VS constant surface dumping code.
Just like everywhere else, I never trust my constant uploads to
correctly put constants in the right places, even though that's so
rarely where the issue is.
2010-12-23 01:32:44 -08:00
Eric Anholt 5dc53444c8 i965: Correct the dp_read message descriptor setup on g4x.
It's mostly like gen4 message descriptor setup, except that the sizes
of type/control changed to be like gen5.  Fixes 21 piglit cases on
gm45, including the regressions in bug #32311 from increased VS
constant buffer usage.
2010-12-23 01:32:43 -08:00
Zhenyu Wang de6fd527a5 i965: upload multisample state for fragment program change
This makes conformance tests stable on sandybridge D0 to track
multisample state before SF/WM state.
2010-12-23 17:30:03 +08:00
Zhenyu Wang 845d651cf6 i965: Use MI_FLUSH_DW for blt ring flush on sandybridge
Old MI_FLUSH command is deprecated on sandybridge blt.
2010-12-23 17:29:46 +08:00
Vinson Lee 1e7bfcc707 st/mesa: Remove unnecessary header. 2010-12-23 01:03:32 -08:00
Vinson Lee 492afbce18 gallivm: Disable MMX-disabling code on llvm-2.9.
The disable-mmx option was removed in llvm-2.9svn by revisions 122188
and 122189.

Fixes FDO bug 32564.
2010-12-22 19:56:10 -08:00
Vinson Lee adaa310e39 gallivm: Fix 'cast from pointer to integer of different size' warning.
Fixes this GCC warning.
lp_bld_const.h: In function 'lp_build_const_int_pointer':
lp_bld_const.h:137: warning: cast from pointer to integer of different size
2010-12-22 16:48:19 -08:00
Vinson Lee 38c8b034e2 i915g: Remove unnecessary header. 2010-12-22 00:57:52 -08:00
Vinson Lee 442fcd0620 llvmpipe: Remove unnecessary headers. 2010-12-22 00:55:41 -08:00
Vinson Lee 013fc33462 r300g: Remove unnecessary headers. 2010-12-22 00:52:05 -08:00
Vinson Lee f39d0c791a svga: Remove unnecessary header. 2010-12-22 00:42:23 -08:00
Vinson Lee a91128030e st/vega: Remove unnecessary headers. 2010-12-22 00:38:42 -08:00
Henri Verbeet ca8b4ca478 r600g: Remove the unused "pframebuffer" field from r600_pipe_context. 2010-12-22 09:19:48 +01:00
Henri Verbeet 2fd718d560 r600g: r600_new() and r600_delete() are unused. 2010-12-22 09:19:48 +01:00
Zhenyu Wang 4374703a9b i965: explicit tell header present for fb write on sandybridge
Determine header present for fb write by msg length is not right
for SIMD16 dispatch, and if there're more output attributes, header
present is not easy to tell from msg length. This explicitly adds
new param for fb write to say header present or not.

Fixes many cases' hang and failure in GL conformance test.
2010-12-22 11:08:51 -05:00
Chia-I Wu 445cb9e53b st/egl: Assorted fixes for dri2_display_get_configs.
Set window_bit only when the visual id is greater than zero.  Correct
visual types.  Skip slow configs as they are not relevant.  Finally, do
not return duplicated configs.
2010-12-22 16:05:27 +08:00
Alex Deucher 341d048e45 r600g: remove useless switch statements
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-12-22 01:30:41 -05:00
Chia-I Wu a31e2e3312 st/egl: Fix eglCopyBuffers.
Flush before presenting.
2010-12-22 14:21:47 +08:00
Chia-I Wu 18bc427ade st/egl: Plug pbuffer leaks.
Unreference validated resources or remove unnecessary validations.
2010-12-22 14:12:33 +08:00
Chia-I Wu 0fb2dcc98f st/egl: Allow single-buffered pixmaps.
All single-buffered configs were ignored before to make sure
EGL_RENDER_BUFFER is settable for window surfaces.  It is better to
allow single-buffered configs and set EGL_WINDOW_BIT only for
double-buffered ones.  This way there can be single-buffered pixmaps.
2010-12-22 14:12:33 +08:00
Dave Airlie f431e0452b r600g: drop unused code in evergreen.
this code was pretty much duplicated, thanks to Henri Verbeet on irc for
pointing it out.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-22 15:58:29 +10:00
Chia-I Wu 975b7ef92a st/egl: Remove native_config::samples.
Multisample buffers are never requested.
2010-12-22 13:22:36 +08:00
Chia-I Wu 3a93c34828 st/egl: Remove native_config::slow_config.
In direct rendering scenario, it is not needed until an EGLDisplay can
support both HW and SW pipe screens.
2010-12-22 13:22:36 +08:00
Chia-I Wu 0364c08d7f st/egl: Remove unnecessary egl_g3d_find_pixmap_config.
It was used to find a compatible config for a given pixmap.  Now that a
config is optional for pixmap surface creation, the function is not
needed.
2010-12-22 13:22:36 +08:00
Chia-I Wu af767ee113 st/egl: Make config optional for create_pixmap_surface.
eglCopyBuffers or EGL_KHR_image_pixmap require creating a pixmap surface
without a config.  Make it just work without relying on
is_pixmap_supported.
2010-12-22 13:22:36 +08:00
Dave Airlie 2dd189a824 r600g: fix evergreen segfaults.
evergreen was crashing running even gears here.

This is a 7.10 candidate if its broken the same.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-22 14:54:17 +10:00
Marek Olšák cb4f367b26 r300g: fix precision issues with B10G10R10A2 2010-12-22 03:39:37 +01:00
Marek Olšák 2a95542088 r300g: support B10G10R10A2 render targets only with DRM 2.8.0 or later versions 2010-12-22 03:39:37 +01:00
Eric Anholt 4fe78d3e12 i965: Avoid using float type for raw moves, to work around SNB issue.
The SNB alt-mode math does the denorm and inf reduction even for a
"raw MOV" like we do for g0 message header setup, where we are moving
values that aren't actually floats.  Just use UD type, where raw MOVs
really are raw MOVs.

Fixes glxgears since c52adfc2e1, but no
piglit tests had regressed(!)
2010-12-21 13:06:15 -08:00
Jerome Glisse fa62cf7450 r600g: avoid segfault
Candidates 7.10

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-21 10:51:32 -05:00
Chris Wilson 8b9570e685 intel: Check for unsupported texture when finishing using as a render target
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32541
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-21 11:58:35 +00:00
Vinson Lee c1f0f90a97 st/mesa: Clean up header file inclusion in st_format.h. 2010-12-21 01:25:04 -08:00
Vinson Lee 3d03b4d839 st/mesa: Clean up header file inclusion in st_draw.h. 2010-12-21 01:17:37 -08:00
Ben Skeggs 57dcd800ca nvfx: fix fragprog word swapping on big-endian machines
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-16 11:13:21 +10:00
Jerome Glisse dbb679e51d gallium: properly check for src->dst blit compatibilities
Spotted by Christoph Bumiller & Jose Fonseca

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-15 15:29:31 -05:00
Fredrik Höglund 66f55de31e r600g: fix pow(0, 0) evaluating to NaN
We have to use the non-IEEE compliant version of MUL here, since
log2(0) is -inf, and 0 * -inf is NaN in IEEE arithmetic.

candidates for 7.10 branch
2010-12-15 14:07:00 -05:00
Jerome Glisse 3861a1001c r600g: need to reference upload buffer as the might still live accross flush
Can't get away from referencing upload buffer as after flush a vertex buffer
using the upload buffer might still be active. Likely need to simplify the
pipe_refence a bit so we don't waste so much cpu time in it.

candidates for 7.10 branch

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-15 12:07:09 -05:00
Brian Paul a8ca30bc58 st/mesa: fix incorrect prev pointer in destroy_program_variants() 2010-12-14 14:15:22 -07:00
Brian Paul c62bb90d6a softpipe: do texture swizzle during texture sampling
Instead of when we read texture tiles.  Now swizzling happens after
the shadow depth compare step.  This fixes the piglit glsl-fs-shadow2d*
tests (except for proj+bias because of a GLSL bug).
2010-12-14 13:01:03 -07:00
Brian Paul be2aa81f5f mesa: more program debug code 2010-12-14 12:46:01 -07:00
Brian Paul 2a77c3cc0b tgsi: document texture opcodes 2010-12-14 12:45:36 -07:00
Brian Paul bb10e081c8 glsl: new glsl_strtod() wrapper to fix decimal point interpretation
We always want to use '.' as the decimal point.

See http://bugs.freedesktop.org/show_bug.cgi?id=24531

NOTE: this is a candidate for the 7.10 branch.
2010-12-14 12:38:38 -07:00
Brian Paul dfbc20593e gallivm: do texture swizzle after shadow compare
We need to swizzle after the shadow comparison so that the GL_DEPTH_MODE
functionality is handled properly.

This fixes all the piglit glsl-fs-shadow2d*.shader_test cases, except
for glsl-fs-shadow2dproj-bias.shader_test which fails because of a
bug in the GLSL compiler (fd.o 32395).
2010-12-14 12:17:10 -07:00
Brian Paul 68c41a25b4 st/mesa: rename the varient release functions 2010-12-14 12:17:10 -07:00
Jerome Glisse 54773415f4 r600g: fix segfault when translating vertex buffer
Note the support for non float vertex draw likely regressed need to
find what we want to do there.

candidates for 7.10 branches

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-14 13:50:46 -05:00
Vinson Lee 4d1b2df6c0 mesa: Clean up header file inclusion in prog_optimize.h. 2010-12-14 00:39:57 -08:00
Vinson Lee 2c582dd25f mesa: Clean up header file inclusion in prog_cache.h. 2010-12-14 00:30:24 -08:00
Vinson Lee 71af07bf40 mesa: Clean up header file inclusion in nvvertparse.h. 2010-12-14 00:22:27 -08:00
Eric Anholt c27285610c i965: Add support for using the BLT ring on gen6. 2010-12-13 19:41:58 -08:00
Eric Anholt d88aa6fe3e i965: Improve the hacks for ARB_fp scalar^scalar POW on gen6.
This is still awful, but my ability to care about reworking the old
backend so we can just get a temporary value into a POW is awfully low
since the new backend does this all sensibly.

Fixes:
fp1-LIT test 1
fp1-LIT test 3 (case x < 0)
fp1-POW test (exponentiation)
fp-lit-mask
2010-12-13 16:47:57 -08:00
Brian Paul 43b7b9d02a st/mesa: 80-columns wrapping, whitespace fixes in st_cb_bitmap.c 2010-12-13 17:34:07 -07:00
Brian Paul c21807d2f7 st/mesa: add geom program code in destroy_program_variants() 2010-12-13 17:29:56 -07:00
Brian Paul b830b62a47 st/mesa: program struct comments 2010-12-13 17:28:02 -07:00
Brian Paul 4312569410 st/mesa: use st_fragment_program() instead of cast 2010-12-13 17:25:29 -07:00
Brian Paul 6c669d0c07 st/mesa: rename variable 2010-12-13 17:25:10 -07:00
Brian Paul 83d50c3ee1 st/mesa: minor re-indenting 2010-12-13 17:20:56 -07:00
Brian Paul 8d8e9491df st/mesa: make st_delete_program() static 2010-12-13 17:20:56 -07:00
Brian Paul 9b4433fe58 st/mesa: add comments, fix formatting in st_cb_program.c 2010-12-13 17:20:56 -07:00
Brian Paul 3d203b6100 Squashed commit of the following (st-mesa-per-context-shaders branch):
commit 4f106f44a32eaddb6cf3fea6ba5ee9787bff609a
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Dec 13 14:06:08 2010 -0700

    st/mesa: reorganize vertex program translation code

    Now it looks like the fragment and geometry program code.
    Also remove the serial number fields from programs.  It was used to
    determine when new translations were needed.  Now the variant key is
    used for that.  And the st_program_string_notify() callback removes all
    variants when the program's code is changed.

commit e12d6791c5e4bff60bb2e6c04414b1b4d1325f3e
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Dec 13 13:38:12 2010 -0700

    st/mesa: implement geometry shader varients

    Only needed in order to support per-context gallium shaders.

commit c5751c673644808ab069259a852f24c4c0e92b9d
Author: Brian Paul <brianp@vmware.com>
Date:   Sun Dec 12 15:28:57 2010 -0700

    st/mesa: restore glDraw/CopyPixels using new fragment program variants

    Clean up the logic for fragment programs for glDraw/CopyPixels.  We now
    generate fragment program variants for glDraw/CopyPixels as needed which
    do texture sampling, pixel scale/bias, pixelmap lookups, etc.

commit 7b0bb99bab6547f503a0176b5c0aef1482b02c97
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Dec 10 17:03:23 2010 -0700

    st/mesa: checkpoint: implement fragment program variants

    The fragment programs variants are per-context, as the vertex programs.

    NOTE: glDrawPixels is totally broken at this point.

commit 2cc926183f957f8abac18d71276dd5bbd1f27be2
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Dec 10 14:59:32 2010 -0700

    st/mesa: make vertex shader variants per-context

    Gallium shaders are per-context but OpenGL shaders aren't.  So we need
    to make a different variant for each context.

    During context tear-down we need to walk over all shaders/programs and
    free all variants for the context being destroyed.
2010-12-13 17:20:53 -07:00
Brian Paul bb7c2691d2 mesa, st/mesa: disable GL_ARB_geometry_shader4
The new GLSL compiler doesn't support geom shaders yet so disable the
GL_ARB_geometry_shader4 extension.  Undo this when geom shaders work again.

NOTE: This is a candidate for the 7.10 branch.
2010-12-13 17:02:48 -07:00
Ian Romanick 2d577ee730 ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors
This is the same as what the array dereference handler does.

Fixes piglit test glsl-link-struct-array (bugzilla #31648).

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2010-12-13 15:47:56 -08:00
Ian Romanick cb2b547a47 linker: Allow built-in arrays to have different sizes between shader stages
Fixes pitlit test glsl-link-varying-TexCoord (bugzilla #31650).
2010-12-13 15:16:39 -08:00
Eric Anholt 036c817f77 i965: Fix gl_FragCoord.z setup on gen6.
Fixes glsl-bug-22603.
2010-12-13 14:02:34 -08:00
Eric Anholt 5fbd8da8df i956: Fix the old FP path fragment position setup on gen6.
Fixes fp-arb-fragment-coord-conventions-none
2010-12-13 14:02:34 -08:00
Eric Anholt 7cec7bf56c i965: Fix ARL to work on gen6.
RNDD isn't one of the instructions that can do conversion from
execution type to destination type.

Fixes glsl-vs-arrays-3.
2010-12-13 14:02:34 -08:00
Eric Anholt df9f891544 intel: Include stdbool so we can stop using GLboolean when we want to.
This requires shuffling the driconf XML macros around, since they use
true and false tokens expecting them to not get expanded to anything.
2010-12-13 14:02:34 -08:00
Brian Paul b363dd43d6 gallivm: store callbacks in a linked list rather than fixed size array
Should fix http://bugs.freedesktop.org/show_bug.cgi?id=32308
2010-12-13 11:47:28 -07:00
Brian Paul 6577f753b2 tnl: a better way to initialize the gl_program_machine memory
This improves commit ef3f7e61b3

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2010-12-13 08:11:58 -07:00
Alex Deucher 4523285e51 r600g: fix rendering with a vertex attrib having a zero stride
The hardware supports zero stride just fine.  This is a port
of 2af8a19831 from r300g.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-12-12 23:35:37 -05:00
Dave Airlie d19b5cbd31 r300g: fixup rs690 tiling stride alignment calculations.
The RS690 memory controller prefers things to be on a different
boundary than the discrete GPUs, we had an attempt to fix this,
but it still failed, this consolidates the stride calculation
into one place and removes the really special case check.

This fixes gnome-shell and 16 piglit tests on my rs690 system.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-13 11:29:21 +10:00
Chia-I Wu d6b1478ff0 egl: Do not unload drivers.
When the driver is the last reference to libEGL.so, unloading it will
cause libEGL.so to be unmapped and give problems.  Disable the unloading
for now.  Still have to figure out the right timing to unload drivers.
2010-12-12 18:31:48 +08:00
Chia-I Wu 1c01bedb02 mapi: Fix a warning in !THREADS build.
It should be u_thread_self, not _glthread_GetID.
2010-12-12 17:59:47 +08:00
Vinson Lee bf8242684a mesa: Clean up header file inclusion in nvfragparse.h. 2010-12-11 14:37:18 -08:00
Vinson Lee 7d8c067460 mesa: Clean up header file inclusion in ir_to_mesa.h. 2010-12-11 13:30:13 -08:00
Christoph Bumiller 5138ac033a nvc0: support user clip planes 2010-12-11 16:24:27 +01:00
Christoph Bumiller 67d0c3dd79 nvc0: enable vertex color clamping 2010-12-11 16:24:21 +01:00
Marek Olšák 2af8a19831 r300g: fix rendering with a vertex attrib having a zero stride
The hardware apparently does support a zero stride, so let's use it.

This fixes missing objects in ETQW, but might also fix a ton of other
similar-looking bugs.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
2010-12-11 14:49:28 +01:00
Marek Olšák c398f1544e tgsi: fix rbug compile error
../mesa/src/gallium/auxiliary/tgsi/tgsi_parse.h:139:
error: dereferencing pointer ‘tokens.25’ does break strict-aliasing rules

Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-12-11 13:37:57 +01:00
Marek Olšák d0990db6bd r300/compiler: fix swizzle lowering with a presubtract source operand
If a source operand has a non-native swizzle (e.g. the KIL instruction
cannot have a swizzle other than .xyzw), the lowering pass uses one or more
MOV instructions to move the operand to an intermediate temporary with
native swizzles.

This commit fixes that the presubtract information was lost during
the lowering.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
2010-12-11 13:37:57 +01:00
Marek Olšák 9e1fbd3d6e r300/compiler: fix LIT in VS
This fixes broken rendering of trees in ETQW. The trees still disappear
for an unknown reason when they are close.

Broken since:
2ff9d4474b
r300/compiler: make lowering passes possibly use up to two less temps

NOTE: This is a candidate for the 7.10 branch.
2010-12-11 07:32:24 +01:00
Ian Romanick d7f27e2e76 glsl: Inherrit type of declared variable from initializer after processing assignment
do_assignment may apply implicit conversions to coerce the base type
of initializer to the base type of the variable being declared.  Fixes
piglit test glsl-implicit-conversion-02 (bugzilla #32287).  This
probably also fixes bugzilla #32273.

NOTE: This is a candidate for the 7.9 branch and the 7.10 branch.
2010-12-10 17:52:35 -08:00
Ian Romanick ec53010c4d glsl: Minor clean-up in validate_assignment
This code has been changed around a lot, and there were some temporary
variables left around from previous versions.
2010-12-10 17:52:35 -08:00
Eric Anholt 783e7caadf i965: Put common info on converting MESA_FORMAT to BRW_FORMAT in a table.
There are exceptions to the table for depth texturing or rendering to
not-quite-supported formats thanks to the non-orthogonal component
selection for surface formats, but it's still a lot simpler.
2010-12-10 16:17:01 -08:00
Eric Anholt be72efb4f2 intel: Just use ChooseTextureFormat for renderbuffer format choice.
One less place to forget to put your new MESA_FORMAT support in.
2010-12-10 16:16:13 -08:00
Eric Anholt e339b669a1 intel: Add a couple of helper functions to reduce rb code duplication. 2010-12-10 15:37:16 -08:00
Eric Anholt 28bab24e16 intel: Add spans code for the ARB_texture_rg support.
This starts spantmp2.h down the path of using MESA_FORMAT_* for
specifying the format instead of the crazy GL format/type combo.
2010-12-10 15:37:10 -08:00
Eric Anholt a7e2d64971 mesa: Don't assertion fail for _mesa_get_format_name(MESA_FORMAT_NONE) 2010-12-10 15:29:52 -08:00
Vinson Lee ef3f7e61b3 tnl: Initialize gl_program_machine memory in run_vp.
Fixes piglit valgrind glsl-array-bounds-04 failure (FDO bug 29946).

NOTE:
This is a candidate for the 7.10 branch.
This is a candidate for the 7.9 branch.
2010-12-10 14:24:05 -08:00
Christoph Bumiller dea9d60400 nvc0: fix FACE state and and handle FACE sysval/varying offset 2010-12-10 20:20:37 +01:00
Christoph Bumiller 51f22689a4 nvc0: fix branching ops
- bra is PC relative
- jump to else condition was inverted
- handle integer comparisons
2010-12-10 20:20:34 +01:00
Mathias Fröhlich b3d2ec9942 vbo: Avoid the copy to current in dlists if not required.
The current state is allowed to be undefined past DrawElements et al.
Consequently omit that copying at least in the display list code.
This pays us some percents performance.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-12-10 10:17:48 -07:00
Brian Paul 2a4df8933e mesa/meta: fix broken assertion, rename stack depth var
assert(current_save_state < MAX_META_OPS_DEPTH) did not compile.

Rename current_save_state to SaveStackDepth to be more consistent with
the style of the other fields.
2010-12-10 10:02:37 -07:00
Jerome Glisse b22c8e8bbc r600g: fix bo size when creating bo from handle
Spoted by Alex Diomin

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-10 11:17:27 -05:00
Vinson Lee d5810efca6 mesa: Clean up header file inclusion in arbprogparse.h. 2010-12-09 23:52:28 -08:00
Xiang, Haihao e47eacdc53 i965: support for two-sided lighting on Sandybridge
VS places color attributes together so that SF unit can fetch the right
attribute according to object orientation. This fixes light issue in
mesa demo geartrain, projtex.
2010-12-10 13:25:22 +08:00
Xiang, Haihao d1196bbc19 meta: allow nested meta operations
_mesa_meta_CopyPixels results in nested meta operations on Sandybridge.
Previoulsy the second meta operation overrides all states saved by the
first meta function.
2010-12-10 13:25:17 +08:00
Eric Anholt 3a3b1bd722 i965: Add support for gen6 reladdr VS constant loading. 2010-12-09 20:25:34 -08:00
Eric Anholt 15566183a6 i965: Add support for gen6 constant-index constant loading. 2010-12-09 20:25:34 -08:00
Chia-I Wu 83bdd402aa targets/egl: Improve st_GL.so loading.
When the application is not linked to any libGL*.so, loading st_GL.so
would give

  /usr/local/lib/egl/st_GL.so: undefined symbol: _glapi_tls_Context

In that case, load libGL.so and try again.  This works because
util_dl_open loads with RTLD_GLOBAL.

Fix "clear" OpenGL ES 1.1 demo.
2010-12-10 11:01:05 +08:00
Chia-I Wu 6efd963a23 target/egl: Fix misleading debug message.
When the name of the module is NULL, the process itself is dlopen()ed.
Do not print

  libEGL debug: searching for st module (null)
2010-12-10 11:00:31 +08:00
Brian Paul becc4bb90c draw/llvm: don't flush in vs_llvm_delete()
Fixes piglit glx-shader-sharing crash.

When shaders are shared by multiple contexts, the shader's draw context
pointer may point to a previously destroyed context.  Dereferencing the
context pointer will lead to a crash.

In this case, simply removing the flushing code avoids the crash (the
exec and sse shader paths don't flush here either).

There's a deeper issue here, however, that needs examination.  Shaders
should not keep pointers to contexts since contexts might get destroyed
at any time.

NOTE: This is a candidate for the 7.10 branch (after this has been
tested for a while).
2010-12-09 18:41:22 -07:00
Brian Paul 70ca064454 draw/llvm: remove redundant comment 2010-12-09 18:40:48 -07:00
Brian Paul bd995cf6c0 draw/llvm: remove extraneous conditional 2010-12-09 18:40:48 -07:00
Luca Barbieri 0e50c21e24 glsl: Unroll loops with conditional breaks anywhere (not just the end)
Currently we only unroll loops with conditional breaks at the end, which is
the form that lower_jumps generates.

However, if breaks are not lowered, they tend to appear at the beginning, so
add support for a conditional break anywhere.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-12-09 16:42:05 -08:00
Kenneth Graunke 13c45c590b glsl: Consider the "else" branch when looking for loop breaks.
Found this bug by code inspection.  Based off the comments just before
this code, the intent is to find whether the break exists in the "then"
branch or the "else" branch.  However, the code actually looked at the
last instruction in the "then" branch twice.
2010-12-09 16:42:05 -08:00
Kenneth Graunke 528fa8ce32 glsl: Clean up code by adding a new is_break() function. 2010-12-09 16:42:05 -08:00
Eric Anholt b13a2e640f glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.
If you used a constant array index to access the matrix, we'd flag a
bunch of wrong inputs/outputs as being used because the index was
multiplied by matrix columns and the actual used index was left out.

Fixes glsl-mat-attribute.
2010-12-09 14:41:50 -08:00
Eric Anholt 3fb18d6775 intel: Set the swizzling for depth textures using the GL_RED depth mode.
Fixes depth-tex-modes-rg.
2010-12-09 14:41:50 -08:00
Eric Anholt b4e8ec3a57 intel: Use plain R8 and RG8 for COMPRESSED_RED and COMPRESSED_RG.
Fixes texture-rg.
2010-12-09 14:41:50 -08:00
Vinson Lee c3ca384e71 i965: Silence uninitialized variable warning.
Fixes this GCC warning.
brw_fs.cpp: In function 'brw_reg brw_reg_from_fs_reg(fs_reg*)':
brw_fs.cpp:3255: warning: 'brw_reg' may be used uninitialized in this function
2010-12-09 14:17:17 -08:00
Vinson Lee af5f7b3260 r600g: Fix SCons build. 2010-12-09 14:03:58 -08:00
Jerome Glisse 121079bd67 r600g: indentation cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:16:22 -05:00
Jerome Glisse 7055068eea r600g: specialized upload manager
Allow important performance increase by doing hw specific implementation
of the upload manager helper. Drop the range flushing that is not hit with
this code (and wasn't with previous neither). Performance improvement are
mostly visible on slow CPU.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:07:05 -05:00
Jerome Glisse 15753cf54d r600g: avoid using pb* helper we are loosing previous cpu cycle with it
r600g is up to a point where all small CPU cycle matter and pb* turn
high on profile. It's mostly because pb try to be generic and thus
trigger unecessary check for r600g driver. To avoid having too much
abstraction & too much depth in the call embedded everythings into
r600_bo. Make code simpler & faster. The performance win highly depend
on the CPU & application considered being more important on slower CPU
and marginal/unoticeable on faster one.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:07:01 -05:00
Fabian Bieler ef534f3838 glsl: fix lowering conditional returns in subroutines
this fix applies to the lower_sub_return 'branch' of the lower_jumps pass

Fixes piglit tests glsl-functions-5 and glsl-functions-6.
2010-12-09 11:28:06 -08:00
Eric Anholt 834cc8e501 i965: remove unused variable since brw_wm_glsl.c removal. 2010-12-09 11:11:04 -08:00
Eric Anholt cfcc2ef587 i965: Set render_cache_read_write surface state bit on gen6 constant surfs.
This is said to be required in the spec, even when you aren't doing writes.
2010-12-09 11:11:04 -08:00
Eric Anholt 30f25a1019 i965: Set up the correct texture border color state struct for Ironlake.
This doesn't actually fix border color on Ironlake, but it appears to
be a requirement, and gen6 needs it too.
2010-12-09 10:51:00 -08:00
Eric Anholt 14a9153a32 i965: Clean up VS constant buffer location setup. 2010-12-09 10:51:00 -08:00
Eric Anholt 8fab1c0e2e i965: Fix VS constants regression pre-gen6.
Last minute change for gen6 with 0 used params dropped the multiply.
2010-12-09 10:50:59 -08:00
José Fonseca cdd4f04f80 llvmpipe: Plug fence leaks. 2010-12-09 16:48:26 +00:00
Christoph Bumiller e32ec11278 nvc0: call grobj_alloc for all used classes
Only doing this to notify the DRM that we need a PGRAPH context,
nvc0 hardware doesn't use actual grobjs anymore.
2010-12-09 17:41:13 +01:00
Shuang He 9946f15d30 mesa: allow GLfixed arrays for OpenGL ES 2.0
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-12-09 08:23:54 -07:00
Christoph Bumiller 92f3642a4f nvc0: write texture address to TIC with a RELOC
Direct access to the bo address requires an API change.
2010-12-09 15:22:17 +01:00
Christoph Bumiller 6e753e3c29 nvc0: use tile flags in a way compatible with nouveau 2010-12-09 15:08:29 +01:00
Christoph Bumiller 3ef1616b63 nvc0: buffer suballocation with a primitive slab allocator 2010-12-09 15:01:37 +01:00
Christoph Bumiller 0d1a2bd0fb nvc0: generate shader header for geometry programs 2010-12-09 14:44:21 +01:00
Christoph Bumiller 14a09095d3 nvc0: fix immediate arg for SHL/SHR 2010-12-09 14:43:11 +01:00
Christoph Bumiller 2bb377ee02 nvc0: index buffers are back
Probably because long methods are gone index buffers must be
explicit again.
2010-12-09 14:41:33 +01:00
Christoph Bumiller 7fa7229560 nvc0: upload constants with m2mf for the time being
I get mysterious lockups with the dedicated CB upload ...
2010-12-09 14:35:26 +01:00
Chia-I Wu 0c0eda393a mesa: Fix glTexCoordPointer with type GL_FIXED.
GL_FIXED is also a legal type for glTexCoordPointer.
2010-12-09 19:37:56 +08:00
Chia-I Wu 2d270ac090 mesa: Fix GL_FIXED arrays.
It is broken since 433e5e6def.
2010-12-09 19:25:05 +08:00
Christoph Bumiller 5655f8d42d nvc0: support primitive restart 2010-12-09 12:08:25 +01:00
Christoph Bumiller 548967f9fa nvc0: rcp f32 also supports neg and abs modifiers 2010-12-09 12:05:03 +01:00
Eric Anholt 05e534e6c4 i965: Drop push-mode reladdr constant loading and always use constant_map.
This eases the gen6 implementation, which can only handle up to 32
registers of constants, while likely not penalizing real apps using
reladdr since all of those I've seen also end up hitting the pull
constant buffer.  On gen6, the constant map means that simple NV VPs
fit under the 32-reg limit and now succeed.  Fixes around 10 testcases.
2010-12-08 22:26:18 -08:00
Alex Deucher fd543e1f95 radeon: bump mip tree levels to 15
I forgot to bump this when I bumped the tex levels.
2010-12-09 00:16:02 -05:00
Brian Paul 09a5e028a6 mesa: simplify target checking for TexImage functions 2010-12-08 21:38:35 -07:00
Brian Paul 7404fa3f07 mesa: revamp error checking for compressed texture images
Simplify some code, remove unneeded checks, etc.
2010-12-08 21:38:35 -07:00
Chad Versace f0f2ec4d8a glsl: In ast_to_hir, check sampler array indexing
Raise error if a sampler array is indexed with a non-constant expression.

From section 4.1.7 of the GLSL 1.30 spec:
  "Samplers aggregated into arrays within a shader (using square
  brackets [ ]) can only be indexed with integral constant
  expressions [...]."
2010-12-08 18:53:53 -08:00
Eric Anholt d547ab150a i965: Drop KIL_NV from the ff/ARB_fp path since it was only used for GLSL. 2010-12-08 11:14:52 -08:00
Eric Anholt dba6fde08c i965: Use the new pixel mask location for gen6 ARB_fp KIL instructions.
Fixes:
fp-kil
fp-generic/kil-swizzle.
2010-12-08 11:14:35 -08:00
Eric Anholt 39eaacff14 i965: Set the render target index in gen6 fixed-function/ARB_fp path.
Fixes:
fbo-drawbuffers2-blend
fbo-drawbuffers2-colormask
2010-12-08 10:51:04 -08:00
Eric Anholt 4b4dc778b6 i965: Set up the per-render-target blend state on gen6.
This will let us get EXT_draw_buffers2 blending and colormasking working.
2010-12-08 10:50:57 -08:00
Eric Anholt 0d3b8a5cc2 i965: Set up the color masking for the first drawbuffer on gen6.
Fixes glean/maskedClear
2010-12-08 09:53:16 -08:00