Commit graph

116 commits

Author SHA1 Message Date
Luca Barbieri
4a4e29a9ab translate: add support for 8/16-bit indices
Currently, only 32-bit indices are supported, but some use cases
translate needs support for all types.
2010-08-16 16:57:05 +02:00
Brian Paul
f667526016 rtasm: fix void * / func * casting warnings 2010-05-13 14:15:44 -06:00
Vinson Lee
e9a25089f9 rtasm: Silence gnu_printf format warnings. 2010-03-26 14:59:06 -07:00
Vinson Lee
b1e3e03d67 rtasm: Fix typos in comments. 2010-03-25 22:51:08 -07:00
José Fonseca
2aaca1df9d gallium: Move p_thread.h and p_atomic.h out of gallium interfaces.
Into os/os_thread.h and util/u_atomic.h respectively.
2010-02-02 15:18:01 +00:00
Michal Krol
9b21b3c52a Merge branch 'master' into instanced-arrays
Conflicts:
	src/gallium/auxiliary/tgsi/tgsi_dump.c
	src/gallium/include/pipe/p_shader_tokens.h
2010-01-05 11:04:50 +01:00
Brian Paul
5ac16495a2 Merge branch 'mesa_7_7_branch'
Conflicts:
	docs/relnotes.html
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/r300/r300_cs.h
	src/mesa/drivers/dri/i965/brw_wm_surface_state.c
	src/mesa/main/enums.c
