Commit Graph

22713 Commits

Author SHA1 Message Date
Christoph Bumiller 6516594c8e nv50: proper linkage between VP and FP
This moves construction of the mapping between VP outputs
and FP inputs into validation.

The map also contains slots for special outputs like clip
distance and point size, so we need to at least merge the
VP related and FP related parts on validation if we want
to support those.

Now we match every single FP input component with results
from the VP and leave those not read out of the map, or
replace those not written by 0 (xyz) or 1 (w).
The bitmap indicating linear interpolants is also filled,
and flat FP inputs are mapped in only after non-flat ones,
as is required.

Furthermore, we can save some space by only fetching VP
attrs we actually use, and avoid wasting any output regs
because of TGSI using less than 4 components.
2009-09-15 12:13:23 +02:00
Christoph Bumiller 38849c529e nv50: move allocation of pc regs
Make use of tgsi_shader_info to determine how many nv50_regs we
need to allocate, whether program uses KIL, or writes DEPR.
2009-09-15 12:13:23 +02:00
Christoph Bumiller e0951797cb nv50: nicer initialization of nv50_regs 2009-09-15 12:13:23 +02:00
Christoph Bumiller 849885c7a6 nv50: handle CEIL and TRUNC opcodes 2009-09-15 12:13:23 +02:00
Christoph Bumiller 2b963f5c72 nv50: handle SEQ, SGT, SLE, SNE opcodes 2009-09-15 12:13:23 +02:00
Christoph Bumiller e774b3c0f2 nv50: SIN and COS use src0.w for dst.w 2009-09-15 12:13:22 +02:00
Christoph Bumiller 81de711fc8 nv50: use broadcast TEMP reg in tx_insn
Makes some opcode cases nicer and might reduce the total
nr of TEMPs required, or save some MOVs.
2009-09-15 12:13:22 +02:00
Christoph Bumiller 234d82ed63 nv50: add nv50_tgsi_insn to handle swizzles safely 2009-09-15 12:13:22 +02:00
Christoph Bumiller 2da8608ad7 nv50: add functions for swizzle resolution
We're going to try to reorder the scalar ops of a vector instr
to accomodate swizzles that would otherwise require us to emit
to an additional TEMP first (like MOV R0.xy, R0.zx).
2009-09-15 12:13:22 +02:00
Christoph Bumiller 5d141b3e3e nv50: extend insn src mask function
Extend its usage to avoiding e.g. emission of negation
instructions in tx_insn for sources we don't need.
2009-09-15 12:13:22 +02:00
Cooper Yuan 287f0072d2 st/g3dvl: pass color values to softpipe clear function 2009-09-15 15:25:47 +08:00
Cooper Yuan 2ef8c60e55 xvmc: Generate new resource ID in _XIDHandler, otherwise it's invalid. 2009-09-15 13:16:56 +08:00
Zack Rusin ef77462171 st/xorg: add some debugging helpers 2009-09-14 19:03:28 -04:00
Alex Deucher 364ca57aff r600: add span support for 1D tiles
1D tile span support for depth/stencil/color/textures

Z and stencil buffers are always tiled, so this fixes
sw access to Z and stencil buffers.  color and textures
are currently linear, but this adds span support when we
implement 1D tiling.

This fixes the text in progs/demos/engine and progs/tests/z*
2009-09-14 18:10:24 -04:00
Alex Deucher f662cedae4 r600: fix warning
Noticed by rnoland on IRC.
2009-09-14 18:10:24 -04:00
Brian Paul 909ab3377f st/mesa: minor whitespace, comment clean-ups 2009-09-14 16:01:27 -06:00
Brian Paul 5a87a25a65 st/xorg: fix ureg_DECL_constant() parameters
This fixes the compilation errors reported in bug 23945 but someone more
familiar with the code should review for correctness and close the bug
report.
2009-09-14 15:47:13 -06:00
José Fonseca c51bd94a14 gallium: Add pipe_transfer_map/unmap inlines. 2009-09-14 20:12:01 +01:00
José Fonseca 88b88bba68 util: Add _BitScanForward intrinsic's declaration.
It is missing in some Microsoft DDKs.
2009-09-14 20:12:01 +01:00
Brian Paul aa522e6cc4 intel: minor code clean-ups 2009-09-14 12:42:18 -06:00
Brian Paul 8ec456c68c intel: fix renderbuffer map/unmap regression
Commit 36dd53a3cd caused a few regressions
because the glReadBuffer() buffer wasn't getting mapped when GL_READ_BUFFER
!= GL_DRAW_BUFFER.
2009-09-14 12:42:18 -06:00
Brian Paul 3c31049439 intel: remove unneeded driver function assignments
These default swrast functions are already installed by
_mesa_init_driver_functions().
2009-09-14 12:42:18 -06:00
Keith Whitwell d7512521fd mesa/st: remove dead comment 2009-09-14 17:11:09 +01:00
Keith Whitwell 4295b34d25 st/mesa: convert to new tgsi_ureg mechanism for shader emit
Should be easier to read and work with than the older ways of emitting
TGSI tokens.

Also, emit simpler TGSI than previously:
  - translate away source and dest extended modifiers
  - translate away the SWZ opcode
