Michal Krol [Thu, 17 Dec 2009 16:00:46 +0000 (17:00 +0100)]
Merge branch 'glsl-pp-rework-2'
Dave Airlie [Thu, 17 Dec 2009 04:19:27 +0000 (14:19 +1000)]
radeon: drop assert accessing cref which is meant to be hidden
Dave Airlie [Thu, 17 Dec 2009 04:18:54 +0000 (14:18 +1000)]
radeon: drop unused members of radeon_state.
Dave Airlie [Thu, 17 Dec 2009 04:23:08 +0000 (14:23 +1000)]
r600: move structs for legacy cmdbuf into cmdbuf C file.
these really shouldn't be exposed here
Richard Li [Wed, 16 Dec 2009 16:35:08 +0000 (11:35 -0500)]
r600 : clean a bit to prepare to enable gl2.
José Fonseca [Wed, 16 Dec 2009 15:06:02 +0000 (15:06 +0000)]
llvmpipe: add LP_DEBUG env var
Cherry-picked from
dec35d04aeb398eef159aaf8cde5e0d04622b811.
Brian Paul [Mon, 14 Dec 2009 22:27:35 +0000 (15:27 -0700)]
llvmpipe: fix broken TGSI_OPCODE_FRC codegen
Brian Paul [Mon, 14 Dec 2009 22:24:31 +0000 (15:24 -0700)]
llvmpipe: fix broken lp_build_abs()
Marek Olšák [Tue, 15 Dec 2009 04:35:03 +0000 (05:35 +0100)]
r300g: fix emission of which textures are enabled
It fixes most of the "Bad CS" issues in piglit/texCombine and piglit/fbo.
Some other issues of this kind will get fixed in the kernel soon (depth-only
rendering, S3TC, and RGTC).
Marek Olšák [Mon, 14 Dec 2009 05:55:54 +0000 (06:55 +0100)]
r300g: clean up the invariant state
Marek Olšák [Mon, 14 Dec 2009 05:39:08 +0000 (06:39 +0100)]
r300g: clamp vertex indices to [min,max] everywhere
Marek Olšák [Mon, 14 Dec 2009 04:29:12 +0000 (05:29 +0100)]
r300g: if no colorbuffers are set, disable blending and set the color mask to 0
This seems to be the only way to disable the first colorbuffer.
Marek Olšák [Mon, 14 Dec 2009 04:47:54 +0000 (05:47 +0100)]
r300g: set the number of colorbuffers in RB3D_CCTL
Marek Olšák [Mon, 14 Dec 2009 04:22:36 +0000 (05:22 +0100)]
r300g: remove unnecessary flush in set_sampler_textures
Marek Olšák [Sun, 13 Dec 2009 01:19:18 +0000 (02:19 +0100)]
r300g: add Z24X8 to the list of unsupported sampler formats on R3xx-R4xx
Marek Olšák [Sun, 13 Dec 2009 00:32:39 +0000 (01:32 +0100)]
r300g: add acceleration of the clear, surface_copy, and surface_fill functions
Marek Olšák [Sat, 12 Dec 2009 22:44:02 +0000 (23:44 +0100)]
r300g: flush CS if a buffer being deleted is referenced by it
Michel Dänzer [Tue, 15 Dec 2009 23:37:40 +0000 (00:37 +0100)]
r300: Fix typo on < R5xx RS setup for blits.
Marek Olšák [Tue, 15 Dec 2009 00:11:22 +0000 (01:11 +0100)]
util/blitter: kill the draw_quad callback
Marek Olšák [Mon, 14 Dec 2009 23:26:10 +0000 (00:26 +0100)]
util/blitter: allocate most of the state objects on-demand
Marek Olšák [Mon, 14 Dec 2009 18:14:49 +0000 (19:14 +0100)]
util/blitter: use PIPE_MAX_* limits, and fix a memory leak
Marek Olšák [Mon, 14 Dec 2009 18:05:15 +0000 (19:05 +0100)]
pipe: add PIPE_MAX_TEXTURE_TYPES
Marek Olšák [Thu, 10 Dec 2009 09:25:33 +0000 (10:25 +0100)]
util: add blitter
Marek Olšák [Sat, 12 Dec 2009 22:38:17 +0000 (23:38 +0100)]
util: add a function which converts 2D coordinates to cubemap coordinates
The code was taken over from u_gen_mipmap.
Marek Olšák [Sat, 12 Dec 2009 05:34:29 +0000 (06:34 +0100)]
util: add new fragment shaders to simple_shaders
New shaders:
* Fragment shader which writes depth sampled from a texture
* Fragment shader which copies COLOR[0] to multiple render targets
Additional improvements:
* The fragment 'tex' shaders now take a sampler type (TGSI_TEXTURE_*)
so that they can sample from any type of texture, not only from a 2D one.
José Fonseca [Tue, 15 Dec 2009 14:46:43 +0000 (14:46 +0000)]
llvmpipe: Fix yet another copynpaste typo in lp_build_log2_approx.
Now fslight looks perfect.
José Fonseca [Tue, 15 Dec 2009 14:15:52 +0000 (14:15 +0000)]
llvmpipe: Fix lp_build_polynomial comment.
José Fonseca [Tue, 15 Dec 2009 13:58:53 +0000 (13:58 +0000)]
llvmpipe: Fix typo in lp_build_log constant.
José Fonseca [Tue, 15 Dec 2009 13:40:13 +0000 (13:40 +0000)]
util: Fix unity value for swizzle 1.
It should be 255 for ubytes, and not 1.
Thanks Michal for spotting this.
José Fonseca [Tue, 15 Dec 2009 12:13:43 +0000 (12:13 +0000)]
llvmpipe: Fix bad SI -> FP conversion into lp_build_log2_approx.
It should be a bitcast as the integer value is actually an encoded FP
already.
José Fonseca [Fri, 11 Dec 2009 20:16:15 +0000 (20:16 +0000)]
util: Add dl wrappers.
Borrowed from Mesa, slightly changed for more type safety.
Michal Krol [Tue, 15 Dec 2009 12:54:05 +0000 (13:54 +0100)]
tgsi/text: Don't use strncasecmp(), it breaks windows build.
Also, break out of the for-loop when a matching property is found.
Andre Maasikas [Tue, 15 Dec 2009 10:03:26 +0000 (12:03 +0200)]
r600: use _mesa_insert_instructions to fixup wpos instead of manual ins insert
this keeps branch targets correct.
glsl/trirast works correctly now afaics
Andre Maasikas [Tue, 15 Dec 2009 08:22:34 +0000 (10:22 +0200)]
r600: fix typos for vert-tex
at least i think this is how it was meant to work
Andre Maasikas [Mon, 14 Dec 2009 14:39:19 +0000 (16:39 +0200)]
r600: fix fragment.position
wpos.y seems inferted to what opengl expexts, so calculate correct
value from window dimension and replace references in fragmentprog
with calculated value
Andre Maasikas [Mon, 14 Dec 2009 09:59:41 +0000 (11:59 +0200)]
r600: add support for FRAG_ATTRIB_PNTC
Andre Maasikas [Mon, 14 Dec 2009 08:48:36 +0000 (10:48 +0200)]
r600: add DDX DDY opcodes
Richard Li [Mon, 14 Dec 2009 23:02:05 +0000 (18:02 -0500)]
r600 : add texture support for vertex shader.
Zack Rusin [Mon, 14 Dec 2009 21:34:07 +0000 (16:34 -0500)]
tgsi: add properties and system value register
adds support for properties to all parts of the tgsi framework, plus
introduces a new register which will be used for system generated
values.
Maarten Maathuis [Fri, 4 Dec 2009 21:58:22 +0000 (22:58 +0100)]
nouveau: avoid running out of relocs
- Added flush notify functions for NV30 and NV40.
- Flushing mid frame will call flush notify, which will resubmit all
relocs.
- We don't try to recover from reloc failure yet.
Christoph Bumiller [Mon, 14 Dec 2009 17:39:13 +0000 (18:39 +0100)]
nv50: be more cautious about using reg_instance
Trying to free part of nv50_pc->reg_instances[] for an
nv50_reg representing an indirect constant resulted in
a segmentation fault.
Michal Krol [Mon, 14 Dec 2009 16:23:22 +0000 (17:23 +0100)]
tgsi/ureg: Add ureg_DECL_gs_input().
Allows one to declare GS input registers.
Christoph Bumiller [Mon, 14 Dec 2009 10:10:16 +0000 (11:10 +0100)]
nv50: store immediates as uint32
Sometimes we want non-float immediates, hacking them into
floats isn't nice.
Sorry, this should have already been committed before.
Patrice Mandin [Sun, 13 Dec 2009 19:09:33 +0000 (20:09 +0100)]
nouveau: nv50: Add missing ctor_immd_4u32 function
Maciej Cencora [Sun, 13 Dec 2009 16:22:33 +0000 (17:22 +0100)]
r300: enable accelerated support for glCopyTexImage only under KMS
Maciej Cencora [Sun, 13 Dec 2009 16:18:50 +0000 (17:18 +0100)]
r300: fix regression introduced by
da73c1ed
The 0 value is correct for I8 format.
Maciej Cencora [Sun, 13 Dec 2009 15:12:11 +0000 (16:12 +0100)]
r300: fix glCopyTexSubImage
Need to properly setup colorbuffer when dst pitch != dst width.
Christoph Bumiller [Sun, 13 Dec 2009 13:36:54 +0000 (14:36 +0100)]
nv50: add proper zslice offset in miptree_surface
Christoph Bumiller [Sun, 13 Dec 2009 13:14:41 +0000 (14:14 +0100)]
nv50: use m2mf z pos instead of calculating offset manually
Christoph Bumiller [Sun, 13 Dec 2009 12:44:49 +0000 (13:44 +0100)]
nv50: add craziness for non-constant TXB and TXL
If lod or bias can be non-constant across a quad of fragments,
we need to execute TEX separately for each value.
Don't ask why.
Patrice Mandin [Sat, 12 Dec 2009 22:15:08 +0000 (23:15 +0100)]
Revert "nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer)"
This reverts commit
ec7844537ecdb0b598447e37bf0b7120acd029f3.
Patrice Mandin [Sat, 12 Dec 2009 21:31:53 +0000 (22:31 +0100)]
nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer)
Michal Krol [Sat, 12 Dec 2009 15:58:43 +0000 (16:58 +0100)]
Remove grammar module -- no dependencies left.
Michal Krol [Sat, 12 Dec 2009 15:49:26 +0000 (16:49 +0100)]
slang: Delete a file that is now autogenerated.
This file has been modified in master and removed in feature branch.
This gave a merge conflict I couldn't resolve by removing and git adding
it to index.
Michal Krol [Sat, 12 Dec 2009 15:48:32 +0000 (16:48 +0100)]
Merge branch 'master' into glsl-pp-rework-2
Conflicts:
progs/perf/drawoverhead.c
progs/perf/teximage.c
progs/perf/vbo.c
progs/perf/vertexrate.c
src/mesa/shader/slang/library/slang_common_builtin_gc.h
Christoph Bumiller [Wed, 9 Dec 2009 23:36:03 +0000 (00:36 +0100)]
nv50: support TXB and TXL
... and don't set the 'live' flag for TEX anymore, we'd
have to know if results affect the inputs for another TEX,
and I'm not going to do that kind of analysis now.
Christoph Bumiller [Wed, 9 Dec 2009 22:45:52 +0000 (23:45 +0100)]
nv50: add S8Z24 depth texture format too
Christoph Bumiller [Thu, 10 Dec 2009 19:54:18 +0000 (20:54 +0100)]
nv50: fix depth comparison func TSC bits
Unfortunately it seems that if depth comparison is
active and we read a 2D texture, i.e. provide only
2 inputs, the second is used for comparison ...
Christoph Bumiller [Mon, 7 Dec 2009 19:40:39 +0000 (20:40 +0100)]
nv50: add src_mask case for IF opcode
Christoph Bumiller [Fri, 4 Dec 2009 22:16:32 +0000 (23:16 +0100)]
nv50: plug memory leak in miptree creation/destruction
Keeping this dynamically allocated for texture arrays.
Since we don't use it to store zslice offsets anymore
it's either 1 or 6 integers (cube) ...
Christoph Bumiller [Wed, 2 Dec 2009 18:59:07 +0000 (19:59 +0100)]
nv50: use copies of tgsi src nv50_regs
So we can use the 'mod' member without concern
if a source is used multiple times in 1 insn.
Christoph Bumiller [Thu, 10 Dec 2009 19:50:02 +0000 (20:50 +0100)]
nv50: support vertex program textures
Maciej Cencora [Fri, 11 Dec 2009 23:50:26 +0000 (00:50 +0100)]
r300: disable blit debugging info
Maciej Cencora [Sun, 22 Nov 2009 14:12:24 +0000 (15:12 +0100)]
r300: emit number of used colorbuffers to pass radeon cs checker
Maciej Cencora [Sat, 21 Nov 2009 20:18:41 +0000 (21:18 +0100)]
r300: setup render target format for r300/r400 cards too
Maciej Cencora [Sat, 21 Nov 2009 17:16:29 +0000 (18:16 +0100)]
r300: finish blit support for r300
Maciej Cencora [Tue, 10 Nov 2009 18:47:04 +0000 (19:47 +0100)]
more blit fixes
Maciej Cencora [Mon, 9 Nov 2009 22:01:35 +0000 (23:01 +0100)]
blit WIP
Maciej Cencora [Sun, 8 Nov 2009 21:01:17 +0000 (22:01 +0100)]
r300: use accelerated emit for CopyTex[Sub]Image functions
Maciej Cencora [Sun, 8 Nov 2009 21:01:12 +0000 (22:01 +0100)]
r300: accelerated blit support
Maciej Cencora [Sun, 8 Nov 2009 20:44:24 +0000 (21:44 +0100)]
r300: fix wrong assertion
Maciej Cencora [Sat, 7 Nov 2009 21:48:23 +0000 (22:48 +0100)]
r300: export translateTexFormat function
Maciej Cencora [Sat, 7 Nov 2009 20:13:55 +0000 (21:13 +0100)]
r300: refactor PVS code and constants emission
Maciej Cencora [Sat, 7 Nov 2009 18:51:44 +0000 (19:51 +0100)]
r300: refactor R500 fragment program emission
Maciej Cencora [Sat, 7 Nov 2009 20:18:08 +0000 (21:18 +0100)]
r300: refactor color buffer setup
Maciej Cencora [Sat, 7 Nov 2009 19:03:57 +0000 (20:03 +0100)]
r300: use _mesa_meta_Clear for buffer clears
Maciej Cencora [Fri, 11 Dec 2009 23:00:34 +0000 (00:00 +0100)]
r300: minor texture code refactoring
Brian Paul [Fri, 11 Dec 2009 23:50:25 +0000 (16:50 -0700)]
gallium: added comment for pipe_reference() return value
Brian Paul [Mon, 16 Nov 2009 19:54:39 +0000 (12:54 -0700)]
mesa: minor reformatting/rewrapping in dd.h
Brian Paul [Mon, 16 Nov 2009 19:50:54 +0000 (12:50 -0700)]
mesa: remove unused ctx->Driver.ActiveTexture() hook
Brian Paul [Mon, 16 Nov 2009 19:43:32 +0000 (12:43 -0700)]
mesa: updated comment
Brian Paul [Fri, 11 Dec 2009 17:11:45 +0000 (10:11 -0700)]
Revert "scons: Pass -fno-strict-aliasing to gcc."
This reverts commit
a2937a2f4ecf22a5a4242cd0a350f20228f50232.
Per Jose's comment, We don't want this on master.
Brian Paul [Fri, 11 Dec 2009 17:04:07 +0000 (10:04 -0700)]
Merge branch 'mesa_7_7_branch'
Conflicts:
src/gallium/state_trackers/xorg/xorg_xv.c
src/mesa/drivers/dri/intel/intel_span.c
Brian Paul [Fri, 11 Dec 2009 16:51:27 +0000 (09:51 -0700)]
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Brian Paul [Fri, 11 Dec 2009 16:41:34 +0000 (09:41 -0700)]
docs: updated 7.6.1 relnotes with GLSL fixes
Brian Paul [Fri, 11 Dec 2009 16:40:33 +0000 (09:40 -0700)]
mesa: remove unnecessary loop in _mesa_remove_output_reads()
Brian Paul [Fri, 11 Dec 2009 16:22:00 +0000 (09:22 -0700)]
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Brian Paul [Fri, 11 Dec 2009 16:16:25 +0000 (09:16 -0700)]
mesa: check dst reg in _mesa_find_free_register()
If a register was only being used as a destination (as will happen when
generated condition-codes) we missed its use. So we'd errantly return
a register index that was really in-use, not free.
Fixes bug 25579.
Aurelien Jarno [Fri, 11 Dec 2009 15:46:54 +0000 (08:46 -0700)]
sparc: additional preprocessor test for SPARC 64-bit
José Fonseca [Fri, 11 Dec 2009 15:16:22 +0000 (15:16 +0000)]
scons: Tweak MSVC release options.
Enable whole program optimizations and fast math.
José Fonseca [Fri, 11 Dec 2009 14:14:03 +0000 (14:14 +0000)]
svga: Add a missing dependency from the prescale state.
Thanks for Keith to finding this.
Fixes Jedi Knight 2 menus.
José Fonseca [Fri, 11 Dec 2009 13:15:12 +0000 (13:15 +0000)]
svga: Always pass SVGA3D_SURFACE_HINT_DYNAMIC.
Since we're reusing buffers we're effectively transforming all
of them into dynamic buffers.
It would be nice to not cache long lived static buffers. But there
is no way to detect the long lived from short lived ones yet. A
good heuristic would be buffer size.
José Fonseca [Fri, 11 Dec 2009 12:29:02 +0000 (12:29 +0000)]
svga: Keep tight control of texture handle ownership.
The texture owns the surface handle. All derivatives need to keep
a reference to texture.
This fixes several assertions failures starting up Jedi Knight 2.
Should cause no change for DRM surface sharing -- reference count still
done as before there.
José Fonseca [Fri, 11 Dec 2009 12:09:02 +0000 (12:09 +0000)]
svga: Fix mixed signed comparisons.
José Fonseca [Fri, 11 Dec 2009 12:08:32 +0000 (12:08 +0000)]
scons: Pass -fno-strict-aliasing to gcc.
Strict aliasing tule violations were fixed on master, but
they're still causing problem in this branch, so disable this assumptions.
Do not apply this fix to master (revert when you merge).
José Fonseca [Wed, 25 Nov 2009 18:06:12 +0000 (18:06 +0000)]
scons: Make it work with MinGW build of LLVM 2.6.
LLVM 2.5 is no longer supported on windows.
Vinson Lee [Fri, 11 Dec 2009 02:51:51 +0000 (18:51 -0800)]
mesa: Initialize variable in MatchInstruction.
Vinson Lee [Fri, 11 Dec 2009 02:32:33 +0000 (18:32 -0800)]
mesa: Assign _mesa_lookup_parameter_index return value to GLint.
Vinson Lee [Fri, 11 Dec 2009 02:21:59 +0000 (18:21 -0800)]
i915: Add missing break statement in i915_debug_packet.
Vinson Lee [Fri, 11 Dec 2009 01:50:35 +0000 (17:50 -0800)]
glsl: Increase size of array in_slang_lookup_constant from 4 to 16.
For some cases, _mesa_GetIntegerv reads up to params[15].