2010-01-04 19:16:24 -07:00
José Fonseca
66c1de77ed rtasm: Play nicely with Windows's Data Execution Prevention. 2010-01-03 11:03:13 +00:00
José Fonseca
c847a13d38 gallium: Generate a single library for auxiliaries with Make too. 2010-01-01 12:16:19 +00:00
José Fonseca
f8f4757d46 scons: Aggregate all tiny libraries in a single library.
Makes integration of gallium into out of tree components much easier. No
pratical change for components in this tree,
2010-01-01 12:16:19 +00:00
Michal Krol
0f185cb027 rtasm: Add x86_div(). 2009-12-30 14:20:29 +01:00
Keith Whitwell
e1ad38ad8e rtasm: export sse_movmskps 2009-07-16 12:47:11 +01:00
José Fonseca
c33ef1f7c6 rtasm: Use 32bit constant.
As we're only using 32bit bitmasks.
2009-06-15 19:04:04 +01:00
Michal Krol
05c70f8f5d rtasm: Silence `static function not used' warning. 2009-04-10 09:07:22 +02:00
Alan Coopersmith
ad11107206 Add #ifdefs needed to compile Gallium on Solaris with gcc or Sun cc
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-25 11:07:31 -07:00
Benjamin Close
dbab39c6ca gallium: Add support for BSD operating systems, tested with FreeBSD
BSD supports pipe in the same way as linux hence options which
are safe for linux are also safe for BSD. Define PIPE_OS_BSD in
include/pipe/p_config.h and adjust the defines to make use of it.

Also define MAP_ANONYMOUS for BSD systems which use MAP_ANON

Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-02-25 07:56:43 -07:00
Jakob Bornecrantz
d9602e5144 gallium: Improve makefiles for libraries
The template makefile that most libraries in
	gallium included was based on dri and had a bunch
	unrelevant junk in it.

	Update it and improve the depending makefiles.
2009-02-20 10:22:10 +00:00
José Fonseca
ea4bf267e4 util: Move p_debug.h into util module.
The debug functions depend on several util function for os abstractions, and
these depend on debug functions, so a seperate module is not possible.
2009-02-18 12:05:26 +00:00
Brian Paul
c4a782041b cell: datatype clean-ups in SPE rtasm 2009-01-11 14:22:00 -07:00
Brian Paul
7acaeb8775 gallium: added comment/annotation support to PPC rtasm 2009-01-10 14:58:44 -07:00
Brian Paul
2b26a92cd3 gallium: s/false/FALSE/ 2009-01-10 14:58:44 -07:00
José Fonseca
42d0079002 rtasm: Remove spurious semi-colons after function bodies. 2008-12-30 17:06:51 +00:00
Robert Ellison
11fc390f64 CELL: use variant-length fragment ops programs
This is a set of changes that optimizes the memory use of fragment
operation programs (by using and transmitting only as much memory as is
needed for the fragment ops programs, instead of maximal sizes), as well
as eliminate the dependency on hard-coded maximal program sizes.  State
that is not dependent on fragment facing (i.e. that isn't using
two-sided stenciling) will only save and transmit a single
fragment operation program, instead of two identical programs.

- Added the ability to emit a LNOP (No Operation (Load)) instruction.
  This is used to pad the generated fragment operations programs to
  a multiple of 8 bytes, which is necessary for proper operation of
  the dual instruction pipeline, and also required for proper SPU-side
  decoding.

- Added the ability to allocate and manage a variant-length
  struct cell_command_fragment_ops.  This structure now puts the
  generated function field at the end, where it can be as large
  as necessary.

- On the PPU side, we now combine the generated front-facing and
  back-facing code into a single variant-length buffer (and only use one
  if the two sets of code are identical) for transmission to the SPU.

- On the SPU side, we pull the correct sizes out of the buffer,
  allocate a new code buffer if the one we have isn't large enough,
  and save the code to that buffer.  The buffer is deallocated when
  the SPU exits.

- Commented out the emit_fetch() static function, which was not being used.
2008-11-21 11:42:35 -07:00
Robert Ellison
2c29a6896a CELL: fix stencil twiddling, stencil invert
Many stencil tests were failing because of a failure to read the
stencil buffer, due to "twiddling" (or "untwiddling") "an unsupported
texture format".  This is fixed for the case of a stencil/Z S824Z format
(which twiddles just like the 32-bit color formats).

tests/stencilwrap.c was failing on the GL_INVERT test, because
the emitted code for "spe_xori" turned out not to be an actual
"xori" instruction, but rather a "stqd" instruction, because
of a typo in the rtasm code.  This is now fixed, and
tests/stencil_wrap now works.
2008-11-13 11:23:04 -07:00
Brian Paul
b44ec717c8 gallium: add missing prototypes 2008-11-12 11:09:12 -07:00
Brian Paul
1cd15f0370 cell: move semicolons to silence warnings w/ other compilers 2008-11-12 11:06:48 -07:00
Brian Paul
7f15e34cfa cell: fix typo in EMIT_ macro 2008-11-12 11:06:48 -07:00
Michal Krol
87f77105ce rtasm: Use INLINE keyword. Compile for all platforms, not only GALLIUM_CELL. 2008-11-12 18:44:20 +01:00
Michal Krol
8fee30064e rtasm: Compile only for GALLIUM_CELL. 2008-11-12 18:13:58 +01:00
Robert Ellison
90027f8578 CELL: two-sided stencil fixes
With these changes, the tests/stencil_twoside test now works.

- Eliminate blending from the stencil_twoside test, as it produces an
  unneeded dependency on having blending working

- The spe_splat() function will now work if the register being splatted
  and the destination register are the same

- Separate fragment code generated for front-facing and back-facing
  fragments.  Often these are the same; if two-sided stenciling is on,
  they can be different.  This is easier and faster than generating
  code that does both tests and merges the results.

- Fixed a cut/paste bug where if the back Z-pass stencil operation
  were different from all the other operations, the back Z-fail
  results were incorrect.
2008-11-11 13:57:10 -07:00
Brian Paul
f952aac1da gallium: grow SPE instruction buffer as needed 2008-10-29 16:56:28 -06:00
Brian Paul
725ba94ce5 gallium: no longer pass max_inst to ppc_init_func() 2008-10-29 16:35:59 -06:00
Brian Paul
a5d920297a gallium: use execmem for PPC code, grow instruction buffer as needed 2008-10-29 16:26:10 -06:00
Brian Paul
8828d52348 gallium: fix alignment parameter passed to u_mmAllocMem()
Was 32, now 5.  The param is expressed as a power of two exponent.
The net effect is that the alignment was a no-op on X86 but on PPC we
always got the same memory address everytime rtasm_exec_malloc() was called.
2008-10-29 14:52:35 -06:00
Brian Paul
3ad56968f0 gallium: prefix memory manager functions with u_ to differentiate from functions in mesa/main/mm.c 2008-10-29 14:19:12 -06:00
Brian Paul
09570d2e73 gallium: test for PIPE_OS_LINUX instead of __linux__ 2008-10-29 14:08:13 -06:00
Brian Paul
7640264064 gallium: added ppc_vnmsubfp() 2008-10-29 11:03:51 -06:00
Michel Dänzer
6b69e3c717 scons: ppc support. 2008-10-23 10:28:48 +02:00
Brian Paul
f8ab4feb75 gallium: remove ppc_vload_float(), rename ppc_vecmove() -> ppc_vmove(). 2008-10-22 17:21:43 -06:00
Brian Paul
3026616c48 gallium: added ppc_vzero() 2008-10-22 17:17:11 -06:00
Brian Paul
b06d072019 gallium: added ppc_vload_float(), for limited cases 2008-10-22 14:48:33 -06:00
Brian Paul
ebdc399d83 gallium: fix-up confusing register allocation masks in rtasm_ppc.c
Plus, add ppc_reserve_register() func.
2008-10-22 13:57:56 -06:00
Brian Paul
049f57f86a gallium: added ppc_lvewx() 2008-10-22 11:06:39 -06:00
Brian Paul
e0c6653a5f cell: implement many more PPC instructions for code gen 2008-10-22 10:35:38 -06:00
Brian Paul
d3403b5482 cell: add emit_RI10s() which does range checking on the 10-bit signed immediate field
This type of checking should be expanded to cover more instructions...
2008-10-10 14:57:57 -06:00
Brian Paul
f42ef6f39d cell: additional 'offset' checking in spe_lqd(), spe_stqd() 2008-10-10 14:44:52 -06:00
Brian Paul
78c67a726f cell: fix assertions in spe_lqd(), spe_stqd() 2008-10-10 14:36:18 -06:00
Robert Ellison
adeed0f90f CELL: fixing stencil bugs
These are the defects found and fixed so far.  Several more have
been observed; I'm working on them.

- Fixed an error in spe_load_uint() that caused incorrect values to be
  loaded if the given unsigned value had the low 18 bits as 0,
  and that caused inefficient code to be emitted if the given value
  had the high 14 bits as 0.

- Fixed a problem in stencil code generation where optional registers
  weren't tracked correctly.

- Fixed a problem that the stencil function NEVER was acting as ALWAYS.

- Fixed several problems that could occur if stenciling were enabled but
  depth was disabled.

- Fixed a problem with two-sided stencil writemask handling that could
  cause a stencil writemask to not be applied.

- Fixed several state permutations that were incorrectly flagged as
  not requiring stencil values to be calculated.
2008-10-10 14:15:51 -06:00
Keith Whitwell
d7f1cb5b5a Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:

	src/gallium/auxiliary/gallivm/instructionssoa.cpp
	src/gallium/auxiliary/gallivm/soabuiltins.c
	src/gallium/auxiliary/rtasm/rtasm_x86sse.c
	src/gallium/auxiliary/rtasm/rtasm_x86sse.h
	src/mesa/main/texenvprogram.c
	src/mesa/shader/arbprogparse.c
	src/mesa/shader/prog_statevars.c
	src/mesa/state_tracker/st_draw.c
	src/mesa/vbo/vbo_exec_draw.c
2008-10-10 15:23:36 +01:00
Brian Paul
7ac1fc7766 cell: fix incorrect bitmask in spe_load_uint() 2008-10-09 19:54:46 -06:00