2009-09-14 17:09:15 +01:00
Marcin Kościelnicki d8a191e314 nv50: Fix m2mf positions. 2009-09-14 12:12:03 +02:00
José Fonseca b4835ea03d llvmpipe: Make lp_type a regular union.
Union not worth the hassle of violating C99 or adding a name to
the structure.
2009-09-14 11:05:38 +01:00
José Fonseca fa150debf0 util: Fix a1r5g5b5's format description. 2009-09-14 11:05:38 +01:00
Cooper Yuan aad0deee4b g3dvl: update tgsi_opcode in order to build g3dvl library 2009-09-14 16:23:03 +08:00
Keith Whitwell 66a7eedaa2 tgsi: handle some src/dst aliasing in tgsi_sse2.c
Src/Dst aliasing (aka SOA dependencies) requires some care to ensure
intermediate results do not overwrite yet-to-be read source registers.

This change ensures that MOV/SWZ handle this correctly, which is poor but
no worse than the current tgsi_exec.c path.  Remove the fallback as there
is nothing to be gained correctness-wise between the two implementations now.

Fixing this properly looks like a bit of work in this code, but might be
easily achieved by sending destination writes to temporary storage.
2009-09-13 11:59:24 -07:00
José Fonseca 86226d5ea1 llvmpipe: Compute derivatives. 2009-09-13 16:22:27 +01:00
José Fonseca 4b32dd3007 llvmpipe: Remove dead references to pipe_winsys. 2009-09-13 16:13:12 +01:00
José Fonseca 5e13e987da llvmpipe: Use const keyword for input array arguments. 2009-09-13 16:12:48 +01:00
José Fonseca faec23387e llvmpipe: Delay storing into the dst register to prevent clobbering the src registers.
How I'm thankful for regular expressions -- just a couple of them were
all that was needed to do this otherwise tiresome and bug prone change.
2009-09-13 14:42:52 +01:00
José Fonseca 873773ee2b llvmpipe: Translate more TGSI opcodes.
Basically cover all low hanging fruit, and mark the still missing opcodes
as "fixme" or deprecated.
2009-09-13 13:55:08 +01:00
José Fonseca 00dd0156e0 llvmpipe: Add a few more common arithmetic functions.
We are relying on SSE4.1 for round/trunc/ceil/floor. We'll need to
eventually find alternatives for the rest of the world.
2009-09-13 13:50:19 +01:00
José Fonseca d7aa114e16 llvmpipe: Rename function to free up lp_build_trunc to the usual arithmetic meaning. 2009-09-13 13:45:48 +01:00
Keith Whitwell 18e5f1cee4 tgsi: implement saturation
Fix recent performance regression.
2009-09-12 18:33:46 -07:00
Keith Whitwell 055fe5768c tgsi: add missing implementation of constant decl change 2009-09-12 16:27:25 -07:00
Cooper Yuan bffa18624d r300g: delete unused flag due to commit: 09b566e161 2009-09-13 07:10:34 -04:00
Keith Whitwell 11f41f54cf ureg: add a mechanism to get the built tokens rather than a full shader
Previously ureg would always call the driver's create-shader function.  This
allows the caller the opportunity to hold onto the tokens if it needs to
reuse them, eg. to create an internal draw shader.
2009-09-12 14:18:50 -07:00
Keith Whitwell c23894295b ureg: add generic emitters for tex and branch instructions
Couldn't previously emit these except by calling the opcode-specific helper.
2009-09-12 14:18:00 -07:00
Keith Whitwell ae4704eabc tgsi/ureg: give ureg_DECL_constant an explicit index parameter
Avoid the need to emit all constant declarations in order.  Makes
referring to a specific constant in the constant buffer much easier.
2009-09-12 14:16:00 -07:00
Keith Whitwell 09b566e161 mesa: remove unused SATURATE_PLUS_MINUS_ONE flag
Never set in mesa.  Remove from tgsi translation as well.
2009-09-12 14:15:15 -07:00
Keith Whitwell 6d8dbd3d1e tgsi/ureg: VS inputs don't have any semantic tags, just an index
Fix ureg_DECL_vs_input to reflect this and fix up all callers.
2009-09-12 14:12:35 -07:00
Keith Whitwell 149945c432 tgsi: free tokens on error 2009-09-12 14:07:48 -07:00
Keith Whitwell e90fb86ac3 tgsi: sanity check ureg programs 2009-09-12 14:05:37 -07:00
Keith Whitwell 983b261e6d tgsi: add const qualifier 2009-09-12 14:04:36 -07:00
Nicolai Hähnle 3cb30e55e4 r300g: There is no such thing as "texture stride"
Individual texture images have a stride, but textures as a whole do not.

There are still pieces of code which are confused about this, but the core of
the confusion is hopefully gone.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-12 16:55:25 +02:00
Eric Anholt 57d16c4cc3 i965: Move OPCODE_DDX/DDY to brw_wm_emit.c and make it actually work.
Previously, it was trying to mess around with the varying's
WM setup data to produce a result.  Along with not actually working when
passed a varying, this wouldn't work if you did dFd[xy]() on a temporary.
Instead, just calculate the derivative using the neighbors in the subspan.
2009-09-11 14:13:47 -07:00
Andre Maasikas a79eecb913 r600: fix texcoords from constants
with some minor updates from Richard.
2009-09-11 15:59:55 -04:00