Age | Commit message (Collapse) | Author |
|
|
|
Our fallback realloc path requires an old_size argument, but the posix
varient doesn't need this. Add some code to avoid gcc unused variable
warnings for this extra argument.
|
|
|
|
Much nicer now.
|
|
This is modelled on the nice & easy-to-use facilities we had
for building shaders in mesa, eg. in texenvprogram.c and friends.
Key points include pass-by-value register structs that can be manipulated
in a functional style, eg:
negate(swizzle(reg, X,X,X,X))
and per-opcode instruction functions, eg:
emit_MOV( p, writemask(dst, 0x1), negate(src));
and similar.
Additionally, the interface allows mixed emit of instructions and decls,
which are sorted out internally to obey TGSI ordering.
Immediates may be emitted at any time and are scanned against existing
immediates to try and reduce redundancy.
Not all TGSI functionality is accessible through this interface, but
most or all of what mesa uses should be.
|
|
This branch introduces new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment
program inputs for GLSL gl_FrontFacing and gl_PointCoord. Before, these
attributes were packed with the FOG attribute. That made things
complicated elsewhere.
|
|
We need aditional meta data about the usage of the surface
in softpipe because we need to be able tell the diffrence
between PRIMARY and DISPLAY_TARGET surfaces.
|
|
|
|
minify() is usually used in mipmap size calculation. Strangely enough,
we all defined it as MAX2(1, d >> 1); imagine that. :3
|
|
Check that the dest surface/format is renderable.
|
|
|
|
|
|
|
|
Check that the dest surface/format is renderable.
|
|
|
|
|
|
|
|
Conflicts:
src/mesa/main/state.c
|
|
|
|
A comment alluded to this. Now it's checked.
|
|
For the surface_copy() path require same format, no flipping and no stretching.
Fixes progs/tests/copypixrate -blit
|
|
|
|
|
|
|
|
|
|
|
|
progs/glsl/pointcoord.c works again
|
|
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour
is similar to a C language for-loop.
The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now
there is no name collision.
|
|
|
|
|
|
The only valid usage for LOOP/ENDLOOP instructions
is LOOP[0] as a destination register.
The only valid usage for the remaining instructions
is LOOP[0].x as an indirect register.
|
|
|
|
|
|
When sampling a 2D shadow map we need 3 texcoord components, not 2.
The third component (distance from light source) is compared against
the texture sample to return the result (visible vs. occluded).
Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI
translation. There's a possibility for breakage in gallium drivers if
they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D /
TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions,
but that should be easy to fix.
With these changes, progs/demos/shadowtex.c renders properly again with
softpipe.
|
|
The leading underscore is meaningful... This function is used by
_warning and _error functions as well as the more common
debug_printf().
debug_printf (without underscore) gets turned off when DEBUG is
disabled, but warning/error messages still use this function to get
their message out.
(cherry picked from commit 0ac879dca797360570543d5bd0fd64f8fb8e566e)
|
|
Conflicts:
Makefile
configs/default
docs/relnotes.html
src/mesa/main/version.h
|
|
|
|
|
|
This changed after a recent commit.
|
|
make linux-llvm succeeds, but doesn't seem to be working, at least with
llvm 2.5
|
|
Various opcodes which can be implemented trivially with other TGSI opcodes,
such as matrix multiplication and negation. These were not used by any
state tracker or implemented by any of the drivers.
|
|
|
|
|
|
The sp_tile_cache is often called repeatedly to look up the same
tile. Add a cache (to the cache) of the single tile most recently
retreived and make a quick inline check to see if this matches the
subsequent request.
Add a tile_address bitfield struct to make this check easier.
|
|
The leading underscore is meaningful... This function is used by
_warning and _error functions as well as the more common
debug_printf().
debug_printf (without underscore) gets turned off when DEBUG is
disabled, but warning/error messages still use this function to get
their message out.
|
|
This is a source of ongoing confusion. TGSI has multiple names for
opcodes where the same semantics originate in multiple shader APIs.
For instance, TGSI includes both Mesa/GLSL and DX/SM30 names for
opcodes with the same semantics, but aliases those names to the same
underlying opcode number.
This makes it very difficult to visually inspect two sets of opcodes
(eg in state tracker & driver) and check if they implement the same
functionality.
This patch arbitarily rips out the versions of the opcodes not currently
favoured by the mesa state tracker and leaves us with a single name
for each distinct operation.
|
|
Remove the need to have a pointer in this struct by just including
the immediate data inline. Having a pointer in the struct introduces
complications like needing to alloc/free the data pointed to, uncertainty
about who owns the data, etc. There doesn't seem to be a need for it,
and it is unlikely to make much difference plus or minus to performance.
Added some asserts as we now will trip up on immediates with more
than four elements. There were actually already quite a few such asserts,
but the >4 case could be used in the future to specify indexable immediate
ranges, such as lookup tables.
|
|
Missing file from previous commit.
|
|
|
|
This function was calling get_input_base() and get_output_base() to
get the names of a couple of register to use as temps. Those
functions no longer return registers, so adjust it to get the
registers elsewhere.
This change doesn't address the issue that it's a fairly poor way to
grab a register name by calling a function with an apparently
unrelated meaning.
|