Ian Romanick
b8f6444a07
mesa: set version string to 7.6.1
2009-12-21 18:10:46 -08:00
José Fonseca
09415ca234
mesa: Fix missing finite symbol error on Windows.
...
Caused by some weird logic regarding the __WIN32__ define which made
the finite definition dependent on the header include order.
(cherry picked from commit 622bdecabd )
2009-12-21 17:56:25 -08:00
Michal Krol
de7021b71c
mesa: Include <unistd.h> only when one is available.
...
(cherry picked from commit 970823978c )
2009-12-21 17:55:13 -08:00
Vinson Lee
2b7b2b90e3
scons: Define _USE_MATH_DEFINES on MSVC.
2009-12-21 17:25:03 -08:00
Fabio Pedretti
e46ad402f1
configure.ac: fix for libdrm_radeon API changes.
2009-12-22 10:44:28 +10:00
Dave Airlie
9373287a1b
radeon/r600: use new libdrm_radeon api
2009-12-22 10:23:41 +10:00
Dave Airlie
9d2910ee0f
radeon: drop assert accessing cref which is meant to be hidden
2009-12-22 10:23:41 +10:00
Dave Airlie
43d8727301
radeon: drop unused members of radeon_state.
2009-12-22 10:23:40 +10:00
Dave Airlie
1703628011
r600: move structs for legacy cmdbuf into cmdbuf C file.
...
these really shouldn't be exposed here
2009-12-22 09:58:33 +10:00
Vinson Lee
07b54fe35b
progs/redbook: Silence compiler warnings.
2009-12-21 15:20:01 -08:00
Dave Airlie
753f0a1dea
r600: fix glFrontFace(GL_CW)
...
fd.o bug #25290
Suggested fix from Rafael Monica
2009-12-21 10:40:19 -05:00
Younes Manton
ace937f165
st/mesa: Check for single level mipmap trees.
...
The assert in util_gen_mipmap() caught it, although
it does the right thing anyway.
2009-12-21 00:59:06 -05:00
Jeremy Huddleston
b96a5df514
darwin: mklib: Use lipo rather than file to figure out architectures of object files
...
(cherry picked from commit ad7f9d71e2 )
2009-12-20 21:36:41 -08:00
Jeremy Huddleston
f926eff263
darwin: Cleanup CPPFLAGS a bit
...
(cherry picked from commit 4a1e103858 )
2009-12-20 21:36:39 -08:00
Vinson Lee
0dd9513874
progs/tests: Silence compiler warnings.
2009-12-20 01:01:00 -08:00
Vinson Lee
d87d71036c
progs/trivial: Use C-style comments.
2009-12-19 00:28:01 -08:00
Vinson Lee
3340fd65fb
progs/xdemos: Use C-style comment.
2009-12-19 00:00:56 -08:00
Vinson Lee
695adf41e2
progs/demos: Silence compiler warning in morph3d.c.
2009-12-18 23:46:14 -08:00
Vinson Lee
121ff55d81
progs/glsl: Use C-style comments.
2009-12-18 23:38:15 -08:00
Vinson Lee
41377942d3
progs/demos: Use C-style comment.
2009-12-18 23:34:28 -08:00
Brian Paul
0478b745fe
glsl: clear out shader code before compiling
...
When we start compiling a shader, first free the existing gl_program.
This (mostly) fixes the piglit glsl-reload-source test.
Without this change, we were actually appending the new GPU code
onto the previous program.
2009-12-18 11:57:17 -07:00
Alex Deucher
20ee275974
r600: Invert front face winding when rendering to FBO
...
fixes fdo bug 25679
Signed-off-by: Alex Deucher <alexdeucher@gmail.com >
2009-12-16 16:18:22 -05:00
Ian Romanick
aeea8a07b8
mesa: set version string to 7.6.1-rc4
2009-12-16 10:13:41 -08:00
Brian Paul
8a09e6e2ad
mesa: add missing semicolon
...
See bug 25663.
2009-12-16 10:39:26 -07:00
Brian Paul
35ff190a9c
docs: document 7.6.1 BlueGene fixes
2009-12-16 08:17:43 -07:00
Brian Paul
138d639ec9
mesa: test for __blrts for CPU_TO_LE32()
...
See bug 25663.
2009-12-16 08:04:25 -07:00
Brian Paul
a43fc39585
mesa: no dlopen on BlueGene
...
See bug 25663.
2009-12-16 08:02:56 -07:00
Brian Paul
6f202b53b0
mesa: remove //-style comments
2009-12-16 07:58:54 -07:00
Brian Paul
ddfc2e7439
st/mesa: remove //-style comments
2009-12-16 07:58:54 -07:00
Vinson Lee
dc0a1ebc73
unichrome: Silence compiler warnings.
2009-12-15 17:39:30 -08:00
Vinson Lee
a60457b03b
sis: Silence compiler warnings.
2009-12-15 17:06:01 -08:00
Vinson Lee
7e3825abdb
savage: Silence compiler warnings.
2009-12-15 16:32:51 -08:00
Vinson Lee
ca02109e91
r128: Silence uninitialized variable warnings in r128_tris.c.
2009-12-15 13:12:12 -08:00
Vinson Lee
7430c3ac35
dri: Initialize variable in driBindContext.
2009-12-15 13:04:25 -08:00
Ian Romanick
f23d01e726
intel: Fallback to software if drawable size is > MaxRenderbufferSize
...
This prevents the mystery blank window if, for example, glxgears is
resized larger than 2048 wide on 915. Since the Intel drivers in Mesa
7.6 lack GTT mapped fallbacks, the performance is a slideshow at
best. On Mesa 7.7 and later the performance is much better.
2009-12-15 12:37:09 -08:00
Vinson Lee
987e9188d2
x86: ifdef out unused function cptr.
2009-12-15 12:32:48 -08:00
Matthew Bell
22d2547ad1
mesa: Add missing $(DESTDIR) support to src/gallium/winsys/xlib/Makefile
2009-12-14 21:58:19 -07:00
Vinson Lee
0a8d508854
progs/trivial: Silence compiler warnings.
2009-12-14 18:11:57 -08:00
Vinson Lee
6e5fe39f50
mga: Silence uninitialized variable warnings.
2009-12-14 17:30:15 -08:00
Vinson Lee
b18fa9f448
mach64: Silence uninitialized variable warnings.
2009-12-14 17:20:34 -08:00
Vinson Lee
6c9870b54c
i810: Silence uninitialized variable warnings in i180tris.c
2009-12-13 00:14:31 -08:00
Vinson Lee
555dc25c4c
swrast: Silence uninitialized variable warnings in s_triangle.c
2009-12-12 23:47:32 -08:00
Vinson Lee
aa44efb045
st/mesa: Silence uninitialized variables warnings in st_draw.c.
2009-12-12 22:17:16 -08:00
Vinson Lee
0aef54ba62
swrast: Silence uninitialized variable warnings in ss_tritmp.h.
2009-12-12 22:00:19 -08:00
Vinson Lee
89d85e8170
glut: Prevent potential double free in menuVisualSetup.
2009-12-12 21:46:13 -08:00
Vinson Lee
20590b9733
t_dd_dmatmp.h: Silence unused value warning in render_poly_elts.
2009-12-12 20:20:02 -08:00
Vinson Lee
cd1a09e3bb
glsl: Initialize member label of struct slang_operation to NULL.
2009-12-12 18:42:18 -08:00
Vinson Lee
f8d4ac56f7
softpipe: Initialize source in blend_quad.
2009-12-12 18:34:15 -08:00
Vinson Lee
7ea452dd35
t_dd_dmatmp2.h: Silence unused value warnings.
2009-12-12 16:56:07 -08:00
Vinson Lee
75e8dbb235
i915g: Silence unused value warning in intel_drm_get_device_id.
2009-12-12 16:24:25 -08:00
Vinson Lee
9dc018618d
t_dd_dmatmp.h: Silence unused value warnings in render_line_loop_elts.
2009-12-12 16:18:08 -08:00
Vinson Lee
af4e4a73f7
t_dd_dmatmp.h: Silence unused value warning in render_tri_fan_elts.
2009-12-12 16:02:09 -08:00
Vinson Lee
588e9f69c4
progs/trivial: Silence compiler warnings in tri-blend-min.c.
2009-12-12 15:47:17 -08:00
Vinson Lee
de9132f274
t_dd_dmatmp.h: Silence unused value warning in render_poly_verts.
2009-12-12 15:27:30 -08:00
Vinson Lee
1e444c9960
swrast: Initialize tex_coords in handle_sample_op.
2009-12-12 15:08:01 -08:00
Vinson Lee
c1d361bd0b
t_dd_dmatmp.h: Silence unused value warning in render_quads_verts.
2009-12-12 14:41:35 -08:00
Vinson Lee
786899f153
progs/trivial: Silence compiler warnings in tri-blend-max.c
2009-12-12 14:20:17 -08:00
Vinson Lee
7d529736b9
t_dd_dmatmp.h: Silence unused value warning in render_tri_fan_verts.
2009-12-12 13:39:39 -08:00
Vinson Lee
c2cee7741e
t_dd_dmatmp.h: Silence unused value warning in render_line_loop_verts.
2009-12-12 12:52:02 -08:00
Vinson Lee
15c6558a2e
progs/xdemos: Silence compiler warnings in glxinfo.c.
2009-12-12 02:06:51 -08:00
Vinson Lee
d5be33477e
progs/tests: Silence compiler warnings in vpeval.c.
2009-12-12 01:34:33 -08:00
Vinson Lee
44d6ab6de5
progs/tests: Silence compiler warnings in cva.c.
2009-12-12 01:11:56 -08:00
Vinson Lee
9e2eee4ab2
progs/redbook: Silence compiler warnings in aaindex.c.
2009-12-12 01:02:16 -08:00
Vinson Lee
81dcf8bdf2
t_dd_dmatmp.h: Silence unused value warning in render_line_loop_verts.
2009-12-12 00:33:42 -08:00
Brian Paul
7d41b4248b
docs: updated 7.6.1 relnotes with GLSL fixes
2009-12-11 09:41:34 -07:00
Brian Paul
d8f8eca9ef
mesa: remove unnecessary loop in _mesa_remove_output_reads()
2009-12-11 09:40:33 -07:00
Brian Paul
5076a4f53a
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.
2009-12-11 09:16:27 -07:00
Aurelien Jarno
f7f1211b9b
sparc: additional preprocessor test for SPARC 64-bit
2009-12-11 08:46:54 -07:00
Vinson Lee
94fba49be9
mesa: Initialize variable in MatchInstruction.
2009-12-10 18:51:51 -08:00
Vinson Lee
e31df54754
mesa: Assign _mesa_lookup_parameter_index return value to GLint.
2009-12-10 18:32:33 -08:00
Vinson Lee
cb1dcb55f9
i915: Add missing break statement in i915_debug_packet.
2009-12-10 18:21:59 -08:00
Vinson Lee
d38ffed523
glsl: Increase size of array in_slang_lookup_constant from 4 to 16.
...
For some cases, _mesa_GetIntegerv reads up to params[15].
2009-12-10 17:52:31 -08:00
Vinson Lee
1cf60c9810
progs/samples: Byte swap individual members of struct _rawImageRec.
2009-12-10 15:41:13 -08:00
Vinson Lee
bc0509bba8
progs/util: Byte swap individual members of struct _rawImageRec.
2009-12-10 13:24:15 -08:00
Vinson Lee
51f52edaf1
glsl: Fix array out-of-bounds access by _slang_lookup_constant.
2009-12-10 12:37:10 -08:00
Vinson Lee
dcb4a37fc8
mesa: Fix array out-of-bounds access by _mesa_TexParameteriv.
2009-12-10 12:11:09 -08:00
Vinson Lee
b827578805
mesa: Fix array out-of-bounds access by _mesa_TexGend.
...
_mesa_TexGend calls _mesa_TexGenfv, which uses the params argument
as an array.
2009-12-09 17:59:23 -08:00
Vinson Lee
444d1f3910
mesa: Fix array out-of-bounds access by _mesa_Lighti.
...
_mesa_Lighti calls _mesa_Lightiv, which uses the params argument
as an array.
2009-12-09 17:34:50 -08:00
Vinson Lee
34528a34c4
mesa: Fix array out-of-bounds access by _mesa_Lightf.
2009-12-09 17:11:30 -08:00
Vinson Lee
348883076b
mesa: Fix array out-of-bounds access by _mesa_PointParameteri.
...
_mesa_PointParameteri calls _mesa_PointParameterfv, which uses the
params argument as an array.
2009-12-09 13:15:05 -08:00
Vinson Lee
6f2d51b81f
mesa: Fix array out-of-bounds access by _mesa_PointParameterf.
...
_mesa_PointParameterf calls _mesa_PointParameterfv, which uses the
params argument as an array.
2009-12-09 13:00:22 -08:00
Vinson Lee
637970aefd
mesa: Fix array out-of-bounds access by _mesa_LightModelf.
...
_mesa_LightModelf calls _mesa_LightModelfv, which uses the
params argument as an array.
2009-12-09 12:43:28 -08:00
Vinson Lee
a082d965de
glsl: Remove unused member x from struct slang_operation.
2009-12-09 11:26:24 -08:00
Brian Paul
3de8fff45d
mesa: fix baseLevel >= MAX_TEXTURE_LEVELS test
...
This fixes invalid array indexing when baseLevel == MAX_TEXTURE_LEVELS.
See bug 25528.
2009-12-09 08:30:05 -07:00
Andre Maasikas
33a120e476
r600: fix state size prediction after dc0777d3
2009-12-09 10:51:52 +02:00
Vinson Lee
af16c822a5
mesa: Fix array out-of-bounds access by _mesa_LightModeli.
...
_mesa_LightModeli calls _mesa_LightModeliv, which uses the
params argument as an array.
2009-12-08 18:26:05 -08:00
Vinson Lee
d33bf38d63
mesa: Fix array out-of-bounds access by _mesa_Fogf.
...
_mesa_Fogf calls _mesa_Fogfv, which uses the params argument
as an array.
2009-12-08 17:51:07 -08:00
Vinson Lee
3f7c2ac279
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
...
_mesa_TexParameteri calls set_tex_parameteri, which uses the
params argument as an array.
2009-12-08 17:25:05 -08:00
Vinson Lee
7f146b3824
mesa: Fix array out-of-bounds access by _mesa_Fogi.
...
_mesa_Fogi calls _mesa_Fogfv, which uses the params argument
as an array.
2009-12-08 16:08:41 -08:00
Vinson Lee
a1d46fbea0
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
...
_mesa_TexParameteri calls set_tex_parameterf, which uses the
params argument as an array.
2009-12-08 15:42:13 -08:00
Vinson Lee
d88f3b9468
mesa: Fix array out-of-bounds access by _mesa_TexParameterfv.
...
_mesa_TexParameterfv calls set_tex_parameteri, which uses the
params argument as an array.
2009-12-08 14:33:33 -08:00
Brian Paul
54b0ed8360
vbo: fix array index out of bounds error, and fix evaluator priorities
...
Fixes bug 25525.
Plus, the GL_NV_vertex_program evaluators alias and override the
convential evaluator maps, so set their state after the conventional
maps.
2009-12-08 15:03:22 -07:00
Vinson Lee
1de1deffce
i915g: Fix memory leak when pci id is unknown.
2009-12-08 00:43:38 -08:00
Vinson Lee
7e93e06781
i915g: Add missing break statement in i915_debug_packet.
2009-12-08 00:37:35 -08:00
Vinson Lee
7f8e22aa29
rbug: Initialize variable in rbug_get_message.
...
Silences uninitialized variable warning.
2009-12-08 00:28:50 -08:00
Andre Maasikas
369669ff9a
r600: add support for TXB instruction
...
makes testing other things easier - does not hang the card
TODO: enable TEX dependency tracking in vertex programs
2009-12-08 10:02:23 +02:00
Andre Maasikas
dc0777d3e3
r600: reorder state for render_target and blend
...
First time around render targets are not enabled yet (done in
r700SendRenderTargetState) so blend state is not emitted for any targets.
Affects first glClear in some mesa tests.
As a quick fix reorder state emit so that target is set first
2009-12-08 09:41:10 +02:00
Vinson Lee
add6dfbba6
llvmpipe: Initialize variables in emit_instruction.
2009-12-07 19:04:07 -08:00
Vinson Lee
3e8b2fda21
progs/test: Initialize variable in prog_parameter.
...
Silences uninitialized variable compiler warning.
2009-12-07 18:40:37 -08:00
Ian Romanick
9dbd47fc6b
mesa: set version string to 7.6.1-rc3
2009-12-07 16:59:59 -08:00
Vinson Lee
7d84169865
progs/demos: Fix memory leak in projtex.c.
2009-12-07 12:31:08 -08:00
Vinson Lee
7005f7cd1a
st/egl: Fix memory leak in egl_tracker.c.
...
(cherry picked from commit 052b127842 )
2009-12-06 01:15:24 -08:00
Vinson Lee
c994f08eb1
dri: Fix potential null pointer dereference in driBindContext.
...
(cherry picked from commit 919898e92f )
2009-12-06 01:01:55 -08:00
Vinson Lee
f622b649fb
dri: Fix potential null pointer deference in dri_put_drawable.
...
(cherry picked from commit 364070b1f2 )
2009-12-06 01:00:20 -08:00
Vinson Lee
76b3523d75
glx: Prevent potential null pointer deference in driCreateContext.
...
(cherry picked from commit 4b0b250aae )
2009-12-06 00:56:20 -08:00
Vinson Lee
978b80c8e3
progs/tests: Add tests to Makefile.
...
(cherry picked from commit 76d2ec3a0a )
2009-12-05 21:20:54 -08:00
Vinson Lee
3cd745515e
draw: Initialize variable in draw_pt.c.
...
(cherry picked from commit ea98e9820d )
2009-12-05 15:11:41 -08:00
Vinson Lee
b2953ee1a6
mesa: Fix array out-of-bounds access by _mesa_TexGenf.
...
_mesa_TexGenf calls _mesa_TexGenfv, which uses the params argument
as an array.
(cherry picked from commit ca5a7aadb4 )
2009-12-05 13:00:35 -08:00
Vinson Lee
d74cd04e61
mesa: Fix array out-of-bounds access by _mesa_TexGeni.
...
_mesa_TexGeni calls _mesa_TexGeniv, which uses the params argument
as an array.
(cherry picked from commit d55fb7c835 )
2009-12-05 12:59:34 -08:00
Vinson Lee
ca8a2150c7
mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
...
_mesa_TexParameterf calls set_tex_parameterf, which uses the params
argument as an array.
(cherry picked from commit 270d36da14 )
2009-12-05 12:50:56 -08:00
Vinson Lee
4071d065c2
mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
...
_mesa_TexParameterf calls set_tex_parameteri, which uses the params
argument as an array.
(cherry picked from commit a201dfb6bf )
2009-12-05 12:47:40 -08:00
Vinson Lee
1446f30875
progs/samples: Fix memory leak if malloc fails in rgbtoppm.c.
2009-12-05 01:43:29 -08:00
Vinson Lee
412aeeed1c
progs/samples: Fix memory leak if fopen fails in rgbtoppm.c.
2009-12-05 01:38:14 -08:00
Vinson Lee
6212c8103a
progs/samples: Add rgbtoppm to Makefile.
2009-12-05 01:28:47 -08:00
Vinson Lee
2cd2341ce8
progs/tests: Removed unused variable from texdown.c.
2009-12-05 01:23:05 -08:00
Vinson Lee
d642edd2d1
progs/vpglsl: Assign glGetUniformLocationARB return value to GLint.
...
The return type of glGetUniformLocationARB is GLint, not GLuint.
2009-12-05 01:11:26 -08:00
Vinson Lee
8d2f3434c5
progs/fp: Redraw upon keypress.
2009-12-04 23:31:39 -08:00
Vinson Lee
fe8e18bcd4
mesa: Fix array out-of-bounds access in _mesa_TexEnvf.
...
_mesa_TexEnvf calls _mesa_TexEnvfv, which uses the param argument
as an array.
(cherry picked from commit a11d60d14c )
2009-12-04 17:48:30 -08:00
Vinson Lee
4fb5ae7233
progs/util: Fix memory leak if fread returns 0 in CompileShaderFile.
...
(cherry picked from commit 11905da883 )
2009-12-04 17:35:00 -08:00
Vinson Lee
5683d7d43f
progs/util: Fix memory leak if fail to load/compile shader
...
Signed-off-by: Brian Paul <brianp@vmware.com >
(cherry picked from commit c475079ef2 )
2009-12-04 17:32:48 -08:00
Vinson Lee
e5bc2a19bd
progs/fp: Add tri-inv.c to Makefile.
2009-12-04 17:29:53 -08:00
Coleman Kane
225bc70b77
r300g: use $(MAKE) variable
...
Fixes bug 24501
2009-12-04 08:45:04 -07:00
Brian Paul
ca7cd3ade0
progs/xdemos: fix some visual/fbconfig logic in glxinfo.c
...
The fbAttribSingle/Double arrays had wrong GLX_DOUBLEBUFFER values.
We only need to use the glXChooseFBConfig() code when glXChooseVisual()
fails (but I don't know when that would happen).
Other recent commits errantly removed some code in this area too.
2009-12-04 08:09:57 -07:00
Brian Paul
fb83fa26c4
docs: a few more fixes for 7.6.1
2009-12-04 08:09:07 -07:00
Alex Deucher
8d8fd9776e
radeon: fix polygon stipple
...
fixes fdo bug 25354
Signed-off-by: Alex Deucher <alexdeucher@gmail.com >
2009-12-04 09:52:37 -05:00
Vinson Lee
c74afe0c46
glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore.
...
(cherry picked from commit 808f037660 )
2009-12-04 00:14:31 -08:00
Vinson Lee
8df551c46b
glu/sgi: Fix memory leak in gluBuild1DMipmapLevelsCore.
...
(cherry picked from commit 94bcb9f1a4 )
2009-12-04 00:14:05 -08:00
Vinson Lee
ea487c6d0b
glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore.
...
(cherry picked from commit 0d89f3dc7f )
2009-12-04 00:13:25 -08:00
Vinson Lee
7b5eba453e
glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore.
...
(cherry picked from commit f895abbd97 )
2009-12-04 00:12:49 -08:00
Vinson Lee
7ed749c062
glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore.
...
(cherry picked from commit 326b66d724 )
2009-12-04 00:11:58 -08:00
Vinson Lee
80a3944a4d
glu/sgi: Fix memory leak in bitmapBuild2DMipmaps.
...
(cherry picked from commit 5b925b7daa )
2009-12-04 00:11:02 -08:00
Vinson Lee
6c1fc2b2a5
glu/sgi: Fix memory leak in gluScaleImage3D.
...
(cherry picked from commit b611f639b4 )
2009-12-04 00:10:22 -08:00
Vinson Lee
fe38c16021
glu/sgi: Fix memory leak in gluScaleImage.
...
(cherry picked from commit a9c540f5de )
2009-12-04 00:09:22 -08:00
Vinson Lee
d23bb22f62
glu: Fix memory leak in __gl_meshMakeEdge.
...
(cherry picked from commit d3b4c99c70 )
2009-12-04 00:07:51 -08:00
Vinson Lee
12a440abfb
progs/xdemos: Silence unused value warnings in sharedtex_mt.c.
...
(cherry picked from commit 8556fad751 )
2009-12-04 00:04:38 -08:00
Vinson Lee
4bf96ebdae
progs/xdemos: Fix memory leak in pbdemo.c.
...
(cherry picked from commit e0857962b9 )
2009-12-04 00:03:14 -08:00
Vinson Lee
ba3fedf246
progs/xdemos: Add missing break statement in offset.c.
...
(cherry picked from commit 4ab8dbe593 )
2009-12-04 00:01:20 -08:00
Vinson Lee
8350648401
progs/xdemos: Remove duplicate code in glxinfo.c.
...
(cherry picked from commit a4720a1a32 )
2009-12-03 23:59:47 -08:00
Vinson Lee
7324c22024
progs/xdemos: Fix memory leak in glxinfo.c.
...
(cherry picked from commit f080567f4c )
2009-12-03 23:59:11 -08:00
Vinson Lee
68d206fafa
progs/xdemos: Add assert in corender.c.
...
(cherry picked from commit 66a4ec14c3 )
2009-12-03 23:22:47 -08:00
Vinson Lee
69ed1147a8
progs/vp: Fix memory leak in vp-tris.c.
...
(cherry picked from commit 760cf71572 )
2009-12-03 23:20:18 -08:00
Vinson Lee
efb582fde7
progs/tests: Fix memory leak in texdown.c if malloc fails.
...
(cherry picked from commit e3cfd78969 )
2009-12-03 23:17:26 -08:00
Vinson Lee
b210739aad
progs/redbook: Fix memory leak in quadric.c.
...
(cherry picked from commit 47b5f584a6 )
2009-12-03 23:12:59 -08:00
Vinson Lee
b1a87a3e0b
progs/glsl: Fix memory leak in deriv.c.
...
(cherry picked from commit 0e783c7d03 )
2009-12-03 22:54:35 -08:00
Vinson Lee
25fd168f03
progs/glsl: Change tangentAttrib from GLuint to GLint in bump.c.
...
tangentAtrrib is assigned the result of glGetAttribLocation.
The assertion 'assert(tangentAtrrib >= 0)' would be a no-op if
tangentAttrib is a GLuint.
(cherry picked from commit b8dcb79c53 )
2009-12-03 22:51:43 -08:00
Vinson Lee
b803abbaad
progs/demos: Fix memory leak in ray.c.
...
(cherry picked from commit 6b480dc21d )
2009-12-03 22:49:18 -08:00
Vinson Lee
5820dae4ec
progs/demos: Fix memory leak in projtex.c.
...
(cherry picked from commit ee555e3d69 )
2009-12-03 22:44:55 -08:00
Vinson Lee
fc5f07de1a
progs/demos: Fix memory leak in ipers.c.
...
(cherry picked from commit a1afe303de )
2009-12-03 22:38:44 -08:00
Vinson Lee
d245a951f3
progs/demos: Fix memory leak in fslight.c.
...
(cherry picked from commit aef3218f0b )
2009-12-03 22:36:37 -08:00
Vinson Lee
905e12f3cc
gallium/util: Initialize variables in u_pack_color.h.
...
(cherry picked from commit 36e2074b63 )
2009-12-03 17:55:59 -08:00
Vinson Lee
56de7e222e
progs/trivial: Redraw upon keypress.
...
(cherry picked from commit 9553a42f63 )
2009-12-03 17:27:24 -08:00
Vinson Lee
34a0b22a74
progs/trivial: Redraw upon keypress.
...
(cherry picked from commit 3790c6a13b )
2009-12-03 17:25:00 -08:00
Vinson Lee
9e29242331
progs/glsl: Redraw upon keypress.
...
(cherry picked from commit 881f55236a )
2009-12-03 17:17:24 -08:00
Vinson Lee
a0ac8fc7d8
progs/util: Exit RawImageGetData early if malloc fails.
...
Prevents a null pointer deference later on.
(cherry picked from commit e26135a744 )
2009-12-03 17:14:08 -08:00
Vinson Lee
0a6acecb35
progs/util: Fix memory leak if malloc fails in RawImageOpen.
...
(cherry picked from commit d36cb2396c )
2009-12-03 17:08:48 -08:00
Vinson Lee
305d4f147e
progs/util: Fix memory leak if fopen fails in RawImageOpen.
...
(cherry picked from commit d9508e8df9 )
2009-12-03 17:03:26 -08:00
Vinson Lee
772e004781
progs/util: Fix memory leak if malloc fails in tkRGBImageLoad.
...
(cherry picked from commit 786d539511 )
2009-12-03 16:57:17 -08:00
Vinson Lee
f1172c4030
progs/util: Fix memory leak if LoadRGBImage fails.
...
(cherry picked from commit 041cd0e110 )
2009-12-03 16:24:03 -08:00
Vinson Lee
84de1672d3
progs/util: Fix memory if LoadRGBMipmaps2 fails.
...
(cherry picked from commit 28b8e4bcd7 )
2009-12-03 16:15:22 -08:00
Vinson Lee
4ca8e1680e
progs/util: Fix memory leak if LoadYUVImage fails.
...
(cherry picked from commit 0e790ac353 )
2009-12-03 16:03:22 -08:00
Vinson Lee
d6a993135f
progs/fp: Redraw upon keypress.
...
(cherry picked from commit cde6643724 )
2009-12-03 15:59:56 -08:00
Vinson Lee
005242f166
prog/tests: Fix MSVC build.
...
Signed-off-by: Brian Paul <brianp@vmware.com >
(cherry picked from commit 9c3197ef0a )
2009-12-03 15:53:13 -08:00
Vinson Lee
d3208678c2
progs/tests: fix MSVC build.
...
Signed-off-by: Brian Paul <brianp@vmware.com >
(cherry picked from commit a8ed066858 )
2009-12-03 15:50:36 -08:00
Vinson Lee
97cbf4943a
progs/tests: Fix MSVC build.
...
(cherry picked from commit 50e113e375 )
2009-12-03 15:45:18 -08:00
Vinson Lee
a99bf51bc8
progs/tests: Fix MSVC build.
...
(cherry picked from commit 952bf63e2c )
2009-12-03 15:35:10 -08:00
José Fonseca
28474e1225
progs/tests: Use rand() instead of random().
...
Forgot these on previous commit.
(cherry picked from commit 166957abeb )
2009-12-03 15:34:38 -08:00
José Fonseca
bb6e3af939
progs/tests: Use rand() instead of random().
...
More portable. Same implementation on Linux.
(cherry picked from commit 699260b195 )
2009-12-03 15:32:45 -08:00
Vinson Lee
a38776419b
progs/tests: Fix MSVC build.
...
(cherry picked from commit f7455ad7af )
2009-12-03 15:29:01 -08:00
Vinson Lee
791b754687
prog/tests: Fix MSVC build.
...
(cherry picked from commit 60b6c74583 )
2009-12-03 15:24:43 -08:00
Vinson Lee
89e747920f
prog/tests: Fix MSVC build.
...
(cherry picked from commit 96fd13c1a0 )
2009-12-03 15:15:12 -08:00
Vinson Lee
5a25adb646
progs/tests: fix MSVC build.
...
(cherry picked from commit 9c778a90ea )
2009-12-03 15:11:25 -08:00
Vinson Lee
3910e88ebf
prog/tests: Fix MSVC build.
...
(cherry picked from commit ea862ec8ff )
2009-12-03 15:05:44 -08:00
Alex Deucher
2b5618fc5b
r200: fix polygon stipple
...
fixes fdo bug 25354
Signed-off-by: Alex Deucher <alexdeucher@gmail.com >
2009-12-03 11:20:40 -05:00
Vinson Lee
c3b7f93e02
scons: Add Mac OS to target platform list.
...
(cherry picked from commit 2c307c7750 )
2009-12-02 20:33:32 -08:00
Vinson Lee
235c0c8134
progs/vpglsl: Fix psiz-mul.glsl compilation error on Mac OS.
...
(cherry picked from commit b98db7bf69 )
2009-12-02 20:28:54 -08:00
Vinson Lee
0a107d36c2
progs/glsl: Fix trirast GLSL compilation errors on Mac OS.
...
(cherry picked from commit 4b3ec2acf2 )
2009-12-02 20:20:12 -08:00
Vinson Lee
b094683e7c
progs/glsl: Fix noise GLSL compilation error on Mac OS.
...
(cherry picked from commit 0d31990b47 )
2009-12-02 20:16:51 -08:00
Vinson Lee
592c8522a2
demos/glsl: Add missing break statement to noise test.
...
(cherry picked from commit 7dfea5c072 )
2009-12-02 20:16:41 -08:00
Vinson Lee
8f4d3613da
progs/glsl: Fix multinoise GLSL compilation errors on Mac OS.
...
(cherry picked from commit d4dc2e30da )
2009-12-02 20:06:20 -08:00
Vinson Lee
9ed77d12b1
progs/glsl: Add missing break statement in multinoise.c.
...
(cherry picked from commit 43080e40aa )
2009-12-02 20:06:11 -08:00
Vinson Lee
832593772d
progs/glsl: Fix mandelbrot GLSL compilation error on Mac OS.
...
(cherry picked from commit 04442841fb )
2009-12-02 19:55:48 -08:00
Vinson Lee
2a5cd95e24
progs/glsl: Include local headers before installed headers during compilation.
...
Fixes compilation errors on platforms with insufficient older installed
GL headers.
(cherry picked from commit d17af7d1e1 )
2009-12-02 19:39:25 -08:00
Brian Paul
ccea09cd3a
progs/glsl: minor Makefile clean-ups
...
(cherry picked from commit 4df2f7af5e )
2009-12-02 19:39:11 -08:00
Vinson Lee
67a0628ab2
progs: Ignore Mac OS dSYM directories.
...
(cherry picked from commit a420056750 )
2009-12-02 15:22:34 -08:00
Brian Paul
908a3e56cc
cell: added tex_usage param to xm_surface_buffer_create()
2009-12-02 09:31:26 -07:00
Brian Paul
ba97b98842
progs/demos: remove unused glFogCoordPointer_ext var
2009-12-01 12:23:07 -07:00
Tom Fogal
b9f4a0bd2b
Simplify hackery added to fix AIX build.
...
Borrow an idiom from the GNU build system which can handle `for'
loops over empty lists.
2009-12-01 10:27:27 -08:00
Ian Romanick
d8da270a2b
intel: Remove GL_NV_point_sprite from extension list
...
i830 does not (and cannot!) support the any of the non-default
GL_POINT_SPRITE_R_MODE_NV settings. i915 and i965 could, but
currently do not. In both cases it would require mucking about with
the fragment shader.
2009-12-01 10:25:44 -08:00
Ian Romanick
910aaed4da
mesa: set version string to 7.6.1-rc2
2009-11-30 17:55:21 -08:00
Ian Romanick
587a52e95b
i915: Actually put i915PointParameterfv in the driver function table. Duh.
2009-11-30 12:43:12 -08:00
Ian Romanick
533b766007
i915: Fallback bit define missed on previous commit
2009-11-29 17:49:55 -08:00
Ian Romanick
718f31b830
i915: Round point sizes instead of truncate.
2009-11-29 17:43:38 -08:00
Ian Romanick
d8d49716cf
i915: Enable point sprite coordinate generation
...
Support still isn't completely correct, but it's better. piglit
point-sprite now passes. However, glean's pointSprite test fails. In
that test the texture on the sprite is somehow inverted as though
GL_POINT_SPRITE_COORD_ORIGIN were set to GL_LOWER_LEFT. i915 hardware
shouldn't be able to do that!
I believe there are also problems when not all texture units have
GL_COORD_REPLACE set. The hardware enable seems to be all or nothing.
Fixes bug #25313 .
2009-11-29 17:40:02 -08:00
Ian Romanick
0528f40e3b
Improve implementation of GL_POINT_SPRITE_COORD_ORIGIN errors
...
This enum is only supported for OpenGL 2.0. If a driver supports
OpenGL 1.4 and GL_ARB_point_sprite, using this enum should generate an
error. This is important because, for example, i915 and i830 can
support GL_ARB_point_sprite, but they cannot support
GL_POINT_SPRITE_COORD_ORIGIN.
This commit just removes the check for NV_point_sprite, which is
completely wrong, and add some comments describing what the code
should do. I don't see an easy way to check for version >= 2.0 from
inside Mesa. Perhaps we should add an extension
GL_MESA_point_sprite_20 (like Intel's old GL_EXT_packed_pixels_12) to
indicate that this added bit of functionality is available.
Also note that glean's pointSprite test only checks for
GL_ARB_point_sprite before trying to use
GL_POINT_SPRITE_COORD_ORIGIN. Naturally, that fails on
non-2.0 implementations (i.e., Mac OS X on GMA 950).
2009-11-25 16:31:28 -08:00
Dave Airlie
e4c5fe52c9
radeon: fix context destroy needing lock for flushing.
...
Thanks to Intel code which I've just stolen pretty much as usual.
This fixes fdo bug 22851 which is a dri1 regression since rewrite.
Tested by: fpiobaf (Fabio) on #radeon
Signed-off-by: Dave Airlie <airlied@redhat.com >
2009-11-25 20:29:56 +10:00
Ian Romanick
b12ca6b87b
i915: Initialize Length and Offset fields when mapping a buffer object
...
This fixes an assertion failure in _mesa_MapBufferARB.
Fixes bugzilla #25253 .
2009-11-23 23:14:49 -08:00
Ian Romanick
da0883114b
shaderutil: Fix detection of shaders
...
Check for versions >= 2.0 (because some drivers return 3.0), and return
GL_FALSE if shaders are not detected.
2009-11-23 18:33:50 -08:00
Jakob Bornecrantz
a11750218f
autoconf: Fix case for not having package
...
(cherry picked from commit 5c4bdbd825 )
2009-11-23 20:09:36 +01:00
Michel Dänzer
601edbef17
Fix the DRI swrast driver for big endian platforms.
...
Too bad I didn't realize earlier how easy this could be...
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22767 .
2009-11-23 19:56:37 +01:00
Brian Paul
3128d65fd7
docs: document fixes for AIX
2009-11-19 09:35:01 -07:00
Tom Fogal
7593bcb6ec
gl: added mangled glXGetProcAddressARB define
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-19 09:33:32 -07:00
Tom Fogal
8f24e863c3
progs: Fix quoting issue with empty set of PROGRAM_DIRS.
...
Quotes are important to make sure the argument to test -n really
is the empty string, but that requires stringifying PROGRAM_DIRS.
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-19 09:26:39 -07:00
Tom Fogal
4e6e2462ea
mesa: define 32bit byteswap for AIX.
...
Fixes `xlib' driver build on AIX.
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-19 09:18:51 -07:00
Brian Paul
5117725fd0
docs: removed VC6/7 project files
2009-11-19 09:07:34 -07:00
Brian Paul
e16b59df42
docs: update news file for 7.6.1 release
2009-11-19 09:07:17 -07:00
Brian Paul
2a1505b42e
docs: remove VC6/7 project file info
2009-11-19 09:01:48 -07:00
Brian Paul
cba614bd88
mesa: omit VC6, VC7 project files from tarballs
...
Only VC8 project file is known to work.
2009-11-19 09:00:16 -07:00
Brian Paul
3bcf2d49f3
windows: remove old VC6 project files directory
...
Very out of date, according to Karl Schultz.
2009-11-19 08:57:39 -07:00
Alex Deucher
fe5c46546e
r600: disable compressed texture support
...
It's not implemented yet. fixes fdo bug 24047
2009-11-18 11:51:20 -05:00
Alex Deucher
c5add6a468
docs: Add note about r600
2009-11-18 11:32:55 -05:00
Alex Deucher
13b5a624b1
Revert "radeon: Fix legacy bo not to reuse dma buffers before refcount is 1."
...
This reverts commit 284a7af274 .
This breaks kde desktop effects. See fdo bug 24131
2009-11-18 11:27:36 -05:00
Brian Paul
027abddf4f
mesa: set version string to 7.6.1-rc1
2009-11-18 08:08:25 -07:00
Brian Paul
d449c07b8b
xorg/st: fixup builds against later dpms headers.
...
(cherry picked from master, commit e9d6ab72be )
2009-11-18 08:07:56 -07:00
Brian Paul
2b3ea2be90
docs: i965 clipping fix
2009-11-17 15:53:27 -07:00
Eric Anholt
514544f373
i965: Fix Ironlake shadow comparisons.
...
The cube map array index arg is always present.
2009-11-12 11:41:39 -08:00
Eric Anholt
5f305b1db9
i965: Fix VBO last-valid-offset setup on Ironlake.
...
Instead of doing math based on the (broken for VBO && offset != 0)
input->count number, just use the BO size. Fixes assertion failure in ETQW.
2009-11-12 11:41:39 -08:00
Roland Scheidegger
ab12e764ba
i965: fix EXT_provoking_vertex support
...
This didn't work for quad/quadstrips at all, and for all other primitive types
it only worked when they were unclipped.
Fix up the former in gs stage (could probably do without these changes and
instead set QuadsFollowProvokingVertexConvention to false), and the rest in
clip stage.
2009-11-11 17:57:56 -08:00
Eric Anholt
1220aba99b
i965: Fix VS constant buffer value loading.
...
Previously, we'd load linearly from ParameterValues[0] for the constants,
though ParameterValues[1] may not equal ParameterValues[0] + 4. Additionally,
the STATE_VAL type paramters didn't get updated.
Fixes piglit vp-constant-array-huge.vpfp and ET:QW object locations.
Bug #23226 .
2009-11-10 14:44:40 -08:00
Eric Anholt
e5ffb9f5ea
i965: Unalias src/dst registers for SGE and friends.
...
Fixes piglit vp-sge-alias test, and the googleearth ground shader. \o/
Bug #22228
(cherry picked from commit 56ab92bad8 )
2009-11-10 14:44:39 -08:00
Eric Anholt
23a4a6727e
i965: Allow use of PROGRAM_LOCAL constants in ARB_vp.
...
Fixes piglit arl.vp.
(cherry picked from commit d52d78b4bc )
2009-11-10 14:44:39 -08:00
Alex Deucher
74ef3207d8
r600: don't emit htile regs
...
These are needed for HiZ which is not currently used and
the _BASE reg requires a reloc which is not currently supported
in the drm.
2009-11-09 12:27:27 -05:00
Ian Romanick
2cda507fa1
prog parse: Handle GL_VERTEX_PROGRAM_ARB in glLoadProgramNV
2009-11-07 15:54:33 -08:00
Ian Romanick
6d2ceda780
prog parse: Handle GL_VERTEX_PROGRAM_NV in glProgramStringARB
...
Handle both NV vertex programs and NV vertex state programs passed to
glProgramStringARB.
2009-11-07 15:54:33 -08:00
Ian Romanick
289db82b2d
prog parse: Handle GL_FRAGMENT_PROGRAM_ARB in glLoadProgramNV
2009-11-07 15:54:32 -08:00
Ian Romanick
7452877cf6
prog parse: Handle GL_FRAGMENT_PROGRAM_NV in glProgramStringARB
2009-11-07 15:54:32 -08:00
Ian Romanick
26d2ce0a09
GLX: Change GLX client vendor string to "Mesa Project and SGI"
...
This change allows a certain closed-source browser plug-in to work
with open-source drivers.
2009-11-06 14:52:49 -08:00
Ian Romanick
9348ac03ce
ARB prog parser: Regenerate parser from previous commits.
2009-11-06 10:46:23 -08:00
Ian Romanick
d8e256f923
ARB prog parser: Release old program string in _mesa_parse_arb_{fragment,vertex}_program
...
The program structure passed to _mesa_parse_arb_program is just a
place holder. The stings that actually need to be released are only
known to the functions calling _mesa_parse_arb_program, so they should
be freed there.
2009-11-06 10:46:22 -08:00
Ian Romanick
301a9b7e28
ARB prog parser: Release strings returned from the lexer that don't need to be kept
2009-11-06 10:46:22 -08:00
Ian Romanick
1c7337d46e
Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"
...
This reverts commit 93dae6761b .
This change was completely broken when the parser uses multiple
strings in a single production. It would be nice if bug fixes could
initially land somewhere other than the stable branch.
2009-11-06 10:46:22 -08:00
Brian Paul
63191bd244
xmesa: pass pixmap to clip_for_xgetimage()
...
The code was assuming ctx->DrawBuffer == ctx->ReadBuffer.
Passing the pixmap is simpler and better.
Fixes a potential segfault.
2009-11-05 16:48:52 -07:00
Brian Paul
7c623905bc
mesa: added cast to silence warning
2009-11-04 17:58:43 -07:00
Brian Paul
1c3f7ab74c
vbo: fix out-of-bounds array access
...
The exec->vtx.inputs[] array was being written past its end. This was
clobbering the following vbo_exec_context::eval state. Probably not noticed
since evaluators and immediate mode rendering don't happen at the same time.
Fixed the loop in vbo_exec_vtx_init().
Changed the size of the vbo_exec_context::vtx.arrays[] array.
Added a bunch of debug-build assertions.
Issue found by Vinson Lee.
2009-11-04 17:51:28 -07:00
Brian Paul
bc4ad7c2ae
mesa: fix broken pack_histogram() case for GLhalf
2009-11-04 17:42:30 -07:00
Brian Paul
76aa0c0fd3
mesa: silence warning from gcc 4.4.1
2009-11-04 17:42:01 -07:00
Vinson Lee
60c328db2d
progs/tests: Fix MSVC build.
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-04 15:56:14 -07:00
Alan Hourihane
f1b91ccc08
Fix YTILE spantmp functions
2009-11-04 15:26:38 +00:00
Vinson Lee
51f7763c00
glslcompiler: Fix Mac OS build.
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-04 07:14:55 -07:00
Brian Paul
6eb71519f7
mesa: (GLint64) casts in get.c to silence Visual Studio warnings
...
Revised version of a patch from Karl Schultz.
2009-11-03 16:13:24 -07:00
Brian Paul
c5106339d3
docs: fix 7.6 build with Visual Studio
2009-11-03 16:12:02 -07:00
Karl Schultz
804d367a47
windows: updated VC8 project file
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-03 16:09:29 -07:00
Karl Schultz
077eb0d81c
windows: remove old entrypoints from mesa.def file
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-03 16:08:46 -07:00
Karl Schultz
e713a95c96
mesa: added GLAPIENTRY keywords for sync object functions
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-03 16:05:12 -07:00
Marek Olšák
a0cd2b7029
st/mesa: clip pixels in draw_stencil_pixels to avoid crash
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-03 09:48:04 -07:00
Brian Paul
e60ebebb39
st/mesa: don't use util_blit_pixels_writemask() for depth or depth/stencil
...
util_blit_pixels_writemask() only works for color formats at this time.
Also, it might never work for depth/stencil surfaces since we can't get
handle stencil values in a fragment shader.
Fixes glCopyTexSubImage(GL_DEPTH_COMPONENT).
2009-11-03 09:48:04 -07:00
Brian Paul
0197348641
st/mesa: fix tests for depth and depth/stencil texture formats
2009-11-03 09:48:04 -07:00
Vinson Lee
e055665752
glx: Fix memory leak if XF86DRICreateDrawable() fails
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-11-02 12:35:47 -07:00
Chow Loong Jin
35506dec67
Add --with-dri-searchpath argument
...
* Add an extra argument to configure which allows for specifying
different DRI driver search paths to libGL (FDO #24766 )
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-10-30 06:00:13 -07:00
Brian Paul
02b9fb9c80
progs/tests: fixes for drawbuffers.c
...
Disable GL_DEPTH_TEST before glDrawPixels.
Show color buffer 0 on left, color buffer 1 on right.
2009-10-29 14:46:35 -06:00
Brian Paul
635ea87374
progs/tests: added test for GL_EXT_texture_compression_s3tc support
2009-10-28 21:50:51 -06:00
Vinson Lee
96128fdf2f
mesa: Fix memory leak if we run out of memory
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-10-28 17:59:49 -06:00
Vinson Lee
c0a61c8442
intel: Fix memory leak in case of renderbuffer bad format
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-10-28 13:09:44 -06:00
Brian Paul
0219cd0961
mesa: remove unneeded #includes
2009-10-28 11:13:21 -06:00
Brian Paul
5e3b2baae7
mesa: include imports.h to silence warning
2009-10-28 11:11:30 -06:00
Vinson Lee
a7d0665c00
intel: Fix memory leak in event of mip tree allocation failure
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-10-28 11:10:14 -06:00
Ian Romanick
93dae6761b
ARB prog parser: Fix epic memory leak in lexer / parser interface
...
Anything that matched IDENTIFIER was strdup'ed and returned to the
parser. However, almost every case of IDENTIFIER in the parser just
dropped the returned string on the floor. Every swizzle string, every
option string, every use of a variable, etc. leaked memory.
Create a temporary buffer in the parser state (string_dumpster and
dumpster_size). Return strings from the lexer to the parser in the
buffer. Grow the buffer as needed. When the parser needs to keep a
string (i.e., delcaring a new variable), let it make a copy then.
The only leak that valgrind now detects is /occasionally/ the copy of
the program string in gl_program::String is leaked. I'm not seeing
how. :(
2009-10-27 17:06:18 -07:00
Ian Romanick
8df9587d68
ARB prog parser: Don't leak program string
...
The program string is kept in the program object. On the second call
into glProgramStringARB the previous kept string would be leaked.
2009-10-27 17:06:18 -07:00
Ian Romanick
0f255d1956
ARB prog parser: Don't leak symbol table header structures
2009-10-27 17:06:18 -07:00
Eric Anholt
2643a7ba29
intel: Fix flipped condition in ARB_sync GetSYnciv(GL_SYNC_STATUS).
...
Bug #24435
(cherry picked from commit d56125a298 )
2009-10-27 16:59:03 -07:00
Brian Paul
b7eea8c616
intel: added region draw_x/y offsets in x/y_tile_swizzle() funcs
...
This fixes the second part of bug 23552.
2009-10-27 17:35:30 -06:00
Brian Paul
498fcfd315
progs/tests: added new blitfb.c test
...
Tests glBlitFramebuffer() between two texture/renderbuffer surfaces.
In particular, blit from level[1] of a cube map face to a 2D texture.
Used to find/fix bug in intel do_copy_texsubimage().
See commit aef1ab1073f3e30d699b99dae17518ed48b57c72
2009-10-27 16:46:20 -06:00
Brian Paul
22575abdec
intel: fix src offset bug in do_copy_texsubimage()
...
Use src->draw_offset intead of zero. Zero usually worked, except when
the src renderbuffer is actually a texture mipmap level higher than zero.
Fixes progs/test/blitfb.c test.
2009-10-27 16:46:20 -06:00
Brian Paul
517ae7a3b6
glsl: fix memory leak
...
A slightly modified version of a patch from Vinson Lee.
2009-10-27 16:29:15 -06:00
Eric Anholt
70b17db918
i915: Fix driver for the miptree x/y offset changes.
...
Bug #24734 .
2009-10-27 10:27:15 -07:00
Brian Paul
43dc91f8bb
i965: be clear that the Fallback field is a boolean, not a bitfield
2009-10-27 09:31:53 -06:00
Brian Paul
f9e334cb32
Revert "i965: fix hacked Fallback usage in brw_prepare_vertices()"
...
This reverts commit 8810b8f671 .
It turns out the i965 driver uses the intel->Fallback field as a boolean,
not as a bitmask. The intelFallback() function is a no-op in the i965
driver. It would have been nice if there were some comments about this.
I'll fix that next...
2009-10-27 09:31:53 -06:00
Vinson Lee
42732611d3
draw: Fix memory leak.
...
This would only be hit if we got and invalid index_size.
2009-10-27 09:14:29 -06:00
Brian Paul
0a47631849
docs: document Intel glBitmap fixes
2009-10-26 10:58:47 -06:00
Brian Paul
48dad9c93f
intel: fix GL state bugs in intel_texture_bitmap()
...
Need to push texture state and polygon state too.
Fixes rendering glitches seen in progs/demos/engine when changing
the rendering mode (wireframe, texture modes).
This makes bitmap rendering a little slower, unfortunately.
2009-10-26 10:44:22 -06:00
Brian Paul
dc8b139aa2
mesa: remove FBO texture depth/stencil test
...
The texture format should not be checked until validation time since
the format might be changed by a subsequent glTexImage() call.
2009-10-23 18:22:41 -06:00
Brian Paul
0acb057ad1
mesa: fix broken _mesa_str_checksum()
2009-10-23 16:36:15 -06:00
Eric Anholt
2d17dbfb53
intel: Keep track of x,y offsets in miptrees and use them for blitting.
...
By just using offsets, we confused the hardware's tiling calculations,
resulting in failures in miptree validation and blit clears.
Fixes piglit fbo-clearmipmap.
Bug #23552 . (automatic mipmap generation)
2009-10-23 14:12:24 -07:00
Brian Paul
b01937a3c9
progs/tests: print requested/internal format info
2009-10-23 14:52:10 -06:00
Brian Paul
96d7d66dff
docs: document updated GL extension header files
2009-10-23 14:49:47 -06:00
Brian Paul
5c0dc902e7
gl: updated wglext.h to version 17
2009-10-23 14:49:26 -06:00
Brian Paul
559da98c2b
gl: updated glxext.h to version 25
2009-10-23 14:49:26 -06:00
Brian Paul
9df9696f6d
gl: updated glext.h to version 56
2009-10-23 14:49:20 -06:00
Brian Paul
ff3f09a7fe
docs: document cell, glGetTexLevelParameter() fixes
2009-10-23 14:45:44 -06:00
Brian Paul
cd62b4f00a
mesa: fix GL_TEXTURE_INTERNAL_FORMAT query for compressed formats
...
Need to return the actual compressed format when the user originally
requested a generic compressed format.
2009-10-23 14:45:44 -06:00
Brian Paul
9528dc6ed8
mesa: added _mesa_compressed_format_to_glenum()
...
Maps a compressed MESA_FORMAT_x to correspding GLenum. Needed for
querying a texture's actual format when a generic format was originally
requested.
2009-10-23 14:45:44 -06:00
Brian Paul
5e4f5e41a4
mesa: change s3tc vs. fxt1 priority when choosing compressed formats
2009-10-23 14:45:44 -06:00
Ian Romanick
dd24501665
ARB prog parser: Fix parameter array size comparison
...
Array indexes are invalid when >= the maximum, but array sizes are
only in valid when > the maximum. This prevented programs from
declaring a single maximum size array.
See the piglit vp-max-array test.
2009-10-22 19:20:15 -07:00
Brian Paul
55058652b8
intel: flush old context before binding new context
...
Per the GLX spec, when changing rendering contexts, the old context
should first be flushed.
2009-10-22 18:33:26 -06:00
Brian Paul
5e6a6a2719
glx: don't destroy context immediately if it's currently bound
...
According to the GLXDestroyContext() man page, the context should not
immediately be destroyed if it's bound to some thread. Wait until it's
unbound to really delete it. The code for doing the later part is
already present in MakeContextCurrent() so no change was needed there.
2009-10-22 18:20:28 -06:00
Brian Paul
4837e01bcd
mesa: code refactoring- new _mesa_finish(), _mesa_flush()
2009-10-22 18:16:10 -06:00
Brian Paul
61a96a2ac7
progs/xdemos: fix command line flag typo
2009-10-22 17:11:59 -06:00
Brian Paul
8810b8f671
i965: fix hacked Fallback usage in brw_prepare_vertices()
...
Setting intel->Fallback = 1 clobbered any fallback state that was already
set. Not sure where this hack originated (the git history is a little
convoluted). Define and use a new BRW_FALLBACK_DRAW bit instead. This
shouldn't break anything and could potentially fix some bugs (but no
specific ones are known).
2009-10-22 16:52:59 -06:00
Brian Paul
c24466c34e
intel: define INTEL_FALLBACK_DRIVER for drivers
2009-10-22 16:52:59 -06:00
Brian Paul
ea659f8917
intel: Fallback field is a bitmask, use GLbitfield
2009-10-22 16:52:59 -06:00
Brian Paul
f9bbbe5803
i965: remove unused brw_context::tmp_fallback field
2009-10-22 16:52:59 -06:00
Brian Paul
2f7abf5c04
i965: remove unused BRW_FALLBACK_TEXTURE bit
...
The value was probably wrong too.
It was the same as INTEL_FALLBACK_DRAW_BUFFER.
2009-10-22 16:52:59 -06:00
Andre Maasikas
869e20bcb7
r600: set barrier for tex inst if dst is used earlier, might overwrite it otherwise
2009-10-22 09:45:11 +03:00
Andre Maasikas
a88c9296cb
r600: need to export something from PS
...
Also avoids empty shader for "END" - seems to be somewhat valid fp
Maybe this can be done differently in the future (fake FRAG_RESULT_COLOR
already in Map_Fragment_Program() or is there a way to program the chip
to not hang in case of no exports.
2009-10-22 09:44:03 +03:00
Andre Maasikas
b86302283b
r600: add beginnings of ARL instruction
2009-10-22 09:42:42 +03:00
Brian Paul
5283a3fb25
progs/trivial: check if GL_ARB_occlusion_query is supported
2009-10-20 16:22:03 -06:00
Marc Dietrich
4b2cf92ad9
cell: fix compilation on cell
...
s/LERP/LRP/
2009-10-20 11:17:12 -06:00
Vinson Lee
ca940a73a7
mesa: Fix Mac OS build.
...
strtod_l needs the xlocale.h header on Mac OS. It's possible other
non-Linux OSes would need this header too.
2009-10-20 10:43:49 -06:00
Mathias Fröhlich
16e21191e2
r300: fix texture size handling with size > 2048
...
The in kernel texture check fails because of both
bit11 flags being set on 16x16 textures. It tuns out
that these bits are still set and not cleared in the
pp_txpitch field of the texture. The attached patch
at least helps for this case on my machine. It clears
the bit 11 from the pitch field if the texture is smaller
and masks out that hight bits on the conventional width
and height field.
Fixes bug 24584
2009-10-19 11:47:21 -04:00
Robert Noland
8123180ea6
r600: Fix size calculation for 24 bit depth
...
size was being calculated based on 3 bytes per pixel with 24 bit depth
instead of 4 bytes. This caused corruption in the bottom 25% of objects.
This finishes fixing the menu/text corruption in compiz/kde4.
Signed-off-by: Robert Noland <rnoland@2hip.net >
2009-10-19 11:09:10 -04:00
Maciej Cencora
3594b53c01
r300: fix vertex program parameters limits
2009-10-16 20:21:17 +02:00
Brian Paul
946bc9aa42
docs: document GLSL float parsing bug fix
2009-10-16 07:38:39 -06:00
Brian Paul
89b31c9619
mesa: use C locale for _mesa_strtod()
...
_mesa_strtod() is used for shader/program parsing where the decimal
point character is always '.' Use strtod_l() with a "C" locale to
ensure correct string->double conversion when the actual locale uses
another character such as ',' for the decimal point.
Fixes bug 24531.
2009-10-16 07:36:50 -06:00
Owen Taylor
3f30b0709b
Use the right pitch when rendering to a texture
...
We need to get the pitch from the texture level we are rendering to,
rather than just using the base texel width.
2009-10-15 11:33:08 -04:00
Robert Noland
16c6a3b71e
r600: FRAG_ATTRIB_WPOS and FRAG_ATTRIB_FOGC appear to be supported.
...
Report unsupported attributes while I'm here.
Signed-off-by: Robert Noland <rnoland@2hip.net >
2009-10-15 11:29:52 -04:00
Robert Noland
a176b1c5d8
r600: cleanup in r600_cs_process_relocs().
...
Signed-off-by: Robert Noland <rnoland@2hip.net >
2009-10-15 11:29:45 -04:00
Robert Noland
e5d6450c2c
radeon: return EINVAL for 0 length buffers.
...
Signed-off-by: Robert Noland <rnoland@2hip.net >
2009-10-15 11:29:35 -04:00
Andre Maasikas
22a0029a68
r600: fix tfp1 bo size
...
Setting the wrong bo size resulting in an incomplete
read cache flush when reading the texture. This fixes the
compiz text corruption.
[agd5f: take hw pitch alignment into account]
2009-10-15 11:24:49 -04:00
Andre Maasikas
a3fec14101
r600: implement ProgramStringNotify
...
need this to properly test with piglit/glean vert/fragprog tests
copied mostly from r300, many thanks to osiris, nha, airlied, others...
2009-10-15 11:22:18 -04:00
Andre Maasikas
606becc7f3
r600: LIT dst.y gets value from src.x
...
seems I overlooked this when removing hardcoded swizzles for this
one previously
2009-10-15 11:21:15 -04:00
Andre Maasikas
74c31e5d05
r600: DPH adds w comp of second operand, so set first one to 1 instead
2009-10-15 11:20:04 -04:00
Andre Maasikas
95851d8cb2
r600: fixup KIL instruction a bit
...
- KILLGT takes 2 arguments
- arb KIL has no dst register
- add TODO about clause ending but currently piglit fp-kil passes and
does not hang the card
2009-10-15 11:18:53 -04:00
Andre Maasikas
bf68e54a4d
r600: use CB_TARGET_MASK instead of CB_SHADER_MASK for setting color mask
...
makes blend functions work better
Signed-off-by: Dave Airlie <airlied@linux.ie >
2009-10-15 11:17:09 -04:00
Andre Maasikas
5101215a64
r600: user correct alpha blend factor
...
Signed-off-by: Dave Airlie <airlied@linux.ie >
2009-10-15 11:16:53 -04:00
Andre Maasikas
f7285bdffc
r600: clear position enable bit when when wpos is not used by FP
...
Makes doom3 alot nicer..
2009-10-15 11:16:41 -04:00
Brian Paul
6f8b4d9e36
mesa: regenerated lex.yy.c w/ _mesa_strtod()
2009-10-15 08:59:13 -06:00
Neil Roberts
269f16cd96
mesa: Use _mesa_strtod in the lexer for assembly shaders
...
See bug 24531.
2009-10-15 08:57:07 -06:00
Brian Paul
31f7e8efb2
progs/Makefile: remove extra quoting
...
This reverts part of commit 115edf24a9 and
fixes the error: "/bin/sh: line 0: test: too many arguments".
2009-10-14 09:37:53 -06:00
Tom Fogal
115edf24a9
Fix build when PROGRAM_DIRS is empty.
...
SUBDIRS just takes PROGRAM_DIRS value. If PROGRAM_DIRS gets set
to the empty string (as can happen when building only OSMesa), a
'for' loop will lack anything to iterate over, causing a parse
error.
This fixes the issue by making sure SUBDIRS is the null string
when PROGRAM_DIRS is, and wrapping the for loops in if's, causing
them only to execute if there are directories to iterate over.
2009-10-13 16:22:09 -06:00
Tom Fogal
9282edfaa0
ac: Fix AIX shared library builds.
...
AIX uses ".a" for both static and shared library extensions.
2009-10-13 16:22:06 -06:00
Eric Anholt
f3be27c0cf
i965: Fix the last valid address setting for the index buffer.
...
Again, last valid address, not first invalid address. Fixes regression
in 255e5be265 that the kernel now catches
and caused piglit draw_elements_base_vertex to fail.
2009-10-11 11:21:03 -07:00
Eric Anholt
a82da7fa26
i965: Fix the bounds emitted in the vertex buffer packets.
...
It's the address of the last valid byte, not the address of the first
invalid byte.
This should also fix problems with rendering with the new sanity checks in
the kernel.
2009-10-11 11:21:03 -07:00
Brian Paul
768481ed40
softpipe: revert 564df9dc5f
...
This change silenced valgrind warnings but broke progs/tests/drawbuffers.
The problem is we don't know the surface's state when we start caching it
(it may or may not be initialized/cleared/etc). So "clearing" it here was
presumptuous. Leaving the code in place (but disabled) for reference and
when using valgrind.
Fixes bug 24401
2009-10-10 09:18:14 -06:00
Alex Deucher
194ede4bf9
radeon: fix scissor regression
...
fixes fdo bug 24248
2009-10-09 15:44:32 -04:00
Brian Paul
2738681e84
docs: fix aux buffer bug 24426
2009-10-09 13:23:07 -06:00
Brian Paul
6164f1fe79
st/mesa: create aux buffers according to visual
...
Fixes bug 24426 for gallium.
2009-10-09 13:22:15 -06:00
Brian Paul
ce64e063a8
mesa: fix incorrect assertion in _mesa_add_aux_renderbuffers()
...
Fixes bug 24426.
2009-10-09 13:22:00 -06:00
Brian Paul
f7fb30f03b
mesa: regenerated gl_mangle.h file
2009-10-08 09:19:42 -06:00
Brian Paul
ee3fbe7067
gallium/xlib: call XQueryExtension() in glXQueryExtension()
...
See bug 24321.
2009-10-07 14:43:27 -06:00
Brian Paul
9f002e4aaa
mesa/xlib: call XQueryExtension() in glXQueryExtension()
...
See bug 24321.
2009-10-07 14:42:16 -06:00
Brian Paul
7dd2c0afd6
mesa: don't need to free textures, VBOs, etc. in _mesa_meta_free()
...
They're freed by the normal context deallocation code.
Fixes Blender crash, bug 24185.
2009-10-07 14:07:49 -06:00
Nicolai Hähnle
9fde81bb20
shader_api: Fix bounds checking of glUniform and glUniformMatrix
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
2009-10-07 20:36:23 +02:00
Nicolai Hähnle
ae351599f1
prog_parameter: Document the fact that Size may be > 4
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-10-07 20:33:55 +02:00
Brian Paul
cdcd9da480
docs: fix glXQueryDrawable() bugs
2009-10-07 09:41:38 -06:00
Brian Paul
c3eef6021a
mesa/xlib: fix glXQueryDrawable() bugs, see bug 24320
2009-10-07 09:41:38 -06:00
Brian Paul
0526100a5c
gallium/xlib: fix glXQueryDrawable() bugs, see bug 24320
2009-10-07 09:41:38 -06:00
Brian Paul
f36425b569
progs/xdemos: test glXQueryDrawable()
2009-10-07 09:41:38 -06:00
Brian Paul
846a6b0695
progs/xdemos: fix swapped parameters to CreatePbuffer()
2009-10-07 09:41:38 -06:00
Brian Paul
edbaa717b4
swrast: s/GLfloat/GLuint/ in bzero()
2009-10-07 08:07:53 -06:00
Brian Paul
14f21c7850
swrast: add missing returns
2009-10-07 08:05:28 -06:00
Vinson Lee
4b3cbecb3a
progs/test: Fix MSVC build.
2009-10-07 07:54:31 -06:00
Brian Paul
e3fff3daf0
mesa/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
...
A little better than leaving the values undefined, I think.
See bug 24321.
2009-10-07 07:45:59 -06:00
Brian Paul
f9904edf53
gallium/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
...
A little better than leaving the values undefined, I think.
See bug 24321.
2009-10-07 07:45:59 -06:00
Brian Paul
79892e7976
intel: use driReadDrawable in do_copy_texsubimage()
2009-10-05 14:26:16 -06:00
Brian Paul
3b7ec94c0d
intel: use driReadDrawable, not driDrawable in do_blit_readpixels()
2009-10-05 14:25:36 -06:00
Brian Paul
3b29dcbb5e
intel: remove a buffer equality test in _mesa_make_current()
...
Before, if we called glXMakeCurrent() to change a context's window binding
while an FBO was bound, we weren't updating the intel->driDrawable and
intel->driReadDrawable fields. This could cause us to dereference a null
pointer elsewhere.
2009-10-05 14:07:29 -06:00
Brian Paul
a8768bbc9d
mesa: fix return value when clipping {Read,Draw}Pixels height <= 0
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
(cherry picked from master, commit 7aeaca33c3 )
2009-10-05 11:10:31 -06:00
Jon TURNEY
a15d9ca9cc
Fix building of GLSL demos which use M_PI
...
Some <math.h> files do not define M_PI, in which case, provide our own definition
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk >
2009-10-05 11:07:23 -06:00
Michel Dänzer
43750f1575
Use _mesa_select_tex_image() rather than hardcoding face 0.
...
Fixes crash loading a map in sauerbraten with
hwmipmap 1
in ~/.sauerbraten/config.cfg.
2009-10-05 12:31:51 +02:00
Frederic Crozat
3856c3cc46
r200: remove subpixel offset from viewport
...
Fixes bug fdo 20340 for r200.
2009-10-04 17:50:16 -04:00
Nicolai Hähnle
bbe384c86a
r300: Workaround problem on R500 with very large fragment programs
...
The non-KMS interface is to blame here. In theory, a proper fix
could be produced that works for the KMS interface only, but it
require cleaning a lot of mess. Easier to just do it right in r300g.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-10-03 01:39:13 +02:00
Brian Paul
c01a77d304
docs: document default texture binding fix
2009-10-02 09:58:16 -06:00
Brian Paul
e1bddd159f
mesa: fix incorrect default texture binding in unbind_texobj_from_texunits()
...
If we deleted a currently bound texture, we were always reverting the texture
binding to the default 1D texture rather than the proper default texture.
2009-10-02 09:57:00 -06:00
Brian Paul
85ee0ef9a7
gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
...
The parameter is a bitmask.
2009-10-02 07:52:29 -06:00
Brian Paul
584b0879ac
xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
...
The parameter is a bitmask.
2009-10-02 07:51:19 -06:00
Brian Paul
abc12d0636
gallium/xlib: return GLX_RGBA_BIT or GLX_COLOR_INDEX_BIT in get_config()
...
This reverts part of commit a6b84aef4a
2009-10-02 07:47:49 -06:00
Brian Paul
389021220d
gallium: replace // comments with /* */
2009-10-02 07:31:42 -06:00
Brian Paul
337480e1f8
gallium: remove // comment and extra whitespace
2009-10-02 07:26:28 -06:00
Brian Paul
167ffa9e03
mesa: fix memory leak when generating mipmaps for compressed textures
2009-10-01 14:55:13 -06:00
Brian Paul
0574954238
mesa: fix mem leaks
2009-10-01 14:52:28 -06:00
Brian Paul
0f291f2efe
gallium/util: silence uninitialized var warning
2009-10-01 14:52:10 -06:00
Brian Paul
63064cf7c3
mesa: add missing return when out of memory
2009-10-01 14:51:43 -06:00
Brian Paul
7b568614a2
mesa: fix potential uninitialized memory reads
2009-10-01 14:51:26 -06:00
Brian Paul
9b27a0d063
glsl: fix mem leak
2009-10-01 14:50:45 -06:00
Brian Paul
b3e41e0d5e
st/mesa: check for null before asserts, fix possible mem leak
2009-10-01 14:49:39 -06:00
Brian Paul
b154497bef
st/mesa: silence hidden parameter warning
2009-10-01 14:49:04 -06:00
Brian Paul
495628bc5c
st/mesa: fix non-mipmap lastLevel calculation.
...
reviewed by Brian Paul.
(cherry picked from master, commit ae2daacbac )
2009-10-01 13:34:49 -06:00
Vinson Lee
18883cdf23
mesa: Return -FLT_MAX instead of 0 for LG2(0).
...
lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0
for LG2(0).
2009-10-01 13:33:20 -06:00
Brian Paul
521e4b9b7e
glx: fix glXQueryContext(GLX_RENDER_TYPE)
...
The renderType parameter to CreateContext() was never used. Also, it
was often passed as zero. Now when it's zero we check if the context
is RGBA or CI mode and set it accordingly.
Fixes bug 24211.
2009-09-30 15:15:10 -06:00
Eric Anholt
49fbdd18ed
i965: Fix massive memory allocation for streaming texture usage.
...
Once we've freed a miptree, we won't see any more state cache requests
that would hit the things that pointed at it until we've let the miptree
get released back into the BO cache to be reused. By leaving those
surface state and binding table pointers that pointed at it around, we
would end up with up to (500 * texture size) in memory uselessly consumed
by the state cache.
Bug #20057
Bug #23530
2009-09-30 11:27:27 -07:00
Brian Paul
b77469871a
docs: document GLSL sqrt(0) fix
2009-09-29 19:05:04 -06:00
Brian Paul
322bc403bc
glsl: regenerated file
2009-09-29 18:59:37 -06:00
Brian Paul
65765c9f2c
glsl: rewrite sqrt(x) intrinsic to handle x=0
...
Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a
divide by zero if x=0 and wind up with unpredictable results.
Now use CMP instruction to test for x<=0 and return zero in that case.
2009-09-29 18:57:13 -06:00
Brian Paul
3c794e45b0
glsl: add support for CMP instruction
2009-09-29 18:51:49 -06:00
Brian Paul
5f1faf4a21
docs: fixed glXQueryContext(GLX_RENDER_TYPE)
2009-09-29 12:18:41 -06:00
Brian Paul
a6b84aef4a
gallium/xlib: fix GLX_RENDER_TYPE query
...
Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.
2009-09-29 12:17:20 -06:00
Brian Paul
86ee448047
mesa/xlib: fix GLX_RENDER_TYPE query
...
Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.
2009-09-29 12:16:20 -06:00
Brian Paul
ef9cd84521
glx: indentation fixes
2009-09-29 09:58:47 -06:00
Brian Paul
69a3043f41
mesa: bump version to 7.6.1
2009-09-29 09:36:06 -06:00
Brian Paul
2d400d43bf
docs: initial 7.6.1 release notes
2009-09-29 09:34:47 -06:00
Brian Paul
9b5541617f
mesa: work-around glXCopyContext() bug in _mesa_copy_texture_state()
...
See bug 24217.
2009-09-29 09:32:40 -06:00
Brian Paul
564df9dc5f
softpipe: initialize the clear_flags bitvector in sp_create_tile_cache()
...
This silences tons of valgrind warnings in programs that don't call
glClear(), such as progs/demos/gamma.
2009-09-29 08:51:00 -06:00
Brian Paul
fbddc75aa2
softpipe: Grab a ref when the fb is set.
...
Nasty bug when the surface is freed and another is allocated right on
top of it. The next time we set the fb state SP thinks it's the same
surface and doesn't flush, and when the flush eventually happens the
surface belongs to a completely different texture.
(cherry picked from commit a77226071f )
Conflicts:
src/gallium/drivers/softpipe/sp_context.c
2009-09-29 08:21:54 -06:00
Brian Paul
6829ef7460
docs: update news.html file with 7.5.2 and 7.6 release
2009-09-28 13:20:15 -06:00
Ian Romanick
d39fd9f641
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
...
Conflicts:
src/mesa/main/version.h
2009-09-28 12:02:39 -07:00
Ian Romanick
18f3afbe88
docs: 7.5.2 md5 sums
2009-09-28 11:41:23 -07:00
Ian Romanick
b807d49f18
Prep for 7.5.2 release
2009-09-28 11:33:52 -07:00
Ian Romanick
86cd188f94
docs: 7.6 md5 sums
2009-09-28 11:29:25 -07:00
Ian Romanick
f0dc378705
Prep for 7.6 release
2009-09-28 11:22:54 -07:00
Brian Paul
eeb7e04da6
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-28 09:59:59 -06:00
Robert Noland
d09941c8cc
Fix build on non GLIBC platforms (FreeBSD at least)
...
Build was broken by commit 9666529b5a
I'm not certain that this is entirely the correct fix since the demo
from bug #23774 seemed to work before the commit that broke the build.
Signed-off-by: Robert Noland <rnoland@2hip.net >
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-09-28 09:48:45 -06:00
Brian Paul
fc613848e6
docs: list additional 7.5.2 bug fixes
2009-09-28 09:43:42 -06:00
Brian Paul
c7d0f0b46c
docs: document gallium mipmap generation fix
2009-09-28 09:38:50 -06:00
Brian Paul
c7fddaf612
st/mesa: fix st_generate_mipmap() issues
...
The main issue is we didn't always have a gallium texture object with
enough space to store the to-be-generated mipmap levels. When that's
the case, allocate a new gallium texture and use st_texure_finalize()
to copy images from the old texture to the new one.
We also had the baseLevel parameter to st_render_mipmap() wrong.
2009-09-28 09:37:16 -06:00
Brian Paul
e3a6f57ad6
st/mesa: fix/simplify st_texture_object::lastLevel calculation
...
Don't compute the st_texture_object::lastLevel field based on the texture
filters. Use the _MaxLevel value that core Mesa computes for us.
When called from the GenerateMipmap path, we'll use the lastLevel field
as-is.
2009-09-28 09:35:08 -06:00
Brian Paul
41d0606b7f
gallium/util: add sanity check assertions
2009-09-28 09:35:04 -06:00
Michel Dänzer
151e0c0aea
intel: Handle GL_RGB8 for glCopyTex(Sub)Image.
...
Avoids an unnecessary fallback.
2009-09-25 21:00:28 +02:00
Vinson Lee
46da1f2c9b
mesa: move declaration before code
2009-09-25 08:51:57 -06:00
Eric Anholt
126d62edd1
i915: Fix GetBufferSubData in the case of a system-memory BO.
...
Bug #23760 (crashes in wine)
2009-09-24 20:04:42 -07:00
Eric Anholt
cc8084932c
intel: Flush the batch when we're about to subdata into a VBO.
...
This fixes the clears in openarena with the new metaops clear code, and
the new piglit vbo-subdata-sync test.
Bug #23857 .
2009-09-24 16:24:46 -07:00
Eric Anholt
54107a0979
i965: Clean up some mess with the batch cache.
...
Its flagging of extra state that's already flagged by the vtbl new_batch
when appropriate was confusing my tracking down of the OA clear bug.
2009-09-24 16:24:46 -07:00
Brian Paul
940ca2e837
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-24 16:01:26 -06:00
Vinson Lee
1730b8db12
softpipe: Increase GL_MAX_3D_TEXTURE_SIZE to 256.
2009-09-24 15:59:57 -06:00
Eric Anholt
726a04a2cd
i965: Emit zero initialization for NV VP temporaries as required.
...
This is similar to what r300 does inside the driver, but I've added it as
a generic option since it seems most hardware will want it.
Fixes piglit nv-init-zero-reg.vpfp and nv-init-zero-addr.vpfp.
2009-09-24 13:34:06 -07:00
Eric Anholt
a9a47afe7e
i965: Remove assert about NV_vp now that it somewhat works.
2009-09-24 13:34:06 -07:00
Eric Anholt
9018a7dd17
i965: Load NV program matrices when required.
2009-09-24 13:34:06 -07:00
Eric Anholt
601769a2c0
mesa: Initialize NV_vertex_program fields for the parameter lists and such.
...
This helps let drivers treat NV_vp like ARB_vp.
2009-09-24 13:34:06 -07:00
Brian Paul
60b152a1b3
mesa: remove glEnable(GL_DEPTH_BOUNDS_TEST_EXT) check/warning
...
At the time of the enable there may not be a Z buffer, but one
may be attached to the FBO later.
2009-09-24 14:24:14 -06:00
Brian Paul
adfa778c8e
mesa: remove rgbMode check in enable_texture()
...
If the currently bound FBO isn't yet validated it's possible for
rgbMode to be zero so we'll lose the texture enable.
This could fix some FBO rendering glitches, but I don't know of
any specific instances.
2009-09-24 14:19:06 -06:00
Brian Paul
b849c6f1b3
intel: use default array/element buffers in intel_generate_mipmap()
...
If there happened to be a bound VBO when intel_generate_mipmap() was
called we blew up because of a bad vertex array pointer.
Fixes regnumonline, bug 23859.
2009-09-24 12:41:14 -06:00
Brian Paul
f0339f502c
mesa: replace assertion with no-op function assignment
2009-09-24 12:37:34 -06:00
Brian Paul
964792b025
mesa: added comment
2009-09-24 12:37:06 -06:00
Brian Paul
1a81611725
vbo: limit number of warnings to 10
...
Otherwise some apps will emit tons of warnings.
2009-09-24 12:36:05 -06:00
Pauli Nieminen
1d2dca194c
radeon: Fix scissors for r600 KMS.
...
Radeon generic scissors code had problem that some of code was using exclusive
and some inclusive bottom right corner. Only r600 driver is using exclusive
coordinate so changed generic code to pass inclusive coordinate and r600 driver
changes BR coordinate to be exclusive.
2009-09-24 20:37:55 +03:00
Brian Paul
7549a8397b
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-24 10:52:15 -06:00
Brian Paul
a64d4516a0
tgsi/sse: Pass the lodbias, not zero. More comments.
...
This fixes the glean/glsl1 "texture2D(), with bias" test when using SSE.
2009-09-24 10:28:09 -06:00
Brian Paul
a491e25b1f
mesa: added default case return to silence warning
2009-09-24 10:28:09 -06:00
Brian Paul
00ddd4f9e9
glsl: init var to silence warning
2009-09-24 10:28:09 -06:00
Brian Paul
e44c084be5
glsl: fix missing initializers warning
2009-09-24 10:28:09 -06:00
Andre Maasikas
2058dfaa47
r600: add support for CUBE textures, also TXP
...
seems to work here ...
2009-09-24 10:03:37 -04:00
Alex Deucher
639fb1472d
r600: fix typo in the last commit
...
128 gprs, 256 reg-based consts
2009-09-24 10:03:22 -04:00
Alex Deucher
28308c9260
r600: various cleanups
...
- max texture size is 8k, but mesa doesn't support
that at the moment.
- attempt to set shader limits to what the hw actually
supports
- clean up some old r300 cruft
- no need to explicitly disable irqs. This is fixed
in the drm now.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com >
2009-09-24 10:03:08 -04:00
Andre Maasikas
ed91d10347
r600: fix some issues with LIT instruction
...
- MUL_LIT is ALU.Trans instruction
- some Trans instructions can take 3 arguments
- don't clobber dst.x, use dst.z as temp, it'll get written correct
value in last insn
- respect source swizzles
2009-09-24 10:02:37 -04:00
Alex Deucher
48559c7605
r600: fix point sizes
...
registers takes radius
2009-09-24 10:02:22 -04:00
Alex Deucher
095db818c6
r600: fix polygon offset
2009-09-24 10:02:08 -04:00
Alex Deucher
ec14d59afa
radeon: don't build non-r600 span code on r600
2009-09-24 10:01:56 -04:00
Alex Deucher
dbec27be85
r600: minor span cleanups
2009-09-24 10:01:41 -04:00
Andre Maasikas
2cd2dc34ac
r600: support position_invariant programs
2009-09-24 10:00:58 -04:00
Alex Deucher
9437ac9bcc
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-24 09:59:45 -04:00
Alex Deucher
93a7ea6ba0
r600: fix warning
...
Noticed by rnoland on IRC.
2009-09-24 09:59:32 -04:00
Andre Maasikas
7f5a958c80
r600: fix texcoords from constants
...
with some minor updates from Richard.
2009-09-24 09:59:15 -04:00
Andre Maasikas
9edd1a441c
r600: enable caching of vertex programs
2009-09-24 09:59:00 -04:00
Alex Deucher
6552a103f9
r600: check if textures are actually enabled before submission
...
noticed by taiu on IRC.
2009-09-24 09:58:36 -04:00
Alex Deucher
65b01d449c
r600: fix ftp for dri1
...
We use t->bo for dri1 since r600 uses CS for dri1.
2009-09-24 09:58:17 -04:00
Dave Airlie
b1e417413f
r600: don't setup hardware state if TFP
...
if we have a BO here it means TFP and we should have set it
up already.
tested by b0le on #radeon
2009-09-24 09:57:45 -04:00
Alex Deucher
cbab3d7f2a
r600: fix dri2 clipping
2009-09-24 09:56:18 -04:00
Maciej Cencora
84c7afd9e0
r300: fallback to software rendering if we are out of free texcoords
...
Fixes #22741
2009-09-23 23:22:33 +02:00
Brian Paul
2acd5de226
swrast: add lod bias when texture sampling
...
Mostly fixes progs/demos/lodbias when MESA_TEX_PROG=1. But the LOD still
seems off by -1 or so.
May be an issue with the params passed to _swrast_compute_lambda()
2009-09-23 13:36:44 -06:00
Brian Paul
890f37d4d9
mesa: don't bias LOD in shader interpreter; do it in swrast
2009-09-23 13:36:44 -06:00
Brian Paul
ad935c3f47
swrast: fix typo in partial derivatives parameter passing
2009-09-23 13:36:43 -06:00
Keith Whitwell
be66ff51ec
st/mesa: trim calculated userbuffer size
...
In get_array_bounds we were previously defining a user buffer sized as
(nr_vertices * stride). The trouble is that if the vertex data
occupies less than stride bytes, the extra tailing (stride - size)
bytes may extend outside the memory actually allocated by the app and
caused a segfault.
To fix this, define a the buffer bounds to be:
ptr .. ptr + (nr-1)*stride + element_size
2009-09-23 18:55:46 +01:00
Brian Paul
e41707beca
softpipe: added max texture/surface size sanity check
2009-09-23 10:50:38 -06:00
Brian Paul
84b956c29b
softpipe: increase MAX_WIDTH/HEIGTH 4096 to match max texture size
2009-09-23 10:46:27 -06:00
Brian Paul
926b965ed5
mesa: don't re-use the meta glDrawPixels VBO; create a new one each time
...
This should help to work around bugs 24083 and 23670.
2009-09-22 15:58:49 -06:00
Brian Paul
f338de4018
mesa: fix more buffer object error messages
2009-09-22 13:47:49 -06:00
Brian Paul
ba002eb196
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
...
Conflicts:
src/mesa/main/bufferobj.c
2009-09-22 13:44:43 -06:00
Brian Paul
bc75464760
glx: include string.h to silence missing memset() prototype warning
2009-09-22 13:19:15 -06:00
Brian Paul
52cadf7592
mesa: fix error message text
2009-09-22 13:19:11 -06:00
Nicolai Hähnle
8cc12ffb34
r300: Fix crash reported in bug #24066
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-22 21:00:01 +02:00
Tormod Volden
e857303305
GLX: Warn only once about applications calling GLX 1.3 functions
...
The warnings introduced in 1f309c40b8
would pour out generously from some applications. This patch adds a
"warn once" wrapper macro, heavily inspired by
src/mesa/drivers/dri/r600/radeon_debug.h
Signed-off-by: Tormod Volden <debian.tormod@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
2009-09-21 15:29:52 -07:00
Brian Paul
6559eaef59
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-21 14:49:46 -06:00
Brian Paul
2655d43756
mesa: refine the error checking vbo_exec_DrawRangeElements()
...
If the 'end' index is out of bounds issue a warning as before. But instead
of just no-op'ing the draw call, examine the actual array indices to see
if they're OK. If the max array index is out of bounds, issue another
warning and no-op the draw call. Otherwise, draw normally. This is a
debug build-only feature since it could impact performance.
This "fixes" the missing torus in the OGL Distilled / Picking demo.
2009-09-21 14:25:39 -06:00
Brian Paul
44d260329e
mesa: make max_buffer_index() a non-static function
2009-09-21 14:25:39 -06:00
Maciej Cencora
ff5535c521
radeon: update buffer map/unmap code for changes introduced in 92033a9516 and 822c796481
2009-09-21 21:13:01 +02:00
Maciej Cencora
db928a5e91
mesa: add some debug info to teximage.c
2009-09-21 21:12:55 +02:00
Maciej Cencora
ab4ec85f6c
r300: fix a typo
2009-09-21 21:12:31 +02:00
Eric Anholt
2b83483fb4
intel: Mark the FBO as incomplete if there's no intel_renderbuffer for it.
...
This happens to rendering with textures with a border, which had resulted
in a segfault on dereferencing the irb.
(cherry-picked from commit 8bba183b9e )
2009-09-21 10:02:38 -06:00
Brian Paul
5a0b29050f
softpipe: Fix cube face selection.
...
If arx and ary are equal, we still want to choose from one of them,
and not arz.
(cherry picked from commit de685b37a9 )
2009-09-21 08:36:05 -06:00
Brian Paul
077e3de989
swrast: fix cube face selection
...
If arx and ary are equal, we still want to choose from one of them,
and not arz.
This is the same as Michal's softpipe fix.
2009-09-21 08:36:05 -06:00
Nicolai Hähnle
526430ade1
r300: Zero-initialize register for NV_vertex_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-21 12:56:16 +02:00
Nicolai Hähnle
736e1ae42f
r300: Fix handling of NV_vertex_program parameters
...
The handling is a bit inefficient, unfortunately, but I don't want to make
any intrusive changes for Mesa 7.6.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-21 12:56:16 +02:00
Michel Dänzer
1d4dbd8d9b
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-21 10:39:20 +02:00
Michel Dänzer
999592745f
intel: Fix crash in intel_flush().
...
Since commit 2921a2555d ('intel: Deassociated
drawables from private context struct in intelUnbindContext'),
intel->driDrawable may be NULL in intel_flush().
2009-09-21 10:28:37 +02:00
Pauli Nieminen
284a7af274
radeon: Fix legacy bo not to reuse dma buffers before refcount is 1.
...
This should help detecting possible memory leaks with dma buffers and prevent
possible visual corruption if data would be overwriten too early.
2009-09-20 22:28:52 +03:00
Nicolai Hähnle
7e3b8b0d8f
r300/compiler: Fix trig instructions in R300 fp
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-20 20:43:32 +02:00
Pauli Nieminen
3640e4acde
radeon: Fix typo in variable name.
2009-09-20 21:08:42 +03:00
Pauli Nieminen
5fa9a7a9a9
radeon: Improve WARN_ONCE macro to appear as single statement.
...
Do-while makes macro safe to be used with if and for constructions.
Also remove __LINE__ macro from variable name because scope is local to macro anyway.
2009-09-20 20:15:52 +03:00
Nicolai Hähnle
94a3c5979f
radeon: Fix "verts" debugging enable
...
Copy'n'paste apparently prevented the RADEON_VERTS flag from being enabled.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-20 18:45:32 +02:00
Nicolai Hähnle
82c2f7756a
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-20 16:59:03 +02:00
Nicolai Hähnle
e617dd14ab
mesa/st: Create front renderbuffer on the fly when supplied with a surface
...
Normally, the mesa/st would create a fake front buffer out of a
client-allocated surface.
In the DRI setting, however, st/dri provides a front buffer surface which is
created and maintained by the X server. Prefer to use this surface instead,
so that front buffer rendering and reading works correctly.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-20 16:58:53 +02:00
Nicolai Hähnle
c4ce6f6a7c
mesa/st: Initialize format bits of framebuffer renderbuffers
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-20 16:54:40 +02:00
Nicolai Hähnle
c8c5de9e9a
docs: Document new features in radeon/r200/r300 drivers
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-20 16:47:40 +02:00
Nicolai Hähnle
6c323a2473
r300/compiler: Fix R300 fragment program regression introduced by 0723cd1...
...
We obviously need to move the code addr register backwards because their may
be overlap.
This bug affected in particular the Compiz water plugin.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-09-20 16:34:47 +02:00
Zou Nan hai
1e4c353511
[i965] add a missing header file
2009-09-18 16:04:41 +08:00
Zou Nan hai
a66bab0e37
[i965] use intel_batchbuffer_flush to flush the clear
2009-09-18 13:29:28 +08:00
Brian Paul
fac38e8c8f
mesa: fix clip plane, fog issues
2009-09-16 21:22:02 -06:00
Ian Romanick
9666529b5a
glx: Use initstate_r / random_r instead of corrupting global random number state
...
Previously srandom and random were used. This cause the global random
number generator state to be modified. This caused problems for
applications that called srandom before calling into GLX. By using
local state the global state is left unmodified.
This should fix bug #23774 .
2009-09-16 16:43:50 -07:00
Brian Paul
08d39251a7
st/mesa: fix some incorrect branching/clean-up code in TexImage functions
...
We need to be sure to call the _mesa_unmap_teximage_pbo() function if we
called _mesa_validate_pbo_teximage().
2009-09-16 13:07:15 -06:00
Brian Paul
cfa1a0a609
st/mesa: fix texture memory allocation bug
...
The following example caused an incorrect GL_OUT_OF_MEMORY error to be
raised in glTexSubImage2D:
glTexImage2D(level=0, width=32, height=32, pixels=NULL);
glTexImage2D(level=0, width=64, height=64, pixels=NULL);
glTexSubImage2D(level=0, pixels!=NULL);
The second glTexImage2D() call needs to cause the first image to be
deallocated then reallocated at the new size. This was not happening
because we were testing for pixels==NULL too early.
2009-09-16 12:57:26 -06:00
Ian Romanick
88e3a57605
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
...
Conflicts:
src/mesa/main/dlist.c
2009-09-16 07:57:19 -07:00
Ian Romanick
2921a2555d
intel: Deassociated drawables from private context struct in intelUnbindContext
...
The generic DRI infrastructure makes sure that __DRIcontextRec::driDrawablePriv
and __DRIcontextRec::driReadablePriv are set to NULL after unbinding a
context. However, the intel_context structure keeps cached copies of
these pointers. If these cached pointers are not NULLed and the
drawable is actually destroyed after unbinding the context (typically
by way of glXDestroyWindow), freed memory will be dereferenced in
intelDestroyContext.
This should fix bug #23418 .
2009-09-16 07:39:58 -07:00
Zou Nan hai
76e836a41a
i965: do a flush in clear, fix openarena render issue,
...
fd.o bug# 23857
2009-09-16 13:25:46 +08:00
Brian Paul
d9ddbc3f47
docs: glUniform functions are now compiled into display lists
2009-09-15 15:12:29 -06:00
Brian Paul
41fff1b9a1
mesa: compile glUniformMatrix() functions into display lists
...
I believe this is the last of the shader-related functions that needed
display list treatment.
2009-09-15 15:10:29 -06:00
Brian Paul
6681981fe1
mesa: implement more glUniform display list functions
2009-09-15 14:56:55 -06:00
Brian Paul
3ad108b77f
docs: document glUseProgram display list fix
2009-09-15 14:38:52 -06:00
Brian Paul
f42c66c138
mesa: compile glUniform4f() into display lists
...
Note: there are more glUniform functions to compile...
2009-09-15 14:37:45 -06:00
Brian Paul
81de9d68f7
mesa: compile glUseProgram/glUseProgramObjectARB into display lists
...
Fixes bug 23746
2009-09-15 14:37:45 -06:00
Ian Romanick
6c6fe0a704
Merge commit 'origin/mesa_7_5_branch' into mesa_7_6_branch
2009-09-15 13:13:35 -07:00
Ian Romanick
1f309c40b8
GLX: Complain when buggy applications call GLX 1.3 functions.
2009-09-15 13:12:22 -07:00
Brian Paul
5d526ed21a
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-15 09:45:18 -06:00
Brian Paul
2b992dc327
gl: restore some PFNGL typedefs
...
Commit d33c315d9e removed a few too many
typedefs. We need the typedefs in glext.h which are protected by #ifdef
GL_VERSION_1_2 but we can exclude the ones protected by
GL_VERSION_1_2_DEPRECATED.
2009-09-15 09:36:31 -06:00
Brian Paul
799631acb1
progs/vp: print program and error info when program does not compile
2009-09-14 17:48:17 -06:00
Brian Paul
ac3c8e3b53
glsl: added some link debug code (disabled)
2009-09-14 17:32:03 -06:00
Brian Paul
3129b2403e
docs: document linker/preprocessor bug fix
2009-09-14 17:27:47 -06:00
Brian Paul
b8b774c775
glsl: remove extra #version directives from concatenated shader sources
...
When we concatenate shaders to do our form of poor-man linking, if there's
multiple #version directives, preprocessing fails. This change disables
the extra #version directives by changing the first two chars to //.
This should help with some Wine issues such as bug 23946.
2009-09-14 17:24:25 -06:00
Vinson Lee
2729db8976
gallium: Add Mac OS to pipe/p_thread.h.
...
Mac OS also has POSIX threads.
2009-09-14 11:50:48 -06:00
Thierry Vignaud
1402ea8f39
configure: fix comment
2009-09-14 11:48:51 -06:00
Dan Nicholson
9c8b69302c
Use CFLAGS as HOST_CFLAGS by default
...
Unless we're cross compiling, the HOST_CFLAGS should be the same as the
normal CFLAGS. This allows the x86 and x86_64 asm to be built correctly
with a native compiler using -m32/-m64.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-09-12 09:35:43 -07:00
Brian Paul
280933f793
docs: mention the new Gallium llvmpipe driver
2009-09-11 13:43:51 -06:00
Brian Paul
d81086a86b
llvmpipe: asst fixes for 'make linux-llvmpipe'
2009-09-11 13:39:14 -06:00
Vinson Lee
0fa1692f14
mesa: raise GL_INVALID_ENUM not GL_INVALID_VALUE for glTexParamter errors
...
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-09-11 08:04:37 -06:00
Pauli Nieminen
796c96de80
radeon: Remove structure allocation from iterator variable.
...
dma_bo varaible is only used for iterating so allocating memory for it only
causes memory leaks.
2009-09-11 01:29:07 +03:00
Brian Paul
4b1cbfcbe6
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
2009-09-10 15:40:26 -06:00
Brian Paul
9e6ae75cc8
intel: disable intel_stencil_drawpixels() for now
...
It doesn't work reliably even when all the prerequisite checks are made.
2009-09-10 15:34:34 -06:00
Brian Paul
4d9bbabb83
docs: document Gallium glDrawPixels(GL_STENCIL_INDEX) fix
2009-09-10 14:15:07 -06:00
Brian Paul
3f4d776199
softpipe: minor indentation fix
2009-09-10 14:14:18 -06:00
Brian Paul
988db64119
softpipe: set dirty_render_cache in softpipe_clear()
...
This fixes a bug seen when doing a glDrawPixels(GL_STENCIL_INDEX) right
after a glClear(). The check-for-flush test was failing because we
didn't set the dirty_render_cache flag in softpipe_clear(). So we saw
stale data when we mapped the stencil buffer.
2009-09-10 14:11:41 -06:00
Brian Paul
79a3e298c5
docs: initial 7.5.2 release notes page
2009-09-10 12:50:08 -06:00
Ian Romanick
8fd4e4dfc3
Fix merge fail
...
One of the conflicst from this merge was missed:
commit 0c309bb494
Merge: c6c44bf d27d659
Author: Brian Paul <brianp@vmware.com >
Date: Wed Sep 9 08:33:39 2009 -0600
2009-09-10 11:47:24 -07:00
Brian Paul
d78a196121
tgsi: use new tgsi_call_record to handle execution mask stacks
...
This fixes some issues when "return"ing from nested loops/conditionals.
2009-09-10 12:45:27 -06:00
Brian Paul
c5f8594aeb
mesa: need to set all stencil bits to 0 before setting the 1 bits
...
Plus, check for pixel transfer stencil index/offset.
2009-09-10 12:45:27 -06:00
Ian Romanick
8398535331
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
...
Conflicts:
src/mesa/drivers/dri/intel/intel_context.c
2009-09-10 11:24:56 -07:00
Eric Anholt
acfea5c705
i965: Fix relocation delta for WM surfaces.
...
This was a regression in 0f328c90db .
Bug #23688
Bug #23254
(cherry picked from commit 5604b27b93 )
2009-09-10 11:22:56 -07:00
Zhenyu Wang
2dd3da3a4a
intel: add B43 chipset support
...
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Hopefully this will be one of the last cherry-picks.
(cherry picked from commit ca246dd186 )
2009-09-10 11:18:41 -07:00
Brian Paul
e9ba9ffc9a
mesa: in texenvprogram code, only do saturation when really needed.
...
For some env modes (like modulate or replace) we don't have to clamp
because we know the results will be in [0,1].
2009-09-10 08:41:12 -06:00
Vinson Lee
23fefa031f
gallium: Add PIPE_OS_APPLE back to auxiliary/util/u_time.h.
...
Fixes typo from commit c6c44bf481 .
2009-09-10 08:40:16 -06:00
Pauli Nieminen
3d1324a66a
radeon: Change debugging code to use macros instead of inline functions.
...
Variadic functions can't be inlined which makes debugging to have quite large
function overead. Only aleternative method is to use variadic macros which are
inlined so compiler can optimize debugging to minimize overhead.
2009-09-10 16:53:08 +03:00
Brian Paul
2b692cd6d6
mesa: include new u_format.csv file in tarballs
2009-09-09 12:01:39 -06:00
Pauli Nieminen
e0f99b8268
radeon: Add more verbose error message for failed command buffer.
2009-09-09 18:31:52 +03:00
Brian Paul
0c309bb494
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
...
Conflicts:
Makefile
configs/default
progs/glsl/Makefile
src/gallium/auxiliary/util/u_simple_shaders.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/brw_vs_emit.c
src/mesa/drivers/dri/intel/intel_context.h
src/mesa/drivers/dri/intel/intel_pixel.c
src/mesa/drivers/dri/intel/intel_pixel_read.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
2009-09-09 08:33:39 -06:00
aljen
c6c44bf481
gallium: Added HaikuOS platform
2009-09-09 08:24:18 -06:00
Brian Paul
89a765e92b
mesa: disable GL_LUMINANCE case in _mesa_meta_draw_pixels()
...
Works around a bug found on i965. See bug 23670.
2009-09-09 08:23:14 -06:00
Vinson Lee
d27d659043
scons: Set default_dri to no for Mac OS.
...
Mac OS does not have libdrm.
2009-09-09 08:21:07 -06:00
Brian Paul
42943a4cf9
mesa: bump version to 7.5.2
...
I'm not 100% sure there'll be a 7.5.2 release, but just in case.
2009-09-08 14:45:27 -06:00
Brian Paul
8de625c7cf
i965: fix incorrect test for vertex position attribute
2009-09-08 12:21:42 -06:00
Brian Paul
18bdb6e712
egl: also use X types for building on Apple/MacOS X
...
See bug 20413.
2009-09-08 09:20:43 -06:00
Peter Hutterer
bf19638a00
prog/glsl: fix Makefile for samplers_array.
...
The rule added in 488b3c4d1b does not use the
right INCDIR, breaking the build when GL isn't installed in the default include
paths.
7.5 branch only fix, already fixed in master by rewriting the Makefile
(ceb9459ed5 )
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2009-09-07 12:37:54 +10:00
Eric Anholt
b2cba25f9e
i965: Fix warnings in intel_pixel_read.c.
...
(cherry picked from commit c80ce5ac90 )
2009-09-04 14:41:33 -07:00
Eric Anholt
cf820a045f
intel: Also get the DRI2 front buffer when doing front buffer reading.
...
(cherry picked from commit df70d3049a )
2009-09-04 14:40:21 -07:00
Eric Anholt
2855ee82c6
intel: Update Mesa state before span setup in glReadPixels.
...
We could have mapped the wrong set of draw buffers. Noticed while looking
into a DRI2 glean ReadPixels issue.
(cherry picked from commit afc981ee46 )
2009-09-04 14:40:15 -07:00
Eric Anholt
04081a164c
intel: Move intel_pixel_read.c to shared for use with i965.
...
(cherry picked from commit dcfe0d66bf )
2009-09-04 14:40:12 -07:00
Eric Anholt
1d1dfc96c4
i965: Add missing state dependency of sf_unit on _NEW_BUFFERS.
...
(cherry picked from commit 99174e7630 )
2009-09-04 14:12:37 -07:00
Eric Anholt
a9504edee3
intel: Align cubemap texture height to its padding requirements.
...
(cherry picked from commit a70e131584 )
(cherry picked from commit 29e51c3872 )
2009-09-04 14:12:37 -07:00
Eric Anholt
945d34e88a
intel: Align untiled region height to 2 according to 965 docs.
...
This may or may not be required pre-965, but it doesn't seem unlikely, and
I'd rather be safe.
(cherry picked from commit b053474378 )
2009-09-04 14:12:36 -07:00
Eric Anholt
94d3b832cc
i965: Fix source depth reg setting for FSes reading and writing to depth.
...
For some IZ setups, we'd forget to account for the source depth register
being present, so we'd both read the wrong reg, and write output depth to
the wrong reg.
Bug #22603 .
(cherry picked from commit f44916414e )
2009-09-04 14:12:36 -07:00
Eric Anholt
8c764d5c34
i965: Respect CondSwizzle in OPCODE_IF.
...
Fixes piglit glsl-vs-if-bool and progs/glsl/twoside, and will likely be
useful for the looping code.
Bug #18992
(cherry picked from commit 78c022acd0 )
(cherry picked from commit 63d7a2f53f )
2009-09-04 14:12:36 -07:00
Brian Paul
a0b7850f1d
i965: asst clean-ups, etc in brw_vs_emit()
...
(cherry picked from commit fd7d764514 )
2009-09-04 14:12:36 -07:00
Eric Anholt
3d6c73513c
i965: Emit conditional code updates as required for GLSL VS if statements.
...
Previously, we'd be branching based on whatever condition code happened to be
laying around.
(cherry picked from commit 7007f8b352 )
2009-09-04 14:12:36 -07:00
Eric Anholt
83e6c67363
i965: Spell "conditional" correctly.
2009-09-04 14:12:36 -07:00
Eric Anholt
f396263651
i965: Fix RECT shadow sampling by not losing the other texcoords.
...
Bug #20821
(cherry picked from commit 191e028de2 )
2009-09-04 14:12:36 -07:00
Eric Anholt
63b3fa2bce
i965: Assert that the offset in the VBO is below the VBO size.
...
This avoids sending a bad buffer address to the GPU due to programmer error,
and is permitted by the ARB_vbo spec. Note that we still have the opportunity
to dereference past the end of the GPU, because we aren't clipping to a
correct _MaxElement, but that appears to be harder than it should be. This
gets us the 90% solution.
Bug #19911 .
(cherry picked from commit d7430d942f )
2009-09-04 14:12:36 -07:00
Eric Anholt
217af32c2d
i965: Even if no VS inputs are set, still load some amount of URB as required.
...
See comment on Vertex URB Entry Read Length for VS_STATE.
This, combined with the previous three commits, fixes #22945 .
(cherry picked from commit e340d4f986 )
2009-09-04 14:12:35 -07:00
Eric Anholt
456a16491b
i965: Make sure the VS URB size is big enough to fit a VF VUE.
...
This fix is just from code and docs inspection, but it may fix hangs on
some applications.
(cherry picked from commit e93848e595 )
2009-09-04 14:12:35 -07:00
Eric Anholt
9eca0e5350
i965: Don't emit bad packets when no VBs are referenced.
...
It appears that sometimes Mesa (and I suppose a VS could as well) emits
a program which references no vertex data, and thus we end up with
nr_enabled == 0 even though some VBs are enabled. We'd end up emitting
VB/VE packet headers of 0xffffffff in that case, leading to GPU hangs.
Bug #22945 (wine with an uncompiled VS)
(cherry picked from commit d1fbfd0f96 )
2009-09-04 14:12:35 -07:00
Eric Anholt
7e26bdb849
i965: Calculate enabled[] and nr_enabled once and re-use the values.
...
The code duplication bothered me.
(cherry picked from commit 9b9cb30d12 )
2009-09-04 14:12:35 -07:00
Eric Anholt
213ac4bb5d
i965: Set the max index buffer address correctly according to the docs.
...
It's the last addressable byte, not the byte after the end of the buffer.
(cherry picked from commit b72dea5441 )
2009-09-04 14:12:35 -07:00
Brian Paul
cab307ce6b
i965: rename var: s/tmp/vs_inputs/
...
(cherry picked from commit 840c09fc71 )
2009-09-04 14:12:35 -07:00
José Fonseca
9216b4e7be
scons: Used wrong exception class.
2009-09-04 19:38:35 +01:00
José Fonseca
b9f56078cd
scons: Don't use scons internal functions.
2009-09-04 19:34:11 +01:00
Alex Deucher
b13a553dd4
r600: fix Elts handling
...
Patch from taiu on IRC. fixes bug 23585
2009-09-04 14:07:53 -04:00
Brian Paul
592a6642fc
ARB prog: replace 'unsigned' with 'gl_state_index'
...
Fixes compilation warnings with MSVC.
2009-09-04 09:17:59 -06:00
Brian Paul
3fedd08779
ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOK
...
Fixes symbol collisions with typedefs in Microsoft headers.
Perhaps we should prefix/suffix all the lexer tokens to avoid this.
2009-09-04 09:17:59 -06:00
Brian Paul
40636fe6f2
gallium/xlib: minor clean-ups
2009-09-04 09:17:59 -06:00
Jakob Bornecrantz
65c79c9cbd
i915g: Fix warnings in scons build by using byte pointers
...
scons build complained about void pointer math
2009-09-04 10:55:53 +01:00
Michal Krol
ce39cd6696
tgsi: Document differencies between vs_1_1 and vs_2_0 for EXPP and LOGP.
2009-09-04 09:31:22 +02:00
Brian Paul
f6dff92c9b
docs: 7.5.1 md5 sums
2009-09-03 16:07:46 -06:00
Brian Paul
5d56e31e1d
docs: point to fd.o for downloads instead of SourceForge
2009-09-03 16:07:46 -06:00
Brian Paul
7ec865202e
gallium/xlib: silence unitialized var warning
2009-09-03 16:07:46 -06:00
Brian Paul
9e711b6865
gallium/xlib: silence uninitialized var warning
2009-09-03 16:07:46 -06:00
Brian Paul
5a8e1ddf19
st/mesa: silence uninitialized var warnings
2009-09-03 16:07:46 -06:00
Brian Paul
f1ae72e9f2
docs: prep for 7.5.1 release
2009-09-03 16:07:46 -06:00
Brian Paul
a04e83ba15
docs: added news entry for 7.5.1
2009-09-03 16:07:46 -06:00
Brian Paul
4aee0dbf81
docs: update precompiled libs info
2009-09-03 16:07:46 -06:00
Brian Paul
7e2f01e0f1
docs: move SGI GLU link
2009-09-03 16:07:46 -06:00
Brian Paul
beb05393c8
st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position
...
If the renderbuffer orientation is Y=0=TOP we need to invert the dstY
position.
2009-09-03 16:07:46 -06:00
Keith Whitwell
8fc945cd84
st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardware
...
State tracker currently backs GL_RGB textures with RGBA almost always.
This means we need to maintain A==1 in these textures to give correct GL_RGB
sampling results.
This change offloads the RGBA->RGB copy to hardware using the new writemask
version of u_blit_pixels.
More src/dstLogical/dstActual triples could be shifted to hardware by
this technique in future patches.
2009-09-03 16:07:45 -06:00
Keith Whitwell
862724d3c2
util: add version of u_blit_pixels which takes a writemask
...
Values outside the writemask are set in the destination to {0,0,0,1}
2009-09-03 16:07:45 -06:00
Brian Paul
375a6b4c4a
progs/tests: re-enable exit() call
...
See bug 21267.
2009-09-03 16:07:45 -06:00
Brian Paul
3b96db337d
docs/: document cross-compile fix
2009-09-03 16:07:45 -06:00
Alex Deucher
6a97cca081
r600: rework cb/db setup
...
Setup the regs when we emit rather than during state setup.
In certain cases a proper CB target was never emitted.
This fixes bug 23658.
2009-09-03 18:04:47 -04:00
Brian Paul
1960da2e09
docs: 7.5.1 md5 sums
2009-09-03 15:49:10 -06:00
Brian Paul
7d3af894d6
docs: point to fd.o for downloads instead of SourceForge
2009-09-03 15:44:49 -06:00
Brian Paul
32156f3a11
gallium/xlib: silence unitialized var warning
2009-09-03 15:44:22 -06:00
Brian Paul
1c32caf075
gallium/xlib: silence uninitialized var warning
2009-09-03 15:23:15 -06:00
Brian Paul
67c286d20e
st/mesa: silence uninitialized var warnings
2009-09-03 15:04:49 -06:00
Brian Paul
0b4e835b13
docs: prep for 7.5.1 release
2009-09-03 14:57:30 -06:00
Brian Paul
08575509e4
docs: added news entry for 7.5.1
2009-09-03 14:57:16 -06:00
Brian Paul
ccb081414b
docs: update precompiled libs info
2009-09-03 14:57:04 -06:00
Brian Paul
47df7900fd
docs: move SGI GLU link
2009-09-03 14:56:50 -06:00
Zack Rusin
323440b3e2
st/xorg: add linear and radial gradient acceleration
2009-09-03 16:52:04 -04:00
Zack Rusin
007a843991
st/xorg: radial gradient shader
2009-09-03 16:52:04 -04:00
Zack Rusin
5571c4fe36
st/xorg: linear gradient shader
2009-09-03 16:52:04 -04:00
Brian Paul
c3a0624ef0
st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position
...
If the renderbuffer orientation is Y=0=TOP we need to invert the dstY
position.
2009-09-03 14:39:53 -06:00
Alex Deucher
8c1d85cebe
r600: make sure the active vertex shader bo is re-added to persistent list.
2009-09-03 15:23:18 -04:00
Brian Paul
dc60d0db52
glapi: fix incorrect/missing return types for glFenceSync(), glClientWaitSync()
2009-09-03 13:02:41 -06:00
Brian Paul
e059885ce3
mesa: rename gl_sync_object::Status to StatusFlag
...
There's a symbol collision with X11/Xlib.h #define Status int
in the Mesa xlib code. This seems the simpliest way to work around this.
2009-09-03 12:47:25 -06:00
Ian Romanick
446a71d1f8
docs: Document new extension support for 7.6 release.
2009-09-03 11:22:47 -07:00
Eric Anholt
5e448a8d4d
Add ARB_sync to the xorg sw dri driver.
2009-09-03 11:22:47 -07:00
Eric Anholt
d5ea2dce93
savage: Fix driver build post-ARB_sync.
...
Like s3v, clean up absurd use of Xlib in the driver, avoiding namespace
pollution.
2009-09-03 11:22:47 -07:00
Eric Anholt
19420f02d4
s3v: Fix driver build for ARB_sync.
...
This driver was including Xlibint.h to get the CARD32 typedef to use for
32-bit unsigned integers, which #defined Status to something. CARD32 isn't
actually a 32-bit unsigned integer, so replacing with uint32_t usage should
fix bugs on 64-bit along with the build.
2009-09-03 11:22:47 -07:00
Eric Anholt
afd6141934
intel: Add support for ARB_sync.
...
We currently weasel out of supporting the timeout parameter, but otherwise
this extension looks ready, and should make the common case happy.
2009-09-03 11:22:47 -07:00
Ian Romanick
aee282faa7
ARB sync / swrast: Use GL_ARB_sync_functions instead of GL_ARB_sync. Oops.
2009-09-03 11:22:47 -07:00
Ian Romanick
0342dce226
Don't dereference function pointers in calls.
...
I'm apparently alone in prefering this calling convention, so I'll be
a team player. :p Based on review comments by Brian Paul and Eric
Anholt.
2009-09-03 11:22:47 -07:00
Ian Romanick
18d3409571
Add syncobj.c to SConscript
2009-09-03 11:22:47 -07:00
Ian Romanick
6af24b6b03
Whitespace and include file clean-up.
...
Based on review comments by Brian Paul.
2009-09-03 11:22:47 -07:00
Ian Romanick
0f8fdd8198
Use MIN2 instead of open-coded version
...
Based on review comments by Brian Paul.
2009-09-03 11:22:47 -07:00
Ian Romanick
16b393d059
ARB sync: Fix delete behavior and context destruction behavior
...
I believe this resolves the outstanding issues WRT sync object
deletetion. I have also added a large comment at the top of syncobj.c
describing the expected memory management behavior. I'm still a
little uncertain about the locking on ctx->Shared.
2009-09-03 11:22:46 -07:00
Ian Romanick
f5a22721c5
Add dummy list node type 'struct simple_node'
2009-09-03 11:22:46 -07:00
Ian Romanick
f37070bab6
ARB sync: Add support for GL_ARB_sync to swrast
...
This isn't quite right yet. The delete behavior and the context
clean-up needs some work.
2009-09-03 11:22:46 -07:00
Ian Romanick
96bdd993ec
Eliminate trailing whitespace in extension_helper.c
2009-09-03 11:22:46 -07:00
Ian Romanick
064913430d
ARB sync: Regenerate files from previous commit
2009-09-03 11:22:46 -07:00
Ian Romanick
10a09e49fc
ARB sync: Add base infrastructure for GL_ARB_sync
2009-09-03 11:22:45 -07:00
Ian Romanick
10067e4641
ARB sync: Add infrastructure for glGetInteger64v
2009-09-03 11:22:45 -07:00
Brian Paul
d75a99edd6
mesa: fix typos in separable filter functions
2009-09-03 12:10:53 -06:00
Brian Paul
7a7d5879e2
mesa: compute tex env program key size based on nr_enabled_units
...
When no textures are enabled, the key size is 4 bytes. If unit[0] is
enabled, the key size is 16 bytes.
Inspired by a patch from Chris Wilson.
2009-09-03 11:48:19 -06:00
Brian Paul
5cd7042088
swrast: wrap comment to 80 columns, remove dead code
2009-09-03 11:46:28 -06:00
Brian Paul
2db37ef659
mesa: use new combined PBO validate/map helpers in convolution/filter funcs
2009-09-03 11:45:18 -06:00
Brian Paul
95027a0087
mesa: use new combined PBO validate/map helpers
2009-09-03 11:45:17 -06:00
Brian Paul
dc947c8f92
mesa: combined PBO validate/map helpers
2009-09-03 11:45:17 -06:00
Brian Paul
203f395aaf
mesa: use new _mesa_map_pbo_source/dest() functions in more places
...
This trims down the code a bit. The next step would be to combine
the validate and map operations into one helper...
2009-09-03 11:45:17 -06:00
Brian Paul
1b448c7a5c
mesa: consolidate PBO map/unmap helpers
...
Instead of _mesa_map_readpix_pbo() use _mesa_map_pbo_source().
Instead of _mesa_map_drawpix_pbo() and _mesa_map_bitmap_pbo() use
_mesa_map_pbo_dest().
2009-09-03 11:45:17 -06:00
Brian Paul
e0ec405a9f
intel: helper to debug bufmgr (disabled)
2009-09-03 11:45:17 -06:00
Jakob Bornecrantz
3070b13f4c
i915g: Up the number of relocs
2009-09-03 19:33:07 +01:00
Jakob Bornecrantz
8303c722cb
i915g: Don't run in sync with HW
2009-09-03 19:33:07 +01:00
Jakob Bornecrantz
87a4fa56ae
i915g: Don't send flush flags to HW
2009-09-03 19:33:07 +01:00
Zack Rusin
5643942517
st/xorg: cleanup and adjust to the changes in the ureg code
2009-09-03 12:44:15 -04:00
Zack Rusin
07f9ad5c32
st/xorg: adjust enums in preperation for gradients
2009-09-03 12:41:39 -04:00
Brian Paul
2f6d2a9e27
mesa: change ctx->Driver.BufferData() to return GLboolean for success/failure
...
Return GL_FALSE if we failed to allocate the buffer. Then raise
GL_OUT_OF_MEMORY in core Mesa.
2009-09-03 09:42:38 -06:00
Keith Whitwell
848ab8be8c
aux/tgsi: pull back ureg work from 0.1 branch
...
Manual merge of ureg changes on the branch. Too much unrelated stuff
for a proper merge.
2009-09-03 15:16:25 +01:00
Christoph Bumiller
8b1ef3fa35
nv50: move centroid, flat bits when making interp long
...
Before this, just the perspective divide bit was moved in
convert_to_long of the load interpolant instruction.
2009-09-03 12:54:41 +02:00
Christoph Bumiller
ffee352726
nv50: fix vbo_static_attrib method size error
...
The VTX_ATTR_3/2/1F methods also had size 4 ...
a stupid copy/paste error.
2009-09-03 12:42:42 +02:00
Christoph Bumiller
c8258b95d6
nv50: fix draw_elements_inline_u08/16
...
We've been emitting the same two indices over and over
without incrementing map.
2009-09-03 12:42:42 +02:00
Cooper Yuan
e938d4a053
r300g: specify point/line/triangle have stuffed texture coord
2009-09-03 17:06:18 +08:00
Dave Airlie
c19b52f10f
r600: visual depth has no meaning here.
...
fbos get angry when this happens.
2009-09-03 14:14:47 +10:00
Dave Airlie
a25d0dc9ec
r600: make sure the active shader bo is re-added to persistent list.
2009-09-03 14:14:31 +10:00
Dave Airlie
5f7c532b1e
radeon: pass internal format into the miptree.
...
We need to figure out if the compression format changes.
without this texcmp segfaults if you change format
enough times.
2009-09-03 12:02:54 +10:00
Dave Airlie
e5b93e1161
radeon/dri2: add gl20 bits for r300/r600 just like dri1 does
2009-09-03 12:01:27 +10:00
Dave Airlie
ea26f28c8f
tests/texcmp: glewInit in wrong place
2009-09-03 11:33:53 +10:00
Zack Rusin
206eb50493
st/xorg: fix warnings
2009-09-02 18:39:21 -04:00
Zack Rusin
d6b58a97c2
st/xorg: handle xrender repeat modes
2009-09-02 18:38:23 -04:00
Zack Rusin
dc9de8064f
st/xorg: flip the coordinate system
2009-09-02 17:21:28 -04:00
Zack Rusin
d918896a75
st/xorg: handle solid fills in the fragment shader
2009-09-02 17:16:03 -04:00
Eric Anholt
cbde276580
Revert "i965: Use VBOs in the VBO module on 965, now that we have ARB_map_buffer_range."
...
This reverts commit 00413d8742 . Even with
fixes, using ARB_map_buffer_range in the VBO module isn't showing up as a
significant win, and some cases apparently regressed.
Bug #23624 .
2009-09-02 12:20:01 -07:00
Eric Anholt
ec32ef12b3
intel: Add support for FlushMappedBufferRange for ARB_map_buffer_range.
...
This should help for the usage by the VBO module, where we would upload
the whole remaining chunk of the buffer for a series of range maps that should
cover just a segment of it.
2009-09-02 12:20:00 -07:00
Eric Anholt
82313eed01
intel: Sync a synchronized READ_BIT map buffer range with GL drawing to it.
...
It's probably uncommon, but would obviously have gone wrong.
2009-09-02 12:20:00 -07:00
Eric Anholt
aecba6b1c8
intel: Move MapBufferRange mesa state setting up to cover the 915 case.
2009-09-02 12:20:00 -07:00
Jakob Bornecrantz
7d8f33590f
st/xorg: Guard against realy old versions of Xorg
2009-09-02 19:48:49 +02:00
Keith Whitwell
e79054cc40
st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardware
...
State tracker currently backs GL_RGB textures with RGBA almost always.
This means we need to maintain A==1 in these textures to give correct GL_RGB
sampling results.
This change offloads the RGBA->RGB copy to hardware using the new writemask
version of u_blit_pixels.
More src/dstLogical/dstActual triples could be shifted to hardware by
this technique in future patches.
2009-09-02 18:31:48 +01:00
Keith Whitwell
de343680a3
util: add version of u_blit_pixels which takes a writemask
...
Values outside the writemask are set in the destination to {0,0,0,1}
2009-09-02 18:31:48 +01:00
Keith Whitwell
1d7a989b10
draw: remove unused variable
2009-09-02 18:31:47 +01:00
Brian Paul
5e809216a8
Revert "mesa: fix the non-GNU C bit-field case"
...
This reverts commit 4b08e74982 .
Don't know what I was thinking there.
2009-09-02 10:38:46 -06:00
Brian Paul
4b08e74982
mesa: fix the non-GNU C bit-field case
2009-09-02 10:12:15 -06:00
Gary Wong
d98b9f4edb
mesa: silence gcc bit-field warning
2009-09-02 10:11:15 -06:00
Brian Paul
a7a3d3c271
mesa: replace 8 with NUM_UNITS
2009-09-02 09:43:10 -06:00
Brian Paul
8cb651578d
mesa: remove accidentally committed printf
2009-09-02 09:25:28 -06:00
Brian Paul
83e4470d9a
mesa: added #ifdef __GNUC__ around GLubyte bitfield usage
...
It would be nice if there were a #pragma or something to disable the warnings:
main/texenvprogram.c:87: warning: type of bit-field ‘Source’ is a GCC extension
main/texenvprogram.c:88: warning: type of bit-field ‘Operand’ is a GCC extension
but there doesn't appear to be a way to do that.
2009-09-02 08:47:47 -06:00
Chris Wilson
a46e32787d
mesa: Compact state key for TexEnv program cache
...
By rearranging the bitfields within the key we can reduce the size
of the key from 644 to 196 bytes, reducing the cost of both the
hashing and equality tests.
2009-09-02 08:47:47 -06:00
Michel Dänzer
c0cf0fd163
st/xorg: Remove code no longer support by xserver Git master.
...
Shouldn't be necessary with older versions either.
2009-09-02 16:01:21 +02:00
Michel Dänzer
ea55f8ed8f
st/xorg: Add support for xserver Git master DRI2 interface.
...
Reorganize to handle both interfaces with common code.
2009-09-02 16:00:30 +02:00
Michel Dänzer
0b26d97f4d
st/dri: Slight consolidation of DRI2 buffer handling.
...
Always use / assume a combined depth/stencil buffer.
Also update drawable formats from surfaces returned by the driver.
2009-09-02 15:41:41 +02:00
Michel Dänzer
385620e5eb
st/xorg: Add EXA UploadToScreen and DownloadFromScreen hooks.
2009-09-02 15:41:40 +02:00
Xiang, Haihao
98a8744e02
i965: CS FENCE in URB_FENCE is 11-bits wide
2009-09-02 13:28:32 +08:00
Xiang, Haihao
f5539b6991
i965: validate sf state
2009-09-02 13:28:23 +08:00
Eric Anholt
60b08eb1fd
mesa: Make MultiDrawElements submit multiple primitives at once.
...
Previously, MultiDrawElements just called DrawElements a bunch of times.
By sending several primitives down the pipeline at once, we avoid a bunch
of validation. On my GL demo, this improves fps by 2.5% (+/- .41%) and
reduces CPU usage by 70.5% (+/- 2.9%) (n=3).
Reviewed by: Ian Romanick <ian.d.romanick@intel.com >
2009-09-01 20:35:19 -07:00
Ben Skeggs
a82cd55a5c
nv50: SWZ is the same as MOV from our perspective
2009-09-02 12:05:34 +10:00
Brian Paul
282f578dbd
mesa: skip bitmap drawing code if width==0 or height==0
2009-09-01 17:40:07 -06:00
Brian Paul
29e22059a9
intel: use _mesa_expand_bitmap() to skip an intermediate buffer
2009-09-01 17:39:32 -06:00
Brian Paul
d5b6dd0001
st/mesa: use new _mesa_expand_bitmap() function
2009-09-01 17:39:32 -06:00
Brian Paul
278e76832f
mesa: new _mesa_expand_bitmap() function
2009-09-01 17:39:32 -06:00
Brian Paul
921bbfc942
mesa: remove redundant assignments
2009-09-01 17:39:32 -06:00
Brian Paul
457e427e32
mesa: more clean-ups
2009-09-01 17:39:32 -06:00
Brian Paul
84d6bed4d6
mesa: change conditional to match the previous one
2009-09-01 17:39:32 -06:00
Brian Paul
25e5a6f279
mesa: updated #includes
2009-09-01 17:39:32 -06:00
Brian Paul
95136694ab
mesa: remove unused texenv_fragment_program::ctx field
2009-09-01 17:39:32 -06:00
Brian Paul
1480bcacfe
mesa: remove unused ureg::abs field
2009-09-01 17:39:32 -06:00
Brian Paul
c7ba2b8622
mesa: remove unused ureg:negateabs field
2009-09-01 17:39:32 -06:00
Brian Paul
9ed0315271
mesa: more comments, clean-ups
2009-09-01 17:39:31 -06:00
Brian Paul
b5ec0a6858
mesa: simplify translate_tex_src_bit()
2009-09-01 17:39:31 -06:00
Brian Paul
f337e2c495
mesa: minor code clean-ups, comments
2009-09-01 17:39:31 -06:00
Brian Paul
d55a28e3dc
mesa: replace 8 with MAX_TEXTURE_UNITS
2009-09-01 17:39:31 -06:00
Brian Paul
51334d8401
dri: remove unused meta_clear_tris()
2009-09-01 17:39:31 -06:00
Brian Paul
c2542cdaff
intel: use BUFFER_BITS_COLOR
2009-09-01 17:39:31 -06:00
Brian Paul
5353961344
intel: fix incorrect parameter type for intel_bufferobj_map_range()
2009-09-01 17:39:31 -06:00
Brian Paul
85d3562385
radeon: trim down #includes
2009-09-01 17:39:31 -06:00
Brian Paul
18916986b4
radeon: use _mesa_meta_clear()
2009-09-01 17:39:30 -06:00
Brian Paul
92d63931e2
mesa: obey stencil write mask in _mesa_meta_draw_pixels()
2009-09-01 17:39:30 -06:00
Brian Paul
a1e869b417
intel: set Length/Offset fields in intel_bufferobj_map()
2009-09-01 17:39:30 -06:00
Brian Paul
15e6d08670
intel: use _mesa_meta_copy_pixels() when do_blit_copypixels() fails
...
Also, trim down #includes.
2009-09-01 17:39:30 -06:00
Brian Paul
be229d24c4
intel: trim down #includes
2009-09-01 17:39:30 -06:00
Brian Paul
886a0a7150
intel: use _mesa_meta_draw_pixels()
...
The textured quad path is slightly faster and will work with POT textures
on i945.
2009-09-01 17:39:30 -06:00
Brian Paul
90cba4a839
intel: trim down #includes
2009-09-01 17:39:30 -06:00
Brian Paul
50d8b295f6
intel: use _mesa_meta_clear(), it's a bit faster
2009-09-01 17:39:30 -06:00
Pauli Nieminen
06bf6628aa
radeon: Fix OQ to set ful lstate as dirty too.
2009-09-02 02:04:10 +03:00
Pauli Nieminen
9f650e19dd
radeon: Fix debug output to filter out less critical messages instead of more critical.
2009-09-02 02:04:10 +03:00
Zack Rusin
7e4487ad5c
st/xorg: getting indexes right tends to be helpful
2009-09-01 19:01:05 -04:00
Zack Rusin
5c746d9214
st/xorg: redo the vertex shader
2009-09-01 18:59:01 -04:00
Zack Rusin
a8cbb15632
st/xorg: setup solid fills
2009-09-01 17:49:32 -04:00
Zack Rusin
811aa02c7a
st/xorg: fold back the helper function into core
2009-09-01 14:44:55 -04:00
Zack Rusin
91c366359c
st/xorg: start rendering and compositing pictures
2009-09-01 14:44:55 -04:00
Ian Romanick
847bc5c852
ARB prog parser: Fix handling of stateOptModMatNum
...
The optional array index should clearly be enclosed in square
brackets. This helps the oglconform test vp_binding.c get a bit
farther, but it still fails.
2009-09-01 11:11:31 -07:00
Keith Whitwell
b3f4b56a3b
tgsi: remove redundant CND0 opcode
...
Can be implemented with CMP src2, src1, src0
2009-09-01 17:30:01 +01:00
Brian Paul
d9b7d7875b
progs/tests: re-enable exit() call
...
See bug 21267.
2009-09-01 08:53:34 -06:00
José Fonseca
836a9f0ae6
scons: Tool for LLVM. Gracefully disable llvmpipe if LLVM not found.
2009-09-01 12:26:00 +01:00
Jakob Bornecrantz
8c3f622a34
trace: Don't set surface_[fill|copy] if not set on pipe
2009-09-01 11:56:14 +02:00
Cooper Yuan
165e87c491
r300g: Fix clear issue on r300
2009-09-01 17:59:03 +08:00
Dave Airlie
7d36153766
radeon: fix r100/r200 polygon stipple under kms
...
There really need to use state emits under kms, otherwise
we end up with some dwords in the command buffer before we've
ever emitted any useful state.
Signed-off-by: Dave Airlie <airlied@redhat.com >
2009-09-01 16:06:02 +10:00
Dave Airlie
a2bd13fec9
r100: fixup cubemap domains
2009-09-01 15:18:17 +10:00
Brian Paul
ae5d78198f
xlib: plug in more meta functions, if TEST_META_FUNCS is set
2009-08-31 21:15:39 -06:00
Brian Paul
056612241a
mesa: implement GL_DEPTH_BUFFER_BIT for _mesa_meta_blit_framebuffer()
2009-08-31 21:15:39 -06:00
Brian Paul
7a78e6e8af
mesa: disable another debug test
2009-08-31 21:15:38 -06:00
Brian Paul
5b0f7c6c3b
mesa: make verts[] arrays local vars
2009-08-31 21:15:38 -06:00
Dave Airlie
97aa3d553f
r200: emit cube for kms correctly + fix tex emit reset
...
CS checker found some issues.
2009-09-01 12:54:48 +10:00
Brian Paul
8126dfa9c2
xlib: option to enable/test meta functions (disabled)
2009-08-31 19:34:47 -06:00
Brian Paul
1fc713a1e7
mesa: implement depth/stencil formats for meta glDrawPixels
2009-08-31 19:34:47 -06:00
Brian Paul
9c41931c0f
mesa: remove accidentally commited debug/disabled code
2009-08-31 19:34:47 -06:00
Brian Paul
10d81f4667
mesa: added _mesa_is_stencil_format()
2009-08-31 19:34:47 -06:00
Brian Paul
d762b5459b
progs/samples: added test/debug code for culling
2009-08-31 19:34:47 -06:00
Brian Paul
a1d3855fb0
swrast: fix selection/feedback regression
...
This fixes a conform selection/feedback regression introduced by commit
8f4d66c5f8
2009-08-31 19:34:47 -06:00
Brian Paul
c0633ddabb
mesa: debug printf for KIL
2009-08-31 19:34:47 -06:00
Brian Paul
b3232e9280
progs/tests: disable depth test for second glDrawPixels
...
We don't want to z-test that glDrawPixels. Also, set the raster color to
red when drawing GL_DEPTH_COMPONENT image to aid in debugging.
2009-08-31 19:34:47 -06:00
Brian Paul
18656201ef
swrast: can't use deferred texture/shading if using KIL instruction
...
If the fragment program uses KIL, we have to execute it before z/stencil
testing. Otherwise, deferred texture/shading lets us skip shading for
pixels that fail z/stencil testing.
2009-08-31 19:34:47 -06:00
Dave Airlie
31a5a9e9cc
r300/compiler: fix warning due to no newline
2009-09-01 10:50:40 +10:00
Dave Airlie
e3a17904dd
r200: emit max vtx info for index buffer.
...
We need this for the CS bounds checking.
2009-09-01 10:50:31 +10:00
Brian Paul
3f785080db
swrast: fix selection/feedback regression
...
This fixes a conform selection/feedback regression introduced by commit
8f4d66c5f8
2009-08-31 17:54:46 -06:00
Jakob Bornecrantz
935e4c56e5
i915g: Implement new winsys
2009-09-01 00:47:02 +01:00
Jakob Bornecrantz
d2110064c2
i915g: Switch from pipe_winsys to intel_winsys
...
Also includes moving lots of functions from i915_batch.h
into intel_batchbuffer.h
2009-09-01 00:47:02 +01:00
Jakob Bornecrantz
dd040753d7
i915g: Add header file for new winsys interface
2009-09-01 00:47:01 +01:00
Jakob Bornecrantz
105e4b093e
i915g: Add new buffer code not yet hocked up
2009-09-01 00:46:56 +01:00
Jakob Bornecrantz
7b32da0b11
st/xorg: Fix crash in MPH
2009-09-01 00:44:36 +01:00
Pauli Nieminen
c4a3e036ed
radeon: Fix null pointer reference in debug system if no context is bind.
2009-09-01 00:39:20 +03:00
Brian Paul
fcf0804c05
swrast: can't use deferred texture/shading if using KIL instruction
...
If the fragment program uses KIL, we have to execute it before z/stencil
testing. Otherwise, deferred texture/shading lets us skip shading for
pixels that fail z/stencil testing.
2009-08-31 13:28:31 -06:00
Pauli Nieminen
d028cf9313
r600: Add more trace debug output to rendering pipeline.
2009-08-31 20:44:11 +03:00
Pauli Nieminen
fde929c4fd
radeon: Add support for indenting debug output.
...
Indetion can be used to make it easier to read debug code when sections of debug output are indented.
2009-08-31 20:39:43 +03:00
Pauli Nieminen
7870edc778
radeon: Add comment warning about not choosing critical debug level.
2009-08-31 20:27:49 +03:00
Pauli Nieminen
6c963fbdd1
radeon: Change default debug level to verbose.
...
Verbose is a lot better for developement but we should considre changing it to normal in stable branch.
2009-08-31 20:27:49 +03:00
Pauli Nieminen
012e990160
r300: Convert to shared debug code.
2009-08-31 20:27:49 +03:00
Pauli Nieminen
239105c6c8
r200: Convert r200 to use new style debug code.
...
Only very few places where realy converted so there isa lot of to do.
2009-08-31 20:27:49 +03:00
Pauli Nieminen
aabb36fdd5
r600: Convert to shared debug code and add a few new debug messages.
...
There is only a few functions that have debugging enabled now.
2009-08-31 20:27:49 +03:00
Pauli Nieminen
fe62e4c3ff
radeon: Make OQ to use new style debugging.
2009-08-31 20:27:48 +03:00
Pauli Nieminen
b6ebcf8156
radeon: Add gcc attribute to enable pritnf format warnings.
2009-08-31 20:27:48 +03:00
Pauli Nieminen
4e0d99a635
r100: Use shared debug code.
...
Converted r100 to use shared debug code with sed and fast compile check. New
code has compability layer so old debugging code doesn't have to be changed
all immidiatly.
2009-08-31 20:27:48 +03:00
Pauli Nieminen
f9a4a0a971
radeon: Add common debugging functions.
...
These function are aiming to make it very simple to add and keep large amount
of debugging code without having runtime impact in relase builds. Basic idea
is to expose simple printf style debugging functions that are inlined.
Level parameter will be evalueted in compile time so compiler can optimise
some of debugging functions out if compile time request for debug level is too
tight.
2009-08-31 20:27:48 +03:00
Brian Paul
a5e7003565
mesa: added const qualifiers, move local var
2009-08-31 11:22:36 -06:00
Brian Paul
956e6c3978
mesa: fix saturation logic in emit_texenv()
...
We need to clamp/saturate after each texenv stage, not just the last one.
Fixes glean texEnv failure for softpipe (and probably other fragment program-
based drivers).
2009-08-31 11:22:36 -06:00
Brian Paul
aca8dbcaa6
docs: fixed glXCreateGLXPixmap() for direct rendering
2009-08-31 11:22:36 -06:00
Brian Paul
1d64a4ceb3
docs/: document cross-compile fix
2009-08-31 11:22:36 -06:00
Marc Dietrich
c705e72382
mesa: fix 32bit cross compilation on a 64bit machine
...
When cross compiling on a 64bit machine, gen_matypes.c is build
for the host machine (64bit) but must generates code for the target
machine (32bit). This causes wrong offsets all over the place and
crashes googleearth on my machine. Solution is to add -m32 when
cross compiling.
Attached patch is compatible with linux-x86-32 and autoconf based
builds.
2009-08-31 11:22:36 -06:00
Zack Rusin
f315c0128b
st/xorg: add code to render textured quads for composite acceleration
2009-08-31 13:26:01 -04:00
Zack Rusin
9ccbadb22d
st/xorg: setup constant buffers for vertex and fragment shaders
2009-08-31 13:26:01 -04:00
Brian Paul
9f36473a8e
mesa: added const qualifiers, move local var
2009-08-31 11:17:59 -06:00
Brian Paul
2241665dc6
mesa: fix saturation logic in emit_texenv()
...
We need to clamp/saturate after each texenv stage, not just the last one.
Fixes glean texEnv failure for softpipe (and probably other fragment program-
based drivers).
2009-08-31 11:14:16 -06:00
Michel Dänzer
3c3ad915d8
st/xorg: Re-organize the EXA ModifyPixmapHeader hook a bit.
...
This should also handle the case where the pixmap is backed by a (different)
texture before and afterwards.
2009-08-31 18:41:54 +02:00
Michel Dänzer
40e3148a81
st/xorg: Simplify EXA ModifyPixmapHeader hook for pPixmap != NULL.
...
Just let the upper layers handle it.
2009-08-31 18:41:54 +02:00
Michel Dänzer
366efd8c4b
st/xorg: Don't always fall back for solid fills.
2009-08-31 18:41:53 +02:00
Brian Paul
6bf86681f5
docs: fixed glXCreateGLXPixmap() for direct rendering
2009-08-31 10:32:56 -06:00
Brian Paul
f7654faf16
docs/: document cross-compile fix
2009-08-31 10:32:14 -06:00
Marc Dietrich
a48ee529a2
mesa: fix 32bit cross compilation on a 64bit machine
...
When cross compiling on a 64bit machine, gen_matypes.c is build
for the host machine (64bit) but must generates code for the target
machine (32bit). This causes wrong offsets all over the place and
crashes googleearth on my machine. Solution is to add -m32 when
cross compiling.
Attached patch is compatible with linux-x86-32 and autoconf based
builds.
2009-08-31 10:32:14 -06:00
Alex Deucher
1b1673fa63
r600: add missing r7xx pci id
2009-08-31 12:18:44 -04:00
Jakob Bornecrantz
5f7b46ae5f
i915g: Reorg texture layout code
2009-08-31 16:29:59 +01:00
Jakob Bornecrantz
761c8c7076
i915g: Move transfer functions into i915_texture.c
2009-08-31 16:29:58 +01:00
Jakob Bornecrantz
5374aff56f
i915g: Reorg texture code a bit
2009-08-31 16:29:58 +01:00
Jakob Bornecrantz
f260652153
i915g: Don't use winsys directly in the driver
2009-08-31 16:29:58 +01:00
Jakob Bornecrantz
bd0c51874f
i915g: Cleanup i915_prim_vbuf.c
2009-08-31 16:29:58 +01:00
Jakob Bornecrantz
1bb3a2c648
i915g: Cleanup i915_screen.[c|h]
2009-08-31 16:29:58 +01:00
Jakob Bornecrantz
1b5f46a3b8
i915g: Cleanup i915_context.c
2009-08-31 16:29:58 +01:00
Jakob Bornecrantz
7864b0e717
i915g: Cleanup i915_blit.[c|h]
2009-08-31 16:29:58 +01:00
Jakob Bornecrantz
5d929366aa
i915g: Cleanup i915_state_emit.c
2009-08-31 16:29:57 +01:00
Jakob Bornecrantz
00b0728094
i915g: Cleanup i915_texture.c
2009-08-31 16:29:57 +01:00
Jakob Bornecrantz
4224bda684
i915g: Cleanup texture init functions a bit
2009-08-31 16:29:57 +01:00
Jakob Bornecrantz
e1741dbe45
i915g: Rename pipe field on context to base
2009-08-31 16:29:57 +01:00
Jakob Bornecrantz
ad25d450ec
i915g: Rename screen field on screen to base
2009-08-31 16:29:57 +01:00
Brian Paul
2b6ab615a4
mesa: set additional fields in _mesa_buffer_map_range()
2009-08-31 09:12:04 -06:00
Brian Paul
d1da8acd82
mesa: set Length/Offset fields in _mesa_buffer_map()
2009-08-31 09:05:28 -06:00
Brian Paul
822c796481
mesa: additional assertions for ctx->Driver.UnmapBuffer()
...
The Pointer, Offset and Lenght fields should be cleared by the driver function
since ctx->Driver.Unmap() may be called from VBO code, etc.
2009-08-31 09:01:58 -06:00
Brian Paul
28c159d614
intel: clear buffer fields in intel_bufferobj_unmap()
2009-08-31 09:01:44 -06:00
Brian Paul
92033a9516
mesa: new assertions, comments about buffer mapping
...
Since ctx->Driver.MapBuffer() and ctx->Driver.MapBufferRange() may be called
from other places in Mesa (such as VBO) it's important that the driver
callbacks set all the buffer object fields properly (Pointer, Offset, Length,
etc). Add assertions to make sure that the driver does that.
2009-08-31 08:50:15 -06:00
Brian Paul
c69a4dce75
st/mesa: fix obj->Pointer offset in st_bufferobj_map_range()
...
This fixes a bunch of gallium regressions since
commit 8096aa5213
2009-08-31 08:49:24 -06:00
José Fonseca
241c3a1d80
llvmpipe: Fallback to element-wise comparisons when no comparison intrinsic is available.
...
Although selection of vector elements is valid LLVM IR, no machine target
supports it yet.
This is a last-resort option, but it allows llvmpipe to be used on any
target supported by LLVM without modifications. Obviously better
performance is attainable by emitting SIMD intrinsics where otherwise
LLVM doesn't.
2009-08-31 10:22:36 +01:00
José Fonseca
45fb66ab7b
llvmpipe: In the abcense of a min/max intrinsic, use the comparison intrinsics.
2009-08-31 10:00:38 +01:00
José Fonseca
b995af25d0
llvmpipe: Actually commit lp_buffer.[ch].
...
Thanks Michel.
2009-08-31 09:34:04 +01:00
Michel Dänzer
9f0495aa76
Gallium xlib: Add support for BGRA visuals.
2009-08-31 10:22:19 +02:00
Ben Skeggs
1ea114958b
nouveau: fix for dri state tracker changes
2009-08-31 13:39:45 +10:00
Ben Skeggs
02f3245448
nouveau: introduce nouveau_miptree common to all nouveau pipe drivers
...
The winsys once again has to know about textures it seems, so we need a
common representation between all our pipe drivers to store some
information the winsys will need.
Only the nv50 driver has been fixed so far.
2009-08-31 13:39:38 +10:00
Ben Skeggs
500b260494
nouveau: hack winsys to compile again, it's broken still however
2009-08-31 12:55:56 +10:00
Marc Dietrich
a192da37ed
cell: fix compilation
2009-08-30 09:24:27 -06:00
Brian Paul
d6b8664e3c
swrast: minor code consolidation
2009-08-30 09:21:20 -06:00
Brian Paul
04f8193aad
mesa: consolidate texture-related code in meta.c
...
Also, allow using texture rectangles, NPOT textures or regular POT textures
(preferred in that order).
2009-08-30 09:15:24 -06:00
Brian Paul
7dd6fa12e1
progs/util: minor updates to glutskel.c
2009-08-30 09:10:36 -06:00
Brian Paul
a068e098e2
intel: use more efficient loop over buffers
2009-08-30 09:10:36 -06:00
Brian Paul
0243f79eac
mesa: avoid redundant viewport changes in meta code
2009-08-30 09:10:36 -06:00
José Fonseca
c28f253ac2
llvmpipe: Texture cache in 4 ubytes instead of 4 floats.
...
This is more a short term experiment than a long term commitment, as we'll
need to support higher precision textures too, as this will all be
be replaced by runtime generated code.
With this change most Mesa demos fps increased around 10%. Not a huge
improvement, but not a negligible one either.
2009-08-30 12:37:03 +01:00
José Fonseca
62b586fce4
llvmpipe: Use util_format_read_4f to read texture tiles.
2009-08-30 12:37:03 +01:00
José Fonseca
ffe1b7bad8
llvmpipe: Texture cache is read-only. No need to flush.
2009-08-30 12:37:03 +01:00
José Fonseca
3d30524393
util: Auto generate pixel format accessor functions from
...
This has several advantages over the u_
- not hand written
- no intermediate memcpy of raw pixels
- supports 4 ubytes in addition to floats
- no need to pass a pipe_transfer
It also has (hopefully temporary) limitations:
- no support for YUV
- no support for SRGB
2009-08-30 12:37:03 +01:00
José Fonseca
379304a72c
llvmpipe: Eliminate internal pipe_buffer_map/unmap usage.
2009-08-30 12:37:03 +01:00
José Fonseca
d336ef410a
xlib: Implement lp_winsys::destroy.
2009-08-30 12:37:03 +01:00
Michel Dänzer
9053bb0d40
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/glx/x11/glxcmds.c
2009-08-30 13:06:18 +02:00
Michel Dänzer
edb1178798
glx/x11: Fix glXCreateGLXPixmap for direct rendering.
...
Fixes progs/xdemos/glxpixmap modified to use direct rendering.
2009-08-30 12:53:00 +02:00
Eric Anholt
3c1172f066
i965: Fix segfault with ARB_oq CheckQuery when results are already fetched.
2009-08-29 13:29:38 -07:00
Eric Anholt
09549704c6
i965: Support PROGRAM_ENV_PARAMs in brw_vs_emit.c
2009-08-29 13:29:38 -07:00
José Fonseca
c9adb4c9cb
llvmpipe: List lp_buffer.c in the Makefile.
2009-08-29 20:07:53 +01:00
José Fonseca
85a0a4b296
xlib: Implement llvmpipe lp_winsys interface.
2009-08-29 20:03:44 +01:00
José Fonseca
e173a9bbd6
llvmpipe: Define an winsys for LLVM. Drop pipe_winsys
...
lp_winsys will eventually be unified with softpipe's eventually, but we
are free to move quicker since we don't have the myriad of users yet.
Will provide a pipe_winsys adaptor from Keith's softpipe-private-winsys
soon.
2009-08-29 20:03:44 +01:00
Pauli Nieminen
e48dc9c5ed
r300: Disable threshold register for KMS.
...
Kernel side doesn't have required register in safe list so can't send it kernel.
2009-08-29 21:05:22 +03:00
Pauli Nieminen
9c0ab1fa85
r300: Swtcl prediction was still missing scissors.
...
All that state stuff should really be in state atoms :/
2009-08-29 21:05:19 +03:00
Pauli Nieminen
32df8922a9
r300: Add missing pre_emit_count to swtcl state size prediction.
2009-08-29 18:40:44 +03:00
Christoph Bumiller
8313801911
nv50: set provoking vertex state
2009-08-29 17:22:12 +02:00
José Fonseca
da1248bee5
xlib: Update llvmpipe integration for changes in master.
2009-08-29 09:21:42 +01:00
José Fonseca
f04ce6276b
llvmpipe: Update for changes in master.
2009-08-29 09:21:42 +01:00
José Fonseca
6818eb9b90
mesa: Update sconscript for new ARB/FP assembler.
2009-08-29 09:21:42 +01:00
José Fonseca
fdb3e75f7e
util: Add util_unsigned_logbase2.
...
Cherry picked from Keith's commit f911c3b989 .
2009-08-29 09:21:42 +01:00
José Fonseca
c40eddd294
llvmpipe: Isolate sampling from TGSI translation.
2009-08-29 09:21:42 +01:00
José Fonseca
d4806c64a2
llvmpipe: Better structure dereference naming.
2009-08-29 09:21:42 +01:00
José Fonseca
8aa62cead7
llvmpipe: Fix shader variant key construction.
...
Fixes the blank screen on non-64bit mode.
2009-08-29 09:21:42 +01:00
José Fonseca
1e6cc1cf37
llvmpipe: Fix build.
2009-08-29 09:21:42 +01:00
José Fonseca
f311bacebd
llvmpipe: Merge all pixel format related files.
2009-08-29 09:21:42 +01:00
José Fonseca
f85c5f8621
llvmpipe: Factor out and optimize the input interpolation.
...
Special attention is given to the interpolation of side by side quads.
Multiplications are made only for the first quad. Interpolation of
inputs for posterior quads are done exclusively with additions, and
perspective divide if necessary.
2009-08-29 09:21:41 +01:00
José Fonseca
03180dca7a
llvmpipe: Pre-declare fetch_texel.
2009-08-29 09:21:41 +01:00
José Fonseca
635c37e118
llvmpipe: Pass the alpha ref value and blend color in the jit context.
2009-08-29 09:21:41 +01:00
José Fonseca
c022e15d1e
llvmpipe: Pass fragment context to generated function in a single structure.
2009-08-29 09:21:41 +01:00
José Fonseca
8c7c108d71
llvmpipe: Structure manipulation helpers.
2009-08-29 09:21:41 +01:00
José Fonseca
08dd41fd68
llvmpipe: Centralize the C <-> JIT interfaces in one place.
2009-08-29 09:21:41 +01:00
José Fonseca
97b4681d7e
llvmpipe: Drop blend derived state.
...
Already included in the fragment shader.
2009-08-29 09:21:41 +01:00
Keith Whitwell
04de13b9cd
llvmpipe: keep texture stride 16byte aligned
...
Fixes crash when resizing gears window.
2009-08-29 09:21:41 +01:00
José Fonseca
4d2b0eb19e
llvmpipe: Squash the quad pipeline.
...
It had been reduced to one fixed stage.
2009-08-29 09:21:41 +01:00
José Fonseca
77b35dc179
llvmpipe: s/uni/scalar/.
...
More obvious name.
2009-08-29 09:21:40 +01:00
José Fonseca
5811ed87d7
llvmpipe: Add a bunch of comments.
...
Description/rationale/to-do items, while I still remember them...
2009-08-29 09:21:40 +01:00
José Fonseca
3f36f4b051
llvmpipe: Split off vs stuff from lp_state_fs.c.
...
lp_state_fs.c is already too big without it.
2009-08-29 09:21:40 +01:00
José Fonseca
c3b7406667
llvmpipe: Avoid duplicate clamping when converting between types.
2009-08-29 09:21:40 +01:00
José Fonseca
9897180279
llvmpipe: Generate the fragment pipeline into a single function.
...
Still hackish. Will document and optimize later.
2009-08-29 09:21:40 +01:00
José Fonseca
64cc71167f
llvmpipe: Get conversions working correctly for all integer types.
2009-08-29 09:21:39 +01:00
José Fonseca
53f9a1180e
llvmpipe: Delete the quad polygon stipple stage.
...
Not used now -- stipple done by the draw module. May code generate later.
2009-08-29 09:21:39 +01:00
José Fonseca
3d7a88674f
llvmpipe: Early depth testing.
2009-08-29 09:21:39 +01:00
José Fonseca
90b5df8d1b
llvmpipe: Disassemble beyond referred code beyond the RET instruction.
2009-08-29 09:21:39 +01:00
José Fonseca
c5531f575b
llvmpipe: Split control flow function declarations and notes.
2009-08-29 09:21:39 +01:00
José Fonseca
1e4376a68f
llvmpipe: Back port recent softpipe-opt improvements from Keith.
2009-08-29 09:21:39 +01:00
José Fonseca
f10ee9a0a1
llvmpipe: Don't limit the number of tiles in the cache.
2009-08-29 09:21:39 +01:00
José Fonseca
87c383a2e5
llvmpipe: Clean dead tile cache code.
2009-08-29 09:21:39 +01:00
José Fonseca
e3baeb3f14
llvmpipe: Simplify tile clears. Use pipe_fill_rect instead of scratch tile.
2009-08-29 09:21:38 +01:00
José Fonseca
d94fbb4a48
llvmpipe: Start hiding llvmpipe_cached_tile.
2009-08-29 09:21:38 +01:00
José Fonseca
1cb9ce0d27
llvmpipe: Drop depth/stencil support from tile cache.
2009-08-29 09:21:38 +01:00
José Fonseca
e3b38e5ec1
llvmpipe: Code generate the depth test, and include in the shader.
...
Only 32bit depth/stencil surfaces supported for now. Stencil ops not
implemented yet.
2009-08-29 09:21:38 +01:00
José Fonseca
db35ac36d9
llvmpipe: Update texture block from format.
2009-08-29 09:21:38 +01:00
José Fonseca
343ccc8dd0
llvmpipe: Depth test to LLVM IR translation.
2009-08-29 09:21:38 +01:00
José Fonseca
c0472f9c34
llvmpipe: Centralize mask update logic.
2009-08-29 09:21:37 +01:00
José Fonseca
3dbf00f9ab
llvmpipe: Clamped float to unsigned norm via mantissa manipulation.
2009-08-29 09:21:37 +01:00
José Fonseca
33ce51bc0d
llvmpipe: Several fixes of the conversion test.
2009-08-29 09:21:37 +01:00
José Fonseca
d07b038366
llvmpipe: Generate instrinsics for integer comparisons.
...
It is a little messy, given the available instrucions form SIMD
integer comparisons is rather limited.
2009-08-29 09:21:37 +01:00
José Fonseca
89146cd48d
llvmpipe: Mention the ability to get microbenchmarks from the unit tests.
...
Even better would be to have a -h/--help option to the tests...
2009-08-29 09:21:37 +01:00
José Fonseca
9ae47069b4
llvmpipe: Code generate alpha testing and append to generated fragment shader.
2009-08-29 09:21:37 +01:00
José Fonseca
b5e397c369
util: Dump PIPE_FUNC_x value names.
2009-08-29 09:21:37 +01:00
Brian Paul
d6d4f8b66e
llvmpipe: use the udis86 lib to print the x86 assembly code
2009-08-29 09:21:36 +01:00
Brian Paul
03b388e1c9
llvmpipe: frag shader comments
2009-08-29 09:21:36 +01:00
Brian Paul
0f6c621aee
llvmpipe: blend comments
2009-08-29 09:21:36 +01:00
Brian Paul
8329e59958
llvmpipe: comments about blend generator
2009-08-29 09:21:36 +01:00
Brian Paul
f586d9546b
llvmpipe: basic comments
2009-08-29 09:21:36 +01:00
José Fonseca
b9f2f01315
llvmpipe: Hack to force the line/point rasterization also fit the blend function expectations.
2009-08-29 09:21:35 +01:00
José Fonseca
7643da88a3
llvmpipe: Refer my udis86 branch which decodes more opcodes.
2009-08-29 09:21:35 +01:00
José Fonseca
7c2dc3faa8
llvmpipe: Code generate the position interpolation.
2009-08-29 09:21:35 +01:00
José Fonseca
6f5cd15f80
llvmpipe: Simpler variant of lp_build_broadcast_scalar.
2009-08-29 09:21:35 +01:00
José Fonseca
17baa01bfb
llvmpipe: Put the position coefficients together with the inputs.
...
The automatic search'n'replace leaves lp_setup.c a bit ugly, but this code
will be eventually code generated as well.
2009-08-29 09:21:35 +01:00
José Fonseca
7926b42d41
llvmpipe: Implement saturation.
2009-08-29 09:21:35 +01:00
José Fonseca
39352b3443
llvmpipe: Put color/depth directly into the quad structure.
2009-08-29 09:21:35 +01:00
Brian Paul
4c6fd574b1
llvmpipe: re-enable other gallium drivers
...
No more symbol collisions between drivers, AFAICT.
2009-08-29 09:21:35 +01:00
Brian Paul
908d8d7a1b
llvmpipe: prefix point/line/tri_setup() functions with llvmpipe_
...
Avoid symbol collisions with softpipe.
2009-08-29 09:21:35 +01:00
Brian Paul
1ea1cd8468
llvmpipe: repurpose linux-llvm config to build the llvmpipe driver
...
The gallivm module is no longer built. If/when gallivm is resuscitated we
can revisit this.
2009-08-29 09:21:35 +01:00
Brian Paul
137afe6a55
llvmpipe: updated Makefile C_SOURCES
2009-08-29 09:21:34 +01:00
Brian Paul
aa2514d12d
llvmpipe: add missing break in xlib _init()
2009-08-29 09:21:34 +01:00
José Fonseca
556eecea67
llvmpipe: Allow to build without udis86.
2009-08-29 09:21:34 +01:00
José Fonseca
2fef9b3369
llvmpipe: Drop the FETCH/STORE macros.
2009-08-29 09:21:34 +01:00
José Fonseca
5999ebfb69
llvmpipe: Debug helper function to name llvm intermediate values.
2009-08-29 09:21:34 +01:00
Keith Whitwell
a22f87c994
llvmpipe: use align_malloc for all structs containing ALIGN16 members
...
Unless the struct is allocated aligned, aligning the members isn't very
helpful.
2009-08-29 09:21:34 +01:00
José Fonseca
49d83fdc45
llvmpipe: Document that llvm 2.5 is expected.
2009-08-29 09:21:34 +01:00
José Fonseca
8df64bb2fe
llvmpipe: Briefly describe current status.
2009-08-29 09:21:34 +01:00
José Fonseca
bb867b0ae4
llvmpipe: Blend in place.
2009-08-29 09:21:34 +01:00
José Fonseca
4a414d8f87
llvmpipe: Code generate logic ops.
2009-08-29 09:21:34 +01:00
José Fonseca
3014919211
llvmpipe: Rasterize the quads according to what the blend function expects.
2009-08-29 09:21:34 +01:00
José Fonseca
efab431684
llvmpipe: Tile in SoA format identical to the blender function output.
2009-08-29 09:21:34 +01:00
José Fonseca
ee066eaf6d
llvmpipe: Allow to dump the disassembly byte code.
...
Useful as dis86 doesn't disassemble some SSE4 opcodes yet.
2009-08-29 09:21:33 +01:00
José Fonseca
c5abcac7ef
llvmpipe: Implement LIT.
2009-08-29 09:21:33 +01:00
José Fonseca
09a7b011ac
llvmpipe: Move lp_build_select to lp_bld_logic.[ch].
2009-08-29 09:21:33 +01:00
José Fonseca
1aae039ee2
llvmpipe: Implement comparison opcodes.
2009-08-29 09:21:33 +01:00
José Fonseca
aede39efd8
llvmpipe: Fix translation of KIL with repeated swizzles.
2009-08-29 09:21:33 +01:00
José Fonseca
81e7ec485d
llvmpipe: Handle floating point selection.
2009-08-29 09:21:33 +01:00
José Fonseca
4d7a8194c5
llvmpipe: Silence compiler warnings.
2009-08-29 09:21:33 +01:00
José Fonseca
7821664b15
llvmpipe: Implement KIL.
2009-08-29 09:21:33 +01:00
José Fonseca
2c90652ed9
llvmpipe: More verbose error message when failed to translate opcodes.
2009-08-29 09:21:33 +01:00
José Fonseca
58f20b2b65
llvmpipe: Detect typos in LLVM intrinsics early.
2009-08-29 09:21:33 +01:00
José Fonseca
1aede69d3a
llvmpipe: Comparisons translation.
2009-08-29 09:21:33 +01:00
José Fonseca
818d444e12
llvmpipe: Disassemble generated x86 code.
2009-08-29 09:21:32 +01:00
José Fonseca
a7f9b915ae
llvmpipe: Shader function arguments don't alias.
2009-08-29 09:21:32 +01:00
José Fonseca
539c55da16
llvmpipe: Test only present functionality to allow regression testing.
2009-08-29 09:21:32 +01:00
José Fonseca
c67570ba85
llvmpipe: Clamp into range when writing integers.
2009-08-29 09:21:32 +01:00
José Fonseca
17aec9304c
llvmpipe: Compute interpolation coeffs directly into SoA layout.
2009-08-29 09:21:32 +01:00
José Fonseca
b6f43b445b
llvmpipe: Pass the interpolation factors as scalars.
2009-08-29 09:21:32 +01:00
José Fonseca
1a004142bb
llvmpipe: Eliminate dependency on tgsi_exec_machine.
2009-08-29 09:21:32 +01:00
José Fonseca
73af91e938
llvmpipe: Eliminate non-LLVM fs execution paths.
2009-08-29 09:21:32 +01:00
José Fonseca
95f38dd67c
llvmpipe: Code generate interpolators.
2009-08-29 09:21:32 +01:00
José Fonseca
af608e56ca
llvmpipe: Factor out lp_build_select from lp_build_select_aos.
2009-08-29 09:21:31 +01:00
José Fonseca
57907e7fd9
llvmpipe: Translate approximate log2/exp2.
2009-08-29 09:21:31 +01:00
José Fonseca
ef1fddb36a
llvmpipe: Handle a few more TGSI opcodes.
2009-08-29 09:21:31 +01:00
José Fonseca
844f802a70
llvmpipe: Efficient implementations of pow/exp/log/exp2/log2
2009-08-29 09:21:31 +01:00
José Fonseca
90e9a4d4f9
llvmpipe: Migrate more SSE2 codegen to LLVM IR.
2009-08-29 09:21:31 +01:00
José Fonseca
1b3c83d699
llvmpipe: Don't assume/enforce fs values are in [0,1] range.
2009-08-29 09:21:30 +01:00
José Fonseca
1709ace359
llvmpipe: Implement more arithmetic functions.
2009-08-29 09:21:30 +01:00
José Fonseca
1929057eac
llvmpipe: Reuse coord/texel store.
2009-08-29 09:21:30 +01:00
José Fonseca
0b6a9b2dbe
llvmpipe: Replace lp_fs_llvm.c.
...
Based on lp_fs_exec.c/lp_fs_sse.c and tgsi_exec.c.
2009-08-29 09:21:30 +01:00
José Fonseca
63b07618b3
llvmpipe: TGSI -> LLVM SoA IR converstion.
...
Based on tgsi_sse2.c.
2009-08-29 09:21:30 +01:00
José Fonseca
9033c44a62
llvmpipe: Dump only the generated function.
2009-08-29 09:21:29 +01:00
José Fonseca
4393ca7956
llvmpipe: Scalar -> vector broadcasting.
2009-08-29 09:21:29 +01:00
José Fonseca
8422f293ab
llvmpipe: More arithmetic ops.
...
Mostly untested.
2009-08-29 09:21:29 +01:00
José Fonseca
36249348ed
llvmpipe: More intrinsic helpers.
2009-08-29 09:21:29 +01:00
José Fonseca
50d77141e8
llvmpipe: Fix typo.
2009-08-29 09:21:29 +01:00
José Fonseca
81644f6315
util: Fix SCons build.
2009-08-29 09:21:28 +01:00
José Fonseca
19b31d0ac8
llvmpipe: Document the typo in llvm-c/Core.h.
2009-08-29 09:21:28 +01:00
José Fonseca
fb56786f60
util: Auto-generate u_format_table.c from SConscript.
2009-08-29 09:21:28 +01:00
José Fonseca
9285f159e0
llvmpipe: Simple description/instructions.
2009-08-29 09:21:28 +01:00
José Fonseca
8edcc8abe3
llvmpipe: Add missing include.
2009-08-29 09:21:27 +01:00
José Fonseca
2101c2941c
llvmpipe: Tiles in rgba8 format.
2009-08-29 09:21:27 +01:00
José Fonseca
3ce1abf950
llvmpipe: Store tile color in SoA.
2009-08-29 09:21:27 +01:00
José Fonseca
29d94a9cbb
llvmpipe: Code generate color masking.
2009-08-29 09:21:27 +01:00
José Fonseca
2d6b39f05e
llvmpipe: Use the generated SoA blending code.
2009-08-29 09:21:27 +01:00
José Fonseca
e7fc21434d
llvmpipe: Handle disabled blending too.
2009-08-29 09:21:27 +01:00
José Fonseca
62c91998ef
xlib: Ensure one screen instance.
2009-08-29 09:21:27 +01:00
José Fonseca
0318f3e53e
llvmpipe: Split the texture cache from the color/depth/stencil cache.
2009-08-29 09:21:27 +01:00
José Fonseca
b836b2593c
xlib: Complete llvmpipe integration.
2009-08-29 09:21:27 +01:00
José Fonseca
2529ed5616
llvmpipe: SoA blending.
...
Throughput seems to be 4x higher.
2009-08-29 09:21:27 +01:00
José Fonseca
20f50b845b
util: Fix blend factor dumping.
2009-08-29 09:21:26 +01:00
José Fonseca
3130b9921c
llvmpipe: Update blending test.
2009-08-29 09:21:26 +01:00
José Fonseca
60584affcf
llvmpipe: Handle more conversions.
...
Not all successfully yet though..
2009-08-29 09:21:26 +01:00
José Fonseca
145de19548
llvmpipe: Use full set of sse4 min/max intrinsics.
2009-08-29 09:21:26 +01:00
José Fonseca
a9771d2b75
llvmpipe: Fix one const generation for some signed integers.
2009-08-29 09:21:26 +01:00
José Fonseca
8244d6e5ad
llvmpipe: Allow floating types without sign.
...
With the meaning that all values are assumed to be positive.
2009-08-29 09:21:26 +01:00
José Fonseca
9493260fdc
llvmpipe: Centralize lp_build_context initialization.
2009-08-29 09:21:25 +01:00
José Fonseca
b07d19a885
llvmpipe: Normalize the cycles with the number of channel.
...
So that we have a comparable number for different formats.
2009-08-29 09:21:25 +01:00
José Fonseca
b874a7b807
llvmpipe: Handle ubyte -> float conversion too.
2009-08-29 09:21:25 +01:00
José Fonseca
b441a0b658
llvmpipe: Make lp_const_offset visible.
2009-08-29 09:21:24 +01:00
José Fonseca
684a47f0f6
llvmpipe: Only get the preprocessor flags from llvm-config.
...
Otherwise we get -O2 optimization flag, preventing proper debugging.
2009-08-29 09:21:24 +01:00
José Fonseca
8988424ee8
llvmpipe: Bootstrap type conversions.
2009-08-29 09:21:24 +01:00
José Fonseca
b19cb0080c
llvmpipe: Use same type for reference vectors.
2009-08-29 09:21:24 +01:00
José Fonseca
d52dce0ffb
llvmpipe: Fix floating point const scale factor.
2009-08-29 09:21:24 +01:00
José Fonseca
e6ebebc485
llvmpipe: Factor out shared test code into a separate module.
2009-08-29 09:21:24 +01:00
José Fonseca
138428bade
llvmpipe: Cleanup constant helpers.
2009-08-29 09:21:23 +01:00
José Fonseca
627d6a6b04
llvmpipe: Move intrinsic helpers to a separate module.
2009-08-29 09:21:23 +01:00
José Fonseca
1165c30dc2
llvmpipe: Collect richer blend data.
2009-08-29 09:21:23 +01:00
José Fonseca
28e46458bc
llvmpipe: Some notes about PSHUF.
2009-08-29 09:21:23 +01:00
José Fonseca
1dd7bb17c7
llvmpipe: Optimize blend swizzles by using bitmasks instead of shuffles for ubytes.
2009-08-29 09:21:23 +01:00
José Fonseca
a77084ea4b
llvmpipe: Write data to a tsv file for posterior analysis.
2009-08-29 09:21:23 +01:00
José Fonseca
f081bacc25
llvmpipe: Move p_build_context to lp_bld_type.h
...
As it will be shared with more modules.
2009-08-29 09:21:23 +01:00
José Fonseca
696f7f2be5
util: New file dedicated to dump state in human/machine readable format.
2009-08-29 09:21:23 +01:00
José Fonseca
5940ba26f7
llvmpipe: Don't use llvm.readcyclecounter.
...
LLVM during optimization reorders the rdtsc instructions next to each
other, which makes it pretty useless.
2009-08-29 09:21:22 +01:00
José Fonseca
64611e086d
llvmpipe: Separate constant building.
2009-08-29 09:21:22 +01:00
José Fonseca
c87fab0008
llvmpipe: Move type support functions into a separate file.
2009-08-29 09:21:22 +01:00
José Fonseca
b94e22e4be
llvmpipe: Measure the number of cycles taken for blending.
2009-08-29 09:21:22 +01:00
José Fonseca
5778970f15
llvmpipe: Minor comments / debug mnemonics.
2009-08-29 09:21:22 +01:00
José Fonseca
02eaa32d83
llvmpipe: Optimize away min/max with equal operands.
2009-08-29 09:21:22 +01:00
José Fonseca
9e92244440
llvmpipe: Improve generated 8bit blending code.
2009-08-29 09:21:22 +01:00
José Fonseca
ede73258a7
llvmpipe: Get blending of normalized 8bit unsigned integers working.
2009-08-29 09:21:22 +01:00
José Fonseca
a6622e6c54
llvmpipe: Specialize arithmetic operations.
2009-08-29 09:21:22 +01:00
José Fonseca
272dadbe4e
llvmpipe: Introduce a custom typing system.
...
Straightforward representation of floating-point/fixed-point/integer,
normalized/scaled, signed/unsigned SIMD vector types.
2009-08-29 09:21:22 +01:00
José Fonseca
f478b6fe76
llvmpipe: Avoid C99-isms.
2009-08-29 09:21:21 +01:00
José Fonseca
fe90e46dc9
llvmpipe: Factor out intrisic calling code into a reusable function.
2009-08-29 09:21:21 +01:00
José Fonseca
7ace0b1f4a
llvmpipe: Cleanup test programs.
2009-08-29 09:21:21 +01:00
José Fonseca
7d043162c5
llvmpipe: Blending.
...
The code
2009-08-29 09:21:21 +01:00
José Fonseca
d2cf3e8dfd
llvmpipe: Arithmetic helpers.
2009-08-29 09:21:21 +01:00
Keith Whitwell
fa3514a57e
llvmpipe: fastpath for interpolated z16 less depthtesting
...
Because this is interpolated (ie. early) depth, we can build in an
assumption about the quads emitted by triangle setup, ie that they
are actually linear spans. Interpolate z over those spans in z16
format to save on math & conversion.
2009-08-29 09:21:21 +01:00
Keith Whitwell
38a1479fe1
llvmpipe: cope with nr_cbufs == 0
...
Disable blend code when no color buffer
2009-08-29 09:21:21 +01:00
José Fonseca
4639f8aad5
llvmpipe: Translate logicops.
2009-08-29 09:21:21 +01:00
José Fonseca
833323b8d0
llvmpipe: Separate pixel packing/unpacking from loading/storing.
2009-08-29 09:21:21 +01:00
José Fonseca
c4903ee27f
xlib: Integrate with llvmpipe.
...
Actually, the makefile/sconscript changes were already commit by mistake.
2009-08-29 09:21:21 +01:00
José Fonseca
b060771612
llvmpipe: Adjust for pixel layout changes.
2009-08-29 09:21:20 +01:00
José Fonseca
42b15b26fd
util: Make pixel format layout more meaningful.
...
Namelly, explicitly distinguish formats coded by arithmetic manipulation,
from formats layed out in array.
2009-08-29 09:21:20 +01:00
José Fonseca
a910c7d820
util: Don't commit u_format_table.c
...
At least not until stabilizes, to reduce noise.
2009-08-29 09:21:20 +01:00
José Fonseca
9a519ec4d1
llvmpipe: Fix typo in copyright.
2009-08-29 09:21:20 +01:00
José Fonseca
3ef44746fe
llvmpipe: Add test cases for pixels.
...
Actually some of this test cases need more testing...
2009-08-29 09:21:20 +01:00
José Fonseca
899bee2788
util: Fix r5g6b5 description.
2009-08-29 09:21:19 +01:00
José Fonseca
3ace63c00f
llvmpipe: Update SConscript.
2009-08-29 09:21:19 +01:00
José Fonseca
b023c1dc68
llvmpipe: Simple shell script to aid port softpipe changes to llvmpipe.
2009-08-29 09:21:19 +01:00
Keith Whitwell
05bfd93c3f
llvmpipe: move all depth/stencil/alpha pixel processing into one stage
2009-08-29 09:21:19 +01:00
Keith Whitwell
b8c437f20f
llvmpipe: fix error in scissor state dependencies
2009-08-29 09:21:18 +01:00
Keith Whitwell
c5375da1dc
llvmpipe: cleanup framebuffer state routine slightly
2009-08-29 09:21:18 +01:00
Keith Whitwell
90caf1a3f3
llvmpipe: move all color-combine code into lp_quad_blend.c
...
Consolidate the read-modify-write color combining code from
the blend, colormask and output stages.
2009-08-29 09:21:18 +01:00
Keith Whitwell
54c6ef144f
llvmpipe: fix typo
2009-08-29 09:21:18 +01:00
Keith Whitwell
3c71a19016
llvmpipe: example fastpaths in blending
2009-08-29 09:21:18 +01:00
Keith Whitwell
80eb276630
llvmpipe: actually pass >1 quad from triangle routine
...
First attempt
2009-08-29 09:21:18 +01:00
Keith Whitwell
bdbb4beb21
llvmpipe: expand quad pipeline to process >1 quad at a time
...
This is part one -- we still only pass a single quad down, but
the code can now cope with more. The quads must all be from the same
tile.
2009-08-29 09:21:18 +01:00
Keith Whitwell
4486012245
llvmpipe: rip out old mulithread support
2009-08-29 09:21:18 +01:00
Keith Whitwell
2a7c39a211
llvmpipe: avoid flushing depth buffer cache on swapbuffers
...
There's no need to push out depth buffer contents on swapbuffers.
Note that this change doesn't throw away depth buffer changes, it simply
holds them in the cache over calls to swapbuffers. The hope is
that swapbuffers will be followed by a clear() which means in that case
we won't have to write the changes out.
2009-08-29 09:21:17 +01:00
Keith Whitwell
3adca96114
llvmpipe: also shortcircuit non-texture tile lookups
2009-08-29 09:21:17 +01:00
Keith Whitwell
2301314e7c
llvmpipe: shortcircuit repeated lookups of the same tile
...
The lp_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.
2009-08-29 09:21:17 +01:00
Keith Whitwell
df1823ec5b
llvmpipe: remove unused vars in lp_setup.c
2009-08-29 09:21:17 +01:00
Keith Whitwell
08811032c2
llvmpipe: use bitwise logic to setup quad masks in lp_setup
2009-08-29 09:21:17 +01:00
Keith Whitwell
0aa24fa36f
llvmpipe: simplify flush_spans
...
No loss of performance, but simpler code.
2009-08-29 09:21:17 +01:00
Keith Whitwell
0f55a95b2f
llvmpipe: make some small steps to flush texture cache less frequently
...
No performance gain yet, but the code is a bit cleaner.
2009-08-29 09:21:16 +01:00
Keith Whitwell
3121484a8b
llvmpipe: remove backwards dependency from tilecache to llvmpipe
...
The tile cache is a utility, it shouldn't know anything about the
entity which is making use of it (ie llvmpipe).
Remove llvmpipe parameter to all the tilecache function calls, and
also remove the need to keep a llvmpipe pointer in the sampler structs.
2009-08-29 09:21:16 +01:00
José Fonseca
c9a5930fe4
llvmpipe: Rename preprocessor symbols too.
2009-08-29 09:21:16 +01:00
José Fonseca
8783732c4d
llvmpipe: Pixel packing/unpacking and loop code generators.
...
Just a small proof of concept plus a standalone test app. Not integrated
with the rest of the driver yet.
2009-08-29 09:21:16 +01:00
José Fonseca
15422b2d99
util: Pixel format database.
...
There are some inconsistencies in pipe_format, but above all, there
simply aren't enough bits in an enum to conveniently store all
information about a pixel format we need to be able to dynamically
generate pixel packing/unpacking code.
2009-08-29 09:21:15 +01:00
José Fonseca
946f432a08
llvmpipe: Fork softpipe for experimentation with llvm.
2009-08-29 09:21:15 +01:00
Ian Romanick
1814d6b49c
Put 'extern' first on the line to silence GCC warnings.
2009-08-28 20:12:36 -07:00
Eric Anholt
00413d8742
i965: Use VBOs in the VBO module on 965, now that we have ARB_map_buffer_range.
...
This looks like it's a small win on blender.
2009-08-28 15:29:35 -07:00
Eric Anholt
8096aa5213
vbo: Fix array pointer calculation for MapBufferRange-mapped vertex data.
...
We would end up with the offset from the start of the mapping rather than
the offset from the start of the buffer.
2009-08-28 15:29:35 -07:00
Eric Anholt
2d5c74fac3
intel: Add support for GL_ARB_map_buffer_range.
...
Passes glean's bufferObject test, and should provide good performance in the
cases applications are expected to use.
2009-08-28 15:29:35 -07:00
Eric Anholt
446a226f9f
i965: Implement ARB_oq CheckQuery in the intended way.
...
Previously we blocked because I hadn't added the libdrm function. Now it's
there, so update your libdrm.
2009-08-28 15:29:34 -07:00
Pauli Nieminen
0926a5f4a1
radeon: Fix swtcl emit pediction.
...
Problem was to find the correct place to run prediction. Only place that is
called for every primitive is ALLOC_VERTS so we have to do prediction there
before allocation.
2009-08-29 00:46:57 +03:00
Jakob Bornecrantz
55e7abf81f
i915g: Add cursor case for scanout layout
2009-08-28 22:41:53 +01:00
Jakob Bornecrantz
644060c025
i915g: Don't forget to init buffer ptrs
2009-08-28 22:41:52 +01:00
Zack Rusin
aaedd035ca
st/xorg: disable composite accelration for now
2009-08-28 16:19:53 -04:00
Zack Rusin
0a26811286
st/xorg: bind samplers before composition
2009-08-28 15:43:46 -04:00
Zack Rusin
f1c0a4b2f4
st/xorg: normalize coords for the src operands in the vertex shader
2009-08-28 15:36:33 -04:00
Pauli Nieminen
4f644e58d4
radeon: Fix scissors for dri1.
...
DRI1 has to set scissors in framebuffer coordinates.
2009-08-28 22:05:15 +03:00
Joakim Sindholt
dbe58d7f9f
r300g: pretty up the new drm code a bit
...
As it turns out, I made some boners. This corrects them (I hope)
2009-08-28 20:05:52 +02:00
Jakob Bornecrantz
1e9eb69f83
st/xorg: If migrating from a sw pixmap to a hw pixmap upload old contents
2009-08-28 17:10:58 +02:00
Jakob Bornecrantz
d80242c254
st/xorg: Null devPrivate.ptr when unmapping
2009-08-28 17:10:57 +02:00
Michel Dänzer
fdc8ec60eb
st/xorg: Fix scons build.
2009-08-28 17:42:07 +02:00
Joakim Sindholt
6bfec14d6d
r300g: support new drm_api
2009-08-28 17:23:11 +02:00
Jakob Bornecrantz
1e5014f7df
drm_api: Operate on textures instead of buffers
...
Most use cases just got the buffer from the texture
and then called into one of the get_handle functions.
Also with this patch it would be easier to move to a
generic function for getting handles from textures
and textures from handles, that is exposed via the screen.
2009-08-28 13:38:23 +01:00
José Fonseca
9399b9a0e2
util: Reset size to zero when failed to allocate buffer.
2009-08-28 12:52:31 +01:00
Jakob Bornecrantz
7d9af52bc5
st/xorg: Fix some warnings
2009-08-28 12:46:24 +02:00
Jakob Bornecrantz
b26aee0ffe
st/dri: Fix some warnings
2009-08-28 12:46:17 +02:00
Jakob Bornecrantz
6f0a1a8426
st/xorg: Pass dri driver name as driverName on screen
2009-08-28 12:36:42 +02:00
Jakob Bornecrantz
205d344e2a
Revert "st/xorg/dri: Pass texture formats via the DRI2 protocol flags."
...
This reverts commit a33e9ea3b9 .
As this change breaks both radeon and nouveau
2009-08-28 12:35:42 +02:00
Pauli Nieminen
4322181e6a
r100/r200: Bring back old PolygonStripple for DRI1.
...
DRI1 didn't have support for command buffer emit for stripple.
2009-08-28 05:42:41 +03:00
Pauli Nieminen
bfbad4fbb7
r100/r200: Share PolygonStripple code.
2009-08-28 04:58:50 +03:00
Pauli Nieminen
e541845959
r200: Fix piglit paths test.
...
Polygon stipple has to go to command buffer because special ioctl is disabled.
Piglit doesn't like HyperZ warning so disable it for kms.
2009-08-28 04:13:01 +03:00
Dave Airlie
a7f8b329aa
r600: fix scissor also.
...
I forgot about r600 being here.
2009-08-28 11:05:29 +10:00
Dave Airlie
d0cb1036aa
radeon: fix scissors harder.
...
this makes gnome-shell work on r300 for me
2009-08-28 11:02:32 +10:00
Eric Anholt
60b072d49f
intel: Add support for ARB_copy_buffer.
...
Passes glean's bufferObject test for this extension.
2009-08-27 17:51:29 -07:00
Pauli Nieminen
812ccacabc
r300: Fix emit prediction to account scissor emitting correctly.
2009-08-28 02:05:08 +03:00
Brian Paul
e363ec1d08
Merge branch 'mesa_7_5_branch'
2009-08-27 16:54:32 -06:00
Brian Paul
0d7bed9f89
docs: fix selection/feedback culling bug
2009-08-27 16:50:44 -06:00
Brian Paul
8f4d66c5f8
swrast: fix incorrect tri culling in selection/feedback mode.
...
See bug 16866.
2009-08-27 16:50:03 -06:00
Eric Anholt
c2ef10803d
i915: Fix undefined symbol as of eabe12df44
2009-08-27 15:33:33 -07:00
Zack Rusin
8bdce0c3a7
st/xorg: set vertex and fragment shader for the current op
2009-08-27 18:17:54 -04:00
Zack Rusin
c7e103d238
st/xorg: bind rasterizer state
2009-08-27 18:08:58 -04:00
Zack Rusin
2048182e86
st/xorg: set blend state for exa
2009-08-27 18:06:15 -04:00
Zack Rusin
f9a3fce090
st/xorg: bind framebuffer and viewport for exa
2009-08-27 17:39:45 -04:00
Zack Rusin
3f15ea866f
st/xorg: create and destroy shader cache
2009-08-27 17:39:45 -04:00
Michel Dänzer
416ee3c53e
st/xorg: Set shared usage of pixmaps for use via DRI2.
...
Also allow pixmaps to have both the shared and displayed usage flags, as is
the case for the screen pixmap now.
2009-08-27 20:29:32 +02:00
Michel Dänzer
bfbfcdd703
st/dri: Make sure the front left renderbuffer is there for texture-from-pixmap.
2009-08-27 20:27:28 +02:00
Michel Dänzer
d73d4cfcf1
st/xorg: Don't hardcode ExaPrepareCopy to fall back to software.
2009-08-27 20:27:28 +02:00
Michel Dänzer
05aa56a827
st/xorg: Flush context if necessary in ExaPrepareAccess.
2009-08-27 20:27:28 +02:00
Michel Dänzer
f3a540f6d7
st/dri: Only ask for fake front buffer for single buffer visuals by default.
2009-08-27 20:17:53 +02:00
Michel Dänzer
a33e9ea3b9
st/xorg/dri: Pass texture formats via the DRI2 protocol flags.
...
No need to guess.
2009-08-27 20:17:53 +02:00
Nicolai Hähnle
1160bf7c65
r300: Cleanup reported native program limits
...
The fragment program native limits are actually higher on R4xx
as reported by Alex Deucher, but using those requires some
bit-twiddling changes to program handling.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-08-27 18:13:48 +02:00
Nicolai Hähnle
eb6e281966
r300: Debug messages are written to stderr, so fflush that
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-08-27 18:13:48 +02:00
Pauli Nieminen
570d4e375a
radeon/r200/r300: Fix swtcl prediction to work after primitie change.
...
Swtcl calls flush everytime primitive changes so prediction has to made again
after flushing.
2009-08-27 18:57:13 +03:00
marvin24
43a064e06d
mesa: direct program debug output to stderr instead of stdout
2009-08-27 09:22:51 -06:00
Brian Paul
44e86dde6d
Merge branch 'mesa_7_5_branch'
2009-08-27 09:14:09 -06:00
Brian Paul
32f95f8c17
gallium/util: added support for SRGB formats
...
Fixes glean/texture_srgb failure, bug #23449 .
2009-08-27 09:10:38 -06:00
Brian Paul
f8ae968d28
gallium/util: added cases for SRGB formats
2009-08-27 09:09:56 -06:00
Chia-I Wu
8d0bdfa433
progs: EGL/X progs should link to libX11.
...
Since 5a459d58fc , libEGL no longer links
to libX11. Add the dependency to affected progs and cleanup
prog/egl/Makefile.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-27 08:08:30 -06:00
Vinson Lee
0dd08a9e15
mesa: move decls before code
2009-08-27 07:40:48 -06:00
Cooper Yuan
ba87cbf2be
r300g: Correct scissor setting, subtract 1 from window's width and height
2009-08-27 17:46:59 +08:00
Dave Airlie
82ff3190de
radeon: fix scissor calcs.
...
For non-FBOs we need to invert, for FBOs the scissors are non-inverted.
no matter what we need to clamp them to the buffer sizes.
2009-08-27 15:38:00 +10:00
Ian Romanick
09c73c7437
i965: Increase assmebly shader program parameter limits
...
Increase the number of native program parameters to the same values
exposed by GLSL.
2009-08-26 22:05:53 -07:00
Ian Romanick
eabe12df44
ARB prog: Change handling of program parameter limits
...
Several changes are made to program parameter limits. Several of the
non-NATIVE limits are set higher. All of the NATIVE limits are set to
zero in the core Mesa code. Each driver must set the actual value in
its context creation routine. If the NATIVE value remains zero, this
indicates that hardware shaders may not be supported.
Each of the preceeding changes matches the bahavior of Apple's shader
assembler, so it seems safe.
Finally, we limit the value of MaxEnvParams to be no greater than
MaxNativeAttribs. At least one case has been found where an
application does the wrong thing if MaxNativeAttribs < MaxEnvParams.
See also bugzilla #23490 .
2009-08-26 22:05:53 -07:00
Dave Airlie
20d9204fbd
radeon: fix max indx/vertex emission due to state checker
2009-08-27 14:50:42 +10:00
Younes Manton
cefe9c4f39
mesa: gitignore
2009-08-26 20:15:00 -04:00
Younes Manton
7d3b8231e1
nv04: Handle more Z formats.
...
Based on the patch from Luo Jinghua.
2009-08-26 20:07:51 -04:00
Nicolai Hähnle
c024f1047f
r300/compiler: Fix vertex program MAD emit
...
Only use the macro variant of MAD when absolutely necessary.
Apparently it cannot deal with relative addressing.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-08-27 01:46:50 +02:00
Nicolai Hähnle
2114acb044
r300/compiler: Fix bug in rc_find_free_temporary
...
Find used temporaries even if they are only written to in dead code.
This fixes a bug in the NQSSADCE stage.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-08-27 01:46:45 +02:00
Chia-I Wu
e1d978775f
egl: Remove Xdpy from EGLDisplay.
...
It is not used anymore.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-26 16:40:22 -06:00
Chia-I Wu
f5a06fad62
egl_glx: Make fbconfigs and visuals per display.
...
This is to allow a driver to drive multiple displays. Remove the use of
_EGL_PLATFORM_X and obsolete code along the way.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-26 16:40:22 -06:00
Chia-I Wu
c06699dd12
egl_softpipe: Make winsys and pipe screen per display.
...
This is to allow a driver to drive multiple displays. Remove the use of
_EGL_PLATFORM_X along the way.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-26 16:40:22 -06:00
Chia-I Wu
49f245ea6b
EGL_i915: Make struct drm_device per display.
...
This is to allow a driver to drive multiple displays.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-26 16:40:22 -06:00
Pauli Nieminen
74b55970dc
Merge branch 'fix_r300_swtcl' into push_master
2009-08-27 00:08:30 +03:00
Pauli Nieminen
47d4b9ff70
radeon: Fix loop en condition so debug output doesn't flood meaningless values.
2009-08-27 00:07:05 +03:00
Pauli Nieminen
e0e76edf97
radeon: Make RADEON_CMDBUF more fine grained.
2009-08-27 00:05:57 +03:00
Pauli Nieminen
97029c1860
radeon/r200/r300: Fix swtcl flushing not to invalidate dma region.
...
We were check command buffer sizes too alte so allocated dma regions
were freed before relocations so space checking failed.
2009-08-27 00:01:56 +03:00
Brian Paul
38f5641106
Merge branch 'mesa_7_5_branch'
2009-08-26 14:49:15 -06:00
Brian Paul
b2b220e622
i965: init the tex_units_used field
2009-08-26 14:47:50 -06:00
Brian Paul
a9a6399cd3
i965: fix incorrect tex unit in emit_tex() and emit_txb()
...
The instructions we're translating already went through the brw_wm_pass_fp()
function which does the sampler->texture unit mapping. We were applying
the sample->unit mapping a second time in the GLSL texture emitters.
Often, this made no difference but other times it could lead to accessing
an invalid texture and could cause a GPU lockup.
2009-08-26 14:46:58 -06:00
Brian Paul
81a101b5be
i965: clean-up tex target switches
2009-08-26 14:43:45 -06:00
Brian Paul
6df38e6f5a
glsl: asst. clean-ups in set_program_uniform()
...
Remove redunant type check for samplers (assert instead).
Move some local vars. Update comments.
2009-08-26 14:35:45 -06:00
Brian Paul
babb5ba9a9
glsl: signal that the program needs to be re-translated when samplers change
2009-08-26 14:29:50 -06:00
Brian Paul
7205221051
progs/glsl: asst. changes in shtest.c
2009-08-26 12:16:18 -06:00
Brian Paul
af7315e58b
i965: added texture unit sanity check
...
Check that all the textures needed by the current fragment program
actually exist and are valid.
2009-08-26 12:08:23 -06:00
Brian Paul
34da6024e3
i965: keep track of which texture units the fragment shader accesses
...
We'll use this for debug/sanity checking.
2009-08-26 12:07:03 -06:00
Brian Paul
d09d03aa42
docs: document sampler array bug fix
2009-08-26 12:04:35 -06:00
Brian Paul
f8b344114f
i965: clean up texture target switches
2009-08-26 12:02:24 -06:00
Brian Paul
f05344fcea
mesa: var renaming, new assertion
2009-08-26 12:02:24 -06:00
Brian Paul
dd528f0ec1
mesa: additional instruction field size assertions
2009-08-26 12:02:24 -06:00
Brian Paul
476290946e
Merge branch 'mesa_7_5_branch'
2009-08-26 12:01:23 -06:00
Brian Paul
2bcf787de1
progs/glsl: handle window resizes in texaaline.c
2009-08-26 11:56:56 -06:00
Brian Paul
488b3c4d1b
progs/glsl: add special Makefile rule for samplers_array
2009-08-26 11:55:15 -06:00
Brian Paul
f6d34c2058
progs/glsl: change samplers.c to better test sampler/texture indexing
...
Now the left half is yellow and the right half is red, with the gradients
going in opposite directions.
2009-08-26 11:53:25 -06:00
Brian Paul
04d170794a
glsl: fix bug in sampler array indexing
...
Need to add the 'offset' parameter when indexing the parameter array.
Before, if we were setting arrays of samplers, we were actually only
setting the 0th sampler's value.
Because of how progs/glsl/samplers.c is constructed, this wasn't showing
up as a failure in the samplers_array output.
2009-08-26 11:39:31 -06:00
Alex Deucher
7ffbe48706
r600: fix two sided stencil
2009-08-26 13:33:06 -04:00
Alex Deucher
f988c750a9
r600: add missing radeon_cs_space_set_flush call
...
fixes crash in etracer reported by kdekorte on IRC
2009-08-26 13:10:15 -04:00
Zack Rusin
a0966c41a9
st/xorg: create basic vertex shader
2009-08-26 12:50:47 -04:00
Zack Rusin
b324aacf13
st/xorg: create basic fragment shader
2009-08-26 12:50:47 -04:00
Alex Deucher
490f640cd5
r600: make reloc_chunk size dynamic
2009-08-26 12:17:44 -04:00
Alex Deucher
f33853e56d
r600: fix memory leak
2009-08-26 11:09:59 -04:00
Alex Deucher
18e0fea55b
r300: r4xx and rs4xx also have lte discard regs
2009-08-26 10:53:30 -04:00
Jakob Bornecrantz
53b3cdaee2
st/dri: Add some debug code
2009-08-26 14:30:54 +02:00
Jakob Bornecrantz
57230d96ed
st/xorg: Temporary fix for none stencil visuals
...
Should be replaced with something looking at the proper
glx visual for the buffers.
2009-08-26 14:27:50 +02:00
Jakob Bornecrantz
23fe960be0
st/xorg: Find out correct type for depth stencil buffers
2009-08-26 13:45:31 +02:00
Jakob Bornecrantz
aab0bedb8c
st/dri: Redo config generation
2009-08-26 12:29:28 +02:00
Michel Dänzer
b2e1b25881
st/xorg: Add support for dirty framebuffer region reporting.
...
Add a BlockHandler which flushes the context and reports the dirty region
gathered using the X server damage layer.
In the interim, with dirty region reporting only allocate textures for the
framebuffer and shared pixmaps (e.g. DRI2 buffers) and fall back to software
for other pixmaps. This will be improved in the future.
2009-08-26 13:18:37 +02:00
Cooper Yuan
dadf138ddb
r600: Update vertex fetch shader if necessary
2009-08-26 16:21:10 +08:00
Ben Skeggs
1664bc1a37
st/dri: make the GL_ARB_map_buffer_range entrypoints available
2009-08-26 16:18:39 +10:00
Dave Airlie
674835f184
radeon/r100/r200: actually init the OQ support properly
2009-08-26 14:16:54 +10:00
Dave Airlie
b6df23d8b3
radeon/r200: OQ support for r200 in theory.
...
this is an untested port of the r100 OQ code
2009-08-26 14:03:48 +10:00
Dave Airlie
5484428d72
radeon: add r100 OQ support with kms.
...
This adds OQ support for the r100 chipsets, it requires
KMS unless someone wants to make a kernel patch to add support
for OQ regs.
2009-08-26 13:56:45 +10:00
Brian Paul
42675ff0e3
progs/glsl: call ValidateShaderProgram()
2009-08-25 17:46:11 -06:00
Brian Paul
a088e5631d
mesa: validate shader before drawing (for debugging, disabled)
2009-08-25 17:46:10 -06:00
Brian Paul
d8b4f8c848
glsl: update a texture/sampler comment
2009-08-25 17:46:10 -06:00
Brian Paul
c90fca3da4
glsl: implement shader sampler validation
...
Shader validation should fail if there are two samplers of different types
which reference the same texture unit. For example, if a cubemap sampler
and a 2D sampler both reference texture unit 0, that's invalid.
2009-08-25 17:46:10 -06:00
Brian Paul
2050baba96
mesa: use gl_texture_index type for gl_program::SamplerTargets
2009-08-25 17:46:10 -06:00
Brian Paul
fa6299cb31
progs/util: added ValidateShaderProgram() to shaderutil.c
2009-08-25 17:46:10 -06:00
Brian Paul
b7d2023cf9
i965: add some texture unit/target assertions
2009-08-25 17:46:10 -06:00
Brian Paul
f9ce0a91dc
mesa: print some program fields in binary too
2009-08-25 17:46:10 -06:00
Pauli Nieminen
dbf59de6d2
r200: Add scissor to state atom list.
...
Scissors are jsut one of states that we have to emit so it should be in state list
2009-08-26 01:53:17 +03:00
Pauli Nieminen
5d10890795
radeon/r600: Fix remaining warnings when building 64 bit binary.
2009-08-25 22:16:19 +03:00
Pauli Nieminen
87f83e193a
r200: Addd missing parameter to debug output.
2009-08-25 21:39:58 +03:00
Pauli Nieminen
75df73838a
r200: Fix commit size prediction.
...
Scissor are emited for every primitive so fix that in prediction.
2009-08-25 21:36:57 +03:00
Zack Rusin
7bc4744026
xorg: insert shaders into the cache
2009-08-25 14:22:26 -04:00
Zack Rusin
23b59d3b40
exa: add basic code to cache vertex and fragment shaders
2009-08-25 14:01:58 -04:00
Zack Rusin
c7653a8333
exa: check whether the op is accelerated
2009-08-25 13:23:08 -04:00
Pauli Nieminen
c3374bf97e
radeon: Fix all compiler warnings.
2009-08-25 19:35:41 +03:00
Brian Paul
42ecb1287e
mesa: remove -I$(TOP)/src/gallium/drivers from sources.mak
...
Core Mesa and the state tracker do not depend on any gallium drivers.
2009-08-25 09:42:28 -06:00
Brian Paul
a94d66e857
Revert "glapi: Fix a possible race in getting current context/dispatch."
...
This reverts commit 17090cf3ef .
We're reverting this because it causes ABI breakage with the X server.
Maybe re-attempt with another patch.
2009-08-25 09:37:43 -06:00
Zack Rusin
65f9d10342
xorg: revert bad merge
2009-08-25 09:58:51 -04:00
Michel Dänzer
d22bd1421c
Add support for building the Xorg state tracker with scons.
...
scons ... statetrackers=xorg
2009-08-25 15:39:05 +02:00
Pauli Nieminen
418cdc66ec
Revert "glx: Make drawables persistent untill they are changed by glXMakeCurrent"
...
This commit was not mean to end in to master yet. It is still queston if this
right design to fix the problem.
This reverts commit 45e3be3c07 .
2009-08-25 05:07:08 +03:00
Pauli Nieminen
ce7ed63f0c
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
2009-08-25 02:36:13 +03:00
Maciej Cencora
1d5a06a1f7
r300: fix condition logic
...
The s3tc extensions are properly enabled now, when force_s3tc_enable option is set in driconf.
2009-08-25 01:30:24 +02:00
Maciej Cencora
ff235c8ccb
r300: set proper CS section size
2009-08-25 01:30:24 +02:00
Pauli Nieminen
4297f32c24
radeon/r200/r300/r600: Warn if we emit more than prediction was.
...
Prediction code making too small prediction may cause space check aserttion
failure later in rendering. So warning about any failure to predict correctly
should be fixed.
2009-08-25 02:23:52 +03:00
Zack Rusin
ffe8cc6cef
xorg: fix compilation
2009-08-24 18:42:16 -04:00
Zack Rusin
17076d700c
xorg: start on code accelerating render
2009-08-24 18:39:01 -04:00
Alex Deucher
3023328ea7
r300: add support for getting Z pipe info from drm
...
Needed for occulsion queries on rv530 chips
Signed-off-by: Alex Deucher <alexdeucher@gmail.com >
2009-08-24 18:08:37 -04:00
Alex Deucher
8dd151b947
r600: code cleanup
2009-08-24 17:51:00 -04:00
Dave Airlie
dea1038186
radeon: fix fbo size calculation to after pitch
2009-08-25 07:21:03 +10:00
Zack Rusin
cd5c7bfd93
Merge branch 'master' of ssh://zack@git.freedesktop.org/git/mesa/mesa
2009-08-24 16:39:25 -04:00
Zack Rusin
534c133022
openvg: fix vgTransformPath with relative coords
2009-08-24 16:38:43 -04:00
Brian Paul
bf7e4b10cb
ARB prog: Set error instead of falling through with incorrect value
...
If a fragment program only parameter was queried of a vertex program
(e.g., GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) no error would be set and
a random value would be returned. This caused 'glxinfo -l' to show
the same values for GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB as for
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB. This is confusing and incorrect.
(cherry picked from master, commit 4bccd693a7 )
2009-08-24 13:56:01 -06:00
Ian Romanick
4bccd693a7
ARB prog: Set error instead of falling through with incorrect value
...
If a fragment program only parameter was queried of a vertex program
(e.g., GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) no error would be set and
a random value would be returned. This caused 'glxinfo -l' to show
the same values for GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB as for
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB. This is confusing and incorrect.
2009-08-24 12:51:29 -07:00
Brian Paul
1e2a71c5c2
mesa: add new program parser sources to tarball
...
The end user doesn't need the .y or .l or Makefile but include them anyway
in case someone wants to patch or debug things.
2009-08-24 13:12:07 -06:00
Brian Paul
b879316d4d
docs: recent 7.5.1 bug fixes
2009-08-24 13:05:20 -06:00
Brian Paul
69170a4aae
xlib: fix single buffer window resize bug
...
When a single-buffered window was resized the new window size was never
detected. This fix that, but there's still a bug which causes window
contents corruption for certain window sizes...
2009-08-24 13:05:20 -06:00
Brian Paul
93aa0fd81c
vbo: fix divide by zero exception
...
Fixes bug 23489.
2009-08-24 13:05:20 -06:00
Vinson Lee
0a24e50111
glsl: Silence gcc uninitialized variable warning.
2009-08-24 13:04:50 -06:00
Brian Paul
4eb7256854
st/mesa: flush bitmap cache if Z value changes
...
When adding a new bitmap to the cache we have to check if the Z value is
changing and flush first if it is.
This is a modified version of a patch from Justin Dou <justin.dou@intel.com >
2009-08-24 13:04:50 -06:00
Brian Paul
96f7b42242
docs: recent 7.5.1 bug fixes
2009-08-24 13:02:33 -06:00
Ian Romanick
d8a3ada7fb
ARB prog parser: Regenerate parser from previous commit
2009-08-24 12:00:35 -07:00
Brian Paul
4cf27608bc
ARB prog parser: use correct context limits
2009-08-24 12:00:35 -07:00
Brian Paul
b5ecbbe636
xlib: fix single buffer window resize bug
...
When a single-buffered window was resized the new window size was never
detected. This fix that, but there's still a bug which causes window
contents corruption for certain window sizes...
2009-08-24 12:58:49 -06:00
Brian Paul
b9b04872d5
vbo: fix divide by zero exception
...
Fixes bug 23489.
2009-08-24 12:44:00 -06:00
Alex Deucher
29473d25a3
r600: fix state emit sizes
2009-08-24 14:40:40 -04:00
Chia-I Wu
58ac57c2b7
egl_xdri: Revive the driver.
...
egl_xdri does not compile for some time. This commit revives the
driver. It no longer depends on libGL.so for GLX related functions.
Instead, it uses code from src/glx/ directly. Both DRI and DRI2 are
supported.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-24 11:49:45 -06:00
Chia-I Wu
17090cf3ef
glapi: Fix a possible race in getting current context/dispatch.
...
There is a possbile race that _glapi_Context is reset by another thread
after it is tested in GET_CURRENT_CONTEXT but before it is returned. We
definitely do not want a lock here to solve the race. To have correct
results even under a race, no other threads should reset _glapi_Context
(or _glapi_Dispatch).
This patch adds a new global variable _glapi_SingleThreaded. Since
_glapi_Context or _glapi_Dispatch are no longer reset,
_glapi_SingleThreaded is tested instead, before accessing them.
DRI drivers compiled with this patch applied will not work with existing
libGL.so because of the missing new symbol. If this turns out to be a
real problem, this patch should be reverted.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-24 11:46:15 -06:00
Chia-I Wu
3076d1617d
glapi: Static mutex does not work on WIN32_THREADS.
...
This re-introduces the race in _glapi_check_multithread, but avoids a
crash on windows.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-24 11:46:15 -06:00
Chia-I Wu
fc2feea685
glapi: Fix a race in accessing context/dispatch TSD.
...
If multiple threads set/get a TSD at roughly same time for the first
time, glthread might (wrongly) initialize it more than once. This patch
solves the race by initializing context/dispatch TSDs early.
Acked-by: Ian Romanick <ian.d.romanick@intel.com >
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-24 11:45:57 -06:00
Chia-I Wu
99939982ec
glapi: Protect _glapi_check_multithread by a mutex.
...
Multiple threads might call _glapi_check_multithread at roughly the same
time. It is possbile that all of them are wrongly regarded as firstCall
if there is no mutex. This bug causes xeglthreads to crash sometimes.
Acked-by: Ian Romanick <ian.d.romanick@intel.com >
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-24 11:45:57 -06:00
Vinson Lee
f785b35b47
glsl: Silence gcc uninitialized variable warning.
2009-08-24 11:43:02 -06:00
Brian Paul
53db19b57d
mesa: _mesa_layout_parameters() returns a boolean value
2009-08-24 10:50:07 -06:00
Pauli Nieminen
55c0457fe9
radeon: Add debug output to radeonCountStateEmitSize.
2009-08-24 18:45:30 +03:00
Pauli Nieminen
ec61f677c3
r600: Fix indetion and add useful debug output.
2009-08-24 18:06:25 +03:00
Pauli Nieminen
75da0a6a56
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
2009-08-24 17:09:27 +03:00
Maciej Cencora
ed14a4cb7b
r300: add support for EXT_framebuffer_blit
2009-08-24 14:52:33 +02:00
Cooper Yuan
a88678d3ee
tgsi: Fix build error due to commit acc7da90
2009-08-24 19:50:38 +08:00
José Fonseca
02c523dfbb
tgsi: Only free temp uregs.
...
Shorthand.
(cherry picked from commit de911220bbbe74cff0c79b260456ff36122b7b5b)
2009-08-24 12:11:24 +01:00
José Fonseca
acc7da9035
tgsi: Pass pipe_context as a parameter to ureg_create_shader.
...
Simplifies migration to tgsi_ureg.
(cherry picked from commit f574398c07c41cb8d31249a7186fc178ef7d552a)
2009-08-24 12:11:22 +01:00
Keith Whitwell
b570a7e6b6
tgsi: add generic instruction builder
...
When translating an incoming shader (rather than building one from scratch)
it's preferable to be able to call a single, generic instruction emitter
rather than figuring out which of the opcode-specific functions to call.
2009-08-24 11:33:38 +01:00
Cooper Yuan
7ee4f32dcd
r300g: Set the vector address in the input memory for bypass_vs_clip_and_viewport case
2009-08-24 13:56:23 +08:00
Dave Airlie
2b29d21018
r600: scissor updates for dri2
...
Pulled from Dave's WIP patch.
2009-08-24 00:56:40 -04:00
Dave Airlie
f758a8bf2e
r600: switch to common cs functions
...
needed for dri2. Pulled from Dave's WIP patch.
2009-08-24 00:47:34 -04:00
Alex Deucher
436fb34369
r600: map 16 VS outputs
...
Should cover everything exported from the VS
2009-08-24 00:33:33 -04:00
Alex Deucher
d6f7ebd603
r600: fix logic copy paste error
...
Spotted by airlied.
2009-08-23 23:56:45 -04:00
Pauli Nieminen
fe42b4b757
r600: Improve emit prediction.
2009-08-24 02:44:27 +03:00
Pauli Nieminen
885906840d
r600: Predict emit size for next rendering.
2009-08-24 02:01:15 +03:00
Pauli Nieminen
ccde276838
radeon: Fix dri1 ctx emit size.
2009-08-24 01:54:01 +03:00
Pauli Nieminen
7bb0f880db
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
...
Conflicts:
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/radeon/radeon_cmdbuf.h
2009-08-24 00:57:05 +03:00
Alex Deucher
4484ce9c7b
radeon: add radeon_cs_write_table to the legacy path
2009-08-23 16:22:01 -04:00
Alex Deucher
becb50f84d
r600: bump reloc_chunk size
...
This fixes openarena reloc errors. This needs to be
made more dynamic.
2009-08-23 16:06:31 -04:00
Alex Deucher
670bd47df9
r600: fix count for CB/DB target state
2009-08-23 15:35:55 -04:00
Maciej Cencora
e1801d861a
r300: fix a typo
2009-08-23 21:30:43 +02:00
Maciej Cencora
bcbe27d0ca
radeon: use proper macro
2009-08-23 21:11:13 +02:00
Maciej Cencora
7e7f0f61bf
radeon: use bo_is_idle interface for checking if OQ result is available
2009-08-23 21:09:55 +02:00
Maciej Cencora
4aadda5f66
r300: minor optimization
...
use properly implemented OUT_BATCH_TABLE where possible
2009-08-23 20:21:48 +02:00
Ian Romanick
9b70c33e73
ARB prog lexer: Fix lexer to eat both DOS and Unix line endings
2009-08-23 11:15:32 -07:00
Alex Deucher
7a05a4c65c
r600: use persistent bos for shaders
2009-08-23 13:41:43 -04:00
Alex Deucher
41934be254
r600: always emit CB base
...
Not doing so seems to cause lock-ups or rendering problems
on some chips. I think there is an logic issue related to
CB and VGT on some chips. We ran into similar issues in
r600_demo IIRC.
2009-08-23 13:05:52 -04:00
Pauli Nieminen
b34695375e
radeon: Fix compilation with legacy memory manager.
2009-08-23 14:02:46 +03:00
Pauli Nieminen
66bbafb6f9
radeon: Check from kernel if dma buffer is idle.
...
This makes sure that objects are leaving wait list only when they are processed by gpu.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-23 13:39:32 +03:00
Alex Deucher
bf6d0ae598
r600: make state emit more fine grained
...
Gives a nice speed boost in most apps since
we only emit what state we need.
2009-08-22 18:03:26 -04:00
Renato Caldas
08e91e0315
shader: fix compilation warnings
...
This patch fixes some "implicit declaration of function" compilation
errors/warnings on the new shader code.
Signed-off-by: Renato Caldas <seventhguardian@gmail.com >
2009-08-22 14:00:23 -07:00
Luo Jinghua
523cb80d0f
ARB prog parser: include imports.h to kill some compiler warnings
2009-08-22 13:59:48 -07:00
Alex Deucher
180c304943
r600: move full state to radeon state atoms
2009-08-22 15:03:41 -04:00
Alex Deucher
17813931db
r600: add support for RS880
2009-08-22 11:45:40 -04:00
Ian Romanick
c87ef0870a
i965: Implement frag prog DPH like DP4
...
DPH can output to any component, not just to X. This allows fpalu.c
to run without hitting the assertion in emit_dph.
2009-08-22 01:35:12 -07:00
Pauli Nieminen
effda2e2a7
r300: Fix debug output.
2009-08-22 04:37:24 +03:00
Jakob Bornecrantz
54fb71b863
st/dri: Remove some debug prints
2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
a3e59b9d06
st/dri: Find out if the drawable is a pixmap
...
Part of this code is disabled since no performance gains
where detected with it enabled.
This code only detects if it is a pixmap that it is
rendering to on the st/xorg DDX since it sets the fake
front to the same handle as front.
2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
6237ac2412
st/dri: Fix frontbuffer rendering with DRI2
2009-08-22 02:16:01 +01:00
Jakob Bornecrantz
29165a2fcc
st/xorg: Handle fake fronts correctly for pixmaps
2009-08-22 02:10:18 +01:00
Jakob Bornecrantz
a469b4c459
i915g: Remove bad assert on fence
2009-08-22 02:09:59 +01:00
Pauli Nieminen
6c5c46f842
r300: Fix dri1 not to emit state that is not supported in old drm.
2009-08-22 02:54:34 +03:00
Pauli Nieminen
c0f4063703
radeon/r300: Code clean up and logic fix.
2009-08-22 02:43:00 +03:00
Michel Dänzer
029e643b24
glx/dri2: Always use X drawable ID for DRI2 protocol.
...
Fixes protocol errors in cases where the GLX ID is different.
2009-08-22 01:33:37 +02:00
Michel Dänzer
6b1f144d9b
Fix r300 VBO support build on big endian.
2009-08-22 01:24:39 +02:00
Alex Deucher
bf5d6cf455
r600: better default state size.
...
Hopefully suokko's emit size impovements will
land soon.
2009-08-21 17:46:32 -04:00
Pauli Nieminen
bb43c5d1cb
r300: Remove calls to rcommonEnsureCmdBufSpace.
...
All rendering is checked in r300PredictTryDrawPrimsSize which mamde these calls useless.
2009-08-21 23:48:39 +03:00
Pauli Nieminen
90647ff558
radeon: protect against buffer overflow in state atom debug code.
2009-08-21 22:37:13 +03:00
Ian Romanick
4cfb1b880b
Merge branch 'asm-shader-rework-1'
2009-08-21 11:34:30 -07:00
Pauli Nieminen
b7ec2ebe33
radeon: Improve state emit code.
...
Trying to make understanding code easier with small refactoring and renaming.
2009-08-21 20:47:35 +03:00
Pauli Nieminen
0bf4308580
r300: Add debug output to show how much was emited in TryDrawPrims.
2009-08-21 20:26:41 +03:00
Brian Paul
ef98eed0a9
radeon: fix incorrect loop limit (warned by -O3)
2009-08-21 11:04:37 -06:00
Brian Paul
49c0825655
glx: initialize some local vars to silence warnings with -O3
2009-08-21 11:04:37 -06:00
Brian Paul
1aba1baa62
st/mesa: flush bitmap cache if Z value changes
...
When adding a new bitmap to the cache we have to check if the Z value is
changing and flush first if it is.
This is a modified version of a patch from Justin Dou <justin.dou@intel.com >
2009-08-21 10:24:50 -06:00
Pauli Nieminen
d6b5464aaa
r300: Predict emit size for next rendering operation.
...
We do flush for cmd buffer in case there isn't enough space left for whole
rendering operation. This protects dma regions from getting released in middle
of state emit.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:31 +03:00
Pauli Nieminen
12fe319c53
r300: Handle possible fall back if space check fails.
2009-08-21 19:12:30 +03:00
Pauli Nieminen
11d3ec1f93
r300: Delay allocation of dma regions in TryDrawprims.
...
This makes it easier to predict size of next rendering operation so we
can do early flush.
2009-08-21 19:12:30 +03:00
Pauli Nieminen
66513ba884
r300: Clean emit code.
...
This fixes some state atom check functions from returing wrong emit size.
There is emit code cleanup so that emit function selection is done in init
time instead of runtime.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:30 +03:00
Pauli Nieminen
d1a0ece907
radeon: Port flush preventation code from r200 to r100.
...
- emit prediction
- fixes to emit_sizes for data
- clean up of excesive use of radeonEnsureCmdBufferSpace
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:30 +03:00
Pauli Nieminen
60d156f688
r200: Make swtcl use state size prediction for flush.
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:30 +03:00
Pauli Nieminen
e083f53ce4
r200: Remove unnecessery Elts from r200 context.
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:29 +03:00
Pauli Nieminen
9f7676c718
r200: Remove unnecessary calls to rcommonEnsureCmdBufSpace.
...
Calling EnsureCmdBufSpace is not required because rendering pipeline has to quarentee free space.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:29 +03:00
Pauli Nieminen
0f41259eff
r200: Fix atom->check call to return emit size for atom.
...
This patch makes render emit size prediction count the corect maximum emit size
for state.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:29 +03:00
Pauli Nieminen
fb1d0bfd47
r200: Prevent flush in middle of rendering.
...
Patch adds prediction functionthat tries to predict emit size to the smallest
possible values that is quarenteed to be higher than worst case scenario in
rendering pipeline.
State emit size prediction code is in place but fix for emit sizes is included
in next patch.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:29 +03:00
Pauli Nieminen
7f8f486b36
radeon/r200: Add -Wall to default build flags like it is in r300/r600
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:29 +03:00
Pauli Nieminen
45e3be3c07
glx: Make drawables persistent untill they are changed by glXMakeCurrent
...
This fixes bug that xdemos/manywin would segfault if it was run with command
./manywin 2. Demo is tring to call glXSwapBuffers while another context was
bind using glXMakeCurrent.
Fix is simple makes drawable and readable persistent untill they change or
context is destroyed.
I found a logic error when same dri context is used for multiple drawables
which caused readable and drawable to fall out of sync in special case. Fix
is simple just updating drawables more often than in original patch.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-21 19:12:28 +03:00
Chia-I Wu
b1f156f0ec
egl: Make _eglChooseDriver return the filename of the driver.
...
The real difference is that the driver suffix is now appended. This
also fixes an annoying bug that EGL_DRIVER could not specify the path to
a driver because a suffix was always appended.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-21 08:34:34 -06:00
Chia-I Wu
5a459d58fc
egl: Remove dependency on libX11.
...
libX11 is used to determine the screen number, which is in turned used
to determine the DRI driver. However, the sysfs interface for
determining the DRI driver is gone, and no working driver depends on
this mechanism.
Display string parsing is moved to a new function,
_eglSplitDisplayString.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-21 08:34:34 -06:00
Chia-I Wu
1f871a4d15
egl_softpipe: Do not flush unlinked context.
...
An unlinked context is destroyed after _eglMakeCurrent. Flushing such
context would cause segfault.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-21 08:34:34 -06:00
Chia-I Wu
408db29792
egl: Check for null display in handle checking.
...
The display may be NULL when checking a handle.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-21 08:34:34 -06:00
Jakob Bornecrantz
9b3e5df900
st/egl: Add support for drmModeDirtyFB command if found
2009-08-21 15:04:21 +02:00
Pauli Nieminen
0c0cea250d
radeon: Add comment to explain logic for freeing dma buffers.
2009-08-21 16:40:14 +03:00
Ian Romanick
ac5551fbb9
ARB prog parser: Revert part of previous change to constant parsing
...
The commit "ARP prog parser: Implement the spec, not what makes sense"
broke the parsing of scalar constants. This commit reverts that part
of that commit. Now vp_swizzle.c passes.
2009-08-20 18:29:41 -07:00
Alex Deucher
ba48e78b1f
r600: convert to using common radeon state atoms
...
switches more state handling to common code. We need
should be more fine grained with the state atoms
eventually.
2009-08-20 18:55:41 -04:00
Alex Deucher
a47bb56d45
r600: improve state emission
...
Slowing migrating to atom based system like
the other radeon drivers.
2009-08-20 17:21:50 -04:00
Alex Deucher
ad36058e21
r600: split state emit into block specific functions
...
We probably want to go finer grained eventually, but
this is a good start.
2009-08-20 17:21:50 -04:00
Brian Paul
a215da5e9c
progs/glsl: report compile/link times in shtest.c
2009-08-20 14:43:32 -06:00
Brian Paul
f300db379e
progs/util: added GetShaderCompile/LinkTime() to get compilation/link times
2009-08-20 14:43:32 -06:00
Brian Paul
8a883d1657
progs/glsl: update multitex.shtest for new texture syntax
2009-08-20 14:43:32 -06:00
Brian Paul
0062bd68b3
progs/glsl: update shtest.c to handle 1D/3D/CUBE/RECT textures
2009-08-20 14:43:32 -06:00
Brian Paul
174054c973
progs/glsl: tweaks to shtest.c
...
1. Larger sphere to match cube size
2. Allow -geometry option to override window size
3. Cube samplers
2009-08-20 14:43:32 -06:00
Christoph Bumiller
d7c55555ac
nv50: use VTX_ATTR_nF for constant vtxelts
2009-08-20 21:41:39 +02:00
Christoph Bumiller
6d1f63f520
nv50: set vertex buffer limits
2009-08-20 21:41:39 +02:00
Christoph Bumiller
80c5ab1586
nv50: modify vbo format to hw translation, add BGRA swizzle
2009-08-20 21:41:39 +02:00
Brian Paul
ce723d8d8b
tgsi: check for SOA dependencies in SSE and PPC code generators
...
Fall back to interpreter for now. This doesn't happen very often.
2009-08-20 10:34:45 -06:00
Brian Paul
4c7c294fff
tgsi: handle SOA dependencies for MOV/SWZ
...
SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled. For example:
MOV T, T.yxwz; would expand into:
MOV t0, t1;
MOV t1, t0;
MOV t2, t3;
MOV t3, t2;
The second instruction will produce the wrong result since we wrote to t0
in the first instruction. We need to use an intermediate temporary to fix
this.
This will take more work to fix for all TGSI instructions. This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.
Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
2009-08-20 10:28:22 -06:00
Brian Paul
5e6d21afa4
tgsi: added tgsi_full_instruction::Flags field
...
Users of the parser can make use of this.
2009-08-20 10:25:55 -06:00
Jakob Bornecrantz
e93d41d24f
st/egl: Open the first drm node
...
At least its better then hardcoded to i915
2009-08-20 17:50:30 +02:00
Brian Paul
94d14f6cd2
progs/glsl: more comments in shtest.c
2009-08-20 10:52:13 -06:00
Brian Paul
45cd9d80db
tgsi: when printing/dumping programs indent loops and conditionals
2009-08-20 10:52:12 -06:00
Brian Paul
1645adc551
tgsi: check for SOA dependencies in SSE and PPC code generators
...
Fall back to interpreter for now. This doesn't happen very often.
2009-08-20 10:52:12 -06:00
Brian Paul
013bd4da1a
tgsi: handle SOA dependencies for MOV/SWZ
...
SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled. For example:
MOV T, T.yxwz; would expand into:
MOV t0, t1;
MOV t1, t0;
MOV t2, t3;
MOV t3, t2;
The second instruction will produce the wrong result since we wrote to t0
in the first instruction. We need to use an intermediate temporary to fix
this.
This will take more work to fix for all TGSI instructions. This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.
Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
2009-08-20 10:52:12 -06:00
Brian Paul
fffcecc4d9
tgsi: added tgsi_full_instruction::Flags field
...
Users of the parser can make use of this.
2009-08-20 10:51:55 -06:00
Alex Deucher
0f0a9e3ee7
r600: try and get everything in the draw in one IB
...
fixes corruption issues with apps like teapot and
geartrain.
2009-08-20 12:12:23 -04:00
Alex Deucher
1b1d591373
r600: move misc regs from general state
...
These regs don't use the SET_CONTEXT_REG packet,
so they weren't getting set correctly.
2009-08-20 12:12:23 -04:00
Brian Paul
39ec4a9253
mesa: add GL_DEPTH_STENCIL to glCopyPixels error check
...
Plus, add a comment about 'type' error checking.
See bug 19087.
2009-08-20 08:12:16 -06:00
Alex Deucher
525ddb1f56
r600: rework emit code
...
make sure we allocate enough space for relocs
2009-08-20 03:38:49 -04:00
Pauli Nieminen
ec1540052b
radeon: Update regulary cs processing info from kernel.
...
This fixes problem that dma buffers were leaking in dri1 mode.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-20 03:38:49 -04:00
Brian Paul
8604a896a6
gallium: rename copy/fill_rect utility functions
2009-08-19 13:17:58 -06:00
Brian Paul
4522cdbfdd
gallium: fix tags target in Makefile.template
2009-08-19 13:17:58 -06:00
Alex Deucher
174aeabc0f
radeon: fix typo in last dma patch
2009-08-19 13:07:39 -04:00
Eric Anholt
29e51c3872
intel: Fix failure to commit -a --amend before last push.
2009-08-19 09:30:47 -07:00
Eric Anholt
a70e131584
intel: Align cubemap texture height to its padding requirements.
2009-08-19 09:19:06 -07:00
Eric Anholt
b053474378
intel: Align untiled region height to 2 according to 965 docs.
...
This may or may not be required pre-965, but it doesn't seem unlikely, and
I'd rather be safe.
2009-08-19 09:19:06 -07:00
Pauli Nieminen
947df2e5a8
radeon: Add debug output for dma buffer object numbers.
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-19 11:59:47 -04:00
Pauli Nieminen
66e019c6c9
radeon: Fix dma buffer object pool to scale object sizes.
...
This fixes problems when application is using large vertex arrays for drawing.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-19 11:59:34 -04:00
Alex Deucher
d551b3ac88
r600: minor cleanup
2009-08-19 11:59:03 -04:00
Brian Paul
0259a2ad69
progs/xdemos: add multictx to .gitignore
2009-08-19 08:58:38 -06:00
José Fonseca
c69d9296fb
tgsi: Add missing include.
...
(cherry picked from commit d2787c02c130b1fe20d0c032d468622f2fdaef79)
2009-08-19 12:03:34 +01:00
José Fonseca
b2f3f7dd12
tgsi: Fix typo in ureg constant creation.
...
(cherry picked from commit aa40c9abc7787fdf46cb661a4d0bb8bec513fc63)
2009-08-19 12:03:10 +01:00
Keith Whitwell
dd5ac3cafc
st/xlib: remove a couple more 'fake' references
2009-08-19 12:02:53 +01:00
Keith Whitwell
515a820021
st/xlib: remove dead ungrab helper
2009-08-19 12:02:53 +01:00
Keith Whitwell
65079afcde
tgsi: silence compiler warning
2009-08-19 12:00:24 +01:00
Keith Whitwell
7dc5527592
tgsi: remove unused function argument
2009-08-19 12:00:03 +01:00
Keith Whitwell
265e210edb
tgsi: add missing functionality to support instructions with labels
...
Could previously emit opcodes with label arguments, but was no way to
patch them with the actual destinations of those labels.
Adds two functions:
ureg_get_instruction_number - to get the id of the next instruction
to be emitted
ureg_fixup_label - to patch an emitted label to point to a given
instruction number.
Need some more complex examples than u_simple_shader, so far this has
only been compile-tested.
2009-08-19 11:54:26 +01:00
Corbin Simpson
e327845e2b
r300g: Force off ZTOP optimizations for now.
2009-08-18 21:25:53 -07:00
Corbin Simpson
0086a84e2d
r300g: Utilize DONTBLOCK.
...
Also ALGYRHYTHMS.
2009-08-18 21:25:53 -07:00
Corbin Simpson
c0bc070ff5
radeon-gallium: Oh, look, we *do* already support DONTBLOCK.
...
Well, okay, the kernel doesn't, but that's no excuse for us! :3
2009-08-18 21:25:53 -07:00
Corbin Simpson
a381ee8266
r300g: Massively cleanup OQ.
...
Still broken, but compiles cleaner, behaves better, etc.
2009-08-18 21:25:53 -07:00
Corbin Simpson
4092f318db
r300g: Add high_second_pipe cap for R3xx chipsets.
...
This name is totally subject to change if ever I need to separate R3xx
for some other reason.
2009-08-18 21:25:53 -07:00
Corbin Simpson
14378cbd2d
radeon-gallium: Stop using outdated ioctls.
2009-08-18 21:25:53 -07:00
Corbin Simpson
c63bd15f81
Revert "r300-gallium, radeon-gallium: Nuke gb_pipes from orbit."
...
This reverts commit 6a40d1e9d9 .
Turns out that we *do* need these for OQ after all. Go figure.
Conflicts:
src/gallium/winsys/drm/radeon/core/radeon_r300.h
2009-08-18 21:25:53 -07:00
Brian Paul
73fc09a7bf
Merge branch 'mesa_7_5_branch'
2009-08-18 17:55:27 -06:00
Brian Paul
e4aa62a6ce
egl/xlib: move call to create_configs() after we set the Xdpy field
2009-08-18 17:54:44 -06:00
Brian Paul
3097d7dbf8
tgsi/ppc: we don't implement saturation modes yet
2009-08-18 17:50:52 -06:00
Brian Paul
fab17c1216
tgsi/sse: we don't implement saturation modes yet
...
Fixes piglit fp-generic tests/shaders/generic/lrp_sat.fp, bug 23316.
2009-08-18 17:50:00 -06:00
Brian Paul
ee0984e299
mesa: when emitting vertex program fog, set yzw=0,0,1
...
Fixes piglit fp-fog failure with gallium.
2009-08-18 17:39:55 -06:00
Brian Paul
b062a119ff
mesa: call FLUSH_CURRENT() for GL_CURRENT_TEXTURE_COORDS query
2009-08-18 17:09:32 -06:00
Ian Romanick
a512985fd8
Merge branch 'master' into asm-shader-rework-1
...
Conflicts:
src/mesa/shader/arbprogparse.c
2009-08-18 12:20:36 -07:00
Ian Romanick
0b5af41c6f
ARB prog parser: Delete the old parser
2009-08-18 12:07:47 -07:00
Ian Romanick
ea8db5c332
ARB prog: Revert some changes to debug output
2009-08-18 12:07:47 -07:00
Pauli Nieminen
f9b8562f32
radeon: balance dma buffer mapping
...
In radeonRefillCurrentDmaRegion() make sure we
unmap the previous buffer.
2009-08-18 14:32:45 -04:00
Jakob Bornecrantz
657109bbc6
egl: Create the front texture the properly
2009-08-18 18:51:41 +01:00
Pauli Nieminen
caae3f1e8d
r300: Movde debug output from stdout to stderr in copiler.
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-18 13:44:00 -04:00
Dave Airlie
1279cdcb1f
r200: make use of DMA buffers for Elts a lot better.
...
This allows us to return the unused portion of the dma buffer
to the allocator instead of wasting nearly 16k a pop.
Cherry picked and ported to new code by Pauli.
2009-08-18 13:19:45 -04:00
Pauli Nieminen
ae290fd93e
r200: Fix missing offset from elt buffer pointer.
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-18 13:19:34 -04:00
Pauli Nieminen
bbf2b5c4ff
radeon: Optimize memory handling for dma operations.
...
We keep dma buffer objects in list untill they have been unused for many
draw operations. Current limit of having 100 flushes is just guess for
good performance/memory trade off.
Moving WARN_ONCE macro to common context because it is used in multiple drivers.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-18 13:19:25 -04:00
Alex Deucher
c745c87b3e
r300: fix the build on big endian
2009-08-18 11:40:18 -04:00
Brian Paul
1c1ee1176d
gallium: improved comments, minor whitespace changes
2009-08-18 09:31:22 -06:00
Chia-I Wu
34d8c13bff
egl: Remove eglhash.c and eglhash.h.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:50:12 -06:00
Chia-I Wu
e484a92928
egl: Add back handle checking.
...
Handle checking was done using hash tables. Now that they are gone, we
have to loop over the lists.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:50:06 -06:00
Chia-I Wu
e3734e4685
egl: Make lookup functions static inline.
...
progs/egl/demo3.c is also changed since it uses an internal function.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:50:00 -06:00
Chia-I Wu
38feefdc4e
egl: Remove hash table for displays.
...
The hash table was used to map a display to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:49:53 -06:00
Chia-I Wu
7a9f528009
egl: Remove hash table for surfaces.
...
The hash table was used to map a surface to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:49:34 -06:00
Chia-I Wu
ccc2b0bc65
egl: _eglCloseDriver should be no-op.
...
Move drv->API.Terminate call to eglTerminate. Remove
_eglReleaseDisplayResource as drivers are doing it.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:49:22 -06:00
Chia-I Wu
5a2c9372a0
egl: Some per-driver data should be per-display.
...
Move some fields of _EGLDriver to _EGLDisplay. It also becomes
unnecessary to pass _EGLDisplay to drivers when _eglMain is called.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:49:09 -06:00
Chia-I Wu
0eaa02c836
egl: Change the way drivers are loaded.
...
Driver is chosen and preloaded when eglGetDisplay is called. Later when
eglInitialize is called, the same driver is matched to initialize the
display. Also, add new, but unused, hooks to EGLDriver to allow a
driver to probe a display or unload itself.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:44:44 -06:00
Chia-I Wu
2f2cf461c5
egl: Overhaul driver API.
...
The motivation is so that drivers do not need to look up and check for
bad display, context, and etc. It also becomes unnecessary for drivers
to call the link functions.
This commit makes eglapi.[ch] do the lookup and check. As a result, the
driver API is overhauled, and almost all sources and drivers need
update. The updates are mainly find and replace with human brains.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-18 08:44:34 -06:00
Dave Airlie
521dea21d4
r600: fix build
2009-08-18 20:38:49 +10:00
Dave Airlie
771e19a861
r300: remove warning introduced with OQ
2009-08-18 20:30:15 +10:00
Dave Airlie
f74e00f4d1
radeon/r200: fix build after OQ commits
2009-08-18 20:29:02 +10:00
Dave Airlie
9ad76e9479
r300: OQ rework
...
Move to common code base so radeon/r200 can add support for this.
Make OQ start a state emitted like all normal state, and make no-tcl
flushing work in proper places.
Really need a generic post emit space reservation mechanism like max_state
so we can reserve some space for the emit
this code passes demos/arbocclude, piglit occlusion query and
glean occlusion query with TCL and NO-TCL on my rv530.
2009-08-18 20:10:50 +10:00
Dave Airlie
0e705c0dd3
r300: fix missing BEGIN/END batches
2009-08-18 20:10:08 +10:00
Dave Airlie
c80bc3abcd
r300: fix big endian build
2009-08-18 13:55:12 +10:00
Brian Paul
3aafd22f6a
gallium: memset() tgsi_exec_machine to all zeros in tgsi_exec_machine_create()
...
This fixes invalid values for CondStackTop, LoopStackTop, etc.
2009-08-17 17:13:17 -06:00
Brian Paul
680df529a3
demos/glsl: remove glutInitWindowPosition() calls
2009-08-17 17:13:17 -06:00
Alex Deucher
af1dc225c2
r600: fix counting error after the last commit
2009-08-17 18:16:38 -04:00
Alex Deucher
66c632b5a1
r600: make sure the number of indices is valid
...
make sure the number of indices is valid for the
requested prim type. glxgears sends invalid
quad strips with only 2 indices for example.
2009-08-17 17:47:27 -04:00
Alex Deucher
c3380ded10
radeon: remove RADEON_DEBUG_BO stuff
...
This stuff was a vestige of the r600 bring up and
now mostly serves to periodically break the build.
2009-08-17 15:42:19 -04:00
Maarten Maathuis
caf40d5d14
nv50: remove a few cases of directly casting struct pipe_context
2009-08-17 18:48:14 +02:00
Maarten Maathuis
97cc526eb7
nv50: borrow some flushing code from the ddx
...
- This fixes neverball corruption.
- I'm unsure about what we're actually flushing here.
2009-08-17 18:48:14 +02:00
Maarten Maathuis
f199dbdb76
gallium: Make PIPE_TRANSFER_{READ,WRITE,READ_WRITE} bitmask friendly.
2009-08-17 18:48:14 +02:00
Maarten Maathuis
93ce4c99d4
nv50: whitespace fixes and deobfuscation
2009-08-17 18:48:13 +02:00
Brian Paul
7c4223876b
cell: fix incorrect pipe_transfer tests
...
The value is an enum, not a bitmask.
2009-08-17 08:28:22 -06:00
Jerome Glisse
c952c1f109
r300: split vbo rendering with big drawarray case
...
Split vbo rendering when the number of elements requested
by drawarrays is bigger than 65536.
2009-08-17 12:50:27 +02:00
Christoph Bumiller
0204c7d8d7
nv50: fix stencil state
...
It's the front stencil methods that have contiguous offsets,
not the back ones.
Unfortunately the names in the header still have FRONT/BACK
reversed, so I'm using hex values until it gets updated.
2009-08-17 12:26:54 +02:00
Dave Airlie
743c4af5cd
radeon: turn off bo debugging
2009-08-17 19:09:15 +10:00
Maciej Cencora
fd97f2f8b8
r300: disable ZTOP only when occlusion queries are used
2009-08-16 02:04:29 +02:00
Maciej Cencora
30e9c753b8
Merge branch 'oq'
2009-08-16 01:56:29 +02:00
Pauli Nieminen
57f55af219
mesa: Add 2 new demos to .gitignore.
2009-08-15 13:30:15 -06:00
Maarten Maathuis
a7adb85827
nv50: avoid a NULL-ptr dereference when the pipe context changes
...
- We cannot assume all state objects are present when the pipe context changes.
2009-08-15 16:57:00 +02:00
Christoph Bumiller
a2af40b846
nv50: align registers used with TEX to 4
...
The TEX instruction is passed the first index of a contiguous
range of 4 TEMP registers that contain coordinates / LOD and,
after execution, the texel values.
It seems the first index is required to be a multiple of 4 on
some (older ?) cards.
2009-08-15 16:22:27 +02:00
Maciej Cencora
60587182d4
r300: enable ARB_occlusion_query
...
Supported only on HW with TCL block and with proper radeon drm.
Required minimum radeon drm version is 1.30 or KMS.
2009-08-15 15:14:29 +02:00
Maciej Cencora
d2b1b9e8d5
radeon: add flag for drm OQ support
2009-08-15 15:14:25 +02:00
Maciej Cencora
f3e1d7d6f8
r300: temporary occlusion query hack
2009-08-15 15:14:24 +02:00
Maciej Cencora
8d60c0b751
r300: clear not_flushed OQ list after flush
2009-08-15 15:14:24 +02:00
Maciej Cencora
c903834d4d
r300/oq: add some debugging info
2009-08-15 15:14:23 +02:00
Maciej Cencora
0d0f01e2e0
r300: add occlusion queries support
...
TODO:
- use proper interface for checking if bo is idle when it's available
- disable ZTOP only when needed
- make it work under KMS
2009-08-15 15:14:11 +02:00
Dave Airlie
f2daded812
radeon space: realign with drm space check code
2009-08-15 21:34:17 +10:00
Dave Airlie
a6cc45e135
r300: fixup space checks since VBO code
...
Hopefully this gets the ordering correct so the space checks don't fail.
2009-08-15 21:18:30 +10:00
Dave Airlie
3cc9a28b9b
r300: add just in case warn I don't think this can actually happen
2009-08-15 20:30:45 +10:00
Dave Airlie
5e4e8effec
radeon: enable vertex splitting for IBs
...
Based on Maciej's code, just fixed up the alignments for INDX_BUFFER
ut2004 runs AS-Convoy
2009-08-15 20:22:13 +10:00
Roland Scheidegger
b9789948e0
i965: disable bounds checking on arrays with stride 0
...
if stride is 0 we cannot use count as max index for bounds checking,
since the hardware will simply return 0 as data for indices failing
bounds check. If stride is 0 any index should be valid hence simply
disable bounds checking in this case.
This fixes bugs introduced with e643bc5fc7 .
2009-08-15 03:44:43 +02:00
Brian Paul
e8957f4800
progs/demos: print more info in fbotexture.c
2009-08-14 17:30:32 -06:00
Ian Romanick
e304c65a2b
i965: Add support for GL_ARB_seamless_cube_map
2009-08-14 16:28:51 -07:00
Ian Romanick
8b0b33530c
demos/cubemap: Add support for GL_ARB_seamless_cube_map
2009-08-14 16:28:51 -07:00
Ian Romanick
06ae1db4a9
Regenerate files for GL_ARB_seamless_cube_map
2009-08-14 16:28:51 -07:00
Ian Romanick
9d5bb3c6f8
Infrastructure for GL_ARB_seamless_cube_map
2009-08-14 16:28:51 -07:00
Ian Romanick
970f768666
Regenerate files for GL_APPLE_flush_buffer_range
2009-08-14 16:28:50 -07:00
Maciej Cencora
a89963cec1
Merge branch 'vbo_clean'
...
Conflicts:
src/mesa/drivers/dri/r300/r300_draw.c
2009-08-15 00:52:44 +02:00
Maciej Cencora
7fe0dd2e6e
r300: mark VBO buffer objects as persistent
2009-08-15 00:39:19 +02:00
Maciej Cencora
cd703049db
r300: unmap buffer objects after usage
2009-08-14 23:56:04 +02:00
José Fonseca
e3bc1fb6bc
gallium: Always map for READ flag when DISCARD is not set.
...
This prevents the driver from discarding a buffer when the whole buffer
is mapped for writing, but only a portion is effectively written.
This is a temporary fix, because WRITE shouldn't imply DISCARD.
The full fix implies using PIPE_BUFFER_USAGE_DISCARD, throughout
the code, and will go only into master.
2009-08-14 20:05:51 +01:00
José Fonseca
10430f47a4
trace: Remove space next to the class attribute of the trace.
2009-08-14 20:05:51 +01:00
José Fonseca
cdf56eb68d
python/retrace: Open bz2 files correctly.
2009-08-14 20:05:51 +01:00
Brian Paul
71b1610941
mesa: append uniform values to the log file the first time we use a shader
...
This info is essential to using/debugging a shader outside of its normal
application.
2009-08-14 12:58:21 -06:00
Brian Paul
12199ed96c
mesa: also pass the GPU program to _mesa_append_uniforms_to_file()
...
We want the post-link program at this points.
2009-08-14 12:57:39 -06:00
Brian Paul
e3d47515f9
vbo: call _mesa_valid_to_render()
2009-08-14 11:31:00 -06:00
Brian Paul
d09a19bf6e
Merge branch 'mesa_7_5_branch'
2009-08-14 11:27:51 -06:00
Brian Paul
db598b8998
mesa: new _mesa_append_uniforms_to_file() debug/logging function
2009-08-14 11:27:33 -06:00
Brian Paul
b6e5600bd4
mesa: call _mesa_valid_to_render()
2009-08-14 11:27:33 -06:00
Brian Paul
d03dde16eb
vbo: call _mesa_valid_to_render()
2009-08-14 11:27:33 -06:00
Brian Paul
56c4226fcc
mesa: new _mesa_valid_to_render() function
...
Tests if the current shader/program is valid and that the framebuffer is
complete. To be called by glBegin, glDrawArrays, etc.
2009-08-14 11:27:33 -06:00
Brian Paul
a48b0a5ce7
mesa: minor error string changes
2009-08-14 11:27:33 -06:00
Brian Paul
1574b05189
docs: docs: document new --with-max-width/height config options
2009-08-14 11:24:20 -06:00
Brian Paul
a7ca80ff6a
Add a FAQ about internal buffer sizes.
...
(cherry picked from master, commit 9a8781bd24 )
2009-08-14 11:23:18 -06:00
Brian Paul
467b3d9a6f
Add configure options for MAX_WIDTH/HEIGHT.
...
This adds two --with configure options for setting defines for
MAX_WIDTH and MAX_HEIGHT. It's conceivably just as easy to define
these in CFLAGS manually, but this way users don't need to know
about internal Mesa details.
Patch updated by BrianP to set DEFINES, not CFLAGS.
(cherry picked from master, commit 7085dce750 )
2009-08-14 11:23:00 -06:00
Brian Paul
e691b0e533
Allow external settings of MAX_WIDTH/HEIGHT.
...
Conditionalize MAX_WIDTH / MAX_HEIGHT defines so that users can
set them via CFLAGS.
(cherry picked from master, commit 66bc17e80e )
2009-08-14 11:22:37 -06:00
Keith Whitwell
51c47383f9
st/xlib: reduce the proliferation of GLX context types
...
Now there is just a single, struct __GLXcontextRec, which is the
GLXContext typedef has already been defined as a pointer to. I
believe this is the intended usage, that GLX implementations should
define that struct as they require.
Merge the two previous structs into one and get rid of the
no-longer-necessary type casts and sub-classing.
2009-08-14 17:56:47 +01:00
Keith Whitwell
9616e4ad1c
st/dri: remove unused dummyContext value
2009-08-14 17:42:27 +01:00
Brian Paul
3ffaa11f88
mesa: move assertions in test_attachment_completeness()
...
Put the assertions after the error checks.
2009-08-14 10:30:10 -06:00
Christoph Bumiller
442a5e4343
nv50: fix mipmap offsets and tiling
...
The hardware expects a texture's tile mode to change with
the mipmap level.
Also, only multiply by block size once to obtain size.
2009-08-14 18:23:55 +02:00
Christoph Bumiller
3506d7d3e2
nv50: make sure we don't re-emit outdated scissor state
...
Since we don't turn off scissors, we need to update the
stateobj when the framebuffer size changes.
2009-08-14 18:16:46 +02:00
Christoph Bumiller
74e8b1a30b
nv50: make use of the y-origin switch
...
Now that we know how to make the hardware have y-coordinate origin
top, we can get rid of all the inversion introduced earlier.
2009-08-14 18:06:24 +02:00
Maciej Cencora
cdaf63d0ea
r300: remove broken vertex splitting
...
Revert to previous behaviour of dropping to big render operations.
2009-08-14 17:10:21 +02:00
Maciej Cencora
9e018d8225
r300: rework index buffer setup
...
Copy elements directly to DMA bo to get rid of one memcpy, and prepare for using VBOs for index buffer.
2009-08-14 17:10:15 +02:00
Maciej Cencora
7c060bff13
r300: remove unused software TNL path
...
This doesn't remove software TCL path - so RS480 and RS690 work as before.
2009-08-14 17:06:02 +02:00
Maciej Cencora
5fb5ea97f4
r300: use VBOs for vertex attributes
2009-08-14 17:05:50 +02:00
Brian Paul
c3f9c2eb75
docs: document new --with-max-width/height config options
2009-08-14 09:00:15 -06:00
Tom Fogal
9a8781bd24
Add a FAQ about internal buffer sizes.
2009-08-14 08:58:59 -06:00
Tom Fogal
7085dce750
Add configure options for MAX_WIDTH/HEIGHT.
...
This adds two --with configure options for setting defines for
MAX_WIDTH and MAX_HEIGHT. It's conceivably just as easy to define
these in CFLAGS manually, but this way users don't need to know
about internal Mesa details.
Patch updated by BrianP to set DEFINES, not CFLAGS.
2009-08-14 08:58:37 -06:00
Tom Fogal
66bc17e80e
Allow external settings of MAX_WIDTH/HEIGHT.
...
Conditionalize MAX_WIDTH / MAX_HEIGHT defines so that users can
set them via CFLAGS.
2009-08-14 08:56:51 -06:00
Tobias Doerffel
87946d206f
intel: in intel_context struct use typedef for sarea struct
...
Using drm_i915_sarea_t instead of struct drm_i915_sarea seems to be
a common standard now, therefore fix it also in intel_context
structure. Additionally this silences a compiler warning:
intel_swapbuffers.c: In function `intelFixupVblank':
intel_swapbuffers.c:48: warning: initialization from incompatible pointer type
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com >
2009-08-14 08:50:52 -06:00
Thierry Vignaud
2674d1ba50
mesa: make sure r300/compiler/ sources are included in tarball
2009-08-14 08:16:54 -06:00
Chia-I Wu
67b639c7ab
st/vega: Add more symbols defined by mesa/st.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-14 08:11:38 -06:00
Maciej Cencora
895f7c33d4
r300: add required symlinks
...
Reported by adamk on #radeon
2009-08-14 16:02:11 +02:00
Maciej Cencora
e029c91fd3
radeon: handle debug versions of radeon_bo_open
2009-08-14 16:02:10 +02:00
Christoph Bumiller
f1aa2a43b7
nv50: fix typo in REALLOC's 2nd argument in ctor_immd
2009-08-14 15:54:49 +02:00
Maciej Cencora
6bcbeb02d6
radeon: add VBO support (not enabled yet)
2009-08-14 15:31:11 +02:00
Maciej Cencora
2233ac61e1
radeon: export emitvec* functions
2009-08-14 15:31:06 +02:00
Maciej Cencora
d534648d90
radeon: constify some parameters
2009-08-14 15:30:55 +02:00
Alex Deucher
7069a7548f
r600: emit SURFACE_BASE_UPDATE on depth base updates on rv6xx
2009-08-14 01:37:36 -04:00
Dave Airlie
ceb9459ed5
glsl: re-write Makefile after I called it bad.
2009-08-14 10:05:10 +10:00
Brian Paul
0c717bcd5d
progs/glsl: added multitex.shtest config file
2009-08-13 17:03:57 -06:00
Brian Paul
08ecd863ee
progs/glsl: set generic vertex attribute values
2009-08-13 17:03:56 -06:00
Brian Paul
62d1132160
progs/glsl: add type field to shtest config files
...
Plus, texture loading.
2009-08-13 17:03:56 -06:00
Brian Paul
823703418e
mesa: added *.shtest files to demo tarball
2009-08-13 17:03:56 -06:00
Dave Airlie
25cd4dc1d6
glsl/tests: skinning.o
...
worst Makefile ever. not sure what is going on here, hopefully
this fixes tinderbox
2009-08-14 08:35:49 +10:00
Alex Deucher
9d96095c1e
r600: move non-surface related cb state to general state
2009-08-13 17:55:42 -04:00
Alex Deucher
083b04e809
r600: move non-surface related depth state to general state
2009-08-13 17:43:03 -04:00
RALOVICH, Kristóf
0896268b97
glx: indent -br -i3 -npcs --no-tabs
...
Some manual intervention applied since XEXT_* and other macro magic
fooled indent. Auto generated files were also skipped.
2009-08-13 15:13:21 -06:00
Brian Paul
1e0f621b50
mesa: fix some invalid memory reads
...
We were passing the address of a float to functions that would deref the
pointer as an array.
2009-08-13 14:38:27 -06:00
Brian Paul
6d55fd705d
progs/tests: hack a PBO/dlist test
2009-08-13 14:07:25 -06:00
Brian Paul
ecb177eaea
mesa: fix warnings about locals hiding function params
2009-08-13 14:05:52 -06:00
Brian Paul
36df6a6e91
mesa: add missing PBO mapping code in unpack_image()
2009-08-13 14:00:21 -06:00
Brian Paul
ad8a6937ae
main: fix some potential memory leaks
...
Allocate dlist images after error checking.
Record GL_OUT_OF_MEMORY when we can't make a copy of an image.
2009-08-13 13:48:36 -06:00
Brian Paul
f418d18ea6
mesa: fix some potential uninitialized memory references
2009-08-13 13:44:31 -06:00
Brian Paul
a531a5cf94
glsl: fix some uninitialized pointers
2009-08-13 13:44:01 -06:00
Brian Paul
741869d73a
progs/util: ignore pre-defined uniforms in SetUniformValues()
2009-08-13 12:53:20 -06:00
Brian Paul
ae99e4c67e
progs/glsl: new shtest program, a simple shader test harness app
...
This commit includes some sample config files (*.shtest)
2009-08-13 12:52:13 -06:00
Brian Paul
03ba461c19
glsl: fix incorrect attribute size
2009-08-13 12:50:57 -06:00
Brian Paul
53dfd5d870
tnl: if NAN_CHECK is enabled, also assert that pos.x != 0
2009-08-13 12:50:57 -06:00
Brian Paul
c10002361c
mesa: s/assert/ASSERT/ in _mesa_reference_texobj()
...
We want the no-op ASSERT for non-debug builds.
2009-08-13 12:50:57 -06:00
Brian Paul
8a9795e5c6
mesa: rework error check in glGetTexLevelParameter(), remove tex_image_dimensions()
2009-08-13 12:50:57 -06:00
Brian Paul
423a53f635
mesa: if maxLevels==0, target is invalid
2009-08-13 12:50:56 -06:00
Brian Paul
fe988d786c
mesa: add extension checks in _mesa_max_texture_levels()
2009-08-13 12:50:56 -06:00
Brian Paul
47a385b43b
mesa: minor clean-ups in bumpmap functions
2009-08-13 12:50:56 -06:00
Brian Paul
6aa7a03d85
mesa: use _mesa_get_current_tex_unit() in more places
2009-08-13 12:50:56 -06:00
Brian Paul
73b150c816
mesa: refactor: move _mesa_is_color/depth/stencil_format() helpers to image.c
2009-08-13 12:50:56 -06:00
Brian Paul
ba2a55ccd6
mesa: move _mesa_Get[Compressed]TexImage() to texgetimage.c
...
All the glGetTexImage code is in one file now.
2009-08-13 12:50:56 -06:00
Brian Paul
b9f67df6e7
mesa: short-circuit no-change in _mesa_DepthRange()
2009-08-13 12:25:53 -06:00
Michel Dänzer
ace98f09e6
st/dri: Add support for GLX_EXT_texture_from_pixmap with direct rendering.
2009-08-13 20:24:09 +02:00
Michel Dänzer
7c08614b32
gallium/drm: Handle circular dependencies in the auxiliary libraries with make.
2009-08-13 18:46:53 +02:00
Michel Dänzer
7ef8c79a8c
st/xorg: Fix DRI2 CopyRegion hook.
...
Use GC CopyArea op for proper translation and clipping, and throttle full
buffer swaps / frontbuffer flushes.
2009-08-13 18:46:53 +02:00
Keith Whitwell
f2fcd5822a
tgsi: add simple facility for releasing and reusing temporaries
2009-08-13 17:32:25 +01:00
Keith Whitwell
b56d2ba7b2
tgsi: rename ureg src/dest converters
...
Also fix a typo in ureg_src().
2009-08-13 17:32:25 +01:00
José Fonseca
5c5364a0f6
draw: Remove unused variable.
2009-08-13 16:33:50 +01:00
José Fonseca
7b39194e2d
scons: Handle Circular dependencies in the libraries.
2009-08-13 16:32:51 +01:00
Keith Whitwell
bf57eda0ec
Merge branch 'mesa_7_5_branch'
2009-08-13 15:57:23 +01:00
Keith Whitwell
1ce3f5a806
draw: cope with more primitives in draw_pipeline_run
...
This previously was used only for decomposed (POINT/LINE/TRI) primitives,
but for some time a full range of primitives could end up in here.
Fixes trivial/lineloop-clip on softpipe, among others.
(cherry picked from commit 87cd8a3b8a2407b30916be418ff2f95dfea5d2ad)
2009-08-13 15:56:17 +01:00
Keith Whitwell
78918c8760
tgsi: turn off debugging
2009-08-13 14:28:01 +01:00
Keith Whitwell
749e52049d
tgsi: use REALLOC for growing token pool
2009-08-13 14:27:42 +01:00
Keith Whitwell
120e76866b
util: silence warnings for third REALLOC argument
...
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.
2009-08-13 14:26:50 +01:00
Keith Whitwell
b1d82f1f19
util: remove unneeded includes
2009-08-13 13:43:25 +01:00
Keith Whitwell
002c76cfef
util: convert u_simple_shaders to use tgsi_ureg
...
Much nicer now.
2009-08-13 13:02:59 +01:00
Keith Whitwell
8a7d1e7b76
tgsi: add tgsi_ureg, a simplified tgsi shader builder
...
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.
2009-08-13 13:02:47 +01:00
Xiang, Haihao
1f40ffca63
i965: fix cube map on IGDNG
2009-08-13 18:42:52 +08:00
Brian Paul
4ce73ad92c
glsl: remove duplicate frag input entry
2009-08-12 20:37:34 -06:00
Brian Paul
f3b215cba2
Merge branch 'new-frag-attribs'
...
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.
2009-08-12 20:32:41 -06:00
Brian Paul
fdfb0d4b0e
progs/glsl: change uniform_info::type field to use GLSL vector types
2009-08-12 17:28:45 -06:00
Brian Paul
af3d7f6889
demos: call SetUniformValues()
2009-08-12 17:28:45 -06:00
Brian Paul
f95b82b486
mesa: const qualifiers
2009-08-12 17:28:45 -06:00
Brian Paul
bd4c6a2e50
vbo: use _mesa_is_bufferobj()
2009-08-12 17:28:45 -06:00
Brian Paul
684049d97d
demos: rename InitUniforms() to SetUniformValues()
...
And call new PrintUniforms() in demos.
2009-08-12 17:28:45 -06:00
Brian Paul
378bff0edd
progs/util: added more shader utility functions
2009-08-12 17:28:45 -06:00
Brian Paul
434ec3ada8
mesa: use _mesa_is_bufferobj()
2009-08-12 17:28:45 -06:00
Brian Paul
604031563c
mesa: use _mesa_is_bufferobj()
2009-08-12 17:28:45 -06:00
Brian Paul
abbf83551f
mesa: new _mesa_is_bufferobj() function
...
Tests if the given buffer object is a user-created, non-default buffer object.
Use this instead of testing bufferobj->Name != 0.
2009-08-12 17:28:45 -06:00
Eric Anholt
d64649a316
i965: Make the cube mapping RCP use a writemask.
...
Fixes cube mapping since the scalar changes.
2009-08-12 13:50:09 -07:00
Eric Anholt
5faa0dc591
i965: Allocate destination registers for GLSL TEX instructions contiguously.
...
This matches brw_wm_pass*.c behavior, and fixes the norsetto shadow demo.
Bug #19489
2009-08-12 13:18:47 -07:00
Eric Anholt
63fa5fd319
i965: drop dead scalar handling in GLSL.
2009-08-12 13:05:59 -07:00
Eric Anholt
08687c8b40
i965: Correct brw_wm_nr_args for WM_DELTAXY and WM_PIXELXY.
2009-08-12 12:54:43 -07:00
Eric Anholt
863ae3a527
i965: Drop GLSL ABS code, which is translated away in brw_wm_fp.
2009-08-12 12:43:43 -07:00
Eric Anholt
4de8b8902f
i965: Drop code for emitting OPCODE_SUB, since brw_wm_fp.c makes it an ADD.
2009-08-12 12:43:43 -07:00
Eric Anholt
0eb819a2d1
i965: Store the dispatch width in the WM compile struct.
...
I'll be using this in merging brw_wm_emit.c and brw_wm_glsl.c
2009-08-12 12:43:43 -07:00
Eric Anholt
536476f243
i965: Handle scalar result swizzling in shared GLSL/non-GLSL code.
...
This is preparation for merging of brw_wm_glsl.c and
brw_wm_emit.c, and glsl.c doesn't swizzle channel results around.
2009-08-12 12:43:43 -07:00
Eric Anholt
792c49968e
i965: Flag ARL-using programs as requiring brw_wm_glsl.c
...
This doesn't fix the glean testcase, but I guess it provides hope.
2009-08-12 12:43:42 -07:00
Eric Anholt
4e477aa1ba
i965: Remove some unused WM opcode args.
2009-08-12 12:43:42 -07:00
Eric Anholt
255e5be265
i965: Avoid re-uploading the index buffer when we don't need to.
...
No performance difference proven at 95% confidence with my GLSL demo (n=10).
2009-08-12 12:43:42 -07:00
Alex Deucher
a245c05dd3
r600: fix warning
2009-08-12 15:40:15 -04:00
Alex Deucher
b0c191acaf
r600: state cleanups
2009-08-12 15:40:15 -04:00
Alex Deucher
2f6675b816
r600: clean up Create/DestroyContext
2009-08-12 15:40:15 -04:00
Pauli Nieminen
b6a4f5f1d3
r200: Prevent TexGenMatrix from leaking when destroying r200 context.
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-12 15:40:14 -04:00
Brian Paul
855374a76a
vbo: fix incorrect pointer
2009-08-12 13:16:41 -06:00
Brian Paul
8f9ee06925
glsl: add gl_Vertex, gl_Normal, etc to list of active attributes
...
If a vertex shader uses gl_Vertex, gl_Normal, etc, we need to include them
when the user queries the list of active attributes. Before this we were
just including the user-defined attributes.
2009-08-12 12:35:13 -06:00
Brian Paul
fd5eda1423
glsl: move predefined shader input/output info/code to slang_builtin.c
...
This is a more logical place for this code.
Also add some functions for querying vertex shader input names, types, etc.
2009-08-12 12:35:12 -06:00
Eric Anholt
2708ddfb06
vbo: Avoid extra validation of DrawElements.
...
This saves mapping the index buffer to get a bounds on the indices that
drivers just drop on the floor in the VBO case (cache win), saves a bonus
walk of the indices in the CheckArrayBounds case, and other miscellaneous
validation. On intel it's a particularly a large win (50-100% in my app)
because even though we let the indices stay in both CPU and GPU caches, we
still end up waiting for the GPU to be done with the buffer before reading
from it.
Drivers that want the min/max_index fields must now check index_bounds_valid
and use vbo_get_minmax_index before using them.
2009-08-12 11:28:34 -07:00
Eric Anholt
ef3ad412c7
radeon: Minor warnings cleanup.
2009-08-12 11:28:34 -07:00
Eric Anholt
e643bc5fc7
i965: Use _MaxElement instead of index-calculated min/max for VBO bounds.
2009-08-12 11:28:33 -07:00
Pauli Nieminen
29173d3d5c
radeon: Add protection against recursive DRM locking.
...
Reference counting protects DRM lock call from recursive locking that would
cause hang. Code also adds optional debugging output for recursive call that
is compiled only if NDEBUG is not defined.
This code is not 100% thread safe because mesa doesn't include increment and
test atomic operation. There is built-in gcc functions but they are only
available from gcc 4.2.
2009-08-12 14:14:29 -04:00
Michel Dänzer
5eeb44f398
st/xorg: Acquire/drop DRM master in order to work with multiple servers.
2009-08-12 19:11:11 +02:00
Brian Paul
f21b0e9a04
gallium/glx/xlib: main/ prefix on Mesa includes, remove -I$(TOP)/src/mesa/main/
2009-08-12 10:32:22 -06:00
Brian Paul
10eb2ca954
gallium/glx/xlib: updated comments
2009-08-12 10:32:22 -06:00
Brian Paul
80b8fbcaba
gallium/glx/xlib: delete fakeglx.h
2009-08-12 10:32:22 -06:00
Brian Paul
275d0e7e92
gallium/glx/xlib: rename fakeglx.c to glx_api.c
2009-08-12 10:32:22 -06:00
Brian Paul
622d531296
gallium/glx/xlib: delete glxapi.h
2009-08-12 10:32:22 -06:00
Brian Paul
f5dd1cff94
gallium/glx/xlib: rename fakeglx_fonts.c to glx_usefont.c
2009-08-12 10:32:22 -06:00
Brian Paul
0528d6c704
gallium/glx/xlib: rename glxapi.c to glx_getproc.c
2009-08-12 10:32:22 -06:00
Brian Paul
f546fa00aa
gallium/glx/xlib: don't include fakeglx.h
2009-08-12 10:32:22 -06:00
Brian Paul
4a4039e199
gallium/glx/xlib: overhaul and simplification of the Gallium Xlib-based GLX
...
The old GLX dispatch table stuff isn't needed (same story for the Mesa/Xlib
driver). The intention of that code was being able to switch on the fly
between the real GLX library and the fake/Xlib-based emulation. That hasn't
been used in a long time.
Next up: some file renaming.
2009-08-12 10:32:22 -06:00
Cooper Yuan
1e52b8b4e0
r600: A shader is bound that exports Z as a float into Red channel
2009-08-12 17:39:18 +08:00
Chia-I Wu
64e7bb3262
egl: Use _eglAddAtExitCall to free thread infos and displays.
...
Thread infos and displays are usually not freed by applications. This
commit add atexit calls to free them.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
Chia-I Wu
435c7ac24d
egl: Add _eglAddAtExitCall.
...
Add a convenient wrapper to register atexit calls. Add mutex to
_eglGlobal along the way.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
Chia-I Wu
0e3687e33d
egl: Make _eglGlobal initialize statically.
...
Now that display and surface hash tables are moved out, _eglGlobal can
be initialized statically.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
Chia-I Wu
413969a920
egl: Implement _eglFiniDisplay.
...
_eglFiniDisplay is called at exit time to free allocated displays. It
is, however, not used right now.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
Chia-I Wu
621801abd2
egl: Make display and surface hash tables local.
...
Move display and surface hash tables to egldisplay.c, and have them
initialized on demand.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
Chia-I Wu
56d2119280
egl: Initialize current thread management on demand.
...
Current thread management was initialized in _eglInitGlobals, which is
called only in eglGetDisplay. Since EGL does not require eglGetDisplay
to be called first, the initialization is better to be done on demand.
_eglFiniCurrent is removed, as it is not called at all.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
Chia-I Wu
f6c2f5e379
egl: Destroy eglThreadInfo on thread exit.
...
This is done through pthread TSD destructor. It destroys all thread
infos except for main thread's. The thread info of the main thread is
destroyed by _eglFiniCurrent.
TLS case is not supported yet.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
Chia-I Wu
e79d21ca1f
egl: Add eglmutex.h.
...
The implementation uses pthread mutex when available. Otherwise, it is
no-op.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-11 22:14:35 -06:00
RALOVICH, Kristóf
50f8ca2344
glx: fix signedness warning
2009-08-11 22:14:35 -06:00
Brian Paul
fd90d8000c
mesa: handle glDrawPixels images which are larger than max rect texture size
2009-08-11 20:34:22 -06:00
Brian Paul
dba6d52ba0
mesa: added _mesa_meta_draw_pixels()
2009-08-11 20:34:21 -06:00
Brian Paul
f821866360
mesa: added META_FOG and optimize some meta_begin/end() code
2009-08-11 20:34:21 -06:00
Brian Paul
9ba19b892c
gallium/trace: remove stray semicolons
2009-08-11 20:34:21 -06:00
Brian Paul
b681f396e6
gallium/xlib: add missing tex_usage parameter
2009-08-11 20:34:21 -06:00
Brian Paul
6deaa6d4b1
gallium/egl: add missing tex_usage parameter
2009-08-11 20:34:21 -06:00
Brian Paul
2e8be3ab79
gallium/xlib: add missing tex_usage parameter
2009-08-11 20:34:21 -06:00
Brian Paul
26a762c2f6
gallium/identity: remove stray semicolons
2009-08-11 20:34:21 -06:00
Alex Deucher
c2b29b5df5
r600: use the drm ioctls for swap and texture upload
...
NOTE: THIS REQUIRES AN UPDATED DRM!
2009-08-11 22:21:26 -04:00
Jakob Bornecrantz
164d8e8701
i915g: Reduce max relocs
2009-08-12 03:58:38 +02:00
Jakob Bornecrantz
df9f27822e
i915g: Check relocs as well
2009-08-12 03:58:37 +02:00
Jakob Bornecrantz
7a60ed2015
i915g: Implement surface_buffer_create for softpipe
...
In order to run softpipe on st/xorg we need this function
2009-08-11 18:37:09 +01:00
Jakob Bornecrantz
a41a253ce3
gallium: Add texture usage information to surface_buffer_create
...
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.
2009-08-11 18:34:43 +01:00
Brian Paul
7013a4dfb8
mesa/glapi: regenerated files from gl_API.xml
2009-08-11 10:00:02 -06:00
Brian Paul
bb45e6f07b
gallium: fix debug_printf() format string
2009-08-11 09:30:12 -06:00
Brian Paul
a9d37f6837
glut: fix incorrect Vista maximisation size due to WM_GETMINMAXINFO handling
...
See bug 23182.
2009-08-11 08:54:25 -06:00
Brian Paul
20e4421fe3
mesa: remove _mesa_set_vp_override() from _mesa_Bitmap()
...
This reverts part of commit 2c9812e3d3 .
The calls to _mesa_set_vp_override() were causing extra state validation
and caused the gallium state tracker's bitmap cache to get flushed on
every call.
2009-08-11 08:38:51 -06:00
Michel Dänzer
e93be5132c
r300g: Fix up remaining VAP_CNTL_STATUS writes for big endian.
2009-08-11 09:16:48 +02:00
Michel Dänzer
bb91368003
r300g: Emit relocations for pitch registers.
...
Fixes CS failures with tiling enabled kernels.
2009-08-11 09:13:12 +02:00
Cooper Yuan
2cbd3fce8f
r300g: a typo of debug message
2009-08-11 14:39:58 +08:00
Cooper Yuan
2ccd66d8a0
r600: update num of interp if posizition is used
2009-08-11 14:36:01 +08:00
Eric Anholt
74504c48ad
demos: Fix the VBO usage in glsl/multitex.
...
The fix for 965 to be noisy when apps sent pointers instead of VBO offsets
caught this app in the act of doing exactly that.
Bug #23203
2009-08-10 15:53:47 -07:00
Brian Paul
16a1f68c39
intel: use new _mesa_meta_copy_pixels() function
...
glCopyPixels() no longer hits a software fallback when zooming, blending, etc.
2009-08-10 15:48:02 -06:00
Brian Paul
edb991b7bc
mesa: save/restore texture matrix in meta code
...
Also, save/restore viewport and texture state in _mesa_meta_copy_pixels()
2009-08-10 15:44:05 -06:00
Brian Paul
2ad10c966c
mesa: for meta blit, check max texture size, use glCopyTexSubImage2D() when possible
2009-08-10 15:09:38 -06:00
Brian Paul
c16fa388d3
mesa: initial meta implementation of glCopyPixels()
2009-08-10 15:09:38 -06:00
Brian Paul
36a222cf04
mesa: remove debug flush call
2009-08-10 14:15:56 -06:00
Brian Paul
0109e1b9f3
intel: add missing \n to fprintf()
2009-08-10 13:58:56 -06:00
Brian Paul
8cb389ce35
intel: use new _mesa_meta_blit_framebuffer() function
...
The previous version of framebuffer blit was a quick hack. The new meta
version works pretty well.
2009-08-10 13:55:32 -06:00
Brian Paul
33a838beb9
mesa: new driver meta-ops module
...
Implement glClear() in terms of quad rendering, implement glBlitFramebuffer()
in terms of glCopyTexImage2D + textured quad, etc.
There have been several places in the drivers where we've implemented
meta rendering similar to this. This is an effort to do it in a more
portable and more efficient form.
The _mesa_meta_begin/end() functions act like glPush/PopAttrib() but are
lighter-weight. Plus, _mesa_meta_begin() resets GL state back to default
values (texturing off, identity vertex transform, etc) so the meta drawing
functions don't have to worry about it.
For now only _mesa_mesa_blit_framebuffer() and _mesa_meta_clear() are
implemented. glDrawPixels() and glCopyPixels() would be the next candidates.
2009-08-10 13:55:31 -06:00
Brian Paul
e9d9dab0cd
mesa: added GLcontext::Meta field for meta rendering state
2009-08-10 13:55:31 -06:00
Dave Airlie
b4c9569715
radeon_fbo: switch short to byte for 565
2009-08-10 19:58:11 +10:00
Dave Airlie
e0c9157671
radeon: fix cut-n-paste in alphabits in fbo code
2009-08-10 10:10:13 +10:00
Pauli Nieminen
11038989c1
egl: Add depend and depend.bak to clean target
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-09 08:42:50 -06:00
Dave Airlie
728da99737
r600: looks like a typo
2009-08-09 20:46:12 +10:00
Cooper Yuan
b2927a6204
r600: load per-pixel position into PS in order to use fragment.position.
...
This patch can fix /progs/fp/tri-depth, tri-depth2, tri-depthwrite,
tri-depthwrite2 and point-position.
2009-08-09 12:18:40 +08:00
Brian Paul
483a7916d1
mesa: update framebuffer status as needed in _mesa_source/dest_buffer_exists()
2009-08-08 07:30:26 -06:00
Brian Paul
101c2f907e
mesa: simplify glPushAttrib() list building code
2009-08-08 07:30:26 -06:00
Brian Paul
924ba48499
mesa: remove old, prototype code
2009-08-08 07:30:26 -06:00
Brian Paul
b153340351
swrast: replace GLenum, GLint with GLbitfield for buffer vars
2009-08-08 07:30:26 -06:00
Brian Paul
4482f96c59
mesa: use _mesa_bufferobj_mapped()
2009-08-08 07:30:26 -06:00
Corbin Simpson
10b9d9f895
r300g: Knock out another fragment of invariant state.
...
Colorbuffer setup will always happen.
2009-08-07 20:50:42 -07:00
Corbin Simpson
847fcb645c
gallium: Move minify() to u_math.
...
minify() is usually used in mipmap size calculation. Strangely enough,
we all defined it as MAX2(1, d >> 1); imagine that. :3
2009-08-07 20:50:42 -07:00
Corbin Simpson
c58133b81a
r300g: Remove r300_constant_buffer::user_count.
...
Not needed with new compiler.
2009-08-07 20:50:42 -07:00
Eric Anholt
a962c07cc3
Revert "i965: Disable texture tiling by default."
...
This reverts commit b8e638d489 .
Now that the known hangs and misrendering issues are fixed, I'm ready to
start encouraging it by default again.
2009-08-07 18:33:08 -07:00
Eric Anholt
ceb8afcca5
intel: Align region height as required for tiled regions.
...
Otherwise, we would address beyond the end of our buffers. Fixes reliable
GPU segfault with texture_tiling=true and oglconform shadow.c.
Bug #22406 .
2009-08-07 18:33:08 -07:00
Eric Anholt
12c6973c6e
i965: Add a note justifying domain choice for the SF VP.
2009-08-07 18:33:08 -07:00
Eric Anholt
b82abaabee
intel: Add some more safety asserts in the blit code.
2009-08-07 18:33:08 -07:00
Eric Anholt
9f981ec27d
i965: Replace the subroutine-skipping jump in VS with a NOP if it's a NOP.
...
This showed a 1.9% (+/-.3%, n=3) improvement in OA performance with high
geometry settings.
2009-08-07 18:33:08 -07:00
Jakob Bornecrantz
7de5e60c18
i915g: Don't forget x/y coords in transfers
...
Fixes demos/ray.
2009-08-08 03:20:24 +02:00
Jakob Bornecrantz
738e02c3c8
i915g: Don't try to free a mapped buffer at shutdown
2009-08-08 03:19:01 +02:00
Alex Deucher
f7474a577d
radeon: correct fix for tiling with the legacy build
2009-08-07 17:36:07 -04:00
Eric Anholt
a2a3d8d7f0
intel: Fix googleearth by avoiding GL_VIEWPORT_BIT in meta clear push/pop
...
I have no idea why this fixes things, but being more efficient sounds good
anyway. Fixes regression in 99d07d0f91
where most of the lit half of the world was not drawn.
2009-08-07 14:04:11 -07:00
Alex Deucher
caf4f0ede7
radeon: fix the build with older drm headers
2009-08-07 16:20:26 -04:00
Pauli Nieminen
0d7fafa0ed
dri: Fix problems with unitialized values in dri screen object.
...
This fixes crash in r200 KMS driver when pSAREA was set to 1 randomly because of memory wasn't cleared.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-07 13:48:26 -06:00
Brian Paul
9de26ccbcc
util: fix incorrect assertion
...
Check that the dest surface/format is renderable.
2009-08-07 13:48:26 -06:00
Brian Paul
f36d012191
util: include u_surface.h, added comment
2009-08-07 13:48:26 -06:00
Brian Paul
513a82cb1b
util: use util_same_surface() to compare surface pointers
2009-08-07 13:48:26 -06:00
Brian Paul
abb120fe5b
util: added util_same_surface() helper function
2009-08-07 13:48:26 -06:00
Robert Ellison
2caec748ad
tests: have getprocaddress return a return code
...
These minor changes allow getprocaddress to return an error code
in the case of test failure. This allows the program to be integrated
into the piglit test suite.
2009-08-07 12:23:19 -06:00
Robert Ellison
99d5139078
mesa: improve getprocaddress test
...
- Allow the getprocaddress test to test extensions not supported by
Mesa. The original getprocaddress.py script only included OpenGL
extension functions that were in Mesa dispatch tables. Now all
known extension functions (as detailed in gl_API.xml) are included.
As the test does not link against any extension function symbols
(i.e. it uses glXGetProcAddress() for all extension functions),
it still compiles and links against Mesa; but now the same
binary can be used to test extensions not yet supported by Mesa.
- Extend the list of tested extension functions. The last revision
of this test exercised 16 extension functions; this revision adds
support for 95 more.
2009-08-07 12:06:17 -06:00
Pauli Nieminen
d80b36f64f
dri: Fix problems with unitialized values in dri screen object.
...
This fixes crash in r200 KMS driver when pSAREA was set to 1 randomly because of memory wasn't cleared.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-07 11:24:47 -06:00
Brian Paul
1359d69f11
st/mesa: remove redundant calls to _mesa_set_vp_override()
...
Called from core Mesa now.
2009-08-07 10:49:38 -06:00
Brian Paul
c02b38d169
progs/xdemos: added multictx.c (multi-context rendering demo)
...
Create one window and render into it with two GLX contexts. Setup the
rendering state differently for each context to be sure there's no state
"bleeding" between contexts.
2009-08-07 09:52:18 -06:00
Brian Paul
2c9812e3d3
mesa: use _mesa_set_vp_override() in glDraw/CopyPixels and glBitmap
...
We don't use the vertex program in these functions and the driver may
install its own. This fixes the broken glCopyPixels swrast fallback in
i965 and possibly other drivers. In particular, glCopyPixels sometimes
didn't work because the fixed-function fragment program was replacing all
fragment colors with the current raster color.
2009-08-07 09:51:50 -06:00
Brian Paul
6807d96f8e
mesa: reformat code to allow setting breakpoints on the true-statement
2009-08-07 09:50:38 -06:00
Brian Paul
84e67330e1
glxgears: make functions static, update comments
2009-08-07 09:50:38 -06:00
Brian Paul
7bf6efe780
mesa: use _mesa_bufferobj_mapped()
2009-08-07 09:50:38 -06:00
Brian Paul
67153a4518
mesa: new _mesa_bufferobj_mapped() helper function
2009-08-07 09:50:38 -06:00
Brian Paul
f738b913e6
mesa: use valid_fragment_program() helper
2009-08-07 09:50:38 -06:00
Brian Paul
94504be63a
mesa: test DrawBuffer, not ReadBuffer in _mesa_dest_buffer_exists()
...
Also, update comments.
2009-08-07 09:50:38 -06:00
Brian Paul
2dec62405f
mesa: fix some incorrect error checks in _mesa_error_check_format_type()
...
Plus, simplify the code a bit.
2009-08-07 09:50:38 -06:00
Brian Paul
3335b847bf
mesa: do error checking on glCopyPixels() type parameter
...
Plus, move some other error checks before state validation and update
some comments.
2009-08-07 09:50:38 -06:00
Brian Paul
28cfd37bb3
mesa: use a more logical flag in _mesa_set_vp_override()
2009-08-07 09:50:38 -06:00
Brian Paul
b28854088b
mesa: new _mesa_copy_client_array() function
2009-08-07 09:50:38 -06:00
Brian Paul
692c50b388
i965: minor context comments
2009-08-07 09:50:38 -06:00
Brian Paul
922ef4a119
intel: minor context comments
2009-08-07 09:50:38 -06:00
Brian Paul
6e0be1cc34
intel: move blit call out of assert()
2009-08-07 09:50:38 -06:00
Brian Paul
4d24feddff
intel: fix typo: s/softare/software/
2009-08-07 09:50:37 -06:00
Brian Paul
3105fd760b
mesa: fix comment
2009-08-07 09:50:37 -06:00
Dave Airlie
239c8bfb10
radeon: enable tiling fallbacks in 3D driver.
...
Only really got good testing on r500 so far, need to enable in
DDX and play some more.
2009-08-07 19:40:59 +10:00
Dave Airlie
2dc3fb7803
radeon span: add r200 depth/stencil span read/writing
...
this should only really affect DRI2 since we mostly have a surface in DRI1.
I don't think this is perfect yet, but it is a better start than nothing.
2009-08-07 16:16:08 +10:00
Dave Airlie
eaf87e84c3
r200: fix scissor emission for r200 under kms
2009-08-07 14:13:19 +10:00
Brian Paul
9676ed27fe
util: fix incorrect assertion
...
Check that the dest surface/format is renderable.
2009-08-06 14:58:06 -06:00
Brian Paul
98f00e8eb9
util: include u_surface.h, added comment
2009-08-06 14:54:25 -06:00
Ian Romanick
3cb6f3bf21
GL_ARB_vertex_array_bgra is (basically) a synonym for the EXT version
2009-08-06 15:26:35 -05:00
Brian Paul
24fdf8aadb
util: use util_same_surface() to compare surface pointers
2009-08-06 09:47:13 -06:00
Brian Paul
ffb1f9bded
util: added util_same_surface() helper function
2009-08-06 09:47:13 -06:00
Alan Hourihane
8c223e8eb6
Ensure GL_EXT_blend_equation_separate is enabled when 2.0 is enabled.
2009-08-06 16:16:55 +01:00
Alan Hourihane
45b12edcbe
Ensure GL_EXT_blend_equation_separate is enabled when 2.0 is enabled.
2009-08-06 15:56:05 +01:00
Chia-I Wu
e179ab2815
progs/egl: Add xeglbindtex, really.
...
Missed this file in the earlier commit.
2009-08-06 08:40:03 -06:00
Jakob Bornecrantz
8fdda95162
mesa: Ignores
...
Got tired of seeing these files in git status all the time
2009-08-06 13:59:48 +01:00
Jakob Bornecrantz
8662f2c542
i915g: Compile with scons
2009-08-06 13:50:46 +01:00
Jakob Bornecrantz
c818efd0b3
identity: Use the correct texture
2009-08-06 13:20:49 +01:00
Eric Anholt
f44916414e
i965: Fix source depth reg setting for FSes reading and writing to depth.
...
For some IZ setups, we'd forget to account for the source depth register
being present, so we'd both read the wrong reg, and write output depth to
the wrong reg.
Bug #22603 .
2009-08-05 20:20:02 -07:00
Jakob Bornecrantz
b6c6551686
st/xorg: If we have DRI2 we should also have some sort of hw support
2009-08-06 00:52:13 +01:00
Jakob Bornecrantz
b6c9401f13
i915g: Always run in sync with the HW
2009-08-06 00:52:13 +01:00
Jakob Bornecrantz
901b87547e
i915g: The i915 seems more happier with sampler domain so lets use that
2009-08-06 00:52:13 +01:00
Jakob Bornecrantz
7a20f50c60
i915g: Dirty fix for VBO module double flush assert
2009-08-06 00:52:13 +01:00
Jakob Bornecrantz
66b00380a2
i915g: Switch to mapping the batch buffer instead of using subdata
2009-08-06 00:52:13 +01:00
Chia-I Wu
246f58d922
progs/egl: Add xeglbindtex.
...
This is a simple demo for eglBindTexImage. It uses a OpenGL context,
instead of the required OpenGL ES one. But it still suffices the demo
and test purpose.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-05 16:08:48 -06:00
Chia-I Wu
6f97a41964
egl_softpipe: Add support for pbuffer binding.
...
This adds support for eglBindTexImage and eglReleaseTexImage. They rely
on the state tracker to do the real work.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-05 16:08:07 -06:00
Chia-I Wu
0153614cb0
egl_softpipe: Flush when switching current context.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-05 16:07:39 -06:00
Chia-I Wu
54a7115fc2
mesa/st: Add support for binding pipe surface to texture.
...
This commit adds functions to bind a pipe surface to a texture. This
allows texturing directly from the surface.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-05 16:07:19 -06:00
Chia-I Wu
42b6b067ac
mesa/main: Add functions to clear and dirty texture objects.
...
This commit adds a function to clear a texture object such that there is
no image data associated with it, and a function to dirty it so that it
will be re-tested for completeness.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-05 16:06:50 -06:00
Brian Paul
1f71305993
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/main/state.c
2009-08-05 14:13:48 -06:00
Brian Paul
5b3428d745
docs:fix glBlitFramebuffer() for Gallium
2009-08-05 13:50:21 -06:00
Brian Paul
a59579c983
st/mesa: implement BlitFramebuffer() for depth/stencil (incomplete)
...
We now handle the case of blitting Z+stencil to/from combined Z/stencil
surfaces. But Z-only or stencil-only and separate depth/stencil surfaces
are not yet implemented.
2009-08-05 13:46:47 -06:00
Brian Paul
dcebe220f4
mesa: generate GL_INVALID_OPERATION for missing z/stencil when blitting
...
If glBlitFramebuffer() is called with GL_DEPTH_BUFFER_BIT or
GL_STENCIL_BUFFER_BIT and the src/dst depth/stencil buffers are absent,
report an error.
2009-08-05 13:44:59 -06:00
Brian Paul
f792137593
st/mesa: fix Y inversion and optimize st_BlitFramebuffer()
...
Need to check for Y inversion separately for src/dest buffers.
If both the src and dest regions are upside down, make them right-side
up for a better chance at a fast path.
progs/tests/copypixrate -blit is much faster now.
2009-08-05 13:26:19 -06:00
Brian Paul
2cd33afa00
util: added comment/question about blit clipping
2009-08-05 13:22:26 -06:00
Brian Paul
727b2d747e
mesa: make _mesa_clip_blit() a shared function
2009-08-05 13:21:59 -06:00
Brian Paul
4f36164024
util: added util_blit_pixels() overlap test
...
A comment alluded to this. Now it's checked.
2009-08-05 13:19:03 -06:00
Brian Paul
05d393f59f
util: fix util_blit_pixels() test for surface_copy() path
...
For the surface_copy() path require same format, no flipping and no stretching.
Fixes progs/tests/copypixrate -blit
2009-08-05 13:09:15 -06:00
Brian Paul
854ea483d4
util: reformatting and comments
2009-08-05 13:08:19 -06:00
Jakob Bornecrantz
3905119b47
st/xorg: Make it work again
2009-08-05 19:29:31 +01:00
Jakob Bornecrantz
8ccec83e63
st/egl: Create primary texture not display target
2009-08-05 19:29:30 +01:00
Jakob Bornecrantz
0500404cdf
i915g: Treat primary textures as scanout buffers
2009-08-05 19:29:30 +01:00
Jakob Bornecrantz
ec269c198a
i915g: Link with trace on EGL and Xorg
2009-08-05 19:29:30 +01:00
Jakob Bornecrantz
1f9ee623d1
trace: Use correct texture in drm_api wrapper
2009-08-05 19:29:29 +01:00
Jakob Bornecrantz
6160c8be57
softpipe: Also defere primary textures to backend
2009-08-05 19:29:29 +01:00
Dave Airlie
ac3de85eb6
r200: emit colorpitch
2009-08-05 11:26:29 +10:00
Eric Anholt
63d7a2f53f
i965: Fix dangerous warning I let slip in.
2009-08-04 18:07:01 -07:00
Eric Anholt
78c022acd0
i965: Respect CondSwizzle in OPCODE_IF.
...
Fixes piglit glsl-vs-if-bool and progs/glsl/twoside, and will likely be
useful for the looping code.
Bug #18992
2009-08-04 18:06:34 -07:00
Eric Anholt
7007f8b352
i965: Emit conditional code updates as required for GLSL VS if statements.
...
Previously, we'd be branching based on whatever condition code happened to be
laying around.
2009-08-04 18:06:34 -07:00
Eric Anholt
011244853b
i965: Don't set pop_count in the reserved MBZ area of IF statements.
2009-08-04 18:06:34 -07:00
Eric Anholt
8288ab4518
i965: Print out ELSE and ENDIF src1 arguments like IF does.
2009-08-04 18:06:34 -07:00
Roland Scheidegger
8b9a5cfce0
r200: fix off-by-one errors causing 6th texture unit to not work
...
both for normal and cube textures, this fixes demos/multiarb
(with 6 enabled texture units) and fixes #23142 .
2009-08-05 02:33:34 +02:00
Roland Scheidegger
7c0fb3a1be
r200: fix compiler warning (unused var)
2009-08-05 02:33:34 +02:00
Roland Scheidegger
15f5f839b1
radeon: fix miptree comparison breakage
...
another case of image never matching miptree in case of compressed textures
2009-08-05 01:13:22 +02:00
Roland Scheidegger
80cab49481
intel: implement intelCompressedTexSubImage2D
...
similar to the radeon code.
passes tests/texcompsub
2009-08-05 01:13:22 +02:00
Roland Scheidegger
0abc9e7565
tests: also test xoffset in texcompsub test
...
use glCompressedTexSubImage2DARB also with xoffset by splitting into 3 calls
in total. Dunno if the top/bottom reversal is intentional but leave as is.
2009-08-05 01:13:21 +02:00
Eric Anholt
de80eeea0e
intel: Add support for EXT_provoking_vertex.
2009-08-04 15:32:18 -07:00
Eric Anholt
b010814e9c
i965: Spell "conditional" correctly.
2009-08-04 15:32:18 -07:00
Eric Anholt
1d4bace9fc
i965: Hook up the disassembler for INTEL_DEBUG={wm,vs}.
...
I was getting tired of doing the dance of INTEL_DEBUG=batch, copying it out,
and running intel-gen4disasm on it.
2009-08-04 15:32:18 -07:00
Eric Anholt
ce63e9929c
i965: Initial import of disasm code from intel-gen4asm.
...
There's a bunch of stuff from gen4asm and gpu-tools that we probably want
to make into a library instead of cargo-culting it around.
2009-08-04 15:32:18 -07:00
Eric Anholt
def85826a0
i965: warning fix
2009-08-04 15:32:17 -07:00
Brian Paul
cd7a8225e8
tests/getteximage: test more texture sizes, including npot
2009-08-04 16:17:09 -06:00
Brian Paul
a746ef28df
mesa: log the shader checksum
2009-08-04 15:36:29 -06:00
Brian Paul
f7783badb5
mesa: compute, print shader checksum
2009-08-04 15:36:29 -06:00
Brian Paul
b501263bf5
mesa: added gl_shader::SourceChecksum field (for debug purposes)
2009-08-04 15:36:28 -06:00
Brian Paul
9f8110adcc
mesa: added _mesa_str_checksum()
2009-08-04 15:36:28 -06:00
Brian Paul
84c8315ae6
mesa: clean-up error debug/count code
2009-08-04 15:36:28 -06:00
Brian Paul
def77160d6
mesa: reset ErrorDebugCount to zero in glGetString()
2009-08-04 15:36:28 -06:00
Brian Paul
b98f0f2d51
mesa: better texture dump/debug code
2009-08-04 15:36:28 -06:00
Brian Paul
2b82bc93e2
mesa: more error message info for vertex pointer functions
2009-08-04 15:36:28 -06:00
Brian Paul
2465c4fa9c
mesa: more glGetTexImage() error checking consolidation, new assertion
2009-08-04 15:36:28 -06:00
Eric Anholt
191e028de2
i965: Fix RECT shadow sampling by not losing the other texcoords.
...
Bug #20821
2009-08-04 12:43:18 -07:00
Brian Paul
3a221a9018
docs: 7.5.1 bug fixes
2009-08-04 09:27:49 -06:00
Brian Paul
61673aebb0
intel: Fix inverted test for disabling flushing of front buffer output.
...
The comment disagreed with the code, and nicely drew my eyes to what was
going wrong.
Bug #21774 (blender)
Bug #21788 (readpix)
(cherry picked from master, commit fd65418f60 )
2009-08-04 09:23:17 -06:00
Brian Paul
f5f8be8bb2
intel: Wait on the last swapbuffers to complete before queuing a new one.
...
This fixes jerkiness in doom3 and other apps since the kernel change to
throttle less absurdly, which led to a thundering herd of frames.
Because this is a rather minimal fix, there is at least one downside: If
the whole scene completes in one batchbuffer, we'll end up stalling the GPU.
Thanks to Michel Dänzer for suggesting using glFlush to signal frame end
instead of going to all the effort of adding a new DRI2 extension.
(cherry picked from master, commit 0828579a65 )
2009-08-04 09:22:15 -06:00
Brian Paul
2bec909c69
texenv: Use VP->Current, since _Current isn't updated at this point.
...
(cherry picked from master, commit a9ba1bfeb3 )
2009-08-04 09:15:33 -06:00
Brian Paul
f0df08abbe
texenv: Match state.c in deciding whether we'll be using a vertex shader.
...
(cherry picked from master, commit 40990d9dfb )
2009-08-04 09:15:09 -06:00
Brian Paul
9d3929b60c
texenv: Add missing dependency on VP changes.
...
Funny thing is I annotated this dependency in
e5f63c403b , but didn't actually use it.
(cherry picked from master, commit 03187571b6 )
Conflicts:
src/mesa/main/state.c
2009-08-04 09:14:33 -06:00
Dan Nicholson
9185a61c8a
mklib: Ensure target directory exists for library
...
Instead of relying on the Makefile to always generate $(TOP)/$(LIB_DIR),
just have mklib handle creating the directory. This should fix any races
when using parallel make.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
(cherry picked from commit 23671e5358 )
2009-08-04 06:30:46 -07:00
Peter Hutterer
0ce73f84e9
Add missing X11_INCLUDES to egl/drivers/demo and egl/main.
...
Compiling mesa on a system with no X headers installed in the default
include paths fails due to missing X11 includes. The header includes are
picked up by configure but not applied.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
Signed-off-by: Dave Airlie <airlied@redhat.com >
(cherry picked from commit 5358e54d1a )
2009-08-04 06:30:30 -07:00
Dan Nicholson
23671e5358
mklib: Ensure target directory exists for library
...
Instead of relying on the Makefile to always generate $(TOP)/$(LIB_DIR),
just have mklib handle creating the directory. This should fix any races
when using parallel make.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-08-04 06:25:26 -07:00
Michel Dänzer
048f988aeb
r300g: Slightly saner initialization of some texture / transfer fields.
2009-08-04 10:57:47 +02:00
Eric Anholt
d7430d942f
i965: Assert that the offset in the VBO is below the VBO size.
...
This avoids sending a bad buffer address to the GPU due to programmer error,
and is permitted by the ARB_vbo spec. Note that we still have the opportunity
to dereference past the end of the GPU, because we aren't clipping to a
correct _MaxElement, but that appears to be harder than it should be. This
gets us the 90% solution.
Bug #19911 .
2009-08-03 17:56:49 -07:00
Eric Anholt
e340d4f986
i965: Even if no VS inputs are set, still load some amount of URB as required.
...
See comment on Vertex URB Entry Read Length for VS_STATE.
This, combined with the previous three commits, fixes #22945 .
2009-08-03 17:19:03 -07:00
Eric Anholt
e93848e595
i965: Make sure the VS URB size is big enough to fit a VF VUE.
...
This fix is just from code and docs inspection, but it may fix hangs on
some applications.
2009-08-03 17:19:03 -07:00
Eric Anholt
d1fbfd0f96
i965: Don't emit bad packets when no VBs are referenced.
...
It appears that sometimes Mesa (and I suppose a VS could as well) emits
a program which references no vertex data, and thus we end up with
nr_enabled == 0 even though some VBs are enabled. We'd end up emitting
VB/VE packet headers of 0xffffffff in that case, leading to GPU hangs.
Bug #22945 (wine with an uncompiled VS)
2009-08-03 17:19:03 -07:00
Eric Anholt
9b9cb30d12
i965: Calculate enabled[] and nr_enabled once and re-use the values.
...
The code duplication bothered me.
2009-08-03 17:19:03 -07:00
Robert Ellison
1f1ead9947
typo fix
...
somehow, this change was missed on the last checkin
2009-08-03 17:09:14 -06:00
Robert Ellison
0d18e9259e
mesa: fix up some GLAPI XML
...
- Added specifications for the extensions GL_APPLE_flush_buffer_range and
GL_APPLE_texture_range
- EXT_framebuffer_object.xml strangely held specifications for both
the GL_EXT_framebuffer_object extension and the GL_EXT_texture_array
extension. Split out the GL_EXT_texture_array data into its own
file.
2009-08-03 17:04:50 -06:00
Roland Scheidegger
50c736589e
radeon: more fixes for compressed textures
...
- fix not respecting required hardware stride with compressedTexImage -
this fixes #22615 .
- make sure correct stride is used in various places
- fix stored miptree never matching with a TexImage call with compressed
texture
- don't always store data with compressedtexsubimage at offset 0,
and actually use the supplied pixel data... (untested)
- make sure rows for compressed texture handling are rounded up not down
Note that trying to access stored compressed textures in hardware miptrees
from core mesa (get_compressed_teximage, swrast fallbacks) can't work correctly,
since RowStride isn't really set to anything useful, plus some places (at least
get_compressed_teximage) assume this data has native stride and no padding.
2009-08-04 00:21:07 +02:00
Eric Anholt
4221e81b24
radeon: Fix inverted test for disabling flushing of front buffer output.
...
(corresponding fix to the intel driver one)
2009-08-03 14:40:46 -07:00
Eric Anholt
fd65418f60
intel: Fix inverted test for disabling flushing of front buffer output.
...
The comment disagreed with the code, and nicely drew my eyes to what was
going wrong.
Bug #21774 (blender)
Bug #21788 (readpix)
2009-08-03 14:33:40 -07:00
Eric Anholt
0828579a65
intel: Wait on the last swapbuffers to complete before queuing a new one.
...
This fixes jerkiness in doom3 and other apps since the kernel change to
throttle less absurdly, which led to a thundering herd of frames.
Because this is a rather minimal fix, there is at least one downside: If
the whole scene completes in one batchbuffer, we'll end up stalling the GPU.
Thanks to Michel Dänzer for suggesting using glFlush to signal frame end
instead of going to all the effort of adding a new DRI2 extension.
2009-08-03 13:34:07 -07:00
Alex Deucher
e0d61fd696
r600: add some new r7xx pci ids
2009-08-03 16:10:32 -04:00
Eric Anholt
a9ba1bfeb3
texenv: Use VP->Current, since _Current isn't updated at this point.
2009-08-03 12:54:41 -07:00
Eric Anholt
40990d9dfb
texenv: Match state.c in deciding whether we'll be using a vertex shader.
2009-08-03 12:54:33 -07:00
Eric Anholt
03187571b6
texenv: Add missing dependency on VP changes.
...
Funny thing is I annotated this dependency in
e5f63c403b , but didn't actually use it.
2009-08-03 12:54:17 -07:00
Pauli Nieminen
fb7cf731f9
xdemo/glxswapcontrol: Move get_framge_usage after the swap.
...
This fixes the problem that first frame would report bogus usage values.
Problem was caused because get_frame_usage returned data from previous buffer
swap.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-03 13:42:05 -06:00
Pauli Nieminen
b59eb3b8b1
xdemos/glxcontexts: Don't leak visual info when choosing visual again.
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-08-03 11:55:29 -06:00
Chia-I Wu
7420e33848
egl_softpipe: Add support for pbuffer surface.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-03 11:36:08 -06:00
Chia-I Wu
8a130a65aa
egl: Correct the default values of surface attributes.
...
EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET should default to
EGL_NO_TEXTURE.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-03 11:35:44 -06:00
Chia-I Wu
8cdc6c66f9
egl: Make eglMakeCurrent more robust.
...
Now that a current surface points back to its binding context, and a
current context points back to its binding thread, make sure there is no
dangling pointers. This commit reworks eglMakeCurrent, adds more checks
to avoid stealing context or surfaces from another thread, and correctly
destroys unlinked context and surfaces.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-03 11:35:14 -06:00
Chia-I Wu
07ee01365a
egl: Replace IsBound by a pointer to the binding.
...
IsBound tells if a context or surface is current. What it does not tell
is, to which thread a context is current, or to which context a surface
is current. This commit replaces IsBound by a pointer to the binding
thread or context.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-08-03 11:34:37 -06:00
Brian Paul
27148ccaba
gl: upgrade wglext.h to version 15
2009-08-03 11:24:09 -06:00
Brian Paul
39bf48f281
gl: upgrade glxext.h to version 23
2009-08-03 11:24:09 -06:00
Brian Paul
2d725dac40
gl: upgrade glext.h to version 54
2009-08-03 11:24:09 -06:00
Brian Paul
4f61bc135a
tgsi: report opcode name in addition to the number when translation fails
2009-08-03 11:24:09 -06:00
Brian Paul
c3c90c2dd9
tgsi: added tgsi_get_opcode_name()
2009-08-03 11:24:09 -06:00
Brian Paul
2e9bf10014
gallium: comments, reformatting
2009-08-03 11:24:09 -06:00
Brian Paul
ed6125fe9b
st/mesa: we don't support GL_NV_point_sprite (see comment)
2009-08-03 11:16:23 -06:00
Alex Deucher
f538d02753
r600: add some missing pci ids
2009-08-03 11:21:10 -04:00
Alex Deucher
583ed4aae5
r600: fix the build when RADEON_DEBUG_BO is set
2009-08-03 03:12:56 -04:00
Alex Deucher
282c0c411c
r600: fix r600SetTexOffset
...
We need to properly set up a fake bo for the texture override,
so add a new function to radeon_bo_legacy.c. This could probably
be used on radeon/r200/r300 to unify the bo handling for
texture override.
compiz now works :)
2009-08-03 02:28:22 -04:00
Corbin Simpson
30bca7a4e6
Merge commit 'nha/r300-compiler-gallium'
2009-08-02 16:56:52 -07:00
Alex Deucher
d07bf2b35c
r600: handle state emit better
...
- move shader-related state with the rest of the shader setup/emit
- start to track dirty state better
2009-08-02 18:26:12 -04:00
vehemens
562ca49611
r600: Logic Operations Fix
...
fixes bug 23087
2009-08-02 18:03:58 -04:00
Alex Deucher
5e51903606
r600: fix regression in texenv
...
Emit shader consts with the shader program itself
2009-08-02 13:29:18 -04:00
Nicolai Hähnle
b1700b03af
r300: Fix a regression on non-KMS
...
The regression was introduced by 9a1c336253
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-08-02 16:24:52 +02:00
Alex Deucher
86ac0ae0b0
r600: fix rectangle textures
...
It might be better to add an instruction to normalize the
coordinates for rectanglular textures as there are some limitations
to wrap modes on unnormalized tex coords.
fixes texrect
2009-08-01 20:55:43 -04:00
Nicolai Hähnle
9a1c336253
r300: Fix corner-case of KIL on R300
...
R300 hardware (but _not_ R500) hardware requires an enabled texture unit
if KIL is used in fragment programs. We now work around the CS checker
correctly when enabling such a fake texture unit.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-08-01 19:00:55 +02:00
Nicolai Hähnle
3d21e3d3a2
r300: Fix Z buffer re-emit after window resize
...
We used to not always correctly re-emit the Z buffer size in all cases,
in particular the clear path, and invalidated state was not always picked
up correctly.
This fixes a bug where the kernel CS checker correctly complains about
a Z buffer that is too small.
Note that this bug was probably only visible with ridiculously high
framerates, i.e. glxgears.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-08-01 17:16:50 +02:00
Patrice Mandin
fc3d564dae
mesa st: Use POT texture for draw pixels operations if NPOT texture is not supported
2009-08-01 11:15:18 +02:00
Patrice Mandin
c1785c19ca
mesa st: Move logbase2 function to util/u_math.h
2009-08-01 11:03:30 +02:00
Roland Scheidegger
801c3fcbca
radeon: fix r100/r200 compressed texture stride
...
This almost fixes compressed mipmapped textures on r200, though some small
mip levels are still broken.
Leave r300 compressed texture stride as is though afaik it's different
to pre-radeon-rewrite too. Also do the fixup for rs600 uncompressed row stride
at same place.
2009-07-31 23:24:44 +02:00
Roland Scheidegger
2730ee75c7
radeon: s/r300/radeon in shared code error message
2009-07-31 23:20:22 +02:00
Brian Paul
f7618f4f37
swrast: fix incorrect texcoord attribute test
2009-07-31 13:57:03 -06:00
Brian Paul
23c0e812bc
draw: fix-ups for point coord attribute
...
progs/glsl/pointcoord.c works again
2009-07-31 13:56:17 -06:00
Pauli Nieminen
55bc8b1390
radeon: Cliprects has to be updated before doing anything with clip rectangles
...
Reported to fix corruption while dragging an active window by John Bridgman.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-31 21:44:31 +02:00
Pauli Nieminen
1fcb321e2f
radeon: Remove unused variable from context.
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-31 21:39:25 +02:00
Alex Deucher
95b64c0ed2
r600: make sure bos are valid before usign that
2009-07-31 15:11:41 -04:00
Alex Deucher
80d80d23b6
r600: fix reloc setup
...
re-use the same reloc index for bos that are referenced
multiple times.
Fixes rain demo.
2009-07-31 14:52:56 -04:00
Alex Deucher
177c33c481
r600: remove unused offset_mod stuff
...
this is a step in migrating to the common cs code
2009-07-31 14:52:56 -04:00
Alex Deucher
19ce428c8a
r600: ensure we have enough room for full state emit
...
full state is roughly 4000 dwords, but will vary depending
on the rendering.
Also fix some warnings.
2009-07-31 14:52:56 -04:00
Alex Deucher
54a1641923
r600: unify state emit into one function
2009-07-31 14:52:55 -04:00
Alex Deucher
be1687a892
r600: re-arrange state setup and emit so they are not mixed
2009-07-31 14:52:55 -04:00
Michal Krol
cb90c43676
Rename TGSI LOOP instruction to better match theri usage.
...
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.
2009-07-31 18:14:40 +02:00
Chia-Wu
dc516d6e2a
egl: Silence warnings on x86-64.
...
Casting an unsigned int to or from a pointer directly gives warnings on
x86-64. Add wrappers to silence the warnings.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-31 07:30:13 -06:00
Alex Deucher
826f1f9c6f
r600: get updated pending age from cs ioctl
...
REQUIRES AN UPDATED DRM
2009-07-31 02:13:43 -04:00
Alex Deucher
643d52a394
r600: warning fixes
2009-07-30 21:32:36 -04:00
Alex Deucher
e0e51ab1ea
r600: split primitive draw into a separate function
2009-07-30 21:32:36 -04:00
Nicolai Hähnle
d0c398a8e2
r300g: Use radeon compiler for fragment programs
...
This is entirely untested on R500, and needs more testing on R300.
2009-07-30 23:55:12 +02:00
Nicolai Hähnle
fbc88a7334
r300g: Remove extraneous printf
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-30 23:45:18 +02:00
Nicolai Hähnle
188f8c6792
r300g: Use r300compiler for vertex shaders
2009-07-30 23:45:18 +02:00
Nicolai Hähnle
cab62aa28f
r300/compiler: Remove inst_offset from r500_fragment_program_code
...
The field is not used, and in any case it would be more interesting to
manipulate from *outside* the compiler if we ever wanted to load several
fragment programs at the same time or something.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-30 23:42:59 +02:00
Ian Romanick
9f26f801dc
progs/vp: Correct the PARAM array sizes in arl-*.txt
2009-07-30 14:08:53 -07:00
Ian Romanick
565a2a8f38
ARB prog parser: Add support for RGBA components to SWZ instruction in fp
2009-07-30 10:51:43 -07:00
Chia-I Wu
27fb3ff858
softpipe: Mark texture dirty when unmapped.
...
When a texutre transfer is mapped for writing, mark the texture dirty
when unmapped. This was done in surface creation, and this commit moves
it to happen in texture unmapping.
This fixes subtex test in progs/tests/.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-30 10:42:46 -06:00
Ian Romanick
17534ab88c
ARB prog parser: Prevent NULL ptr deref for KIL instruction
...
The KIL instruction doesn't have a destination register, so
dereferencing dst in asm_instruction_ctor would cause a segfault.
2009-07-30 09:41:35 -07:00
Brian Paul
9c936403de
mesa: re-enable _mesa_source_buffer_exists() call
...
Somehow this code wound up inside a comment a while back.
2009-07-30 10:04:42 -06:00
Brian Paul
4406f79402
mesa: get_current_tex_unit() helper function
2009-07-30 09:59:52 -06:00
Brian Paul
25be043940
mesa: refactor glGetTexImage error checking code
2009-07-30 09:50:36 -06:00
Brian Paul
783a93a2c3
tests: glGetTexImage() test
2009-07-30 09:46:57 -06:00
Brian Paul
c156eeb682
mesa: simplify _mesa_select_tex_image()
2009-07-30 09:24:01 -06:00
Brian Paul
9c9a9abd7b
mesa: simplify _mesa_set_tex_image()
2009-07-30 09:10:26 -06:00
Brian Paul
1e355a0cb3
Merge branch 'mesa_7_5_branch'
2009-07-30 09:03:43 -06:00
Brian Paul
35e3449ad7
mesa: move misplaced return statement
...
Fixes regression from commit 7d93f817c9
2009-07-30 09:02:36 -06:00
Brian Paul
288299ae12
Merge branch 'mesa_7_5_branch'
2009-07-30 08:24:10 -06:00
Brian Paul
7d93f817c9
mesa: add missing return after catching program error
2009-07-30 08:23:26 -06:00
Brian Paul
e87320b5e0
Merge branch 'mesa_7_5_branch'
2009-07-30 08:22:57 -06:00
Brian Paul
aefaeba54a
docs: document new i915/945 extensions
2009-07-30 08:22:26 -06:00
Thomas Hellstrom
98ba6cfb4c
mesa st: Change the preferred internal format for some RGB formats.
...
For GL_RGB5, GL_RGB4 and GL_R3_G3_B2, prefer
PIPE_FORMAT_R5G6B5_UNORM over PIPE_FORMAT_A1R5G5B5_UNORM, since hardware
is more likely to support the previous format for rendering.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2009-07-30 12:43:35 +02:00
Thomas Hellstrom
f583745519
mesa st: Report unsupported render-to-texture formats.
...
If a texture image is bound to a framebuffer for render-to-texture, but
the hardware doesn't support rendering to its internal format,
report the framebuffer as incomplete with FRAMEBUFFER_UNSUPPORTED.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2009-07-30 12:43:35 +02:00
Michal Krol
6c70285e33
tgsi: Add proper constraints to sanity.
2009-07-30 11:39:06 +02:00
Michal Krol
cf8907018e
tgsi: Declare a LOOP register.
...
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.
2009-07-30 10:34:06 +02:00
Michal Krol
65fb2c52f9
tgsi: Fix number operands for LOOP/ENDLOOP.
2009-07-30 10:33:18 +02:00
Michal Krol
1e9d3ad4e1
vbo: Fix build on windows.
2009-07-30 10:31:57 +02:00
Michal Krol
b724dd28e2
tgsi: Document LOOP/ENDLOOP instruction operation.
2009-07-30 10:14:17 +02:00
Xiang, Haihao
3e2b6a2049
i965: Postpone ff_sync message in CLIP kernel on IGDNG
...
In addition, it guarantees ff_sync message is issued
2009-07-30 15:40:08 +08:00
Alex Deucher
0fdac3529c
r600: fix mipmaps
...
redbook mipmap works
2009-07-30 03:31:37 -04:00
Eric Anholt
246729162c
i915: Add support for EXT_stencil_two_side and ATI_separate_stencil.
...
Passes tests/stencil_twoside and glean/stencil2.
2009-07-29 21:25:39 -07:00
Ian Romanick
600710907c
ARP prog parser: Implement the spec, not what makes sense
2009-07-29 21:07:41 -07:00
Eric Anholt
92b9aa1646
i915: Add ARB_point_sprite since we already expose NV_point_sprite.
...
It's all fallbacks anyway due to the DD_POINT_ATTEN fallback.
2009-07-29 20:56:14 -07:00
Ian Romanick
48183ca8b6
ARB prog parser: Get program limits from the context
...
Some debug code from the older stand-alone version of the assembler
was hanging around and needed to go.
2009-07-29 20:51:38 -07:00
Ian Romanick
cbe4133109
ARB prog lexer: attenuation is not just for vp
2009-07-29 20:42:28 -07:00
Ian Romanick
333bb4f291
ARB prog parser: Finish implementing fp state.depth.range
2009-07-29 20:41:48 -07:00
Ian Romanick
e511633985
ARB prog: Fix the order of swizzle application
...
The swizzle used to generate the "original" value from the value
stored in the parameter array happens before the swizzle specified in
the instruction. This fixes problems seen in progs/vp/vp-tris with arl-*.txt.
2009-07-29 20:07:59 -07:00
Brian Paul
9d0b8d72d8
mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputs
...
Previously, the FOGC attribute contained the fragment fog coord, front/back-
face flag and the gl_PointCoord.xy values. Now each of those things are
separate fragment program attributes. This simplifies quite a few things in
Mesa and gallium.
Need to test i965 driver and fix up point coord handling in the gallium/draw
module...
2009-07-29 20:07:41 -06:00
Brian Paul
b9889517f5
gallium: fix SSE shadow texture instructions
...
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.
2009-07-29 16:33:58 -06:00
Alex Deucher
9c4c9f2837
r600: remove extraneous semicolon
2009-07-29 18:12:33 -04:00
Alex Deucher
b116f57bac
r600: fix texture pitch alignment
...
fixes texwrap
2009-07-29 18:06:20 -04:00
Alex Deucher
1e207ba9c1
r600: minor fixes
...
- set MAX_LOD properly
- min texel pitch is 8 texels
- emit old command buffer when re-initing base state
2009-07-29 17:25:56 -04:00
Nicolai Hähnle
0723cd1b0a
r300: Cleanup r300_fragment_program_code
...
Configuration register values are now stored directly in that structure.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-29 21:15:00 +02:00
Nicolai Hähnle
d3a1fc62f4
r300/compiler: Adapt AllocateHwInputs interface to common usage pattern
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-29 21:15:00 +02:00
Eric Anholt
88ebf514a4
swrast: enable ARB_vertex_array_object.
...
It was getting enabled anyway but without the entrypoints installed. Whoops.
2009-07-29 11:17:53 -07:00
Ian Romanick
8a430dd4da
Indentation fixes.
2009-07-29 09:50:06 -07:00
Ian Romanick
4c5879ff31
ARB prog parser: Set NumAttributes based on the number of attribs read
2009-07-29 09:47:14 -07:00
Keith Whitwell
6842829539
mesa/st: short-circuit glFinish calls on WIN32 only
...
Windows opengl32.dll calls glFinish prior to every swapbuffers, which
makes it pretty hard to get decent performance...
Work around by mapping finish to flush on PIPE_OS_WINDOWS. This is
conformant, though it might confuse poorly-written benchmarks which
attempt to measure a single event rather than figuring out the rate of
continuous processing.
2009-07-29 12:48:05 +01:00
Keith Whitwell
2420b283b7
mesa/st: recognize no-op scissor state when checking clear_with_quads
...
Some apps enable scissor but set the rectangle to the dimensions of
the window. Don't let this force us onto a slower clear path.
2009-07-29 12:48:04 +01:00
Keith Whitwell
4d99e14535
util: _debug_printf should print even when DEBUG is not defined
...
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 0ac879dca7 )
2009-07-29 12:48:04 +01:00
Cooper Yuan
03607708b0
r600: emit fog color in PS input map, fix fog related applications
2009-07-29 15:31:41 +08:00
Cooper Yuan
0f6d3aece7
R6xx/r7xx: VS export fog color as parameter
2009-07-29 15:23:56 +08:00
Ian Romanick
648dac4251
ARB prog parser: Set component negation mask for SWZ instruction
2009-07-28 21:57:28 -07:00
Ian Romanick
86b33b5649
ARB prog parser: Set correct register file for OUTPUT variables
2009-07-28 21:56:42 -07:00
Ben Skeggs
693f900b16
nv50: support non-blocking query_result()
2009-07-29 11:19:52 +10:00
Ben Skeggs
625bc0cfa2
nouveau: map_range returning -EBUSY isn't necessarily an error
2009-07-29 10:58:05 +10:00
Christoph Bumiller
84166a021f
nv50: correct zeta formats
...
What was Z24S8 before is actually S8Z24, and what we had for Z16
is actually X8Z24. Now, we also have the REAL Z24S8 and I added
Z32_FLOAT as well; most of the formats need different tile_flags.
2009-07-29 09:40:35 +10:00
Christoph Bumiller
987c59c486
nv50: use new 2D surface format names
2009-07-29 09:40:35 +10:00
Christoph Bumiller
1f17b8ff59
nv50: support more vtxelt formats
...
NOTE: we must not try to emit buffer relocations when
vtxbuf_nr is 0 but vtxelt_nr is not
2009-07-29 09:40:35 +10:00
Christoph Bumiller
72813ba5b6
nv50: should use uint32_t ptr in draw_elements_inline_u32
2009-07-29 09:40:34 +10:00
Christoph Bumiller
df189c9efc
nv50: TIC/TSC fixes and additions
...
Red and blue were interchanged in TIC.
Add border color and some formats.
2009-07-29 09:40:34 +10:00
Christoph Bumiller
f498ccd654
nv50: fix sx/dx typo in transfer_rect_m2mf
2009-07-29 09:40:34 +10:00
Christoph Bumiller
d1b9183e64
nv50: fix viewport transform
...
The translation also needs to be inverted, and in bypass mode
the state tracker incorrectly assumes that Y = 0 = TOP, so we
need inversion there to; NDC clipping has to be deactivated
explicitly.
2009-07-29 09:40:34 +10:00
Christoph Bumiller
b0341f994f
nv50: use correct scissor reg
2009-07-29 09:40:33 +10:00
Alex Deucher
8c56029b1e
r600: fix tex clamp modes
...
This makes texwrap look better.
2009-07-28 18:09:38 -04:00
Alex Deucher
e629c50e2b
r600: implement texture border color
2009-07-28 17:59:54 -04:00
Alex Deucher
719abd7fc0
r600: fix flat shading
...
Set the flat shading bit on the appropriate PS input
depending on the type of attribute it is. The VS output
and PS input routing should probably be made more dynamic
at some point. We may want to use semantic ids to make
it easier.
2009-07-28 16:58:41 -04:00
Alex Deucher
dbdb3952c1
r600: don't call r700UpdateShaders twice for each render
2009-07-28 15:58:01 -04:00
Alex Deucher
b1f7c844a3
r600: move r700TranslateFragmentShader into r700UpdateShaders
2009-07-28 15:53:45 -04:00
RALOVICH, Kristóf
45f4e8842e
glx: assign per screen driver configs (DRISW)
2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf
d090ba9e00
glx: assign per screen driver configs (DRI)
2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf
82f4dc21cc
glx: assign per screen driver configs (DRI2)
2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf
e32b601e7d
glx: properly release DRI configs
...
Release per screen DRI driver configs during screen destruction.
2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf
ce0ad53281
glx: cache DRI configs in __GLXscreenConfigsRec
2009-07-28 10:35:56 -06:00
Alex Deucher
4d648523aa
r600: disable flat shade fix in 506bacb8e4
...
This breaks textures. We need to only set this bit for
attributes that that need flat shading.
2009-07-28 11:12:36 -04:00
Brian Paul
d2f6d6ce49
Merge branch 'mesa_7_5_branch'
...
Conflicts:
Makefile
configs/default
docs/relnotes.html
src/mesa/main/version.h
2009-07-28 08:58:25 -06:00
Brian Paul
94726bc69e
gallium: minor code/comments clean-up
2009-07-28 08:55:43 -06:00
Chia-I Wu
a744a496d5
egl: Comment out unused tables in_eglFillInConfigs
...
This silences a compiler warning.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-28 08:55:43 -06:00
Vinson Lee
bc60b88411
progs/trivial: add missing files to Makefile, .gitignore
2009-07-28 08:54:48 -06:00
Cooper Yuan
506bacb8e4
R6xx/r7xx: enable flat shading, this can fix quadric/accanti/accpersp
2009-07-28 13:57:07 +08:00
Ian Romanick
aafd576259
ARB prog parser: Add support for GL_MESA_texture_array
...
This isn't really tested yet as no drivers actually support this extension.
2009-07-27 17:22:21 -07:00
Ian Romanick
41d5696628
ARB prog parser: More robust error message for bad OPTION string
2009-07-27 17:10:01 -07:00
Ian Romanick
1edd13bf23
ARB prog parser: Add support for GL_ARB_fragment_program_shadow
...
Passes the piglit asmparsertest shadow-0[123].txt tests and
progs/demos/shadowtex.
2009-07-27 16:24:49 -07:00
Ian Romanick
88018e2e07
ARB prog parser: Fix handling of RECT
...
Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before
allowing use of RECT texture target.
2009-07-27 15:47:52 -07:00
Ian Romanick
4821099429
ARB prog: Fix parameters to _mesa_calloc
...
So totally awesome that _mesa_calloc has a different parameter
signature than calloc. Why do these libc wrappers still exist?!?
2009-07-27 15:46:07 -07:00
Alex Deucher
fcf317ac16
r600: fix _REV texture format component swizzles
2009-07-27 18:14:45 -04:00
Brian Paul
6c03563af7
mesa: regenerated file
2009-07-27 15:42:29 -06:00
RALOVICH, Kristóf
8363dff251
glx: remove XTHREADS support
2009-07-27 15:38:04 -06:00
RALOVICH, Kristóf
27e55588e0
docs: do not mentions xthreads any more
2009-07-27 15:38:04 -06:00
RALOVICH, Kristóf
bdb8ee5186
glapi: regenerated GL API assembly files
2009-07-27 15:38:04 -06:00
RALOVICH, Kristóf
8f397bffa8
glapi: remove XTHREADS support
2009-07-27 15:38:04 -06:00
Brian Paul
3dbaf68bdc
intel: Fix leak of DRI option info due to using the wrong free routine.
...
(cherry picked from commit 6d66f23c50 )
2009-07-27 15:33:07 -06:00
Brian Paul
722d136f7b
intel: Clean up leak of driver context structure on context destroy.
...
(cherry picked from commit ddef7dc87b )
2009-07-27 15:33:07 -06:00
Ian Romanick
054ab5a50a
ARB prog parser: Correct handling of some extensions that interact w/ARB_vp
2009-07-27 14:18:40 -07:00
Brian Paul
a7427b0f7b
st/mesa: silence warning
2009-07-27 15:10:28 -06:00
Brian Paul
0ad9eba333
mesa: separate some finite/pragma Watcom stuff
2009-07-27 15:10:00 -06:00
Brian Paul
7e2f26cbbf
softpipe: include sp_winsys.h to silence function prototype warning
2009-07-27 15:08:44 -06:00
Nicolai Hähnle
3ccf89d584
r300/compiler: Make calculate_inputs_outputs available to external users
...
In the long run, it's probably better to just get rid of InputsRead and
OutputsWritten.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:40 +02:00
Nicolai Hähnle
59fff53492
r300/compiler: Add vertex program code dumper from Gallium driver
2009-07-27 22:51:39 +02:00
Nicolai Hähnle
6bc0e1054a
r300/compiler: Prepare for hookup to Gallium
2009-07-27 22:51:39 +02:00
Nicolai Hähnle
e82a50a6a1
r300/fragprog: Move wpos_attr and fog_attr where they belong
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:39 +02:00
Nicolai Hähnle
790334883a
r300/fragprog: Remove hardcoded FRAG_ATTRIB_xxx constants
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:38 +02:00
Nicolai Hähnle
e034683eda
r300/fragprog: No longer rely on hardcoded FRAG_RESULT_xxx constants
...
Also, this makes radeon_program_pair depend on the r300 fragment program
compiler. Since we now know that r600+ no longer use the same pairing
style in their ALU, we can stop pretending that program_pair is useful
for anything but r300-r500 fragment programs.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:38 +02:00
Nicolai Hähnle
836050ba5e
r300/fragprog: Move some of the attribute handling out of the compiler
...
Attribute indices will probably be different in Gallium, so make the compiler
independent of magic values.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:38 +02:00
Nicolai Hähnle
1348a7ebc0
r300/fragprog: Finally get rid of the duplicate program copy
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:38 +02:00
Nicolai Hähnle
3f78381687
r300/vertprog: Move Mesa-dependent input/output handling out of compiler
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:37 +02:00
Nicolai Hähnle
d6a304800b
r300: Remove ugly PSIZ hack
...
Instead of setting Sourced, we simply force writemasks to begin with.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:37 +02:00
Nicolai Hähnle
05a51f4b3d
r300/vertprog: Refactor wpos rewrite using rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:37 +02:00
Nicolai Hähnle
ce0c32e3d2
r300/vertprog: Refactor fog_as_texcoord to use rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:36 +02:00
Nicolai Hähnle
a1e8992ffa
r300/vertprog: Refactor addArtificialOutputs to use rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:36 +02:00
Nicolai Hähnle
273af68570
r300/fragprog: Refactor wpos rewrite to use rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:36 +02:00
Nicolai Hähnle
9dc1be4158
r300/compiler: Refactor fragment program fog rewrite to use rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:36 +02:00
Nicolai Hähnle
aab949cb9d
r300/compiler: Refactor rewrite_depth_out to use rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:35 +02:00
Nicolai Hähnle
6f4608f53c
r300/compiler: Refactor local transforms to use rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 22:51:14 +02:00
Brian Paul
d2f56fe687
intel: Use _mesa_warning() to report GEM warnings
2009-07-27 14:35:18 -06:00
Ian Romanick
be32fb779b
ARB prog: Update generated files missed on previous two commits
...
The changes are, as it turns out, purely cosmetic.
2009-07-27 12:48:44 -07:00
Ian Romanick
6d3ccaf366
ARB prog: Delete comment about possibly needing to free a buffer
...
Valgrind doesn't complain about a leak here, so delete the comment
about possibly needing to free the state returned by yy_scan_bytes.
2009-07-27 12:38:52 -07:00
Karl Schultz
09ef339b69
windows: updated VC8 project files
...
See bug 22882.
2009-07-27 13:38:35 -06:00
Brian Paul
25e371fb7b
docs: 7.5 tarball md5sums
2009-07-27 13:27:54 -06:00
Ian Romanick
94b4556704
ARB prog: Clean up several memory leaks
...
As far as I am able to determine via code inspection and using
Valgrind, that should be all of the leaks in the parser.
2009-07-27 12:21:26 -07:00
Ian Romanick
946ea82bff
Add destructor for symbol_table
2009-07-27 12:19:14 -07:00
Ian Romanick
0044d3ba94
Add destructor for hash_table
2009-07-27 12:17:06 -07:00
Nicolai Hähnle
800f482586
r300: Allow compiler to add constants in a cleaner way
...
Adding constants is used in a number of non-native instruction
rewrites, and it required us to keep copies of modified gl_programs
around. This is a first step towards ending this.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:07 +02:00
Nicolai Hähnle
92f7a599c7
r300/compiler: Refactor nqssadce to use rc_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:07 +02:00
Nicolai Hähnle
a898e7d66c
r300/compiler: Refactor for rc_program usage
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:07 +02:00
Nicolai Hähnle
2237d136cd
r300/compiler: Add rc_print_program
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:07 +02:00
Nicolai Hähnle
8bcb6ef786
r300/compiler: Lay groundwork for better error handling
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:06 +02:00
Nicolai Hähnle
c5cb9a3378
r300: Remove dependency on GLcontext from compiler
...
Unfortunately, this does cause some code duplication (which we can hopefully
eliminate eventually).
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:06 +02:00
Nicolai Hähnle
d65404225d
r300/vertprog: Cleanup source conflict handling
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:06 +02:00
Nicolai Hähnle
86e3334333
r300/vertprog: Massively reduce code duplication
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:06 +02:00
Nicolai Hähnle
127ca61fa3
r300/vertprog: Use generic transforms and throw away unneeded code
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:06 +02:00
Nicolai Hähnle
84445273ed
r300: Move vertex program compilation to compiler
...
This is just the first step of refactoring. The separation is not yet
clean enough with this commit.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:05 +02:00
Nicolai Hähnle
11cd795940
r300: Cleanup vertex_program structure
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:05 +02:00
Nicolai Hähnle
927f5f1682
r300: Remove faux lazy translation of vertex programs
...
De facto, vertex programs were translated immediately in all situations,
so let's just stop pretending that we do lazy translation.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:05 +02:00
Nicolai Hähnle
a808b10ce8
r300: Reduce include dependencies
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:05 +02:00
Nicolai Hähnle
9198ab8bfc
r300: Introduce rc_program and use it in radeon_pair
...
The goal is to convert both Mesa and TGSI programs into an intermediate format
that happens to be convenient for us.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:05 +02:00
Nicolai Hähnle
9cd5e3e13a
r300: Add radeon_compiler as a base for compilation-related tasks
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:04 +02:00
Nicolai Hähnle
647766494f
r300: Remove some unnecessary includes
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:04 +02:00
Nicolai Hähnle
77a6ae64b6
r300/compiler: Compile the compiler seperately into an archive
...
This is all part of untangling the compiler from the classic driver, so that
it may be used in Gallium without depending on Mesa stuff if possible
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:04 +02:00
Nicolai Hähnle
d6275ccf79
r300: Further reduce dependency between compiler and classic driver
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:04 +02:00
Nicolai Hähnle
f70d3ee371
r300: Remove some dependencies on additional fragment program copies
...
The copy is still needed because some program transforms add state variables
or constants.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:04 +02:00
Nicolai Hähnle
b54e083201
r300: Remove GLcontext from r300_fragment_program_compiler
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:03 +02:00
Nicolai Hähnle
e93d70e3e9
r300: Remove GLcontext requirement from radeonLocalTransform
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:03 +02:00
Nicolai Hähnle
9ceee4d3e4
r300: Remove unused enums
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:03 +02:00
Nicolai Hähnle
b4b286b980
r300: Remove GLcontext requirement from radeon_nqssadce
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:03 +02:00
Nicolai Hähnle
d29cdde569
r300: Remove GLcontext requirement from radeon_program_pair
...
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:03 +02:00
Nicolai Hähnle
cb8c694adb
r300/program_pair: Introduce driver-specific texture instruction structure
...
This is to prepare more experimentation and possible internal changes in the
compiler.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:02 +02:00
Nicolai Hähnle
78f88d8b87
r300/program_pair: Dynamically allocate instructions temporarily
...
In preparation of using TGSI, where we cannot easily predict the number
of instructions.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:02 +02:00
Nicolai Hähnle
e5bed439be
r300: Detangle fragment program compiler from driver-specific structure
...
This is in preparation of sharing the fragment program compiler with Gallium:
Compiler code is moved into its own directory and modified so that it no
longer depends on driver structures.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-27 20:32:02 +02:00
Pauli Nieminen
6b142866ab
radeon: Add r6xx/r7xx chip family to get_chip_family_name
...
This fixes problem that glxinfo was reporting r600+ cards as unknown.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com >
2009-07-27 11:06:18 -04:00
Patrice Mandin
1ee3bcfff0
nouveau: swizzle a single row or column, doing it one pixel at a time
2009-07-27 10:58:11 +02:00
Alex Deucher
7d3190a85b
r600: fix textures
...
We weren't allocating enough gprs for the fragment shader
in some cases. There are likely other issues that still need
to be sorted out for textures, but at least they now work.
2009-07-27 03:52:37 -04:00
Alex Deucher
7e6819f843
r600: don't draw when num indices is 0
...
fixes engine demo
2009-07-27 02:26:41 -04:00
Alex Deucher
48b2fea142
r600: set VGT NUM_INSTANCES as part of the draw command
...
set VGT NUM_INSTANCES as part of the draw command rather
than as state as recommended by the pm4 guide. Also,
use the NUM_INSTANCES packet.
2009-07-27 02:26:41 -04:00
Alex Deucher
600a53a32e
r600: Use R600_SCRATCH_REG_OFFSET rather than RADEON_SCRATCH_REG_OFFSET
...
noticed by vehemens on IRC.
2009-07-27 02:26:41 -04:00
Alex Deucher
0b3d51ee31
r600: switch vtx resource setup to use SETfield macros
...
For consistency
2009-07-27 02:26:41 -04:00
Alex Deucher
2c5e55d919
r600: switch tex code to use SETfield macros
...
for consistency with the rest of the code.
2009-07-27 02:26:41 -04:00
Corbin Simpson
7a10472f09
r300g: Fix two trivial texture size issues.
...
Next thing to fix: progs/tests/mipgen.
2009-07-26 22:48:20 -07:00
Corbin Simpson
725c1f004c
radeon-gallium: If BO allocation fails, return NULL.
2009-07-26 22:35:26 -07:00
Corbin Simpson
2cbd5ecfb6
r300g: Add some debugging, correct little bits of math in texture setup.
...
Simple stuff still works, but not sure about some of the more complex things.
2009-07-26 21:38:24 -07:00
Patrice Mandin
8df35b7b57
nouveau: only swizzle square textures for copy
2009-07-26 22:30:35 +02:00
José Fonseca
5276b049b4
util: fix typo.
2009-07-26 20:31:59 +01:00
Patrice Mandin
2b8a8f75f3
nouveau: Take into account destination position for copy_swizzle, need to split copy a bit more
2009-07-26 16:18:06 +02:00
Patrice Mandin
77a8a650e6
nouveau: Recursively swizzle an NPOT sized copy
2009-07-26 12:30:12 +02:00
Ian Romanick
258f640eda
ARB prog: Layout parameters from parameter type, not src type
...
Use the type stored in the Parameters array to determine the layout
instead of the type in the instruction register field. Also, update
the instruction register field based on the parameter type.
This makes Google Earth work exactly like with Mesa master.
2009-07-24 18:14:47 -07:00
Ian Romanick
a7400e7364
ARB prog: _mesa_print_program output should go to same place as _mesa_printf
2009-07-24 18:03:02 -07:00
Ian Romanick
f3cba9d66a
ARB prog parse: Fix cut-and-paste error for constant vectors
2009-07-24 18:01:59 -07:00
Ian Romanick
6f8214cae6
ARB prog: get frag prog texture info from the right place
...
This gets basic texturing working. w00t!
2009-07-24 17:33:30 -07:00
Patrice Mandin
8c30292a6e
nouveau: use nv04_surface_copy_swizzle only for POT sizes
2009-07-24 23:37:46 +02:00
Joakim Sindholt
12b183d250
radeon-gallium: remove old getparam ioctl
2009-07-24 14:54:00 +02:00
Brian Paul
c57d81ddc9
mesa: include glew headers in MesaDemos tarballs
2009-07-23 20:20:39 -06:00
Alex Deucher
3b4235d4eb
r600: fix segfault in morph3d
...
These attributes still need work, but it shouldn't hurt to
enable them.
2009-07-23 18:26:02 -04:00
Keith Whitwell
aa99a765c1
draw: correct address for machine struct in llvm path
...
This changed after a recent commit.
2009-07-23 18:48:04 +01:00
Keith Whitwell
adc6f8cdfc
gallivm: updates for TGSI changes
...
make linux-llvm succeeds, but doesn't seem to be working, at least with
llvm 2.5
2009-07-23 17:59:08 +01:00
Corbin Simpson
ca83d5a8db
r300g, radeon-gallium: Fix API, cleanup.
...
Something called "validate" should return FALSE on failure, not TRUE.
2009-07-23 07:18:29 -07:00
Nicolai Hähnle
27b3c435ba
radeon-gallium: Build fixes wrt changed libdrm_radeon space check API
...
Had to be hacked up a bit to apply to master. Sorry 'bout that. :3
2009-07-23 07:18:29 -07:00
Corbin Simpson
256eacbde4
r300g: PIPE_CAP_BLEND_EQUATION_SEPARATE.
2009-07-23 07:18:29 -07:00
Keith Whitwell
d0d98f3ecf
gallium: clean up opcode definitions
...
Remove commented-out opcodes. Remove information about API mappings
to opcodes, but add a reference to tgsi-instruction-set.txt where
that information is better presented.
2009-07-23 14:39:07 +01:00
Keith Whitwell
78379abcbf
gallium: remove deprecated TGSI opcodes
...
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.
2009-07-23 14:38:26 +01:00
José Fonseca
8b78294d21
r600: Remove CRLF line endings.
2009-07-23 14:11:10 +01:00
Vinson Lee
af1163cc41
util: Add support for Mac OS.
2009-07-23 14:08:07 +01:00
Corbin Simpson
07961bb05e
r300g: Actually mark shaders as translated/untranslated.
...
Also trust that Gallium will not give us TGSI that miscounts shader consts.
This creates a 20x speedup on glxgears, from 8 FPS to 160 FPS.
2009-07-23 00:00:28 -07:00
Brian Paul
895c435def
cell: update TGSI_OPCODE_ cases
2009-07-22 21:04:07 -06:00
Ian Romanick
ef80c2012d
parser: Clean up a bunch of silly compiler warnings
2009-07-22 17:13:08 -07:00
Ian Romanick
0db5ef0741
parser: Track a few more frag prog related values
2009-07-22 16:21:54 -07:00
Ian Romanick
28b13038d8
parser: Ensure that param_binding_type is set correctly
2009-07-22 16:03:32 -07:00
Michel Dänzer
d602966f89
gallium: Fix PPC build.
2009-07-23 00:47:32 +02:00
Ian Romanick
5f090bb074
GIT ignore program_parse.output
2009-07-22 15:28:31 -07:00
Ian Romanick
c2ee82d693
parser: Set NumParameters
2009-07-22 15:27:31 -07:00
Ian Romanick
44843c7533
parser: Clean up generation of error strings during assembly
2009-07-22 15:06:49 -07:00
Patrice Mandin
b7042399fd
nouveau: nv30: wrong variable for format
2009-07-22 22:26:08 +02:00
Maciej Cencora
b129c55f42
r300: fix address register handling in NQSSADCE
...
For address register we always use X component
2009-07-22 22:10:22 +02:00
Ian Romanick
aec4291706
parser: Initialize unused instruction source registers
...
The 965 driver expects unused source registers (e.g., SrcReg[2] of a
DP3 instruction) to have a register file of PROGRAM_UNDEFINED.
Initializing these source registers ensures that this happens.
2009-07-22 12:29:48 -07:00
Patrice Mandin
db40bb0287
nouveau: Take into account sx,sy parameters to read from source surface
2009-07-22 21:10:20 +02:00
Brian Paul
b4ba6a66b7
docs: initial release notes for 7.5.1
2009-07-22 12:49:34 -06:00
Brian Paul
9c4b877519
mesa: bump version to 7.5.1
2009-07-22 12:46:53 -06:00
Brian Paul
b9e2e32daf
mesa: include GLEW sources in MesaDemos tarball
2009-07-22 12:34:07 -06:00
Ian Romanick
69d3d19b54
parser: Anonymous constants come from the PROGRAM_CONSTANT file
2009-07-22 10:51:18 -07:00
Keith Whitwell
ede9f3b52e
gallium: remove multiple aliases for TGSI opcodes
...
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.
2009-07-22 12:42:09 +01:00
Keith Whitwell
fd31f92cea
gallium: simplify tgsi_full_immediate struct
...
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.
2009-07-22 12:42:09 +01:00
Richard Li
5e3c62b550
r600: fix dst reg indexing for real
...
This fixes segfaults in apps like teapot and tunnel
2009-07-21 17:56:06 -04:00
Alex Deucher
7edb2a9eef
Revert "r600: fix dst reg indexing"
...
This reverts commit cc893d9a98 .
Richard has the proper fix.
2009-07-21 17:44:36 -04:00
Alex Deucher
72a3d8845f
r600: add stencil support
2009-07-21 17:10:54 -04:00
Alex Deucher
db0160bb9d
r600: use state functions to set default state
2009-07-21 17:10:54 -04:00
Alex Deucher
bd62cd735f
r600: fill in point functions
2009-07-21 17:10:54 -04:00
Alex Deucher
5a615e7e65
r600: set provoking vertex to last vertex for OGL
2009-07-21 17:10:54 -04:00
Alex Deucher
60787df1e5
r600: fill in r700UpdateViewportOffset
2009-07-21 17:10:53 -04:00
Alex Deucher
549b8e6f1a
r600: first pass at polyoffset support
...
not working yet
2009-07-21 17:10:53 -04:00
Jerome Glisse
7247446ba8
radeon: fix colorbuffer pitch emission regarding tiling in KMS/CS case
...
We need to emit a relocation for pitch register so that kernel can
check and properly setup tiling on the color buffer.
2009-07-21 21:14:19 +02:00
Alex Deucher
ecead30111
R600: fix up some build problems
2009-07-21 11:09:05 -04:00
Alex Deucher
9e6d38f8a2
r600: add alpha test support
2009-07-21 10:53:20 -04:00
Michel Dänzer
cf24119d38
Track Radeon driver symlinks in Git.
2009-07-21 10:47:42 +02:00
Eric Anholt
a6b314150c
intel: Fall back on glBitmap with fog enabled.
...
We would have to build the program with the appropriate fog mode, and
also supply the fog coordinate if appropriate.
Bug #19413 .
(cherry picked from commit 8ae02a3919 )
2009-07-20 19:10:32 -07:00
Eric Anholt
1b445f9673
i965: Don't clip everything if FRONT_AND_BACK culling while culling disabled.
...
Fixes everything-black with meta_clear_tris on quake4-mpdemo and doom3-demo.
Bug #18844 , 22077.
(cherry picked from commit 81d5550684 )
2009-07-20 19:10:20 -07:00
Peter Hutterer
5358e54d1a
Add missing X11_INCLUDES to egl/drivers/demo and egl/main.
...
Compiling mesa on a system with no X headers installed in the default
include paths fails due to missing X11 includes. The header includes are
picked up by configure but not applied.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2009-07-21 11:45:49 +10:00
Eric Anholt
81d5550684
i965: Don't clip everything if FRONT_AND_BACK culling while culling disabled.
...
Fixes everything-black with meta_clear_tris on quake4-mpdemo and doom3-demo.
Bug #18844 , 22077.
2009-07-20 18:31:13 -07:00
Ian Romanick
770cebbc29
ARB_fp/vp: Initial import of new ARB vp/fp assembler
...
This still needs quite a bit of work, but a bunch of the programs in progs/vp
produce correct results.
2009-07-20 17:44:36 -07:00
Alex Deucher
6617fa6fab
r600: fix typo in blend code
2009-07-20 19:33:05 -04:00
Kevin DeKorte
cc893d9a98
r600: fix dst reg indexing
...
This fixes segfaults in apps like teapot and tunnel
2009-07-20 19:00:57 -04:00
Alex Deucher
265d5eba65
r600: add blending support
2009-07-20 19:00:57 -04:00
Alex Deucher
a369963b18
r600: add user clip plane support
2009-07-20 19:00:57 -04:00
Alex Deucher
ce9c5a1a27
r600: add logicop support
2009-07-20 19:00:57 -04:00
Ian Romanick
480567d5c4
Add new _mesa_new_parameter_list_sized to pre-allocate a parameter list
2009-07-20 15:37:24 -07:00
Keith Whitwell
cad82cd063
tgsi: get texturing working in vertex shader sse2 path
...
Missing file from previous commit.
2009-07-20 19:47:38 +01:00
Michel Dänzer
cd63e35603
Merge branch 'mesa_7_5_branch'
2009-07-20 20:41:11 +02:00
Michel Dänzer
5ed4404005
radeon: With DRI1, if we have HW stencil, only expose fbconfigs with stencil.
...
Otherwise simple apps like glxgears pick up a DirectColor visual since the X
server mixes the depth 32 visual in with the other GLX visuals, and this seems
to result in a (mostly) black screen due to a bad ColorMap for a lot of people.
The bad ColorMap may be a bug in the apps, the X server or X driver, and
regardless of that I think the X server should ideally make the depth 32 GLX
visual separate from the rest again, but in the meantime this makes us cope.
(depth_bits is either 16 or 24, never 0)
2009-07-20 20:34:04 +02:00
Keith Whitwell
442101dad7
tgsi: get texturing working in vertex shader sse2 path
2009-07-20 19:32:28 +01:00
Keith Whitwell
27a19be8d1
tgsi: fix regression in indexed const lookups
...
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.
2009-07-20 19:32:28 +01:00
Kevin DeKorte
91512fa019
r600: Fix compilation
2009-07-20 09:27:17 -04:00
Cooper Yuan
19249a1ae7
R6xx/r7xx: Fix line stipple and width issue
2009-07-20 17:42:47 +08:00
Michel Dänzer
cf721c8137
Add common_ppc.c to MESA_GALLIUM_SOURCES.
2009-07-20 02:11:17 +02:00
Michel Dänzer
3d0009ce45
r300g: Fix SCons build.
2009-07-20 02:06:37 +02:00
Michel Dänzer
0b7a907f39
gallium/trace: Fix SCons build.
2009-07-20 02:05:38 +02:00
Michel Dänzer
3326be6c0a
r300g: Guard R500 register writes by is_r500 check.
...
Flagged by the DRM command stream checker. This allows the driver to work on
non-R500 cards.
2009-07-20 01:53:15 +02:00
Dave Airlie
a8921d0b52
gallium: make g3dvl build again
2009-07-18 17:44:44 +10:00
Brian Paul
b96ae1b2c4
Merge branch 'mesa_7_5_branch'
...
Conflicts:
Makefile
progs/glsl/multitex.c
src/mesa/main/enums.c
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
2009-07-17 22:00:47 -06:00
Alex Deucher
f81f57e25d
R6xx/R7xx: add fine grained syncing support
2009-07-17 19:05:30 -04:00
Alex Deucher
b192b9dac6
R6xx/r7xx: send depth state in it's own function
2009-07-17 19:05:29 -04:00
Andrew Randrianasulu
2a6f58460a
st/egl: Fix broken build after EGL thread changes
2009-07-18 00:55:12 +02:00
Alex Deucher
5008269cfe
R200: fix build when RADEON_DEBUG_BO is set
2009-07-17 18:19:01 -04:00
Dave Airlie
a046beaffe
radeon: disable BO debug
2009-07-18 08:00:23 +10:00
Brian Paul
cd10996d4f
progs/util: remove extfuncs.h (we use GLEW instead)
2009-07-17 14:43:29 -06:00
Brian Paul
40fd101919
egl: commit missing eglcurrent.[ch] files
...
Not sure how these got left out from earlier commit.
2009-07-17 13:36:58 -06:00
Brian Paul
ee0b1bc7d3
progs/glsl: finish conversion to GLEW
...
This is a follow-on to b799af91d5 .
Remove _func function suffix and unneeded #includes.
2009-07-17 13:23:11 -06:00
Alex Deucher
e910f6831b
Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa into r6xx-rewrite
2009-07-17 14:46:40 -04:00
Kevin DeKorte
79a170108f
R6xx/r7xx: warning fixes
...
patch from Kevin DeKorte with some minor fixes from me.
2009-07-17 14:43:42 -04:00
Brian Paul
a77b455af0
mesa: set version to 7.5
2009-07-17 12:40:48 -06:00
Brian Paul
71b9e10291
mesa: set version to 7.5
2009-07-17 12:40:44 -06:00
Brian Paul
7fd3674672
docs: set date for 7.5 release
2009-07-17 12:40:24 -06:00
Chia-I Wu
30bccf8ea9
xeglthreads: Check current context for EGL per-thread support.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:56:32 -06:00
Chia-I Wu
15fdbc8361
egl: Remove redundant DeletePending flag.
...
A context or surface that is neither linked to a display nor current to
a thread should be destroyed. Therefore, an unlinked context or surface
implies a pending delete automatically.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:56:00 -06:00
Chia-I Wu
3f7e0d5302
egl: Destroy display's resources upon termination.
...
eglTerminate should destroy the contexts and surfaces of the display.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:54:06 -06:00
Chia-I Wu
be9d1ab171
egl: Return the same EGL Display for the same native display.
...
The latest revision of the spec explicitly requires the same handle to
be returned for the same native display.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:53:39 -06:00
Chia-I Wu
cca31340b5
egl: Use the link functions to manage resources.
...
This commit uses the newly introduced link functions to manage EGL
contexts and surfaces. As a result of this, the API for drivers are
changed. All drivers are updated for the change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:53:03 -06:00
Chia-I Wu
18457cb263
egl: Add funtions to link contexts and surfaces to displays.
...
EGL contexts and surfaces are resources of displays. They should be
managed by displays. This commit adds a bunch of functions to
egldisplay.c to help establish the links between contexts/surfaces and
displays. How links are established is considered opaque outside
display. Functions like _eglGetSurfaceHandle or _eglLookupSurface are
therefore moved to egldisplay.c, with some small modifications.
The idea is also extended to display. That is, displays need to link to
themselves to be looked up.
This commit only adds the functions. A commit to use them should
follow.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:48:27 -06:00
Chia-I Wu
21b635ffa8
egl: Extend per-thread info for multiple current contexts.
...
EGL allows multiple current contexts, as long as they are bound to
different client APIs.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:42:04 -06:00
Chia-I Wu
75da80b295
egl: Support per-thread info.
...
This commit introduces a "current" system to manage per-thread info. It
uses TLS, if GLX_USE_TLS is defined, or pthread, if PTHREADS is defined.
If none of them are defined, it uses a dummy implementation that is just
like before.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-17 11:41:02 -06:00
Chia-I Wu
8e92ec9fdd
egl: Add eglcompiler.h for compiler features.
...
Only INLINE (from mesa/main/compiler.h) is defined now. It may be used
to deal with symbol visibility and int/pointer conversion in the future.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Signed-off-by: Brian Paul <brianp@vmware.com >
2009-07-17 11:36:45 -06:00
Alex Deucher
c4ab08a0cd
R6xx/r7xx: disable depth/stencil compression for now
2009-07-17 12:21:33 -04:00
Alex Deucher
60d681f367
R6xx/r7xx: add some missing state regs
2009-07-17 12:07:15 -04:00
Brian Paul
27587f46e5
docs: news entry for 7.5 release
2009-07-17 09:40:59 -06:00
Brian Paul
8c6e81f97d
docs: update links to Gallium wiki page on freedesktop.org
2009-07-17 09:40:59 -06:00
Eric Anholt
9cea84b6b5
texenv: Calculate whether we need to do secondary color on our own.
...
The _TriangleCaps bit is deprecated, not updated when we require, and
is set based on state that hasn't been updated at that point in
_mesa_update_state_locked().
Fixes incorrect clear color in glsl/twoside.c with meta_clear_tris.
2009-07-16 19:02:04 -07:00
Eric Anholt
99174e7630
i965: Add missing state dependency of sf_unit on _NEW_BUFFERS.
2009-07-16 19:00:34 -07:00
Alex Deucher
6f63698d26
R6xx: fix rendering on r6xx/rs780 chips
...
You always need to emit a fetch shader (fs) even if you
aren't using it. For now, just emit the fs with the
vs address to make the kernel happy.
2009-07-16 17:35:44 -04:00
José Fonseca
2ba98efdf6
python/retrace: Process the call no passed to --to option inclusively.
2009-07-16 19:34:44 +01:00
José Fonseca
cf7e8fbc2e
python/retrace: Dump the surface copy contents.
2009-07-16 19:32:40 +01:00
José Fonseca
5807ccb41b
python/retrace: Flush stdout before calling the pipe driver.
...
So that messages are in sync with stderr.
2009-07-16 19:31:36 +01:00
José Fonseca
d4e6df9ab6
mesa: Fix logbase2.
...
It was providing 1 too many for non power two values.
2009-07-16 19:20:25 +01:00
Keith Whitwell
04dd8b71b4
draw: fix ppc build regression
...
Found by x.org tinderbox, reported by Chris Ball.
2009-07-16 19:01:29 +01:00
Kevin DeKorte
c42a616314
Warning fixes
2009-07-16 11:57:14 -04:00
Alex Deucher
0850776f1a
R6xx/r7xx: remove unused function
...
Spotted by kdekorte on IRC
2009-07-16 11:53:58 -04:00
Brian Paul
3e8832d24b
st/mesa: add some array index bounds assertions
2009-07-16 08:44:51 -06:00
Chia-I Wu
721f80b82a
egl: Add xeglthreads
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
2009-07-16 08:29:57 -06:00
Richard Li
00a216fd1e
Restore vp input mapping, fix vtx stream missing problem.
2009-07-16 10:28:58 -04:00
Keith Whitwell
caf5d52d48
tgsi: simplify and fix sse KIL implementation
...
Use sse_movmskps to extract the correct bits of the comparison result
for use in updating the killmask. Simplify some logic around
identifying the set of necessary comparisons to make.
2009-07-16 12:49:27 +01:00
Keith Whitwell
e1ad38ad8e
rtasm: export sse_movmskps
2009-07-16 12:47:11 +01:00
Keith Whitwell
3858f47994
tgsi: initial texturing support on sse path
...
Most obvious problem is drawpixels comes out blocky, but this may be
an existing issue of KIL on the sse path.
2009-07-16 11:37:52 +01:00
José Fonseca
0c4350790a
python: Hack to prevent segmentation faults when python exits.
2009-07-16 11:22:56 +01:00
José Fonseca
4e1e18a772
wgl: Expose pipe_screen/pipe_context via an extension.
2009-07-16 11:22:56 +01:00
José Fonseca
3ab3209a1f
python: Obtain pipe_screen/pipe_context from the system's OpenGL driver.
2009-07-16 11:22:56 +01:00
Keith Whitwell
a01383ff6a
tgsi: make sse function callout mechanism more generic
...
Take a list of arguments rather than hardcoding TEMP_R0.
2009-07-16 10:11:46 +01:00
Keith Whitwell
ebc4a9bf2e
tgsi: reduce x86 reg usage in tgsi_sse generated programs
...
Pass the tgsi_exec_machine struct in directly and just hold a single
pointer to this struct, rather than keeping one for each of its
internal members.
2009-07-16 09:53:08 +01:00
Keith Whitwell
4e3002b50f
tgsi: no need to separately malloc input and output arrays
...
Can now guarantee alignment in the initial allocation of the tgsi exec machine.
2009-07-16 09:53:08 +01:00
Keith Whitwell
c202fe187c
gallium: reduce recursive include of tgsi_exec.h
...
A lot of draw code no longer needs to see this header.
2009-07-16 09:53:07 +01:00
Keith Whitwell
7fb702705a
tgsi: make function call code in tgsi_sse.c less opaque
...
Explictly pass src and dst arguments (previously dst argument was also
being used as a src). Separate argument handling from the rest of
the function call emit.
2009-07-16 09:53:07 +01:00
Keith Whitwell
6175653d0b
gallium: proper constructor and destructor for tgsi_exec_machine
...
Centralize the creation, initialization and destruction of this struct.
Use align_malloc instead of home-brew alternatives.
2009-07-16 09:53:07 +01:00
Alex Deucher
11606e873d
Fix more merge fallout
2009-07-16 02:59:36 -04:00
Kevin DeKorte
92a2f0164a
R6xx/r7xx: warning fixes
2009-07-15 17:13:09 -04:00
Richard Li
01b793ec7d
R6xx/r7xx: fix missing vertex stream
...
Somehow context->radeon.tcl.aos[j].bo is not null sometimes,
but it is safe for now because it is only a pointer to
dma.current so overwriting it would not hurt anything.
2009-07-15 17:00:42 -04:00
Alex Deucher
1e8a6068ee
radeon bo: Fix merge fall out
2009-07-15 15:59:04 -04:00
Alex Deucher
582838a666
R6xx/r7xx: more Makefile fixes
2009-07-15 15:40:35 -04:00
Alex Deucher
2ab328e5e4
Fix r600 makefile for lastest CS changes
2009-07-15 15:23:11 -04:00
Alex Deucher
c5c19919ce
Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa into r6xx-rewrite
...
This builds, but I get an assertion in radeonGetLock() due to
the drawable being null.
2009-07-15 14:17:07 -04:00
Luca Barbieri
6b7b13b5eb
softpipe: limit blend results to [0,1]
2009-07-15 11:34:36 -06:00
Brian Paul
d970313b66
Fix state flag dependencies for fixed function fragment program updates.
...
I started looking into why _NEW_ARRAY punishes us, and while annotating
dependencies noticed that a bunch of dependencies were missing.
(cherry picked from master, commit e5f63c403b )
2009-07-15 11:12:44 -06:00
Alex Deucher
a0d4a12614
make sure ctx->Driver.Flush is valid before calling it
2009-07-15 11:31:24 -04:00
Alex Deucher
efe7ad233c
Use memcpy directly in the common code
...
This alleviates the need for an additional symbol.
2009-07-15 11:16:41 -04:00
José Fonseca
0474b5cb2a
python/retrace: Interpret surface_copy.
2009-07-15 16:02:39 +01:00
José Fonseca
c68f659be3
python/samples: Use PIPE_FORMAT_Z16_UNORM instead of PIPE_FORMAT_Z32_UNORM.
...
More common. True fix would be to use whatever the screen supports though.
2009-07-15 16:02:39 +01:00
Keith Whitwell
fdeb778990
mesa: recognize and eliminate repeated error messages
2009-07-15 13:31:51 +01:00
Keith Whitwell
59de430de7
mesa: split out errorstring switch from _mesa_error
...
Move a chunk of code out of _mesa_error()
2009-07-15 13:31:51 +01:00
Keith Whitwell
df5f7a6761
mesa: remove dead code in _mesa_error
...
Remove early and unused snprintf and where[] string.
2009-07-15 13:31:51 +01:00
Keith Whitwell
6c9d8a6f24
mesa: don't call getenv every time _mesa_error is called
...
Buggy apps can generate thousands of mesa_error calls. Don't need
to keep calling getenv to retreive the same MESA_DEBUG string each
time.
2009-07-15 13:31:50 +01:00
Dave Airlie
3a3b83e511
radeon: update span reading micro tile code
...
tested on r500 with zreaddraw with Z buffer in all 3 modes
2009-07-15 14:23:14 +10:00
Dave Airlie
bd4ed25222
r300: emit z depth pitch reloc in preparation for tiling
2009-07-15 14:23:14 +10:00
Dave Airlie
94d2a809f9
radeon: r300 fix span reading for macro tiled buffers.
...
this uses the correct formula for macro tiled buffers for readback
2009-07-15 14:23:13 +10:00
Dave Airlie
9b17f041d1
radeon: for tiling you really need to use GET/PUT VALUE not PTR.
...
since the surfaces aren't linear you can't just use GET_PTR
2009-07-15 14:23:13 +10:00
Xiang, Haihao
868aa16074
i965: the offset of any branch/jump instruction is in unit of 64bits on IGDNG
2009-07-15 10:48:13 +08:00
Alex Deucher
10b3e64bca
R6xx/r7xx: implement memcpy buffer swaps
...
This allows double buffered apps to run, but perfomance
will be awful until we implement something faster.
You must update to the latest kernel modules.
2009-07-14 21:19:32 -04:00
Dave Airlie
f6f0e117a4
intel/radeon: add common metaops code.
...
Move all the metaops to a dri_metaops file and port radeon/intel
to use the new common meta ops code.
2009-07-15 10:30:23 +10:00
Alex Deucher
9385e4e1ff
r6xx/r7xx: fix buffer aging bug
...
We were using sparse indexing for aos, while the common
code expected packed indexing.
2009-07-14 20:08:27 -04:00
Alex Deucher
9ae78dc0bc
R6xx/R7xx: no irqs yet.
2009-07-14 20:06:29 -04:00
Dave Airlie
681ede8836
radeon: fix unsigned vs signed comparison in stencil code.
...
This function takes a GLint not a GLuint, passing in -1
breaks internally.
2009-07-15 08:19:34 +10:00
Eric Anholt
99d07d0f91
intel: Fix ClearDepth to not be affected by DepthRange.
...
Fixes new piglit depthrange-clear.c test.
2009-07-14 15:14:52 -07:00
Eric Anholt
b677c40abb
intel: Set DepthRange in the metaops using RasterPos[2].
...
RasterPos[2] is already sent through the window transform, which includes
DepthRange handling. So make DepthRange for the metaops a noop.
Fixes a failure in oglconform depthrange.c
2009-07-14 15:14:52 -07:00
Eric Anholt
e5f63c403b
Fix state flag dependencies for fixed function fragment program updates.
...
I started looking into why _NEW_ARRAY punishes us, and while annotating
dependencies noticed that a bunch of dependencies were missing.
2009-07-14 15:14:52 -07:00
Eric Anholt
374110bc98
intel: Flag _NEW_ARRAY state when doing array object binding in clears.
...
This is just following bind_vertex_array()'s behavior.
2009-07-14 15:14:51 -07:00
Alex Deucher
a1ecbb2356
Disable shader dumps
2009-07-14 18:01:29 -04:00
Brian Paul
9aca6769df
mesa: fix texture border color code for glPopAttrib()
...
The texture object's border color used to be stored as GLchan but it's
been GLfloat for a while now.
2009-07-14 14:28:01 -06:00
Jakob Bornecrantz
26e58a42b0
progs/tests: Use compressed texture in mipmap_comp_tests
2009-07-14 17:11:07 +01:00
Jakob Bornecrantz
b0a17581e2
progs/tests: Tests more views in mipmap_comp_tests
2009-07-14 17:11:05 +01:00
Jakob Bornecrantz
a36b9987cd
progs/tests: Add yet another mipmap test
2009-07-14 17:11:01 +01:00
Brian Paul
6ec955efaf
mesa: regenerated enums.c file
2009-07-14 07:58:43 -06:00
Brian Paul
e786ecbfb5
mesa: regenerated enums.c file
2009-07-14 07:47:19 -06:00
José Fonseca
7325c1ebc8
scons: Monkey patch os.spawnve on Windows to become thread safe.
...
See also:
- http://bugs.python.org/issue6476
- http://scons.tigris.org/issues/show_bug.cgi?id=2449
2009-07-14 12:21:25 +01:00
José Fonseca
4ed1de8b84
mesa: Report the true face number when flushing.
2009-07-14 12:20:43 +01:00
Corbin Simpson
b727150b14
dri-st: Unbreak GL_EXT_blend_equation_separate.
...
Since it has a dispatch table entry (for BlendEquationSeparateEXT,)
can't omit it from this list. It'll still get disabled if the cap
(PIPE_CAP_BLEND_EQUATION_SEPARATE) isn't set.
Somebody that doesn't suck at GL (read: not me) should probably add
this into progs/samples/blendeq or similar so we can test it.
2009-07-14 01:16:25 -07:00
Patrice Mandin
54cf63278f
gallium: Define PIPE_CAP_BLEND_EQUATION_SEPARATE, remove extension from default extension list
2009-07-14 09:44:49 +02:00
Michel Dänzer
33f56b4612
radeon: Differentiate 16 bpp destination formats.
...
Fixes those formats in fbo_firecube.
Only tested with r300, radeon and r200 compile tested only.
2009-07-14 08:25:27 +02:00
Michel Dänzer
60e60bb302
radeon: Invert front face winding when rendering to FBO.
...
Fixes fgl_glxgears and progs/demos/fbotexture after pressing 'c'.
Tested with r300, radeon and r200 compile tested only.
2009-07-14 08:00:49 +02:00
Cooper Yuan
f4646f3247
R6xx/r7xx: Fix specular lighting issue
2009-07-14 10:39:07 +08:00
Nicolai Hähnle
59155f70e7
r300g: Small compile warning fixes.
...
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com >
2009-07-13 16:26:29 -07:00
Nicolai Hähnle
b3f1d370a2
r300g, radeon: Whitespace fixes.
...
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com >
2009-07-13 16:26:29 -07:00
Corbin Simpson
ca28e591f2
r300g: Use align() instead of inline maths.
2009-07-13 16:26:29 -07:00
Maciej Cencora
9226e3d6a6
Merge branch 'shaders_cleanup'
2009-07-13 20:29:11 +02:00
Eric Anholt
0dc700850a
intel: Partially fix fallback detection for glCopyTexSubImage.
...
Really, we should be checking that the MesaTexFormat for the read buffer
and the texture match, but the previous code wasn't even doing that, so
matching the cpp should be an improvement (and potentially fix some hangs!).
The previous code also rejected GL_RGB even though blitting the alpha
channel to the ignored channel of an x8r8g8b8 texture should be fine, which
tripped up compiz's blur plugin.
2009-07-13 10:57:12 -07:00
Maciej Cencora
582bd34665
r300: always assume all components are read by fragment program
...
Components of input attributes that are used by fragment program aren't part of vertex program key, and that may lead to situations when vertex program writes only TEX1.xy and fragment program reads TEX1.xyz, resulting in rendering errors.
Reported-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-13 19:28:15 +02:00
Nicolai Hähnle
f06910f6c3
r300: Fix fogcoord rewriting
...
We only care about the actual fogcoord itself now, reducing the rewriting
done for the vertex program.
The rewriting of source operand swizzles in the fragment program takes
care that fogcoord.yzw = 001.
This should fix fogcoord rewriting entirely, which had been horribly
broken in the face of dot-product instructions, and just broken (though
not horribly so) in the face of almost every other instruction (the W
component would be incorrect for most arithmetic instructions).
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-13 19:28:15 +02:00
Maciej Cencora
3f5382819e
r300: fix swizzle masking in getUsedComponents
2009-07-13 19:28:15 +02:00
Maciej Cencora
acd3360041
r300: minor fix
...
Split initializations becase the vars are of different type.
Reported-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-13 19:28:15 +02:00
Maciej Cencora
1a5520fcd3
r300: move variables declarations
2009-07-13 19:28:14 +02:00
Maciej Cencora
b3716eeb61
r300: document r300_vertex_program_cont structure
...
Reported-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-13 19:28:14 +02:00
Maciej Cencora
a0204ce456
r300: document r300_fragment_program_cont struct
2009-07-13 19:28:14 +02:00
Maciej Cencora
ec854729d1
r300: fix indentation
...
Reported-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-13 19:28:13 +02:00
Maciej Cencora
48cc352a71
r300: fix StrideB == 0 case when converting data format
...
Reported-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-13 19:28:13 +02:00
Maciej Cencora
4eff323731
r300: hw can handle per component negations in vertex shaders
...
Reported-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-07-13 19:28:13 +02:00
Maciej Cencora
4efb9f053c
r300: fix WPOS for SWTCL
2009-07-13 19:28:13 +02:00
Maciej Cencora
bdc8a95fc9
r300: removed unnecessary params
...
We don't have check which attributes are used by fragment program - it's already done by NQSSADCE.
2009-07-13 19:28:12 +02:00
Maciej Cencora
65d9f23c7c
r300: use NQSSADCE for vertex programs
2009-07-13 19:28:12 +02:00
Maciej Cencora
70448b9f95
r300: operate on copy of a program when pairing instructions
...
We need to keep unpaired program for vertex program NQSSADCE.
2009-07-13 19:28:12 +02:00
Maciej Cencora
12a6d73c75
r300: handle relative addressing in NQSSADCE
2009-07-13 19:28:11 +02:00
Maciej Cencora
96b2eb18c5
r300: handle ARB_vertex_program specific instructions in NQSSADCE
2009-07-13 19:28:07 +02:00
Maciej Cencora
e43cc28c1b
r300: move depth output rewrite out of NQSSADCE
2009-07-13 19:25:59 +02:00
Maciej Cencora
f79ef95df4
r300: rewrite FOGC and HPOS attribs handling
...
Rewrite vertex and fragment programs so that we don't have to do any hacks on lower level.
2009-07-13 19:25:59 +02:00
Maciej Cencora
df5fe747fa
r300: bind vertex program to fragment program
2009-07-13 19:25:58 +02:00
Maciej Cencora
d1e4caa6e2
r300: recalculate used inputs and outputs after dead code removal
2009-07-13 19:25:58 +02:00
Maciej Cencora
7360f83364
r300: move fragment program selection before vertex program selection
...
Prepare for wpos and fogc handling rewrite.
2009-07-13 19:25:58 +02:00
Maciej Cencora
37c319f62f
r300: implement proper IsProgramNative check for vertex programs
2009-07-13 19:25:57 +02:00
Maciej Cencora
bce224c1f1
r300: don't modify original vertex program
...
Keep the original vertex program untouched because it may be needed after some state change for generating new r300 specific vertex program.
2009-07-13 19:25:57 +02:00
Maciej Cencora
7829b7a1b8
r300: cache translated fragment programs
2009-07-13 19:25:56 +02:00
Maciej Cencora
28066ed012
r300: update state parameters only once per rendering operation
2009-07-13 19:25:56 +02:00
Maciej Cencora
21db37d432
r300: translate non native insts earlier for easier debugging
2009-07-13 19:25:55 +02:00
Maciej Cencora
0b411a72f3
r300: print vertex program after adding artificial output insts
2009-07-13 19:25:55 +02:00
Maciej Cencora
4a6899e080
r300: use mesa provided function for adding MVP code
2009-07-13 19:25:54 +02:00
Maciej Cencora
9b781ca2ce
r300: simplify insert_wpos a little
2009-07-13 19:25:54 +02:00
Brian Paul
9615daa932
Merge branch 'mesa_7_5_branch'
2009-07-13 08:47:37 -06:00
Dave Airlie
bb4c703587
radeon: port more front fixes from intel.
...
Port fixes to read buffer from front.
2009-07-14 01:23:24 +10:00
Dave Airlie
504d01b275
radeon/r200: fix color masking under dri2
...
Need to retrieve the bits from the rrb not from screen struct
2009-07-14 01:23:24 +10:00
Dave Airlie
a79aefb177
radeon: Use Stencil.Enabled instead of Stencil._Enabled in DrawBuffers.
...
The _Enabled field isn't updated at the point that DrawBuffers is called,
and the Driver.Enable() function does the testing for stencil buffer
presence anyway.
2009-07-14 01:23:23 +10:00
Dave Airlie
d9913d7c09
radeon/fbo: stencil bits fix from Michel in intel fbo code
2009-07-14 01:23:23 +10:00
Peteri Andras
680f7d09b0
r128: fix two-sided lighting segfault seen in GLUT's olight demo
2009-07-13 08:04:08 -06:00
Ian Romanick
022e8e582e
intel: Bump driver data, add RC3 tag
2009-07-12 21:07:38 -07:00
Xiang, Haihao
2995bf0d68
i965: add support for new chipsets
...
1. new PCI ids
2. fix some 3D commands on new chipset
3. fix send instruction on new chipset
4. new VUE vertex header
5. ff_sync message (added by Zou Nan Hai <nanhai.zou@intel.com >)
6. the offset in JMPI is in unit of 64bits on new chipset
7. new cube map layout
2009-07-13 11:01:13 +08:00
Dave Airlie
f030e2ba17
r300: move fallback warnings inside fallback debugging
...
random output is bad
2009-07-12 21:37:47 +10:00
Dave Airlie
dfecf217fa
r300: fix clear mask to not use sw if not necessary
2009-07-12 21:37:46 +10:00
Nicolai Hähnle
b484c71036
radeon: Fix crash when rendering to incomplete texture and other formats
...
It is possible to bind texture images of an incomplete mipmapped texture.
Software fallbacks in this case incorrectly tried to mmap the entire texture.
Additionally, add span functions for 1555 and 4444 formats.
This fixes crashes in piglit's fbo-readpixels test; unfortunately, the test
itself still fails - this needs to be investigated.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-07-12 12:50:36 +02:00
Dave Airlie
a10244453c
radeon: update clear code from Intel codebase.
...
This updates some of the clear code from Intel gives a 5x clearspd perf
for me here. played openarena also, not sure if the viewport changes
broke anything,
2009-07-12 17:28:14 +10:00
Dave Airlie
b06cb372bf
radeon: fbo fix firecube crashes
...
it might still be misrendering not sure
2009-07-12 12:13:40 +10:00
Michel Dänzer
65059606e9
radeon: Fix scissor rectangle calculation when rendering to FBO.
...
fgl_glxgears -fbo runs, though the gears don't look right yet.
2009-07-11 20:25:09 +02:00
Zack Rusin
1c1307e7c5
gallium: compare the actual register, not all the inputs
...
otherwise we decrement indexes for all registers
2009-07-11 13:48:41 -04:00
Brian Paul
cff2126f52
tgsi: update some assertions
2009-07-10 16:26:09 -06:00
Brian Paul
a79586ce18
tgsi: tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACE
...
Same story as in the tgsi_dump.c code (see prev commit).
2009-07-10 15:44:48 -06:00
Brian Paul
f01af4dbd2
tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACE
...
Fixes TGSI dump output when front/back-face register is declared.
Also, add some assertions to make sure the semantic/interpolate string
arrays have as many elements as there are tokens in the p_shader_tokens.h
file. That should catch problems like this in the future.
2009-07-10 15:41:26 -06:00
Brian Paul
762c1d11ff
st/mesa: implement indirect addressing for destination registers
2009-07-10 13:09:09 -06:00
Brian Paul
baa7ff47d5
tgis: implement indirect addressing for destination registers
...
Includes the TGSI interpreter, but not the SSE/PPC/etc code generators.
2009-07-10 13:09:09 -06:00
Brian Paul
ca1b71b78d
vbo: fix vbo/dlist memory leak
...
Based on a patch by kristof.ralovich@gmail.com
2009-07-10 13:09:09 -06:00
Brian Paul
6ff1a5385e
demos: set 4th component of texcoord to 1.0
...
Avoid potential randomness in resulting texcoords.
2009-07-10 13:09:09 -06:00
Dave Airlie
db618427ab
radeon: enable GL_NV_texture_rectangle under dri2.
2009-07-11 03:17:13 +10:00
Dave Airlie
85957cb512
radeon: set texture in state properly.
...
make sure to turn off when no texture is used in hw
2009-07-11 03:17:12 +10:00
Dave Airlie
a6a11e1dc0
radeon: make swtcl emit size bigger
2009-07-11 03:17:12 +10:00
Alex Deucher
37c0cde80a
R6xx/r7xx: use packet 3 for scratch emit
...
no need to allow packet 0 scratch regs in the drm
2009-07-10 12:04:56 -04:00
Michel Dänzer
cade071d52
Remove stale reference to non-Gallium nouveau driver from configure.ac.
2009-07-10 14:49:46 +02:00
Ian Romanick
fcd3572edf
mesa: From float type modifier from values to large for singles
...
The values 2147483648.0 and 4294967294.0 are too larget to be stored in single
precision floats. Forcing these to be singles causes bits to be lost, which
results in errors in some pixel transfer tests.
This fixes bug #22344 .
(cherry picked from commit 70e72070fc )
2009-07-09 16:07:05 -07:00
Alex Deucher
0de26dba2e
R6xx/r7xx: disable CS dump
...
Don't fprintf to a xterm with the lock held.
2009-07-09 17:15:23 -04:00
Brian Paul
8987410ab6
Merge branch 'mesa_7_5_branch'
2009-07-09 08:05:56 -06:00
Brian Paul
78af70be37
docs: document gl_TextureMatrix[i][j] array indexing bug fix
2009-07-09 08:04:07 -06:00
Brian Paul
c86b076668
glsl: do const parameter optimization for array element actual parameters
...
When a function parameter is const-qualified we can avoid making a copy
of the actual parameter (we basically do a search/replace when inlining).
This is now done for array element params too, resulting in better code
(fewer MOV instructions).
We should allow some other types of function arguments here but let's be
conservative for the moment.
2009-07-09 07:58:50 -06:00
Brian Paul
abdb0fdcc0
glsl: fix incorrect indexing for gl_TextureMatrix[i][j]
...
The two indexes were mixed up when accessing a row of a matrix in an array
of matrices.
2009-07-09 07:57:29 -06:00
Brian Paul
36e906aad6
docs: document glMaterial/glShadeModel display list optimization
2009-07-08 14:14:03 -06:00
Richard Li
93ab69a0ef
Fix buffer age implementaion bug.
2009-07-08 14:49:48 -04:00
Brian Paul
4adc9b4a5b
mesa: only use fallback texture when using shaders, not fixed-function (take two)
...
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture. The fallback texture returning
(0,0,0,1) should only be used with shaders. For fixed function, the texture
unit is truly disabled/ignored.
Fixes glean fbo test regression.
(cherry picked from commit 01e16befd4 )
(cherry picked from commit 51325f44d1 )
[anholt: squashed these two together from master, skipping the mess in between]
2009-07-07 16:02:45 -07:00
Zack Rusin
7b861b9b9e
gallium: fixup register indexes for fog/frontface/point coord
2009-07-07 12:48:50 -07:00
Alex Deucher
f9db04878b
R6xx/r7xx: remove some left over debugging
2009-07-07 15:44:44 -04:00
Alex Deucher
0396795689
R6xx/R7xx: fix texture reloc emit
...
Textures don't look right yet, but tex demos run.
2009-07-07 15:40:28 -04:00
Michel Dänzer
71633abafc
gallium: Fixes for clobbering stencil values in combined depth/stencil textures.
...
Also fix one case where a 32 bit depth value was incorrectly converted to a
combined depth/stencil value.
2009-07-07 14:49:52 +02:00
Michel Dänzer
25b492b976
GLX/DRI1: Mark GLX visuals with depth != screen depth non-conformant.
...
Such visuals are subject to automatic compositing in the X server, so DRI1
can't render to them properly.
2009-07-07 13:59:59 +02:00
Michel Dänzer
96601ec8e0
gallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.
...
Fixes potential crash when SwapBuffers is called but there's no back buffer.
2009-07-07 12:17:04 +02:00
Alex Deucher
f74d1c26ac
r6xx/r7xx: add sw blit for tex upload
...
Can be used for buffer swap as well.
2009-07-07 02:12:38 -04:00
Alex Deucher
6799bc0b6b
tex wip
2009-07-07 01:02:08 -04:00
Zack Rusin
a4d952358d
gallium: more fog extraction fixes
...
fix the cases when fog coord/front face/point coord are used in the same
shader.
2009-07-06 21:35:15 -04:00
Ian Romanick
7fb4becf98
demos: Fix vsync checking in glxgears
...
Of course glXGetVideoSyncSGI doesn't return the swap interval. The feature
only exists in the Mesa extension... which is the whole reason I created the
Mesa extension! Note that the Mesa extension allows drivers to default to a
swap interval of 0. If the Mesa extension exists, use its value. Only
consider the SGI extension when the Mesa extension is not available.
Fixes bug #22604 .
2009-07-06 11:42:12 -07:00
José Fonseca
1068c15c61
wgl: Make the stw_framebuffer destructions threadsafe.
...
Ensure no other thread is accessing a framebuffer when it is being destroyed by
acquiring both the global and per-framebuffer mutexes. Normal access only
needs the global lock to walk the linked list and acquire the per-framebuffer
mutex.
2009-07-06 18:23:37 +01:00
José Fonseca
6f4167c8a2
wgl: Check for multiple threads before GET_CURRENT_CONTEXT.
...
Fixes wglthreads -- the 2nd thread MakeCurrent call was trying to flush
the first thread context while still in use.
2009-07-06 17:40:08 +01:00
José Fonseca
5470a67335
wgl: Listen to WM_WINDOWPOSCHANGED instead of WM_SIZE messages.
...
According to
http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx
WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it
can be masked out by the application.
Also there were some weird bogus WM_SIZE 0x0 messages when starting
sharedtex_mt which we don't get like this.
2009-07-06 17:08:37 +01:00
Alex Deucher
1bad691a17
R6xx/r7xx: first pass at texture support
...
texture bo setup isn't quite working yet
2009-07-06 10:25:48 -04:00
Cooper Yuan
c6b0b46d6d
R6xx/r7xx: DEPTH_CONTROL will be reset by this function
2009-07-06 16:30:43 +08:00
Jakob Bornecrantz
7ccb00b1ac
Merge branch 'mesa_7_5_branch'
2009-07-05 04:14:41 +02:00
Brian Paul
f742f2c0b3
demos: indentation fix
2009-07-08 13:59:03 -06:00
Brian Paul
820436f978
demos: use glEnable/DisableClientState() for vertex arrays
2009-07-08 13:58:30 -06:00
RALOVICH, Kristóf
bf71ece171
glx: death to RCS tag
2009-07-08 13:34:57 -06:00
Corbin Simpson
67a43b2cfc
r300g: Remove VAP_CNTL_STATUS from invariant state.
...
Seriously.
2009-07-08 11:59:56 -07:00
Corbin Simpson
c737e57357
r300g: Disable MSPOS registers for glisse's CS security checker.
...
These will come back in someday, when we can properly use them.
2009-07-08 11:55:27 -07:00
Corbin Simpson
746140e215
r300-gallium: Unify sampler and texture emit.
...
They have to cross into each other's registers.
2009-07-08 11:39:34 -07:00
Corbin Simpson
1aa38b2c2d
r300-gallium: Mipmap setup.
...
(cherry picked from commit 88c01a15da5639dd68a6a0133724994cb66f1316)
2009-07-08 11:30:59 -07:00
Corbin Simpson
e46d12d394
r300g: Add endian fix to vertex fetcher setup.
...
As reported and initially tested by MrCooper.
2009-07-08 11:27:26 -07:00
Corbin Simpson
ce0f7954f8
gallium: Add endian detection to p_config.
2009-07-08 11:26:52 -07:00
Maciej Cencora
186d187ff7
r300: fix regression introduced by ca13937ef9
...
Stride == 0 means that we value for first vertex should be copied to every other vertices (e.g. constant color).
This fixes glean/vertProg1 and sauerbraten with enabled shaders.
2009-07-08 18:42:39 +02:00
Maciej Cencora
95df7bfc03
radeon: fix copy and paste typo
2009-07-08 18:42:39 +02:00
Maciej Cencora
afd687b0dc
mesa/vbo: always recalculate min_index and max_index when splitting vertices
2009-07-08 18:42:39 +02:00
Jakob Bornecrantz
eb33c0ab8b
progs/tests: Use compressed texture in mipmap_comp_tests
2009-07-04 16:01:45 +02:00
Eric Anholt
be64e66e5a
intel: Fix flipped Y for glDrawPixels(GL_STENCIL_INDEX) to window system.
...
Even after fixing bugs in this code, it doesn't make me feel any cleaner.
Fixes piglit stencil-drawpixels.
2009-07-07 15:43:44 -07:00
Eric Anholt
bdd7506f10
intel: Fall back on glCopyPixels(GL_DEPTH) or GL_STENCIL.
2009-07-07 15:36:10 -07:00
Eric Anholt
510c3bd7a1
i965: Remove BRW_NEW_INPUT_VARYING
...
This state flag has been unused since the ffvertex_prog move to core.
2009-07-07 15:16:29 -07:00
Eric Anholt
058e96916b
Cap array elements at 0 when passed an invalid pointer for an array object.
...
Otherwise, a pointer greater than the size would underflow and give a large
maximum element.
Reviewed-by: Brian Paul <brianp@vmware.com > (previous version)
2009-07-07 15:16:28 -07:00
Roland Scheidegger
fc6e02ce62
i965: fix fetching constants from constant buffer in glsl path
...
the driver used to overwrite grf0 then use implicit move by send instruction
to move contents of grf0 to mrf1. However, we must not overwrite grf0 since
it's still used later for fb write.
Instead, do the move directly do mrf1 (we could use implicit move from another
grf reg to mrf1 but since we need a mov to encode the data anyway it doesn't
seem to make sense).
I think the dp_READ/WRITE_16 functions may suffer from the same issue.
While here also remove unnecessary msg_reg_nr parameter from the dataport
functions since always message register 1 is used.
2009-07-04 15:35:07 +02:00
Eric Anholt
c30f23c123
i965: Remove bad constant buffer constant-reg-already-loaded optimization.
...
Thanks to branching, the state of c->current_const[i].index at the point
of emitting constant loads for this instruction may not match the actual
constant currently loaded in the reg at runtime. Fixes a regression in my
GLSL program for idr's class since b58b3a786a .
2009-07-04 15:32:56 +02:00
Jakob Bornecrantz
28471cfa97
Merge branch 'mesa_7_5_branch'
2009-07-04 07:43:01 +02:00
Jakob Bornecrantz
9982821cda
progs/tests: Tests more views in mipmap_comp_tests
2009-07-04 07:41:40 +02:00
Zack Rusin
edb0267170
Merge commit 'origin/openvg-1.0'
2009-07-06 21:43:26 -04:00
Zack Rusin
124a6b1958
gallium: rearrange some members to avoid memory holes/padding
...
plus it saves us a cacheline in the cso
2009-07-06 17:21:37 -04:00
Zack Rusin
5920b6b679
pipebuffer: handle possible null pointer dereference
...
reported by clang static analyzer
2009-07-06 17:21:37 -04:00
Zack Rusin
f311893bf4
cso: possible null pointer dereference
...
reported by clang static analyzer
2009-07-06 17:21:37 -04:00
Zack Rusin
4873031e29
util: fix possible null pointer usage
...
found by the clang static analyzer
2009-07-06 17:21:37 -04:00
Zack Rusin
21cce6afb0
exa: some infrastucture work for accelerating composite
2009-07-06 17:21:36 -04:00
Dave Airlie
d66de6c341
radeon: ensure cmdbuf space for state + AOS is available
...
The problem is if we find out later we don't have any cmdbuf space but
we've already written the arrays to the DMA buffer object, we end up
emitting the current cmdbuf which has references to the current DMA object
we then send that to the hw and we can't reference the arrays we just emitted
to the old DMA buffer. things go bad, crash boom.
This can probably be tuned further + swtcl probably needs some fixes
2009-07-06 20:39:49 +10:00
Dave Airlie
7266e33abd
r200: fix makefile
2009-07-06 17:46:36 +10:00
Dave Airlie
f110c5fd6e
radeon: fixup FBO depth 24 allocations to avoid assert
2009-07-06 15:50:24 +10:00
Dave Airlie
c27f21f92d
radeon/r200/r300: port to new space checking code in libdrm
...
This moves a big chunk of the space checking code into libdrm so
it can be shared by the DDX.
2009-07-06 15:12:17 +10:00
Corbin Simpson
645bfa32c9
radeon-gallium: Compile warning fix.
...
Fixes flush during validation, in case a buffer is double-validated.
2009-07-05 11:56:40 -07:00
Corbin Simpson
c8e0d55ac6
radeon-gallium: Use FLINK to do proper global buffers.
2009-07-05 11:55:47 -07:00
Corbin Simpson
df04e72d25
radeon-gallium: Wait for BOs before mapping them.
2009-07-05 11:29:13 -07:00
Maciej Cencora
6fff62ee3f
r300: fix vertex limits
...
- don't limit vertex count if we are using indices
- max indices count is 65535 not 65536
- remove some comments that don't apply anymore
- remove unreachable code
2009-07-05 15:22:37 +02:00
Jakob Bornecrantz
862488075c
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/main/dlist.c
src/mesa/vbo/vbo_save_api.c
2009-07-03 18:53:58 +02:00
Michel Dänzer
94e1117c9b
intel: Also update stencil bits in intel_update_wrapper().
...
Fixes assertion failure when binding depth/stencil texture to FBO stencil
attachment.
2009-07-03 17:54:34 +02:00
Keith Whitwell
f580494bef
progs: revert damage to progs/SConscript from recent compressed texture commit
2009-07-03 16:40:03 +01:00
Keith Whitwell
b928d18398
mesa/shaders: fix gl_NormalMatrix state parameters
...
gl_NormalMatrix is the inverse transpose of the modelview matrix, but
as every matrix here needs to be transposed, we end up with
{MODELVIEW_MATRIX, INVERSE}.
2009-07-03 14:31:07 +01:00
Keith Whitwell
aa98575ebb
st/wgl: don't advertise WGL_EXT_swap_interval string
...
This is a tweak to a previous fix -- it's not necessary to actually
advertise this extension to prevent these games from crashing -- they
ignore the extension string anyway. It's sufficient to just have
GetProcAddress return some dummy function addresses for SwapInterval.
Given we don't really implement this funcitonality, this is a better
fix.
2009-07-03 14:31:06 +01:00
José Fonseca
cffe7c8bd0
wgl: Lookup framebuffers by HWND whenever possible.
...
Some applications create several HDCs for the same window, so spite the WGL
API is geared towards HDCs it is not reliable searching by HDC.
2009-07-03 14:21:55 +01:00
Michel Dänzer
060c7f2321
radeon: Wait for BO idle if necessary before mapping it.
...
Fixes fighting between GPU and software rendering with TTM.
2009-07-03 12:44:19 +02:00
Michel Dänzer
6b2461fec9
r300: Guard debugging output.
2009-07-03 12:44:02 +02:00
Eric Anholt
8ae02a3919
intel: Fall back on glBitmap with fog enabled.
...
We would have to build the program with the appropriate fog mode, and
also supply the fog coordinate if appropriate.
Bug #19413 .
2009-07-02 19:31:51 -07:00
Eric Anholt
ae1bfb6427
intel: Flush when mapping buffer objects so writes don't get reordered.
...
While GEM covers this for execution it knows about, it doesn't know about
the batchbuffer we're preparing. Fixes piglit vbo-map-remap.c testcase.
2009-07-02 18:53:56 -07:00
Corbin Simpson
9a0b570ab6
vbo: If MapBufferRange fails, try MapBuffer instead.
...
Fixes segfaults with radeon winsys.
(Probably libdrm_radeon doing something that it shouldn't.)
2009-07-02 16:32:59 -07:00
Corbin Simpson
aa5b9c050f
Nuke old trace-drm integration.
...
AFAICT nobody will miss it.
2009-07-02 16:32:59 -07:00
Eric Anholt
6d66f23c50
intel: Fix leak of DRI option info due to using the wrong free routine.
2009-07-02 14:07:10 -07:00
Eric Anholt
ddef7dc87b
intel: Clean up leak of driver context structure on context destroy.
2009-07-02 14:07:10 -07:00
Eric Anholt
cb4ef34214
intel: Init num_fences to clean up valgrind warning.
...
Valgrind doesn't know that a successful getparam sets the target of the
pointer, so just set the value beforehand.
2009-07-02 14:07:09 -07:00
José Fonseca
2a2236606f
mesa: Assume depth textures have a single level unless told otherwise.
2009-07-02 17:24:50 +01:00
Richard Li
bb429803e0
r6xx/r7xx: Better fix for fragment temps
...
This doesn't waste as many in generic cases.
2009-07-02 12:08:57 -04:00
Keith Whitwell
588c862571
mesa: s/TRUE/GL_TRUE
...
Fix compile breakage on Linux.
2009-07-02 14:44:06 +01:00
Jakob Bornecrantz
d1c8a0a308
r300g: Readd trace driver support
2009-07-02 15:07:53 +02:00
Jakob Bornecrantz
59abfa8e42
i915g: Readd trace driver support
2009-07-02 15:05:17 +02:00
Jakob Bornecrantz
c0d7502a2c
trace: Add drm api integration
...
This is okay since drm_api.h doesn't have any external
dependancies, one could make it only compile on platforms
that support drm.
2009-07-02 14:57:55 +02:00
Keith Whitwell
798cd2a98d
glapi: ensure _mesa_lookup_prim_by_nr() is not clobbered on regeneration
...
Propogate changes to enums.c back up to the python source.
2009-07-02 13:33:20 +01:00
Keith Whitwell
1668a679c4
Merge commit 'origin/dlist-statechange-shortcircuit' into mesa_7_5_branch
...
Conflicts:
progs/trivial/Makefile
Pull in a minimal version of statechange shortcircuiting in display
list compilation. This affects only glMaterial and glShadeModel state,
and includes quite a few tests to exercise various tricky cases.
If this goes well, will consider extending to all state in the future.
2009-07-02 13:29:46 +01:00
Dave Airlie
54ee188a00
radeon/r200/r300: drop radeon renderbuffer private width/height
...
half stealing the code without taking the intel regions
2009-07-02 20:57:45 +10:00
Dave Airlie
2ed3eddf9a
radeon/r300: use base width/height.
...
I suspect this might break TFP in some way but it makes firecube run here
2009-07-02 20:45:19 +10:00
Keith Whitwell
b3e8e1cd4c
mesa: ensure UsesFogFragCoord value is set for non-glsl shaders
...
With recent changes to support frontfacing in glsl, it is necessary
to ensure that the UsesFogFragCoord value is accurate in all shaders.
We were previously not setting it for fixed-function and ARB_fs shaders.
2009-07-02 11:28:56 +01:00
Cooper Yuan
c571395e5d
R6xx/r7xx: Fix line width issue, ROUND_MODE and QUANT_MODE aren't bits of LINE_CNTL
2009-07-02 16:52:11 +08:00
Cooper Yuan
da88333671
R6xx/r7xx: Correct the indeices of DRAW_INDEX_IMMD
2009-07-02 16:49:19 +08:00
Xiang, Haihao
73137997e2
i965: fixes for JMPI
...
1. the data type of <src1> (JMPI offset) must be D
2. execution size must be 1
3. NoMask
4. instruction compression isn't allowed.
2009-07-02 16:32:19 +08:00
Corbin Simpson
96ef7aae1d
r300g: Fix recursive Draw flush.
...
Also just noticed that demos/copypix walks around the overlapping blit rules.
Bad, bad Mesa. :3
2009-07-01 23:25:47 -07:00
Corbin Simpson
8799a9d24d
r300g: Use floats for surface_copy texcoords, use correct src and dest.
...
This makes demos/copypix better-looking. Horizontal dimensions are right now.
2009-07-01 23:09:18 -07:00
Corbin Simpson
338db0af61
radeon-gallium: Adapt to drm_api changes.
...
Note that trace debugging is temporarily gone. I'll rework it later.
2009-07-01 22:33:17 -07:00
Alex Deucher
8bda0f1f4f
r6xx/r7xx: rework aos setup
...
In theory this should fix the stride = 0 case,
but I can't seem to reproduce that anymore
with mesa master.
2009-07-01 14:41:57 -04:00
Alex Deucher
65cdf9c561
R6xx/R7xx: Fix number of temps used in fragment program
...
Spotted by Cooper. This gets hello, aargb, smooth, etc.
working.
2009-07-01 11:10:10 -04:00
Eric Anholt
5e6b593d35
intel: Avoid pointer arithmetic on void *.
...
Bug #22000 .
2009-06-30 22:57:56 -07:00
Eric Anholt
c3499f6c66
i965: Increase G4X default VS URB allocation to actually allow 32 threads.
...
This improves the performance of my GLSL demo by 30%. It also fixes the
VS deadlock that ut2004 had, for reasons I can't explain. Bug #21330 .
2009-06-30 17:55:23 -07:00
Ian Romanick
f359165a82
demos: Set the depth mask correctly to get the desired blending
2009-06-30 17:29:52 -07:00
Ben Skeggs
18a1c36c2d
nouveau: return some supported zeta formats
2009-07-01 09:26:57 +10:00
Ben Skeggs
55e5ac17c1
nouveau: deal with PIPE_CAP_TGSI_CONT_SUPPORTED
2009-07-01 09:26:57 +10:00
Ben Skeggs
55fc63cd7d
nouveau: fix build...
2009-07-01 09:26:56 +10:00
Jakob Bornecrantz
64849d1236
drm/st: Remove drm_api struct from drivers
...
Remove the drm_api from the functions in the softpipe and
i915simple drivers. Create wrapper functions in the
backends instead.
2009-07-01 01:20:04 +02:00
Brian Paul
119eb40942
i965: first attempt at handling URB overflow when there's too many vs outputs
...
If we can't fit all the VS outputs into the MRF, we need to overflow into
temporary GRF registers, then use some MOVs and a second brw_urb_WRITE()
instruction to place the overflow vertex results into the URB.
This is hit when a vertex/fragment shader pair has a large number of varying
variables (12 or more).
There's still something broken here, but it seems close...
2009-06-30 17:12:44 -06:00
Brian Paul
1b6ae2e004
i965: use BRW_MAX_MRF
2009-06-30 17:12:44 -06:00
Brian Paul
76a5a5dace
i965: use BRW_MAX_GRF, BRW_MAX_MRF
2009-06-30 17:12:44 -06:00
Brian Paul
0fe19bc91d
i965: move BRW_MAX_GRF, define BRW_MAX_MRF
2009-06-30 17:12:44 -06:00
Brian Paul
0b7b8c8ddf
i965: defined BRW_MAX_MRF
2009-06-30 17:12:44 -06:00
Brian Paul
6eb2ca500d
i965: comments and a new assertion
2009-06-30 17:12:44 -06:00
Alex Deucher
d10006e67f
R6xx/r7xx: fix locking for clear
...
this allows redbook hello to render correctly mostly.
2009-06-30 18:40:48 -04:00
Keith Whitwell
1fa4cde757
mesa/vbo: fix compile and replay of nodes ending in a FALLBACK
...
Where vbo save nodes are terminated with a call to DO_FALLBACK(), as in
the case of a recursive CallList which is itself within a Begin/End pair,
there two problems:
1) The display list node's primitive information was incorrect, stating
the cut-off prim had zero vertices
2) On replay, we would get confused by a primitive that started in a
node, but was terminated by individual opcodes.
This change fixes the first problem by correctly terminating the last
primitive on fallback, and the second by forcing the display list to
use the Loopback path, converting all nodes into immediate-mode rendering.
The loopback fix is a performance hit, but avoiding this would require
a fairly large rework of this code.
2009-06-30 19:52:44 +01:00
Eric Anholt
57a06d3a48
i915: Fix assertion failure on remapping a non-BO-backed VBO.
...
Failure to set the obj->Pointer back to null tripped up the assertion.
Bug #22428 .
2009-06-30 10:41:18 -07:00
Keith Whitwell
70ae7ba818
mesa/dlist: fixes and improvements for material caching
...
Only short-circuit material call if *all* statechanges from this call
are cached. Some material calls (eg with FRONT_AND_BACK) change more
than one piece of state -- need to check all of them before returning.
Also, Material calls are legal inside begin/end pairs, so don't need
to be as careful about begin/end state as with regular statechanges
(like ShadeModel) when caching. Take advantage of this and do better
caching.
2009-06-30 18:40:20 +01:00
Keith Whitwell
c48c01c9e7
progs/trivial: add dlist-mat-tri.c
2009-06-30 18:37:34 +01:00
Keith Whitwell
1ca836f0de
progs/trivial: add test case for short-circuiting material changes
...
Similar to dlist-tri-flat-tri, but using glMaterial calls, which
have the extra property of being legal within Begin/End calls.
2009-06-30 18:17:39 +01:00
Keith Whitwell
d6c2347d79
mesa/dlist: don't cache state which may not be replayed on CallList
...
Statechanges which occur before the first End in a display list may
not be replayed when the list is called, in particular if it is called
from within a begin/end pair.
Recognize vulnerable statechanges and do not use them to fill in the
state cache.
2009-06-30 17:10:56 +01:00
Keith Whitwell
09a3a28fc8
progs/trivial: add dlist-flat-tri.c
...
State-change functions which precede the first call to glEnd() in
a compiled list are vulnerable to not being executed when that list
is called.
In particular this can happen if a list is invoked from within a
begin/end pair, as in this example.
2009-06-30 17:06:50 +01:00
Keith Whitwell
7e91d035b9
mesa/dlist: invalidate cached dlist compile state after CallList
...
When compiling a display list containing a CallList, it is necessary to
invalidate any assumption about the GL state after the recursive call
completes.
2009-06-30 17:04:11 +01:00
Keith Whitwell
2e570be852
progs/trivial: add dlist-recursive-call
...
When one display list calls another display list, it is possible
that the calling display list makes state-changes or other actions which
invalidate any attempt at caching or state-change elimination in the
calling list.
This test exercises one such case, where the called list consists of just
a single glShadeModel() call.
2009-06-30 17:02:16 +01:00
Keith Whitwell
1730eaa2a2
dlist-tri-flat-tri: make tri render differently if flatshade not enabled
...
When testing flat-shading, it helps to specify per-vertex colors so
that you can distinguish between flat & smooth shading.
2009-06-30 16:57:21 +01:00
Keith Whitwell
4147bb24d4
Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuit
...
Need this to pick up fixes for per-vertex materials.
2009-06-30 16:28:54 +01:00
Keith Whitwell
6af783bea0
progs/trivial: add test case for lighting plus per-vertex materials
...
Exercise material-within-begin/end case.
2009-06-30 16:19:23 +01:00
Keith Whitwell
a9ae89d104
progs/isosurf: add materials mode for glVertex + TRISTRIP
2009-06-30 16:14:08 +01:00
Keith Whitwell
6dfb89e4a0
mesa: remove whitespace
2009-06-30 16:14:05 +01:00
Keith Whitwell
cea259f039
mesa: remove dead constant pointsize code from ffvertex_prog.c
2009-06-30 16:13:58 +01:00
Keith Whitwell
79047cc1dd
mesa: remove dead vertex fog code from ffvertex_prog.c
2009-06-30 16:13:53 +01:00
Keith Whitwell
f6c8ca06f6
mesa: fix material inputs in ffvertex_prog.c
...
Varying material inputs were not being picked up from the same slots
where the VBO code is currently placing them (GENERIC0 and above).
Most often they were just being ignored.
2009-06-30 16:13:22 +01:00
Brian Paul
b40dc7e7fc
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/vbo/vbo_exec_draw.c
2009-06-30 08:56:53 -06:00
Brian Paul
b750b9fc3d
gallium: remove the pipe_sampler_state::shadow_ambient field
...
This was only present for the sake of GL_ARB_shadow_ambient which we
never implemented in Gallium. If we someday want GL_ARB_shadow_ambient
we can implement it in the state tracker by adding a MAD after the
relevant TEX instructions.
2009-06-30 08:51:32 -06:00
Arthur HUILLET
4c31632817
mesa: fix transform_points_3d_no_rot using undefined values in %xmm0
...
Signed-off-by: Arthur HUILLET <arthur.huillet@free.fr >
2009-06-30 08:43:23 -06:00
Kristof Ralovich
fa5b0364f9
glx: plug a leak
...
Swrast was missing a free for the culmination of driConcatConfigs.
Use free(), not _mesa_free() since we shouldn't be calling any Mesa
functions from the GLX code. driConcatConfigs() should probably use
regular malloc/free to be consistant but the Mesa functions just wrap
the libc functions anyway.
2009-06-30 08:43:22 -06:00
Brian Paul
52f895df51
glx: fix null pointer dereference segfault (bug 22546)
2009-06-30 08:43:22 -06:00
Keith Whitwell
14a2b5445a
progs/util: make sure function pointers are initialized
...
Call Init() from CompileShaderFile, was previously only called for the
Text version of this function.
2009-06-30 15:41:43 +01:00
José Fonseca
6e09c1fd08
mesa: Set FLUSH_EXPLICIT_BIT flags when calling FlushMappedBufferRange.
...
As prescribed by ARB_map_buffer_range.
2009-06-30 15:33:53 +01:00
José Fonseca
18a6f0f1a7
util: Set PIPE_BUFFER_USAGE_FLUSH_EXPLICIT when calling buffer_flush_mapped_range.
2009-06-30 15:33:53 +01:00
José Fonseca
4ffe2844a4
gallium: New PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag for buffer_flush_mapped_range.
...
When a buffer was mapped for write and no explicit flush range was provided
the existing semantics were that the whole buffer would be flushed, mostly
for backwards compatability with non map-buffer-range aware code.
However if the buffer was mapped/unmapped with nothing really written --
something that often happens with the vbo -- we were unnecessarily assuming
that the whole buffer was written.
The new PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag (based from ARB_map_buffer_range
's GL_MAP_FLUSH_EXPLICIT_BIT flag) allows to clearly distinguish the
legacy usage from the nothing written usage.
2009-06-30 15:33:53 +01:00
Jakob Bornecrantz
578230dbbf
st/gl: Add stubs for CompressedTexSubImage[1D|3D]
2009-06-30 14:11:49 +02:00
Jakob Bornecrantz
a4fd94a54a
st/gl: Add support for glCompressedTexSubImage
2009-06-30 14:11:45 +02:00
Jakob Bornecrantz
ba7f45ac0c
progs/tests: Add tests for glCompressedTexSubImage
2009-06-30 14:11:29 +02:00
José Fonseca
f2de2d5f37
util: Increase OutputDebugStringA to 4k.
...
According to http://unixwiz.net/techtips/outputdebugstring.html that's
how big the buffer is.
The 512bytes limitation is in kernel mode.
2009-07-01 19:10:50 +01:00
José Fonseca
e2a8ef4430
mesa: Unbind depth/stencil surface from pipe_framebuffer when none is attached.
2009-07-01 19:10:49 +01:00
Keith Whitwell
6c913411d3
st/wgl: dummy implementation of wgl swapinterval extension
...
Required as some applications
retrieve and call these functions regardless of the fact that we
don't advertise the extension and further more the results of
wglGetProcAddress are NULL.
2009-07-01 17:37:15 +01:00
Zack Rusin
1c04731b87
gallium: fix the front face semantics
...
mesa allocates both frontface and pointcoord registers within the fog
coordinate register, by using swizzling. to make it cleaner and easier
for drivers we want each of them in its own register. so when doing
compilation from the mesa IR to tgsi allocate new registers for both
and add new semantics to the respective declarations.
2009-07-01 10:45:55 -04:00
José Fonseca
e8c4663c11
wgl: Optimize wglGetProcAddress.
...
Do linear search only if prefix matches.
2009-07-01 10:03:59 +01:00
Eric Anholt
c72261f2a8
i915: Fix assertion failure on remapping a non-BO-backed VBO.
...
Failure to set the obj->Pointer back to null tripped up the assertion.
Bug #22428 .
(cherry picked from commit 57a06d3a48 )
2009-06-30 13:29:37 -07:00
Jon TURNEY
57955451f8
xdemos: Fix xdemos which default to using display :0.0 to default to $DISPLAY
...
Fix xdemos which default to using display :0.0 to default to $DISPLAY,
this is kind of irritating when testing on a display other than :0.0
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk >
2009-06-30 13:58:21 -06:00
Keith Whitwell
e5cb11adda
mesa/vbo: fix compile and replay of nodes ending in a FALLBACK
...
Where vbo save nodes are terminated with a call to DO_FALLBACK(), as in
the case of a recursive CallList which is itself within a Begin/End pair,
there two problems:
1) The display list node's primitive information was incorrect, stating
the cut-off prim had zero vertices
2) On replay, we would get confused by a primitive that started in a
node, but was terminated by individual opcodes.
This change fixes the first problem by correctly terminating the last
primitive on fallback, and the second by forcing the display list to
use the Loopback path, converting all nodes into immediate-mode rendering.
The loopback fix is a performance hit, but avoiding this would require
a fairly large rework of this code.
2009-06-30 19:59:38 +01:00
Keith Whitwell
53f8dccd0c
progs/trivial: test case for dlist statechange elimination
...
Creates a display list with redundant call to glShadeModel.
View dlist contents with MESA_VERBOSE=list
2009-06-30 12:20:24 +01:00
Keith Whitwell
00438bb94a
mesa/dlist: restore missing SAVE_FLUSH_VERTICES in save_ShadeModel
...
Reorganization of ShadeModel to avoid flushing vertices too often
ended up never flushing vertices due to omitted line of code.
2009-06-30 12:19:11 +01:00
Keith Whitwell
0846c88ec3
mesa/vbo: use _lookup_prim_by_nr for debugging
...
Switch over to specialized enum lookup for primitives
2009-06-30 12:16:41 +01:00
Keith Whitwell
aa688d1579
mesa: add debug printer for primitive name
...
Add a simple version of _mesa_lookup_enum_by_nr() which expects a primitive
enum (GL_POINTS..GL_POLYGON). This avoids some annoying duplicates
when looking up primitives, such as the GL_FALSE/GL_POINTS clash.
2009-06-30 12:13:59 +01:00
Brian Paul
8d24160a40
progs/glsl: link with GLEW library
...
(cherry picked from commit b1f2f92d9b )
2009-06-30 11:47:51 +01:00
Jakob Bornecrantz
f7cbaae13d
identity: Create a drm_api wrapper
2009-06-30 12:24:47 +02:00
Jakob Bornecrantz
303cbb45b5
drm/st: Return drm_api struct from a function
2009-06-30 12:20:39 +02:00
Keith Whitwell
47173cf67f
mesa/dlist: shortcircuit some redundant statechanges at compile time
...
Currently, state-changes in mesa display lists are more or less
a verbatim recording of the GL calls made during compilation.
This change introduces a minor optimization to recognize and eliminate
cases where the application emits redundant state changes, eg:
glShadeModel( GL_FLAT );
glBegin( prim )
...
glEnd()
glShadeModel( GL_FLAT );
glBegin( prim )
...
glEnd()
The big win is when we can eliminate all the statechanges between two
primitive blocks and combine them into a single VBO node.
This commit implements state-change elimination for Material and ShadeModel
only. This is enough to make a start on debugging, etc.
2009-06-30 09:55:33 +01:00
Brian Paul
efe9faf061
softpipe: use shadow_compare4() to compare texcoord to four texture samples
2009-06-29 22:46:55 -06:00
Brian Paul
005ee9f4e0
softpipe: pass sampler state to shadow_compare()
2009-06-29 22:46:49 -06:00
Younes Manton
0eb1b3fac1
nouveau: Expect right params to tex_transfer_destroy().
...
Never crashed on x86, ptx is in the same stack slot in either case.
Thanks to Bob Gleitsmann for catching this.
2009-06-29 22:22:25 -04:00
Younes Manton
78aaf2a4f1
nouveau: Turn off debug cannon.
2009-06-29 22:22:25 -04:00
Eric Anholt
1f070125e3
intel: Enable EXT_gpu_program_parameters.
...
There doesn't appear to be any driver impact for enabling this, and
tests/prog_parameter passes.
2009-06-29 15:14:50 -07:00
Brian Paul
b8c479d4b0
Merge branch 'mesa_7_5_branch'
2009-06-29 15:27:49 -06:00
Brian Paul
423f45d18a
gallium/draw: sketch out some missing pointcoord code
...
The gl_PointCoord attribute is currently expected to be in the fog coord
register's z/w components. This was never totally fleshed out though.
This is just some placeholder code.
2009-06-29 15:27:28 -06:00
Brian Paul
5c06c52116
st/mesa: enable GL_ARB_framebuffer_object
...
All gallium drivers should be able to support mixed-size color/depth/stencil
buffers. If not, we'll need a new PIPE_CAP_ query.
2009-06-29 15:27:28 -06:00
Brian Paul
f44638fa61
mesa: check for ARB_framebuffer_object for GL_TEXTURE_STENCIL_SIZE_EXT query
2009-06-29 15:27:28 -06:00
Brian Paul
cb0ea416bd
mesa: alphabetize lines
2009-06-29 15:27:28 -06:00
Brian Paul
4e43126a59
intel: added null ptr check
...
This fixes a segfault seen with piglit's fdo20701 test.
2009-06-29 15:26:28 -06:00
Eric Anholt
a96f86831e
Revert "intel: Remove unneded pthread mutex in LOCK_HARDWARE."
...
This reverts commit de447afff2 but
puts the lock under DRI1-only.
From keithw:
> It's there because the DRI1 code doesn't actually achieve the mutexing
> which it looks as if it should. For multi-threaded applications it was
> always possible to get two threads inside locked regions -- I have no
> idea how, but it certainly was and presumably still is possible.
2009-06-29 11:39:09 -07:00
Eric Anholt
94008088c1
intel: Move note_unlock() implementation to the one place it's needed.
2009-06-29 10:33:50 -07:00
Eric Anholt
de447afff2
intel: Remove unneded pthread mutex in LOCK_HARDWARE.
...
This would cause LOCK_HARDWARE to mutex all contexts in this process on
both DRI1 and DRI2. On DRI1, LOCK_HARDWARE already does it for all
processes on the system. On DRI2, LOCK_HARDWARE doesn't, but there shouldn't
be any state outside the context that needs any additional protection.
Notably, the bufmgr is protected by its own mutex and not
LOCK_HARDWARE.
This code was originally introduced with the i915tex code dump, so it's not
clear what it was there for.
2009-06-29 10:33:50 -07:00
Eric Anholt
3927874d9c
intel: Make LOCK_HARDWARE recursive to avoid hand-rolling recursiveness.
2009-06-29 10:33:50 -07:00
Brian Paul
7b5373c434
Merge branch 'mesa_7_5_branch'
2009-06-29 11:20:07 -06:00
Brian Paul
b1f2f92d9b
progs/glsl: link with GLEW library
2009-06-29 10:32:04 -06:00
Keith Whitwell
9014f475ff
progs/util: make sure function pointers are initialized
...
Call Init() from CompileShaderFile, was previously only called for the
Text version of this function.
2009-06-29 16:07:14 +01:00
Keith Whitwell
b799af91d5
progs/glsl: compile with scons and glew
...
Get most of these working with scons.
2009-06-29 14:15:08 +01:00
José Fonseca
9a5ee12434
scons: Don't raise an exception when DXSDK is not found.
...
Unfortunately scons does not check if a tool exists before it invokes
its generate function.
2009-06-29 12:56:47 +01:00
José Fonseca
bb8f3090ba
scons: Disable optimizations only for gcc-4.2
...
gcc-4.2's optimizer has a strange bug where it looses code from inner
loops in certain situations. For example, if the appearently innocent
looking code below is compiled with gcc-4.2 -S -O1, the inner loop's
code is missing from the outputed assembly.
struct Size {
unsigned width;
};
struct Command {
unsigned length;
struct Size sizes[32];
};
extern void emit_command(void *command, unsigned length);
void
create_surface( struct Size size, unsigned faces, unsigned levels)
{
struct Command cmd;
unsigned face;
unsigned level;
cmd.length = faces*levels*sizeof(cmd.sizes[0]);
for(face = 0; face < faces; ++face) {
for(level = 0; level < levels; ++level) {
cmd.sizes[face*levels + level] = size;
// This should generate a shrl statement, but the whole for body
// disappears in gcc-4.2 -O1/-O2/-O3!
size.width >>= 1;
}
}
emit(&cmd, sizeof cmd.length + cmd.length);
}
Note that this is not specific to MinGW's gcc-4.2 crosscompiler (the
version typically found in debian/ubuntu's mingw32 packages). gcc-4.2 on
Linux also displays the same error. gcc-4.3 and above gets this
correctly though.
Updated MinGW debian packages with gcc-4.3 are available from
http://people.freedesktop.org/~jrfonseca/debian/pool/main/m/
2009-06-28 11:12:22 +01:00
José Fonseca
72ad039d19
scons: Use -Bsymbolic linker option.
...
This prevents the error
relocation R_X86_64_PC32 against symbol `_gl_DispatchTSD' can not be used when making a shared object; recompile with -fPIC
when building on x86_64 architecture.
2009-06-28 10:54:23 +01:00
Brian Paul
418987ff05
docs: detect when too many varying vars are used
2009-06-26 16:54:44 -06:00
Brian Paul
21320b24c5
glsl: check number of varying variables against the limit
...
Link fails if too many varying vars.
(cherry picked from master, commit cc58fbcf2c )
2009-06-26 16:53:46 -06:00
Brian Paul
4181a107cb
docs: fix typos, remove old text from relnotes file
2009-06-26 16:47:57 -06:00
Brian Paul
2a41df86a3
docs: bring over news updates from 7.4 branch
2009-06-26 16:46:21 -06:00
Brian Paul
318122b60a
docs: bring in 7.4.3 and 7.4.4 release notes, news
2009-06-26 16:45:54 -06:00
Brian Paul
dd585db687
docs: increase max varying vars to 16
2009-06-26 16:41:54 -06:00
Brian Paul
f08bebfe24
mesa: raise MAX_VARYING (number of shader varying vars) to 16
...
16 is the limit for now because of various 32-bit bitfields.
(cherry picked from master, commit 4e762395ef )
2009-06-26 16:41:04 -06:00
Ian Romanick
2d86503471
intel / DRI2: Additional flush of fake front-buffer to real front-buffer
...
To maintain correctness, the server will copy the real front-buffer to
a newly allocated fake front-buffer in DRI2GetBuffersWithFormat.
However, if the DRI2GetBuffersWithFormat is triggered by glViewport,
this will copy stale data into the new buffer. Fix this by flushing
the current fake front-buffer to the real front-buffer in
intel_viewport.
Fixes bug #22288 .
2009-06-26 13:32:26 -07:00
Brian Paul
077a06c140
mesa: bump version to 7.5-rc4
2009-06-26 13:16:34 -06:00
Brian Paul
62ad606065
docs: document for/continue bug fix
2009-06-26 13:16:34 -06:00
Brian Paul
928e1ce47f
cell: PIPE_CAP_TGSI_CONT_SUPPORTED query
2009-06-26 13:16:34 -06:00
Brian Paul
af7fb892d8
softpipe: PIPE_CAP_TGSI_CONT_SUPPORTED query
2009-06-26 13:16:34 -06:00
Brian Paul
f5dc352e5f
gallium: added PIPE_CAP_TGSI_CONT_SUPPORTED
2009-06-26 13:16:34 -06:00
Brian Paul
e80ecdf659
glsl: move/simplify error checking for 'return' statements
2009-06-26 13:16:34 -06:00
Brian Paul
8e6dd8bf79
glsl: overhaul 'return' statement handling
...
A new node type (SLANG_OPER_RETURN_INLINED) is used to denote 'return'
statements inside inlined functions which need special handling.
All glean glsl1 tests pass for EmitContReturn=FALSE and TRUE.
2009-06-26 13:16:34 -06:00
Brian Paul
aa48becb82
glsl: predicate assignments according to __returnFlag
...
Fixes glean "function with early return (3)" case (when EmitContReturn=FALSE).
2009-06-26 13:16:34 -06:00
Brian Paul
16787c513b
glsl: added slang_variable::is_global field
2009-06-26 13:16:34 -06:00
Brian Paul
ac05996b81
glsl: silence a problem warning
2009-06-26 13:16:34 -06:00
Brian Paul
0efd25b502
glsl: code refactoring for return statements
2009-06-26 13:16:34 -06:00
Brian Paul
2ae297c318
glsl: fix assorted regressions related to early-return-removal
2009-06-26 13:16:34 -06:00
Brian Paul
ddf64be258
glsl: comments, field reordering
2009-06-26 13:16:34 -06:00
Brian Paul
f652f15e6d
glsl: rework loop nesting code
2009-06-26 13:16:34 -06:00
Brian Paul
dd453fa37c
glsl: remove test for loop unrolling when we hit conditional cont/break
...
This is no longer needed since we added the new
_slang_loop_contains_continue_or_break() function/test.
2009-06-26 13:16:34 -06:00
Brian Paul
2f1c5c58b3
glsl: checkpoint: predicate __retVal = expr with __returnFlag
...
The glean "function with early return (1)" test passes now.
2009-06-26 13:16:34 -06:00
Brian Paul
65eaafee25
glsl: use new helper functions in _slang_gen_logical_and/or()
2009-06-26 13:16:33 -06:00
Brian Paul
e139434d44
glsl: add comments
2009-06-26 13:16:33 -06:00
Brian Paul
b04605d544
glsl: checkpoint: replace 'return' with __returnFlag=true;
...
Needed for "remove early returns" transformation.
2009-06-26 13:16:33 -06:00
Brian Paul
515513b409
glsl: fix up scoping for parent/children in slang_operation_copy()
...
This will need more testing, but no regressions seen so far.
2009-06-26 13:16:33 -06:00
Brian Paul
09313043e7
glsl: fix uninitialized var in _slang_gen_for_without_continue()
2009-06-26 13:16:33 -06:00
Brian Paul
5951ab311d
glsl: added slang_operation_free_children()
2009-06-26 13:16:33 -06:00
Brian Paul
e5b53c071b
glsl: added slang_oper_num_children() helper
2009-06-26 13:16:33 -06:00
Brian Paul
3c6480ea42
glsl: check-point: declare _returnFlag
2009-06-26 13:16:33 -06:00
Brian Paul
fc0896b50b
glsl: added slang_operation_insert_child()
2009-06-26 13:16:33 -06:00
Brian Paul
f4b1a69b7d
glsl: use slang_generate_declaration() to consolidate some code
2009-06-26 13:16:33 -06:00
Brian Paul
454a717d94
glsl: remove obsolete comment
2009-06-26 13:16:33 -06:00
Brian Paul
02edc8da36
st/mesa: query PIPE_CAP_TGSI_CONT_SUPPORTED
2009-06-26 13:16:33 -06:00
Brian Paul
08025cd4a5
glsl: implement _slang_gen_while_without_continue()
2009-06-26 13:16:33 -06:00
Brian Paul
2102e301a7
glsl: fix a bug involving 'continue' in 'for' loops
...
Need to execute the for loop's increment code before we continue.
Add a slang_assemble_ctx::CurLoopOper field to keep track of the containing
loop and avoid the "cont if true" path in this situation.
Plus, assorted clean-ups.
2009-06-26 13:16:33 -06:00
Brian Paul
541594b044
glsl: added slang_oper_child_const()
2009-06-26 13:16:32 -06:00
Brian Paul
38ddbc5588
glsl: use _slang_loop_contains_continue_or_break() to check for unrolling
...
The previous test failed for nested loops.
2009-06-26 13:16:32 -06:00
Brian Paul
4dafac2b2f
glsl: use new _slang_loop_contains_continue() helper function
2009-06-26 13:16:32 -06:00
Brian Paul
aba93643be
glsl: implement continue->break translation for do-while loops
2009-06-26 13:16:32 -06:00
Brian Paul
7e0eaca201
glsl: added slang_operation_literal_int/bool() helper functions
2009-06-26 13:16:32 -06:00
Brian Paul
c1f74a6734
glsl: don't allocate 0-length children array in slang_operation_copy()
2009-06-26 13:16:32 -06:00
Brian Paul
f38872473c
glsl: remove debug code, misc clean-up
2009-06-26 13:16:32 -06:00
Brian Paul
f66733bbee
glsl: implement continue->break transformation for for-loops
2009-06-26 13:16:32 -06:00
Brian Paul
c4fd947bee
glsl: added slang_operation_add_children() and slang_oper_child() helpers
2009-06-26 13:16:32 -06:00
Brian Paul
c20bb48d3a
glsl: added slang_assemble_ctx::EmitContReturn field, init
2009-06-26 13:16:32 -06:00
Brian Paul
eb1eee03a6
demos: improve argv parsing in fslight.c
2009-06-26 13:16:32 -06:00
Brian Paul
4bc74a0756
glsl: don't unroll loops containing continue/break
...
Just search the AST in _slang_can_unroll_for_loop().
2009-06-26 13:16:32 -06:00
Brian Paul
625b0fe268
Revert "slang: if/else/break & if/else/continue work for unrolled loops"
...
We should just check if the loop contains a continue/break in the
_slang_can_unroll_for_loop() test function...
This reverts commit 989856bde4 .
Conflicts:
src/mesa/shader/slang/slang_codegen.h
2009-06-26 13:16:32 -06:00
Brian Paul
4031ea1520
glsl: Added gl_shader_state::EmitContReturn field
...
This is the start of a glsl-continue-return feature branch to support
a GLSL code generator option for 'continue' and 'return' statements.
Some targets don't support CONT or RET statements so we'll need to
try to generate code that does not use them...
2009-06-26 13:16:32 -06:00
Brian Paul
84c5e4805b
docs: updated Mesa release instructions
2009-06-26 13:16:32 -06:00
José Fonseca
72aed16aee
scons: Tool to build with DirectX SDK.
...
Also works with MinGW, as long as the path to the DirectX SDK top
directory is set in the DXSDK_DIR environment variable.
2009-06-26 19:57:47 +01:00
José Fonseca
25f6c936fe
scons: Don't use C specific options with g++
2009-06-26 19:57:46 +01:00
Keith Whitwell
3e94521912
tgsi: correct handling of return value from util_vsnprintf
...
We were failing to deal with:
- vsnprintf returns negative value on error.
- vsnprintf returns the number of chars that *would* have been
written on truncation.
2009-06-26 13:45:34 +01:00
Keith Whitwell
c9f8c400ab
aux/indices: don't use 'prim' value once it is known to be bad
...
Theoretical bugfix only - no known case where this might happen.
2009-06-26 13:44:20 +01:00
Cooper Yuan
d1bc9a29b9
Fix viewport issue
2009-06-26 17:04:53 +08:00
Cooper Yuan
eaadba6eee
Fix color data can't be fetched issue
2009-06-25 19:48:43 +08:00
José Fonseca
c25534f30d
wgl: Handle flush after a window is destroyed.
...
Fixes assertion failure with conform.
2009-06-24 15:23:44 +01:00
Brian Paul
b79e6a59d8
demos: fix issues in glxcontexts.c
...
The reshape() function was called when there was no GLX context so
the viewport/modelview/projection setup wasn't doing anything. Move
the call to reshape() into draw().
Also, remove -stereo, -fullscreen options and do some general clean-up.
2009-06-23 09:31:27 -06:00
Cooper Yuan
5e1534f532
correct scissor and cliprect setting
2009-06-23 11:11:19 +08:00
Roland Scheidegger
2f184d0d9f
i965: handle OPCODE_SWZ in the glsl path
...
glsl compiler will not generate OPCODE_SWZ, and as a first step it would
be translated away to a MOV anyway (why?), but later internally this opcode is
generated (for EXT_texture_swizzling).
(cherry picked from commit 4ef1f8e3b5 )
2009-06-22 15:15:20 -07:00
Owen W. Taylor
9d367d43b2
Disable SGI_swap_control extension for DRI2
...
We currently don't have support for SGI_swap_control for direct
contexts with DRI2, so disable reporting the extension. Reporting
the extension, and then having glXSwapIntervalSGI() "succeed"
but do nothing can confuse applications.
https://bugs.freedesktop.org/show_bug.cgi?id=22123
(cherry picked from commit 279143c6e8 )
2009-06-22 15:15:20 -07:00
Michel Dänzer
0584b6e433
intel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.
...
Fixes glean depthStencil test.
(cherry picked from commit 3885b708fd )
2009-06-22 15:15:20 -07:00
Brian Paul
19218fe712
i965: added intelFlush() call in intel_get_tex_image()
...
Fixes the render-to-texture test in progs/tests/getteximage.c
(cherry picked from commit a03b349153 )
2009-06-22 15:15:20 -07:00
Brian Paul
a5b7e0c7d7
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcs
...
(cherry picked from commit 4dc426c016 )
2009-06-22 15:15:20 -07:00
Brian Paul
54f425b5ce
mesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBS
...
Be clearer that this is the number of generic vertex program/shader
attributes, not counting the legacy attributes (pos, normal, color, etc).
(cherry picked from commit 4a95185c9f )
2009-06-22 15:15:19 -07:00
Brian Paul
810df8317d
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS
...
(cherry picked from commit d2a74d76c9 )
2009-06-22 15:15:19 -07:00
Brian Paul
19ca5ee1db
mesa: fix some potential state-restore issues in pop_texture_group()
...
Call the _mesa_set_enable() functions instead of driver functions, etc.
Also, add missing code for 1D/2D texture arrays.
(cherry picked from commit aac19609bf )
2009-06-22 15:15:19 -07:00
Brian Paul
ad0514b24d
vbo: return VP_NONE from get_program_mode() if running fixed-func vertex program
...
If we're running a vertex program to emulated fixed-function, we still need
to treat vertex arrays/attributes as if we're in fixed-function mode.
This should probably be back-ported to Mesa 7.5 after a bit more testing.
(cherry picked from commit dda82137d2 )
2009-06-22 15:15:19 -07:00
Brian Paul
00e203fe17
mesa: create/use a fallback texture when bound texture is incomplete
...
When a GLSL sampler reads from an incomplete texture it should
return (0,0,0,1). Instead of jumping through hoops in all the drivers
to make this happen, just create/install a fallback texture with those
texel values.
Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some
GPU lockups when trying to sample from missing surfaces. If a binding
table entry is NULL, it seems that sampling sometimes works, but not
always (lockup).
Todo: create a fallback texture for each type of texture target?
(cherry picked from commit 3f25219c7b )
2009-06-22 15:15:19 -07:00
Cooper Yuan
3a3c7fd52e
functions declaration with 'extern'
2009-06-22 15:10:57 +08:00
Cooper Yuan
2f6451042d
Pass viewport id to r700SendViewportState function, otherwise the radom value may beyond R700_MAX_VIEWPORTS
2009-06-22 14:33:18 +08:00
Cooper Yuan
46ca8e5782
add LINK_STATES for SPI_PS and SEMANTIC
2009-06-22 10:16:01 +08:00
Eric Anholt
abfd56c24c
intel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.
...
Fixes oglconform zbfunc.c and pxtrans-cidraw.c, at least.
(cherry picked from commit 405300bb19 )
2009-06-19 16:57:06 -07:00
Eric Anholt
daacac1c24
intel: Fix glClear behavior versus display lists.
...
The CALL_DrawArrays was leaking the clear's primitives into the display
list with GL_COMPILE_AND_EXECUTE. Use _mesa_DrawArrays instead, which
doesn't appear to leak. Fixes piglit dlist-clear test.
(cherry picked from commit 64edde1004 )
2009-06-19 16:54:59 -07:00
Roland Scheidegger
43bb78f2bb
radeons: use dp4 for position invariant vertex programs
...
Fixes #22181 . R200 requires this since DP4 is used in hw tnl mode.
R300 prefers it (should be faster due to no instruction dependencies), but
both methods should be correct (when sw tcl is used though, MUL/MAD might
be faster). Probably doesn't make much difference for R100 since vertex progs
are executed in software anyway, but let's just keep it the same there too.
2009-06-19 20:00:55 +02:00
Michel Dänzer
9dfce365c7
Also release direct rendering resources in glXDestroyGLXPixmap.
...
Fixes leak running compiz with direct rendering.
2009-06-19 18:00:49 +02:00
Michel Dänzer
a120778c72
Always free image offsets memory when re-initializing texture image fields.
...
Fixes leak running compiz with direct rendering.
2009-06-19 18:00:33 +02:00
José Fonseca
3cf92e936a
scons: Output the friendly "Linking ..." message when creating DLLs with MinGW.
2009-06-19 16:08:38 +01:00
Brian Paul
0487656245
softpipe: return alpha=1 in shadow_compare() function
...
The alpha value wasn't set at all before so we got unpredictable results.
Note that we don't currently obey GL_DEPTH_TEXTURE_MODE in the state
tracker. For now, we return the result in the default mode (r,r,r,1).
2009-06-19 08:53:15 -06:00
José Fonseca
8f382fd3f3
util: Add cast.
...
It is expected to loose precision here.
2009-06-18 14:54:09 +01:00
José Fonseca
21bfd0f4bd
draw: Replace pointer arithmetic with cast.
...
Using uintptr_t as intermediate type for pointer -> integer conversions is
easier to understand and does not cause any size mismatch warnings.
uintptr_t is part of C99, and we already provide a suitable replacement
definition for all platforms we care about.
2009-06-18 14:54:09 +01:00
José Fonseca
d609df1dae
trace: Use size_t consistently.
2009-06-18 14:54:09 +01:00
José Fonseca
2af0173e9e
pipebuffer: Use a type consistently for sizes/offsets.
...
Avoids warnings on 64bit builds.
Use regular unsigned since that's what gallium expects, but use a
typedef to facilitate possible changes in the future.
2009-06-18 14:54:08 +01:00
José Fonseca
42882897c6
wgl: Fix window resizing in multithread applications.
...
In multithreading stw_call_window_proc can be called by a thread other
than the thread where the context is bound.
2009-06-18 14:54:07 +01:00
José Fonseca
4b4855c717
wgl: Move all thread related code together.
...
Not only for cosmetic reasons, but also because we need to set the
SetWindowsHookEx hook for threads created before the DllMain is called
(threads for each we don't get the DLL_THREAD_ATTACH notification).
2009-06-18 14:54:07 +01:00
Keith Whitwell
1b05b5b4fe
glew: correct misspelling of glFramebufferTextureLayer
...
This was misspelt as glFramebufferTexturLayer (missing e), causing
conflicts with the correctly spelt version in glext.h and extfuncs.h.
2009-06-18 10:13:55 +01:00
Keith Whitwell
0491142152
mesa: protect Elements against multiple definitions
...
Mesa and gallium both have a definition of this macro
2009-06-18 09:53:45 +01:00
Brian Paul
39366ed995
intel: remove extra \n from warning string
...
(cherry picked from commit 42e9bde0fa )
2009-06-17 12:55:26 -07:00
Robert Ellison
d446d3acac
i965: fix 1D texture borders with GL_CLAMP_TO_BORDER
...
With 1D textures, GL_TEXTURE_WRAP_T should be ignored (only
GL_TEXTURE_WRAP_S should be respected). But the i965 hardware
seems to follow the value of GL_TEXTURE_WRAP_T even when sampling
1D textures.
This fix forces GL_TEXTURE_WRAP_T to be GL_REPEAT whenever 1D
textures are used; this allows the texture to be sampled
correctly, avoiding "imaginary" border elements in the T direction.
This bug was demonstrated in the Piglit tex1d-2dborder test.
With this fix, that test passes.
(cherry picked from commit ab6c4fa582 )
2009-06-17 12:55:26 -07:00
Robert Ellison
56235ae504
i965: send all warnings through _mesa_warning()
...
One warning message:
drm_i915_getparam: -22
was still being sent to fprintf(). This causes all Piglit tests to fail,
even with MESA_DEBUG=0.
Using _mesa_warning() to emit the message allows the general Mesa controls
for messages like this to be applied.
(cherry picked from commit bc3270e99f )
2009-06-17 12:55:26 -07:00
Robert Ellison
e15aebe10e
i965: fix segfault on low memory conditions
...
When out of memory (in at least one case, triggered by a longrunning
memory leak), this code will segfault and crash. By checking for the
out-of-memory condition, the system can continue, and will report
the out-of-memory error later, a much preferable outcome.
(cherry picked from commit 44a4abfd4f )
2009-06-17 12:55:26 -07:00
Ian Romanick
a70c45bdab
Fast path when rebinding the same texture in single context environment
...
If there is no shared context, there is no purpose in rebinding the same
texture. In some artificial tests this improves performance 10% - 30%.
(cherry picked from commit 7f8000db8b )
2009-06-17 12:55:26 -07:00
Eric Anholt
ff3da0966f
i915: Don't put VBOs in graphics memory unless required for an operation.
...
This saves doing swtnl from uncached memory, which is painful. Improves
clutter test-text performance by 10% since it started using VBOs.
(cherry picked from commit a945e203d4 )
2009-06-17 11:08:36 -07:00
Eric Anholt
1b8e4dd2c8
i915: Fall back on NPOT textured metaops on 830-class.
...
(cherry picked from commit 8ec6e03679 )
2009-06-17 11:08:28 -07:00
Eric Anholt
cee73ffdaf
i915: Restore the Viewport and DepthRange functions on 8xx.
...
Fixes failed viewport updates on glxgears (and other apps) resize since
e41780fedc .
Bug #20473 .
(cherry picked from commit 0e83e8f51a )
2009-06-17 11:08:13 -07:00
Eric Anholt
7805c3b57b
i956: Make state dependency of SF on drawbuffer bounds match Mesa's.
...
Noticed while debugging a weird 1D FBO testcase that left its existing
viewport and projection matrix in place when switching drawbuffers. Didn't
fix the testcase, though.
(cherry picked from commit 3a521d84ec )
2009-06-17 11:07:03 -07:00
Eric Anholt
97974b7e51
intel: Don't complain on falling back from PBO fastpaths.
...
Instead, stash the debug info under the handy debug flag.
Bug #20053
(cherry picked from commit 22690482e6 )
2009-06-17 11:06:52 -07:00
Eric Anholt
957f3c8c3d
mesa: Mark FBOs with compressed color attachments as FBO-incomplete.
...
Both EXT_fbo and ARB_fbo agree on this. Fixes a segfault in the metaops
mipmap generation in Intel for SGIS_generate_mipmap of S3TC textures in
Regnum Online.
Bug #21654 .
(cherry picked from commit 0307e609aa )
2009-06-17 11:06:46 -07:00
Eric Anholt
66bfd025c8
i915: Use Stencil.Enabled instead of Stencil._Enabled in DrawBuffers.
...
The _Enabled field isn't updated at the point that DrawBuffers is called,
and the Driver.Enable() function does the testing for stencil buffer
presence anyway.
bug #21608 for Radeon
(cherry picked from commit 4c6f829899 )
2009-06-17 11:06:38 -07:00
Eric Anholt
fbd554d074
i915: Only use the new 945 cube layout for compressed textures.
...
The docs actually explain this, but not in a terribly clear manner.
This nearly fixes the piglit cubemap testcase, except that something's
going wrong with the nearest filtering at 2x2 sizes in the testcase.
Looks good by visual inspection, though.
Bug #21692
(cherry picked from commit 5c5a468848 )
2009-06-17 11:06:25 -07:00
Eric Anholt
6e0df938d4
i965: Fix varying payload reg assignment for the non-GLSL-instructions path.
...
I don't have a testcase for this, but it seems clearly wrong.
(cherry picked from commit dc657f3929 )
2009-06-17 11:05:55 -07:00
Eric Anholt
988b61be27
i965: Fix register allocation of GLSL fp inputs.
...
Before, if the VP output something that is in the attributes coming into
the WM but which isn't used by the WM, then WM would end up reading subsequent
varyings from the wrong places. This was visible with a GLSL demo
using gl_PointSize in the VS and a varying in the WM, as point size is in
the VUE but not used by the WM. There is now a regression test in piglit,
glsl-unused-varying.
(cherry picked from commit 0f5113deed )
2009-06-17 11:04:31 -07:00
Eric Anholt
320a303be0
intel: Use FRONT_AND_BACK for StencilOp as well.
...
(cherry picked from commit 64980125c7 )
2009-06-17 10:52:56 -07:00
Eric Anholt
d9e35d51fd
intel: Use GL_FRONT_AND_BACK for stencil clearing.
...
This comes from a radeon-rewrite fallback fix, but may also fix stencil
clear failure when the polygon winding mode is flipped.
(cherry picked from commit d866abeffc )
2009-06-17 10:52:54 -07:00
Eric Anholt
61a2c9668f
intel: Skip the DRI2 renderbuffer update when doing Viewport on an FBO.
...
(cherry picked from commit d4a42b0ce6 )
2009-06-17 10:52:49 -07:00
Eric Anholt
2770107d87
intel: Map write-only buffer objects through the GTT when possible.
...
This looks to be a win of a few percent in cairogears with new vbo code,
thanks to not polluting caches.
(cherry picked from commit aa422b2625 )
2009-06-17 10:52:30 -07:00
Brian Paul
3f856c6b6b
mesa: rework viewport/scissor initialization code
...
The first time a context is bound to a drawable, the viewport and scissor
bounds are initialized to the buffer's size. This is actually a bit tricky.
A new _mesa_check_init_viewport() function is called in several places
to check if the viewport has been initialized. We also use a new
ctx->ViewportInitialized flag instead of the overloaded
ctx->FirstTimeCurrent flag.
2009-06-17 08:38:38 -06:00
Brian Paul
d18c57aaea
mesa: added null ptr check in Fake_glXCreatePixmap()
...
Fixes segfault in progs/xdemos/glxgears_pixmap.c
2009-06-17 08:38:38 -06:00
Brian Paul
3705f48688
st/glx: added null ptr check in Fake_glXCreatePixmap()
...
Fixes segfault in progs/xdemos/glxgears_pixmap.c
2009-06-17 08:38:38 -06:00
José Fonseca
c6f71eabd8
Revert "scons: Debug build by default."
...
Per Brian's request.
This reverts commit 25f0c33bb3 .
2009-06-17 15:24:06 +01:00
José Fonseca
1bee650ef3
progs/wgl: Fix shreadtex_mt too.
2009-06-17 15:23:25 +01:00
José Fonseca
6e24fdeae5
progs/wgl: Tweak the initialization wait in wglthreads.
...
There was still a non-zero probability for wglShareLists of failing.
2009-06-17 15:23:25 +01:00
José Fonseca
557421b6de
progs/wgl: Get wglShareLists working in wglthreads.
...
wglShareLists is a little picky -- it seems to check if it has exclusive
access to a lock, and fails if it doesn't.
This allows the texture to be shared with all windows.
2009-06-17 15:23:25 +01:00
José Fonseca
25f0c33bb3
scons: Debug build by default.
...
Match what autotools and other build systems do by default.
2009-06-17 15:23:24 +01:00
Brian Paul
c53705ed7b
GLX: attempt to fix glean makeCurrent test cases.
...
Two parts to this:
One we don't keep pointers to possibly freed memory anymore once we unbind the
drawables from the context. Brian I need to figure out what the comment
you made there, can we get a glean/piglit test so we can fix it properly?
If the new gc is the same as the oldGC, we call the unbind even though
we just bound it in that function. doh.
(cherry picked from master, commit 77506dac8e )
2009-06-17 08:03:19 -06:00
José Fonseca
ebe0796ba2
docs: Document building with SCons.
2009-06-17 10:12:11 +01:00
José Fonseca
d22828f716
wgl: Factor out some repetitive code into inline functions.
2009-06-17 10:08:25 +01:00
José Fonseca
992000cce7
progs/wgl: Allow resizing wglthreads' windows.
2009-06-17 10:08:24 +01:00
Brian Paul
6b917d0b17
i965: fix bugs in projective texture coordinates
...
For the TXP instruction we check if the texcoord is really a 4-component
atttibute which requires the divide by W step. This check involved the
projtex_mask field. However, the projtex_mask field was being miscalculated
because of some confusion between vertex program outputs and fragment
program inputs.
1. Rework the size_masks calculation so we correctly set bits corresponding
to fragment program input attributes.
2. Rename projtex_mask to proj_attrib_mask since we're interested in more
than just texcoords (generic varying vars too).
3. Simply the indexing of the size_masks and proj_attrib_mask fields.
4. The tracker::active[] array was mis-dimensioned. Use MAX_PROGRAM_TEMPS
instead of a magic number.
5. Update comments, add new assertions.
With these changes the Lightsmark demo/benchmark renders correctly, until
we eventually hit a GPU lockup...
2009-06-16 18:21:26 -06:00
Brian Paul
742ba08406
softpipe: fix out of bounds quad rasterization bug
...
For some triangles we can generate quads which lie just outside the
surface bounds. Just check the quad's mask before trying to emit/process
the quad.
Fixes failed assertion in Lightsmark.
2009-06-16 15:41:49 -06:00
Brian Paul
3e48dd0445
mesa: fix incorrect viewport clamping in _mesa_set_viewport()
...
A 0 by 0 viewport size is legal. Don't clamp against lower bound of one.
The error checking earlier in the function prevents negative values.
2009-06-16 09:34:35 -06:00
Brian Paul
ed7f4b4230
mesa: fix REMAINDER() macro
...
The results were incorrect for some negative values of A.
See bug 21872.
2009-06-16 08:45:56 -06:00
José Fonseca
3463b1479d
gallium: Avoid atomic ops / locking when src is dst.
2009-06-16 13:05:25 +01:00
José Fonseca
077c5e62d8
progs/wgl: Quit after displaying usage for -h option.
2009-06-16 12:34:29 +01:00
José Fonseca
06075711af
progs/wgl: Use appropriate types to silence msvc warnings.
2009-06-16 12:29:58 +01:00
José Fonseca
566bdbe67d
progs/wgl: Fix assertion failure in wglthreads' texture creation.
2009-06-16 12:29:58 +01:00
Shuang He
d027e8feff
intel: Release fb backing regions in intelDestroyBuffer()
...
Fixes memory leak when destroying framebuffers.
2009-06-15 16:19:30 -06:00
José Fonseca
227d233cff
python/tests: Add is_depth_stencil_format utility function.
2009-06-15 19:22:35 +01:00
José Fonseca
7585cbffe0
python/tests: Cleanup texture_sample.
2009-06-15 19:21:58 +01:00
José Fonseca
c6af9b2947
mesa: Always return a value.
2009-06-15 19:20:25 +01:00
José Fonseca
053d8eb891
mesa: Use appropriate float/integer types.
2009-06-15 19:20:05 +01:00
José Fonseca
6214c7262f
mesa: Use type modifier for float constants.
2009-06-15 19:19:29 +01:00
José Fonseca
37f2117cd1
mesa: Use integer type with appropriate sign.
2009-06-15 19:17:07 +01:00
José Fonseca
c33ef1f7c6
rtasm: Use 32bit constant.
...
As we're only using 32bit bitmasks.
2009-06-15 19:04:04 +01:00
José Fonseca
940cb7ce16
gallium: Ensure assert macro is defined before being used in p_thread.h
2009-06-15 18:57:45 +01:00
José Fonseca
5d0cf9ebb4
softpipe: Fix softpipe_is_texture_referenced.
...
Render results are only visible when the render cache is flushed.
softpipe_is_texture_referenced must reflect that or transfers to/from the
textures bound in the framebuffer won't be proceeded of the necessary
flush, causing transfer data to be outdated/clobbered.
This fixes conform drawpix test with softpipe.
2009-06-15 18:42:13 +01:00
José Fonseca
0e1abced56
progs/tests: Use opaque colors.
...
Transparency is not relevant for this example, and leads to distraction
due to different results in alpha visuals, when capturing images to disk.
2009-06-15 15:40:10 +01:00
Thomas Hellstrom
db22b35d21
dri st: Don't require the PIPE_TEXTURE_USAGE_RENDER_TARGET property for depth- and stencil renderbuffers.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-06-15 11:48:57 +02:00
Thomas Hellstrom
cbe5af766e
gallium: Fix segfault and valgrind error introduced with commit 3f2e006b75
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-06-15 11:22:06 +02:00
Jakob Bornecrantz
2fe65e8f14
Merge branch 'mesa_7_5_branch'
2009-06-14 16:56:34 +02:00
Dave Airlie
6791576f6c
Revert "r200: make use of DMA buffers for Elts a lot better."
...
This reverts commit 0952645fe0 .
Need to revisit where this is going wrong
2009-06-29 20:15:47 +10:00
Corbin Simpson
928a568417
r300g: YCbCr and sRGB textures.
2009-06-27 12:07:59 -07:00
Corbin Simpson
f150e05afc
r300g: Fix EXT_packed_depth_stencil functionality.
...
Allow Z24S8 to be a true texture.
2009-06-27 12:07:59 -07:00
Jakob Bornecrantz
1ac72aedb2
st/dri: Fix last depth bits logic
2009-06-27 19:55:37 +02:00
Nicolai Hähnle
dbb56687c8
radeon: Always initialize front and back renderbuffers if present
...
This fixes an assertion in glReadPixels from the front buffer.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-06-27 18:16:49 +02:00
Nicolai Hähnle
9fa0d25c54
radeon: Update .gitignore
...
Add all source files that are symlink'ed from common radeon code to the
ignore list.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-06-27 18:08:44 +02:00
Corbin Simpson
3f15acb7e8
r300g: EXT_provoking_vertex.
2009-06-26 21:48:09 -07:00
Corbin Simpson
6ebcdc7549
r300g: S3TC.
...
tests/texcompress2 doesn't work, but tests/texcmp does (more or less.)
2009-06-26 21:25:41 -07:00
Corbin Simpson
aac6648cd8
r300g: Use real texture formats.
...
What bugs me is that the YUV444 format somehow worked properly. :3
2009-06-26 21:25:41 -07:00
Corbin Simpson
7a3224c334
r300g: Definitively forbid unusable Z buffer/stencil formats.
2009-06-26 21:25:40 -07:00
Corbin Simpson
9e7d195fdc
r300g: Comment out assert for now.
...
Will fix with better constant refactoring later.
2009-06-26 21:25:40 -07:00
Corbin Simpson
00ffc90dd2
r300g: Be more specific on surface_copy fallbacks.
2009-06-26 21:25:40 -07:00
Corbin Simpson
6a926f9997
r300g: PIPE_CAP_TGSI_CONT_SUPPORTED.
2009-06-26 21:25:40 -07:00
Corbin Simpson
f80b7f4683
r300-gallium: Ensure that no dirty state goes unemitted.
2009-06-26 21:25:40 -07:00
Brian Paul
f57280cc73
Merge branch 'arb_vertex_array_object'
2009-06-26 17:49:14 -06:00
Brian Paul
a18e209edb
Merge branch 'mesa_7_5_branch'
...
Conflicts:
Makefile
src/gallium/drivers/softpipe/sp_screen.c
src/mesa/main/version.h
2009-06-26 17:07:07 -06:00
Roland Scheidegger
4fdc6ad41b
i965: fix fetching constants from constant buffer in glsl path
...
the driver used to overwrite grf0 then use implicit move by send instruction
to move contents of grf0 to mrf1. However, we must not overwrite grf0 since
it's still used later for fb write.
Instead, do the move directly do mrf1 (we could use implicit move from another
grf reg to mrf1 but since we need a mov to encode the data anyway it doesn't
seem to make sense).
I think the dp_READ/WRITE_16 functions may suffer from the same issue.
While here also remove unnecessary msg_reg_nr parameter from the dataport
functions since always message register 1 is used.
2009-06-26 20:39:49 +02:00
Vinson Lee
d3b46fc77f
configs/darwin: Set CXX to g++.
2009-06-26 12:36:45 -06:00
Brian Paul
b2a1ca4fcf
docs: document GL_ARB_vertex_array_object
2009-06-22 17:54:16 -06:00
Brian Paul
8affcd364b
intel: enable GL_ARB_vertex_array_object extension
2009-06-22 17:54:00 -06:00
Brian Paul
cfb8158058
mesa: plug in glBindVertexArray, glGenVertexArrays functions
2009-06-22 17:52:08 -06:00
Brian Paul
31618f1a88
tests: update bufferobj.c to test GL_ARB_vertex_array_object
2009-06-22 17:51:30 -06:00
Brian Paul
2a795ad522
st/mesa: alphabetize lines
2009-06-22 17:01:44 -06:00
Brian Paul
32220c48ad
st/mesa: enable GL_ARB_vertex_array_object
2009-06-22 17:01:00 -06:00
Brian Paul
e2b7249555
mesa: enforce the rule that arrays live in VBOs for GL_ARB_vertex_array_object
2009-06-22 16:56:35 -06:00
Brian Paul
7ebadecd87
mesa: added extension flag for ARB_vertex_array_object
2009-06-22 16:47:45 -06:00
Brian Paul
9342e6f5a9
mesa: implement _mesa_GenVertexArrays() for GL_ARB_vertex_array_object
...
This also involves adding a gl_array_object::VBOonly field. For the
ARB extension, all arrays in the object must reside in a VBO. This flag
keeps track of that requirement.
2009-06-19 18:17:25 -06:00
Brian Paul
b8000c874e
mesa: implement _mesa_BindVertexArray()
2009-06-19 18:12:11 -06:00
Brian Paul
12cf98f5fc
mesa: move vertex array objects from shared state to per-context
...
The ARB version requires VAOs to be per-context while the Apple extension
was ambiguous.
2009-06-19 18:11:52 -06:00
Brian Paul
bda551898a
mesa: regenerated files related to GL_ARB_vertex_array_object
2009-06-19 18:11:29 -06:00
Brian Paul
54b03948e0
glapi: add new information for GL_ARB_vertex_array_object
2009-06-19 18:11:18 -06:00
Michel Dänzer
dd26899ca3
intel: Fixups for 'mesa: create/destroy buffer objects via driver functions'.
...
Initialize all driver function hooks before calling _mesa_initialize_context(),
and handle all buffer objects in intel_buffer_object().
Fixes assertion failure when running glxinfo.
2009-06-19 23:55:55 +02:00
Roland Scheidegger
4d2b392a0a
radeon: fix cube maps for non-mm path
...
drm cmd checker would refuse cube emits
also fix an issue in the cs path which would calculate the register
offset off by one dword.
Only same testing done as original code (none except compile tested).
2009-06-19 22:56:32 +02:00
Brian Paul
fa5b81ea8b
st/mesa: restore some parameter checking buffer object functions
...
These functions may be called from the VBO code (not just user GL calls)
so do some parameter sanity checking.
2009-06-19 14:43:55 -06:00
Roland Scheidegger
ffae82da4c
r200: fix cube maps for non-mm path
...
drm cmd checker rightfully fell over any cube emit
2009-06-19 22:32:06 +02:00
Brian Paul
e90d6a3cbf
i965: initial code for loops in vertex programs
2009-06-19 12:19:33 -06:00
Brian Paul
fd7d764514
i965: asst clean-ups, etc in brw_vs_emit()
2009-06-19 12:19:33 -06:00
Brian Paul
752204d362
i965: asst clean-ups, var renaming in brw_wm_emit_glsl()
2009-06-19 12:19:33 -06:00
Brian Paul
9d029e0e20
st/mesa: remove redundant st_buffer_object::size field and error checks
...
Just use the gl_buffer_object::Size field. Remove unnecessary size/offset
error checks. Core Mesa will have already done these checks before these
functions are called.
2009-06-19 12:19:15 -06:00
Brian Paul
1ffd074436
st/mesa: no longer special-case buffer object 0 in st_buffer_object() cast wrapper
...
Since commit 6629a35559 "mesa: create/destroy
buffer objects via driver functions" this is no longer needed, and actually
was causing a crash during context tear-down.
2009-06-19 12:13:15 -06:00
Roland Scheidegger
7ce814b25f
radeons: use dp4 for position invariant vertex programs
...
Fixes #22181 . R200 requires this since DP4 is used in hw tnl mode.
R300 prefers it (should be faster due to no instruction dependencies), but
both methods should be correct (when sw tcl is used though, MUL/MAD might
be faster). Probably doesn't make much difference for R100 since vertex progs
are executed in software anyway, but let's just keep it the same there too.
2009-06-19 20:01:14 +02:00
Brian Paul
a8da1feb23
mesa: make query-related driver fallback functions static
...
Plug them in via _mesa_init_query_object_functions().
2009-06-19 10:05:08 -06:00
Brian Paul
331eb58f68
mesa: make buffer object-related driver fallback functions static
...
Plug them in via _mesa_init_buffer_object_functions().
2009-06-19 10:00:03 -06:00
Brian Paul
6629a35559
mesa: create/destroy buffer objects via driver functions
2009-06-19 09:58:51 -06:00
Brian Paul
e164210f65
i965simple: use u_reduced_prim() function
2009-06-19 09:48:43 -06:00
Brian Paul
d2e4643767
draw: use u_reduced_prim() function
2009-06-19 09:45:23 -06:00
Brian Paul
09da78c235
softpipe: use u_reduced_prim()
2009-06-19 09:42:37 -06:00
Brian Paul
157d52143a
gallium/util: s/boolean/unsigned/
2009-06-19 09:39:56 -06:00
Brian Paul
b0b8832e6f
softpipe: whitespace, reformatting
2009-06-19 09:38:12 -06:00
Brian Paul
9038b6c8bb
Merge branch 'ext-provoking-vertex'
...
Conflicts:
docs/relnotes-7.6.html
progs/tests/Makefile
src/gallium/drivers/softpipe/sp_prim_vbuf.c
src/glx/x11/indirect.c
src/mesa/glapi/Makefile
src/mesa/glapi/dispatch.h
src/mesa/glapi/glapioffsets.h
src/mesa/glapi/glapitable.h
src/mesa/glapi/glapitemp.h
src/mesa/glapi/glprocs.h
src/mesa/main/dlist.c
src/mesa/main/enums.c
src/mesa/sparc/glapi_sparc.S
src/mesa/x86-64/glapi_x86-64.S
src/mesa/x86/glapi_x86.S
2009-06-19 09:15:34 -06:00
Brian Paul
0ddc4dbe43
draw: use flatfirst variable
2009-06-18 23:00:37 -06:00
Brian Paul
9205a871e7
draw: remove debug code
2009-06-18 22:51:41 -06:00
Brian Paul
af5fff9c23
draw: fix first provoking vertex mode for quads, quad strips and polygons
2009-06-18 22:48:51 -06:00
Brian Paul
950171be3c
draw: fix first provoking vertex mode for unfilled quads
2009-06-18 22:47:46 -06:00
Brian Paul
601065f153
mesa: fix first provoking vertex mode for unfilled tri strips
2009-06-18 22:45:57 -06:00
Brian Paul
c70a529d7c
draw: clean up indentation
2009-06-18 18:33:29 -06:00
Thomas Hellstrom
0342229289
gallium dri st: Probe the driver for supported surface formats.
...
This is done when constructing the fbconfigs, and the result is saved
for window system framebuffer creation.
Note: For dri2 the server needs to have an identical format selection
logic. Otherwise the dri state-tracker and the xorg driver (state-tracker)
will disagree on which format to use for the attachments. Some more work
is needed in this area.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2009-06-17 03:07:01 +02:00
Thomas Hellstrom
c9f19571da
mesa driconf: Add macro to specify an option with a quoted default value.
...
The default values true and false will expand to "1" and "0" when
gcc -std=c99, causing bool option defaults to generate runtime failures.
One solution is to specify bool option defaults quoted as "true" and "false".
Add a macro to assist this.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2009-06-17 03:07:00 +02:00
Jakob Bornecrantz
edbec6b112
progs/rbug: Add small program to add block rules
2009-06-18 14:36:19 +02:00
Eric Anholt
3addc4e307
i965: Add decode for the G4X x,y offset in surface state.
2009-06-17 21:01:48 -07:00
Eric Anholt
6c3f696891
i965: Fix up texture layout for small things with wide pitches (tiled)
...
We were packing according to the pitch, while the hardware appears to base
it on the base level width.
With this and the previous commit, fbo-cubemap now matches untiled behavior.
2009-06-17 21:01:48 -07:00
Eric Anholt
0f328c90db
i965: Fall back or appropriately adjust offsets of drawing to tiled regions.
...
3D rendering to tiled textures was being done with non-tile-aligned offsets.
The G4X hardware has fields to let us support it easily and correctly, while
the pre-G4X hardware requires a path full of suffering, so we just fall back.
2009-06-17 21:01:48 -07:00
Dave Airlie
46000cecc3
r300: use vbo_split_prims to split up large vertex buffers.
...
This lets ut2004 avoid hitting the elt warning.
2009-06-18 13:25:38 +10:00
Eric Anholt
bd10f0e84f
i965: Fix tiling for FBO depth attachments by making DEPTH_COMPONENT Y tiled.
...
This may hurt if miptree relayout occurs, since we can't blit Y tiled
objects. But it corrects depth tests on FBOs using textures.
2009-06-17 20:19:19 -07:00
Dave Airlie
b165fa7d45
radeon: don't re-add BOs to validate list
...
if its on the list its on the list don't go readding it.
multitexturing from the same texture could cause this.
2009-06-18 13:16:06 +10:00
Brian Paul
3817a54912
glsl: call _mesa_postprocess_program(), disabled
2009-06-17 09:58:29 -06:00
Brian Paul
516d20fd26
mesa: silence warning
2009-06-17 09:58:29 -06:00
Brian Paul
ec6ad7ba3c
mesa: added _mesa_postprocess_program() to aid shader debugging
2009-06-17 09:58:29 -06:00
Jerome Glisse
f806a03361
radeon: Flush command buffer on viewport change
...
We flush the command buffer so we don't emit mixed
state (with new and previous buffer size) command
buffer, this is especialy affecting zbuffer states.
2009-06-17 16:33:14 +02:00
Jerome Glisse
2506c4e8b1
r300: don't emit vap index offset on r5xx hw when using cs
...
vap index offset is programmed to 0 by the kernel, it
would add work to kernel checker to allow userspace
programming of this so it's now disallowed with CS
on KMS.
2009-06-17 13:54:09 +02:00
Dave Airlie
77506dac8e
GLX: attempt to fix glean makeCurrent test cases.
...
Two parts to this:
One we don't keep pointers to possibly freed memory anymore once we unbind the
drawables from the context. Brian I need to figure out what the comment
you made there, can we get a glean/piglit test so we can fix it properly?
If the new gc is the same as the oldGC, we call the unbind even though
we just bound it in that function. doh.
2009-06-17 13:59:28 +10:00
Dave Airlie
856221d699
radeon: fix warnings in wrapper with libdrm
2009-06-17 11:12:57 +10:00
Brian Paul
8d48222791
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/main/api_validate.c
2009-06-16 18:25:52 -06:00
Roland Scheidegger
4ef1f8e3b5
i965: handle OPCODE_SWZ in the glsl path
...
glsl compiler will not generate OPCODE_SWZ, and as a first step it would
be translated away to a MOV anyway (why?), but later internally this opcode is
generated (for EXT_texture_swizzling).
2009-06-16 21:40:41 +02:00
Brian Paul
1510c3cae1
docs: minor relnotes clean-up
2009-06-15 16:44:26 -06:00
Brian Paul
70d247c69b
Merge branch 'arb_map_buffer_range'
...
Conflicts:
docs/relnotes-7.6.html
src/mesa/main/mtypes.h
2009-06-15 16:42:42 -06:00
Brian Paul
01f7bda44c
mesa: revert some recent VBO buffer object refcounting changes
...
Reverts part of commit d7ea9ddf58 .
We were calling _mesa_reference_buffer_object() on some heap-allocated
memory that was uninitialized and could trigger an assertion.
We can actually go back to "looser" ref counting of the Null/default
buffer object in these cases.
2009-06-15 10:58:04 -06:00
Brian Paul
b0d874bfbe
mesa: regenerated gl_mange.h file
2009-06-15 10:47:07 -06:00
Roland Scheidegger
63c407db3e
enable ARB_half_float_pixel for intel drivers
2009-06-15 18:31:03 +02:00
Roland Scheidegger
4ed2c0dddc
intel: fix (cosmetic) typo flag used twice
2009-06-15 18:30:51 +02:00
Thomas Hellstrom
f5888d9ca5
Merge branch 'mesa_7_5_branch'
...
Conflicts:
progs/util/extfuncs.h
2009-06-15 11:43:48 +02:00
Maciej Cencora
e0eafde746
r300: fix 3D textures
2009-06-15 01:07:19 +02:00
Jakob Bornecrantz
6530fabb93
Merge branch 'mesa_7_5_branch'
2009-06-14 06:32:47 +02:00
Jakob Bornecrantz
210ad58ee3
trace: Don't write state objects to file if dumping is not set
2009-06-14 06:07:50 +02:00
Keith Whitwell
0cce6d7e33
tgsi: correct handling of return value from util_vsnprintf
...
We were failing to deal with:
- vsnprintf returns negative value on error.
- vsnprintf returns the number of chars that *would* have been
written on truncation.
2009-06-26 13:43:10 +01:00
Dave Airlie
0952645fe0
r200: make use of DMA buffers for Elts a lot better.
...
This allows us to return the unused portion of the dma buffer
to the allocator instead of wasting nearly 16k a pop.
2009-06-26 15:09:12 +10:00
Dave Airlie
db54579628
r200: only emit unitneeded textures
2009-06-26 15:09:11 +10:00
Joakim Sindholt
622858884f
r300-gallium: organize fragment/vertex shaders
...
Appart from separating r3xx/r5xx fragment shaders, a more consistent
naming scheme has been applied. From now on:
r300 = all chips
r3xx = R300/R400 only
r5xx = R500 only
This way r300_fragment_shader is the master struct, and the structs
r3xx_fragment_shader and r5xx_fragment_shader inherits it.
2009-06-26 01:13:06 +02:00
Vinson Lee
450b20d1ef
gallium: Add PIPE_OS_APPLE token.
2009-06-25 09:52:50 -06:00
Jakob Bornecrantz
e99d13bbc6
progs/tests: Add yet another mipmap test
2009-06-14 01:44:34 +02:00
Roland Scheidegger
43b3b745e4
radeon: fix hw texture limits
...
still always enable max, but the right values this time.
More work should probably be done for saner limits without mm, and/or
dri conf option allow_large_textures (which is ignored) removed.
3D limit on r100 is pretty arbitrary as still handled by swrast anyway.
Also fix r300 limits (except 3d I've no idea what the max is anyway so
keep using mesa default).
2009-06-25 15:57:33 +02:00
Dave Airlie
cdbcb051d9
radeon/r200: add some hw texture limits
2009-06-25 13:26:52 +10:00
Dave Airlie
69fd0cbaa2
radeon: fix stupidity in cs space check code.
...
This was already correct in the GEM code
2009-06-25 12:13:17 +10:00
Brian Paul
bc5c40d7d9
intel: fix additional merge conflicts missed in previous commit
2009-06-24 08:57:48 -06:00
Brian Paul
a04af335a4
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/drivers/dri/i915/i915_tex_layout.c
src/mesa/drivers/dri/i965/brw_wm_glsl.c
src/mesa/drivers/dri/intel/intel_buffer_objects.c
src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
src/mesa/drivers/dri/intel/intel_pixel_draw.c
src/mesa/main/enums.c
src/mesa/main/texstate.c
src/mesa/vbo/vbo_exec_array.c
2009-06-24 08:54:37 -06:00
Jakob Bornecrantz
d60b2c6855
identity: Add new identity driver
...
This driver does no transformation of the gallium calls
going to the real driver, like the identity matrix. It is
intended to be the basis for transforming and/or debug
drivers like trace and rbug.
Authors of this patch are:
Michal Krol, orignal heavy lifting.
José Fonesca, object wrapping code stolen from trace.
Jakob Bornecrantz, put it all toghether and renamed a stuff.
2009-06-24 13:04:56 +02:00
Eric Anholt
b8e638d489
i965: Disable texture tiling by default.
...
I haven't fixed all the regressions yet, and it'll be easy to re-enable when
the known problems are fixed.
2009-06-23 19:31:43 -07:00
Eric Anholt
b72dea5441
i965: Set the max index buffer address correctly according to the docs.
...
It's the last addressable byte, not the byte after the end of the buffer.
2009-06-23 19:31:13 -07:00
Eric Anholt
d43599afef
i965: Don't set a reserved bit in MI_FLUSH.
...
I noticed this when this MI_FLUSH showed up in IPEHR for the ut2004 hang.
Not setting the reserved bit didn't help, though.
2009-06-23 19:31:13 -07:00
Eric Anholt
5ca800e100
dri2: Refresh the fake front contents after glXSwapBuffers().
...
Bug #19177 .
Reviewed by: Ian Romanick <ian.d.romanick@intel.com >
2009-06-23 19:31:12 -07:00
Eric Anholt
9c0ba017c8
i965: Fix depth-texture Y-tiling detection for sized internal formats.
...
Fixes assertion failure on norsetto shadow mapping demo.
2009-06-23 19:31:12 -07:00
Eric Anholt
e0a4e25f93
i965: Fix packed depth/stencil textures to be Y-tiled as well.
...
Fixes shadowtex.c. And an assert is added to catch this sooner next time.
2009-06-23 19:31:12 -07:00
Eric Anholt
1593a1bb34
intel: Bail on blits with non-tile-aligned offsets.
2009-06-23 19:31:12 -07:00
Eric Anholt
8f81a6468f
intel: Avoid trying to do blits to Y tiled regions.
...
This is somewhat nasty, but we need to do Y-tiled depth for FBO support.
May help with corruption and hangs since enabling texture tiling, and
since switching depth textures to Y tiled.
Fixes piglit depthtex.c on 965.
2009-06-23 19:31:11 -07:00
Eric Anholt
246d59c29e
intel: Fix some potential writes to zero-copy PBOs when used as regions.
...
I was in the midst of fixing some blitting-with-Y-tiled issues when I
noticed this. Hopefully PBO usage will be a little more robust, as a
result.
2009-06-23 19:31:11 -07:00
Eric Anholt
6a49473ab5
intel: Remove long-unused intel_region_fill and intelEmitFillBlit.
2009-06-23 19:31:10 -07:00
Eric Anholt
a9b03aaebf
intel: Refuse to do texture tiling if we don't have the kernel support.
2009-06-23 19:31:10 -07:00
Pauli Nieminen
4f1e141c11
Fix crash when debug output is enabled and sarea is notset in r200Clear
2009-06-23 16:43:00 +02:00
Ian Romanick
70e72070fc
mesa: From float type modifier from values to large for singles
...
The values 2147483648.0 and 4294967294.0 are too larget to be stored in single
precision floats. Forcing these to be singles causes bits to be lost, which
results in errors in some pixel transfer tests.
This fixes bug #22344 .
2009-06-22 18:22:51 -07:00
Brian Paul
a31118c25a
st/mesa: fix setup_edgeflags() regression
...
stobj is now non-null for the default/null buffer object. Update the
test to check the buffer ID to see if it's a real buffer object.
2009-06-22 17:49:22 -06:00
Jakob Bornecrantz
7a879500ac
gallium-intel: Improve Xorg Makefile a bit
...
The real solution is to create a Makefile.template for xorg
drivers and use that here.
2009-06-22 23:45:02 +02:00
Jakob Bornecrantz
23170ab236
st/xorg: Convert to template makefile
2009-06-22 23:34:18 +02:00
Jakob Bornecrantz
5d0a1d4241
st/dri: Fix typo when checking for depth formats
2009-06-22 23:34:18 +02:00
Eric Anholt
c80ce5ac90
i965: Fix warnings in intel_pixel_read.c.
2009-06-22 08:52:52 -07:00
Michel Dänzer
2c36ed9067
intel: Fix glReadPixels regression since changing context init order.
...
Fixes regression in dd26899ca3 that also
affected some PBO operations.
2009-06-22 08:45:45 -07:00
Eric Anholt
df70d3049a
intel: Also get the DRI2 front buffer when doing front buffer reading.
2009-06-19 22:18:16 -07:00
Eric Anholt
afc981ee46
intel: Update Mesa state before span setup in glReadPixels.
...
We could have mapped the wrong set of draw buffers. Noticed while looking
into a DRI2 glean ReadPixels issue.
2009-06-19 22:17:46 -07:00
Eric Anholt
dcfe0d66bf
intel: Move intel_pixel_read.c to shared for use with i965.
2009-06-19 22:16:16 -07:00
Eric Anholt
3b08a43f32
intel: Don't map regions with drm_intel_gem_bo_map_gtt() unless they're tiled.
...
This fixes a regression in region read performance that came in with the
texture tiling changes. Ideally we'd have an access flag coming in so we
could also use bo_map_gtt for writing, like we do for buffer objects.
Bug #22190
2009-06-19 17:25:20 -07:00
Eric Anholt
405300bb19
intel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.
...
Fixes oglconform zbfunc.c and pxtrans-cidraw.c, at least.
2009-06-19 16:43:45 -07:00
Eric Anholt
64edde1004
intel: Fix glClear behavior versus display lists.
...
The CALL_DrawArrays was leaking the clear's primitives into the display
list with GL_COMPILE_AND_EXECUTE. Use _mesa_DrawArrays instead, which
doesn't appear to leak. Fixes piglit dlist-clear test.
2009-06-19 16:43:45 -07:00
Eric Anholt
396b4043f0
mesa: Make VBO dlist printing use the same path as other dlist printing.
...
I was rather confused when mesa_print_display_list didn't show any of
my glBegin()..glEnd(). Nothing but print_list appears to call
this function, so matching its behavior seems like a good idea.
2009-06-19 16:43:45 -07:00
Chia-I Wu
cca30245bd
intel: Do not access pbo's buffer directly when attaching.
...
pbo might be system buffer based or attached to another region. Call
intel_bufferobj_buffer to make sure pbo has a buffer of its own.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Signed-off-by: Eric Anholt <eric@anholt.net >
2009-06-19 16:43:45 -07:00
Chia-I Wu
ed91389618
intel: Data are copied in the wrong direction when breaking COW tie.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Signed-off-by: Eric Anholt <eric@anholt.net >
2009-06-19 16:43:45 -07:00
Chia-I Wu
1a7ec317ef
intel: Fix migration from sys_buffer in intel_bufferobj_buffer.
...
intel_bufferobj_subdata is called to migrate data from sys_buffer, and
it expects only one of buffer or sys_buffer is non-NULL.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Signed-off-by: Eric Anholt <eric@anholt.net >
2009-06-19 16:43:45 -07:00
Roland Scheidegger
402df41c1c
radeon: make cubemap mipmap generation work
...
need to pass target parameter to radeon_teximage/radeon_subteximage functions
otherwise mipmap generation for cube maps can't work (assert/segfault in
_mesa_generate_mipmap)
2009-06-20 00:28:39 +02:00
Roland Scheidegger
7a5c5b9af3
demos: make cubemap work without EXT_fbo support
...
use SGIS_generate_mipmap if EXT_fbo support (for manual mipmap generation)
is not available.
2009-06-20 00:28:38 +02:00
Brian Paul
18af7c384c
i965: interpolate colors with perspective correction by default
...
...rather than with linear interpolation. Modern hardware should use
perspective-corrected interpolation for colors (as for texcoords).
glHint(GL_PERSPECTIVE_CORRECTION_HINT, mode) can be used to get
linear interpolation if mode = GL_FASTEST.
2009-06-12 16:21:20 -06:00
Brian Paul
05f0d90962
mesa: use larger initial refcount for NullBufferObj
...
Refcounting of the null/default buffer object isn't perfect yet so be
extra safe.
2009-06-12 16:01:02 -06:00
Brian Paul
0854b7e972
mesa: use _mesa_reference_buffer_object() in a few places
2009-06-12 16:01:02 -06:00
Brian Paul
d7ea9ddf58
mesa: use _mesa_reference_buffer_object() in a few places
2009-06-12 16:01:02 -06:00
Brian Paul
193177b732
tests: added persp_hint.c test
...
Test the effect of GL_PERSPECTIVE_CORRECTION_HINT on color interpolation.
2009-06-12 15:59:53 -06:00
Dave Airlie
c4a5754a8c
add some info to relnotes on radeon
2009-06-13 07:43:04 +10:00
Maciej Cencora
4109108739
r300: add support for EXT_texture_sRGB
...
Tested with glean/texture_srgb and wine/d3d9 tests on RV535
2009-06-12 19:08:44 +02:00
Brian Paul
d0b0df380a
set/mesa: enable GL_NV_texture_env_combine4
...
This is handled entirely in core Mesa where the combiner state is converted
into a fragment program.
2009-06-12 10:18:15 -06:00
Alex Deucher
1036ef2bf4
Merge master and fix conflicts
2009-06-12 12:09:34 -04:00
Brian Paul
5379f35a15
tests: added arbgpuprog, for compile-testing ARB vertex/fragment programs
2009-06-12 08:16:18 -06:00
Brian Paul
509d9eb686
st/mesa: additional debug code (disabled)
2009-06-12 08:16:18 -06:00
Brian Paul
fb64365642
demos: update fbotexture.c to use EXT or ARB functions exclusively
...
When the -arb option is specified we use GL_ARB_framebuffer_object intead
of GL_EXT_framebuffer_object.
For some vendors' OpenGL it's important to call the ARB entrypoints
instead of the EXT entrypoints to get correct behaviour. Use some
function pointer tricks to do this (instead of GLEW).
2009-06-12 08:15:33 -06:00
Brian Paul
476685c63c
util: additional function pointers
2009-06-12 08:15:33 -06:00
Jakob Bornecrantz
1cd0afffc9
progs/rbug: Add binary to bmp converter program
2009-06-12 15:07:57 +01:00
Jakob Bornecrantz
3fff84a999
Merge branch 'mesa_7_5_branch'
2009-06-12 12:31:04 +01:00
Jakob Bornecrantz
c6de08fff4
mesa: Enable uploads of only depth to z24s8 textures
2009-06-12 12:29:02 +01:00
Owen W. Taylor
279143c6e8
Disable SGI_swap_control extension for DRI2
...
We currently don't have support for SGI_swap_control for direct
contexts with DRI2, so disable reporting the extension. Reporting
the extension, and then having glXSwapIntervalSGI() "succeed"
but do nothing can confuse applications.
https://bugs.freedesktop.org/show_bug.cgi?id=22123
2009-06-12 11:41:37 +10:00
Dave Airlie
d0fab94842
radeon: fix size of mipmap texture array
2009-06-12 11:37:13 +10:00
Dave Airlie
a5d92d7ed2
radeon/r200/r300: fix max texture levels assert
...
use the actual value set in the context
2009-06-12 11:35:10 +10:00
Dave Airlie
7f223ff891
Merge remote branch 'main/radeon-rewrite'
2009-06-12 11:17:32 +10:00
Alex Deucher
917f8bc1a8
Add RV740 support
2009-06-11 18:24:41 -04:00
Maciej Cencora
67bbfb9c68
r300: fix VAP setup
...
If GL context had e.g. tex0, tex2 and fog the VAPOutputCntl1 returned 0x104 instead of 0x124 - that meaned we're sending only 8 texcoords (instead of 12) which ended up in GPU hang.
2009-06-11 23:25:54 +02:00
Maciej Cencora
234797564d
r300: fix for SW TCL path
...
We shouldn't use i variable for SWTCL_OVM_TEX because textures doesn't have to be enabled in "packed" order.
We could have tex1,tex3 and fog which would receive 7,9,8 OVM locations instead of 6,7,8.
2009-06-11 23:25:54 +02:00
Maciej Cencora
8d728b8fe7
r300: don't send unused attributes for SW TCL path
2009-06-11 23:25:54 +02:00
Maciej Cencora
b5d49cb195
r300: send only RS_IP_* regs that we are going to use
2009-06-11 23:25:53 +02:00
Maciej Cencora
2b5f8d2b55
r300: fix RS setup when no colors and textures are sent to FP
...
RS_COL_FMT field is part of RS_IP_* reg not RS_INST_*
2009-06-11 23:25:53 +02:00
Maciej Cencora
34cb4b6be3
r300: r500 fragment program fixes
...
- when rewriting per component negate swizzle, first instruction should get not negated source
- KIL instruction ignores swizzles
TODO:
- tex instructions does not support saturation
- tex instructions cannot read from consant memory
2009-06-11 23:25:53 +02:00
Maciej Cencora
e21e82f425
radeon: increase max bo count
2009-06-11 23:25:53 +02:00
Maciej Cencora
9abc72d1fc
r300: fix a GPU lock up
...
Sending from VAP more texture coordinates than RS expects results in GPU hang.
Fixes BumpSelfShadow from DirectX8 SDK.
2009-06-11 23:24:25 +02:00
Maciej Cencora
de19eb0b0d
r300: fix vertex program bug
...
If the vertex program didn't write position attribute, the position invariant function would add necessary instructions, but the vertex position would be overwritten by artificial outputs insts added to satisfy fragment program requirements.
Fixes "whole screen is gray" problem for HW TCL path in sauerbraten when shaders are enabled, and whole slew of wine d3d9 tests.
2009-06-11 23:24:25 +02:00
Maciej Cencora
2611e92da5
r300: move some code for easier debugging
2009-06-11 23:24:25 +02:00
Maciej Cencora
52645c4647
r300: print vertex program when debugging is enabled
2009-06-11 23:24:25 +02:00
Maciej Cencora
28724b575d
r300: fix output register allocation for vertex shaders
...
If the vertex program wrote secondary color without primary color, the secondary color output register index would be 0 which resulted in overwriting vertex position in some cases.
2009-06-11 23:24:25 +02:00
Maciej Cencora
b4ebd1c191
r300: hw doesn't support saturation for tex instructions
2009-06-11 23:24:25 +02:00
Brian Paul
3754c4135c
mesa: rework vertex shader output / fragment shader input attribute matching
...
Before, if a vertex shader's outputs didn't exactly match a fragment
shader's inputs we could wind up with invalid TGSI shader declarations.
For example:
Before patch:
DCL OUT[0], POSITION
DCL OUT[1], COLOR[1]
DCL OUT[2], GENERIC[0]
DCL OUT[3], GENERIC[0] <- note duplicate [0]
DCL OUT[4], GENERIC[2]
After patch:
DCL OUT[0], POSITION
DCL OUT[1], COLOR[1]
DCL OUT[2], GENERIC[0]
DCL OUT[3], GENERIC[1]
DCL OUT[4], GENERIC[2]
2009-06-11 14:58:25 -06:00
Brian Paul
322e8556b9
mesa: add default function for ctx->Driver.CheckQuery() hook
2009-06-11 14:58:25 -06:00
José Fonseca
0ddc38309a
python/retrace: Show the contents of the depth/stencil and surfaces before/after transfers.
2009-06-11 20:46:07 +01:00
José Fonseca
e1700009b7
python/retrace: Interpret is_texture_referenced/is_buffer_referenced.
2009-06-11 19:24:48 +01:00
José Fonseca
d5ba39ad08
wgl: Fix prototype.
2009-06-11 19:05:46 +01:00
José Fonseca
877061141a
Merge branch 'mesa_7_5_branch'
2009-06-11 19:03:54 +01:00
José Fonseca
de413b1ba9
mesa: Use new pf_is_depth_and_stencil inline.
2009-06-11 19:02:59 +01:00
José Fonseca
3f2e006b75
gallium: New pf_is_depth_and_stencil / pf_is_depth_or_stencil inlines.
2009-06-11 19:02:59 +01:00
José Fonseca
7cafd49c93
mesa: Use PIPE_TEXTURE_USAGE_DEPTH_STENCIL for any depth or stencil format.
2009-06-11 19:02:59 +01:00
José Fonseca
862c7b8cd3
mesa: Remove dead code.
2009-06-11 19:02:59 +01:00
Brian Paul
bb0b954f12
st/mesa: fix typo s/BFC0/BFC1/
2009-06-11 10:40:19 -06:00
Brian Paul
9d5479eeeb
vbo: fix assertion, #define IMM_BUFFER_NAME
...
This was sometimes seen when Glean exited upon test failure when using
Gallium.
2009-06-11 09:46:02 -06:00
José Fonseca
bf89ecb6c9
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_framebuffer.c
2009-06-11 16:34:56 +01:00
José Fonseca
cc09724a50
python/tests: Test sampling from a depth texture.
2009-06-11 16:22:17 +01:00
Jakob Bornecrantz
41cf681535
mesa: Only do read write when we don't have a depth value to write
2009-06-11 15:37:53 +01:00
José Fonseca
e3f14f2f3b
progs: Port fp programs to GLEW.
2009-06-11 13:19:34 +01:00
José Fonseca
48d816b8ff
mesa: Take the format from the right structure.
2009-06-11 12:23:09 +01:00
José Fonseca
96aca15c9d
meas: Use a read/write transfer when writing stencil component, but not touching the depth component.
2009-06-11 11:47:20 +01:00
Jerome Glisse
b445e54868
r300: fix indexed primitive rendering when using memory manager
2009-06-11 11:06:14 +02:00
Alex Deucher
1d8d4cad6a
Properly set aos_count
...
This is used by radeonReleaseArrays to free AOS.
2009-06-11 01:54:40 -04:00
Thomas Hellstrom
0d2ac7a10b
dri st: Don't require the PIPE_TEXTURE_USAGE_RENDER_TARGET property for depth- and stencil renderbuffers.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-06-11 00:56:03 +02:00
Michel Dänzer
550a2fe1b7
scons: Indent abbreviated command line strings, so command messages stand out.
...
Also add ASPPCOMSTR.
2009-06-11 12:15:50 +02:00
Michel Dänzer
3885b708fd
intel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.
...
Fixes glean depthStencil test.
2009-06-11 12:09:10 +02:00
Alex Deucher
7ac2f655f8
move radeon_set_screen_flags() up so CHIP_FAMILY is set before using it
...
fixes last commit.
2009-06-10 18:02:20 -04:00
Alex Deucher
51507b0e94
Use correct scratch reg offset for r6xx/r7xx
2009-06-10 17:56:05 -04:00
José Fonseca
337f559cd2
mesa: Reverse s8z24 into z24s8 as required by EXT_packed_depth_stencil.
...
Actually, after spotting this problem, I realized this is unreachable
code. However don't bother to enable this fast path now, given the normal
path is working just fine.
2009-06-10 21:29:25 +01:00
José Fonseca
8fa8669aeb
mesa: Fix typo in bitmask.
2009-06-10 21:25:54 +01:00
José Fonseca
0a4fcabe44
mesa: Fix draw_stencil_pixels for PIPE_FORMAT_Z24S8_UNORM.
...
Reversed component order.
This fixes glean depthStencil test failures for PIPE_FORMAT_Z24S8_UNORM
visuals.
2009-06-10 20:05:00 +01:00
Brian Paul
dbab657fe7
glsl: fix warnings, update comments, s/TRUE/GL_TRUE/
...
(cherry picked from master, commit 7fdd64ab29 )
2009-06-10 12:22:36 -06:00
Brian Paul
9225b67383
glsl: Handle continuation characters in preprocessor.
...
(cherry picked from master, commit cc22620e4b )
2009-06-10 12:21:56 -06:00
Brian Paul
7fdd64ab29
glsl: fix warnings, update comments, s/TRUE/GL_TRUE/
2009-06-10 12:16:15 -06:00
Michal Krol
cc22620e4b
glsl: Handle continuation characters in preprocessor.
2009-06-10 20:00:15 +02:00
Brian Paul
88527220e4
swrast: fix state validation bug for changing program constants
...
Add _NEW_PROGRAM_CONSTANTS to _SWRAST_NEW_DERIVED.
This makes sure that we update the fragment shader's constants when state
vars (such as point size) changes.
Fixes the progs/glsl/points.c demo.
2009-06-10 09:31:01 -06:00
Brian Paul
506989b20e
glsl: Fix symbol replacement handling in preprocessor.
...
(cherry picked from master, commit d9617deb00 )
2009-06-10 09:31:01 -06:00
Brian Paul
6f50c9865d
mesa: disable texture unit error check in _mesa_MatrixMode()
...
See comments for details.
2009-06-10 09:31:01 -06:00
Brian Paul
5450281ff7
docs: document GLSL preprocessor fixes
2009-06-10 09:31:01 -06:00
José Fonseca
4d16eb5e18
util: Single precision constants.
2009-06-10 15:39:47 +01:00
José Fonseca
978bca8b2a
mesa: Single precision constants.
2009-06-10 15:39:34 +01:00
José Fonseca
52411a1951
mesa: Pure software accum buffer.
...
The existing implementation was already implemented on software, but relied
on the pipe driver to always support the R16G16B16A16_SNORM format. This
patch eliminates that, without prejudice against a future hardware-only
implementation.
It also avoids some of the short <-> float conversions, and only does a read
transfer of the color buffer on GL_RETURN if absolutely necessary.
2009-06-10 15:39:02 +01:00
José Fonseca
8bfbb7ec8b
gallium: Shorthand functions for computing stride and sizes for a rect.
2009-06-10 15:31:12 +01:00
Brian Paul
aebc08b5cc
gallium: updated PIPE_CAP_x comments
2009-06-10 08:12:19 -06:00
Jerome Glisse
316598b96f
r300: make sure indexed rendering doesn't try to use more than the num of vertices
...
When with memory manager we need to make sure the GPU won't try to access
beyond vertex buffer size, do so by enforcing that the maximun index is the
last vertex of the buffer.
2009-06-10 14:59:33 +02:00
Brian Paul
ded8eb25ef
st/mesa: enable EXT_provoking_vertex
2009-06-09 22:01:55 -06:00
Brian Paul
0195cc1c0d
tests: prim.c demo, modified for GL_EXT_provoking_vertex
2009-06-09 22:00:22 -06:00
Brian Paul
39fd18014c
tests: need tkmap.c for prim.c
2009-06-09 21:59:36 -06:00
Brian Paul
8b45c9ce6e
draw: implement flatshade_first for drawing pipeline
2009-06-09 21:53:34 -06:00
Brian Paul
5aec03aaf4
softpipe: implement flatshade_first for triangles
2009-06-09 21:52:37 -06:00
Brian Paul
6f26f8c750
softpipe: implement flatshade_first for line setup
2009-06-09 21:51:29 -06:00
Alex Deucher
530e3e389d
Pull in additional state setup from the DDX
2009-06-09 18:20:57 -04:00
Keith Whitwell
76a1017e97
mesa/st: fix tracking of mapped buffer ranges
...
In st_bufferobj_map_range(), set obj->Offset consistently with its
usage elsewhere.
2009-06-09 18:32:18 +01:00
Keith Whitwell
9192347443
stw: ignore swapbuffer requests on singlebuffer
...
Return TRUE in this case. Returning FALSE seems to result in
mis-rendering -- possibly opengl32.dll is trying to compensate by
doing a software blit??
2009-06-09 16:37:38 +01:00
Brian Paul
cb549775a5
glsl: Expand nested preprocessor macros.
...
(cherry picked from master, commit ef8caec29a )
2009-06-09 09:14:38 -06:00
Jakob Bornecrantz
ee98ae5a29
Merge branch 'mesa_7_5_branch'
...
Conflicts:
Makefile
src/mesa/main/version.h
src/mesa/shader/slang/slang_preprocess.c
src/mesa/state_tracker/st_cb_bufferobjects.c
2009-06-09 07:53:25 +02:00
Michal Krol
d9617deb00
glsl: Fix symbol replacement handling in preprocessor.
2009-06-10 12:15:13 +02:00
Michal Krol
03760a3903
winsys/gdi: Link to ws2_32 library.
2009-06-10 12:01:13 +02:00
Michal Krol
1b334587e9
trace: __func__ --> __FUNCTION__.
2009-06-10 11:56:38 +02:00
Eric Anholt
b30dc2c66a
i915: Add an option for testing the effect of early Z in classic mode.
...
The early Z stuff is supposed to be unsafe without some more work in the
enable/disable path (in particular, how do we want to get it disabled on
the way out to the X Server?), but at the moment is 6% in OA.
2009-06-09 16:12:43 -07:00
Eric Anholt
38eddf04ed
intel: Remove an unneeded hunk that slipped in with texture tiling.
...
intel_miptree_pitch_align does this later on.
2009-06-09 15:21:17 -07:00
Eric Anholt
1362484840
intel: Base tri clearing depth on Y tiling, not IS_I965().
...
Y tiling is why the 965 check was there, but I wanted to experiment with Y
on pre-965 as well.
2009-06-09 15:21:17 -07:00
Eric Anholt
2d57e96408
intel: Fix intel_region_unmap to do unmap, not map.
...
Thanks to Shuang He for catching this.
2009-06-09 15:21:16 -07:00
Brian Paul
a03b349153
i965: added intelFlush() call in intel_get_tex_image()
...
Fixes the render-to-texture test in progs/tests/getteximage.c
2009-06-09 15:07:39 -06:00
Brian Paul
29c79a03a4
tests: check for GL_EXT/ARB_framebuffer_object
2009-06-09 15:06:41 -06:00
Brian Paul
073c20befa
tests: also test glGetTexImage with render to texture
...
Also, adjust texture dims for the original test.
And use GLEW.
2009-06-09 15:05:36 -06:00
Brian Paul
139f2ddde4
tests: quick and dirty glGetTexImage() test program
2009-06-09 14:05:17 -06:00
Brian Paul
b38dbc5179
intel: use GLboolean, not int, for compressed parameter
2009-06-09 14:05:17 -06:00
Brian Paul
89205a8760
intel: make a bunch of glTexImage-related functions static
2009-06-09 14:05:17 -06:00
Brian Paul
4eb9e58bbb
intel: whitespace clean-ups
2009-06-09 14:05:17 -06:00
Brian Paul
c55f1a6c99
vbo: more glDrawElements debug code (disabled)
2009-06-09 14:05:17 -06:00
Brian Paul
4a7fd6323a
mesa: added a simple bounds checker to glMap/UnmapBuffer() (disabled)
2009-06-09 14:05:17 -06:00
Jakob Bornecrantz
41482a6461
trace/rbug: Add support for draw block rule
2009-06-09 19:24:06 +01:00
Jakob Bornecrantz
f3cf3d2fc2
rbug: Change block protocol around a bit
2009-06-09 19:22:40 +01:00
Jakob Bornecrantz
b71a254f05
trace/rbug: Return textures currently bound to context
2009-06-09 16:00:40 +01:00
Jakob Bornecrantz
f0c21c0294
rbug: Extend context info and block ops
2009-06-09 16:00:39 +01:00
Brian Paul
42e9bde0fa
intel: remove extra \n from warning string
2009-06-09 08:53:56 -06:00
Brian Paul
a81097c545
mesa: reorder fields, update comments for gl_buffer_object
2009-06-09 08:52:56 -06:00
Michal Krol
ef8caec29a
glsl: Expand nested preprocessor macros.
2009-06-09 12:14:40 +02:00
Dave Airlie
18b3cbcede
radeon: fix mipmap_limits crasher.
...
This gets the correct srclvl image map when uploading images to the new mipmap.
2009-06-09 13:52:58 +10:00
Corbin Simpson
c534604800
r300-gallium: HW TCL glxgears. (Read the rest of the log.)
...
Um. So, yeah. Two massive WTF moments here. The first one is that, somehow,
I never actually hooked up vertex shader emission, so the only time that the
VAP gets set up is during surface_copy/surface_fill. That's why acidgears
was happening.
The second one is that, somehow, once I actually hooked it up, glxgears just
magically worked. Without any actual, real testing, I somehow accidentally
made the shader compiler work. Go figure.
2009-06-08 20:23:34 -07:00
Corbin Simpson
cb3b91f2d6
r300-gallium: Make UCP and clip work again for SW TCL.
...
SW TCL: tri-clip works, tri-userclip works
HW TCL: tri-clip fails, tri-userclip works
That is a 200% improvement over the previous situation. Woot.
2009-06-08 20:01:57 -07:00
Corbin Simpson
ffa1972efb
r300-gallium: Don't emit UCP planes for SW TCL.
2009-06-08 19:55:33 -07:00
Brian Paul
8d0f72e8f9
st/mesa: enable GL_ARB_map_buffer_range
2009-06-08 17:07:21 -06:00
Brian Paul
e297569d65
docs: new feature: GL_ARB_map_buffer_range
2009-06-08 17:06:13 -06:00
Brian Paul
e75b283b45
mesa: implement GL_ARB_map_buffer_range
...
Only enabled for software drivers at this point.
Note that the gl_buffer_object::Access enum field has been replaced by
a gl_buffer_object::AccessFlags bitfield. The new field is a mask of
the GL_MAP_x_BIT flags which is a superset of the old GL_READ_ONLY,
GL_WRITE_ONLY and GL_READ_WRITE modes. When we query GL_BUFFER_ACCESS_ARB
we translate the bitfield into the conventional enum values.
2009-06-08 17:02:36 -06:00
Brian Paul
75cb3c3b7a
mesa: regenerated files for GL_ARB_map_buffer_range
2009-06-08 17:00:12 -06:00
Brian Paul
9c4ab6f4cc
glapi: hook in ARB_map_buffer_range.xml
2009-06-08 16:59:53 -06:00
Brian Paul
b6bc5f37a5
glapi: spec/xml file for GL_ARB_map_buffer_range
2009-06-08 16:58:45 -06:00
Brian Paul
34bb024cf2
st/mesa: fix incorrect bufObj Length assignment, remove unneeded assertion
2009-06-08 16:11:17 -06:00
Brian Paul
462a9525c7
mesa: reorder fields, update comments for gl_buffer_object
2009-06-08 15:27:10 -06:00
Jon TURNEY
7eed6ab5b5
Cygwin build fixes
...
Fix mklib to deal with NOPREFIX and use --enable-auto-image-base for cygwin
Teach configure.ac some basic facts about cygwin
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk >
2009-06-08 14:30:46 -06:00
Brian Paul
304ba4bba4
glsl: Fix preprocessor define argument parsing for dead sections.
...
(cherry picked from master, commit 19a54d9f10 )
2009-06-08 13:53:33 -06:00
Michal Krol
19a54d9f10
glsl: Fix preprocessor define argument parsing for dead sections.
2009-06-08 20:52:47 +02:00
Jakob Bornecrantz
77c329a277
pipebuffer: Silence out of heap space debug print
2009-06-08 19:54:55 +02:00
Brian Paul
854151ba62
glsl: preprocessor debug code (disabled)
2009-06-08 10:58:04 -06:00
Brian Paul
cc26e27746
docs: document MESA_EXTENSION_OVERRIDE env var
2009-06-08 10:56:51 -06:00
Brian Paul
f9c0ce0e07
softpipe: advertise PIPE_CAP_MAX_TEXTURE_ANISOTROPY as 16.0
...
Note that this doesn't have any real significance since
PIPE_CAP_ANISOTROPIC_FILTER still returns 0.
2009-06-08 10:55:34 -06:00
Brian Paul
a6f2663616
mesa: new MESA_EXTENSION_OVERRIDE env var
...
Can be used to enable/disable extensions as reported by
glGetString(GL_EXTENSIONS).
If a name is preceeded by '-' it's disabled. Otherwise, the named
extension is enabled.
Intended for debug/test purposes.
2009-06-08 10:52:16 -06:00
Brian Paul
b6753adbc7
st/mesa: remove invalid assertion
...
It's legal for ARB_vertex_program programs to not write to result.position.
The results are undefined in that case. This assertion was causing us to
abort/exit though.
2009-06-08 10:46:46 -06:00
José Fonseca
e09f78d8dc
mesa: Use matching signedness for the counter as upper bound.
2009-06-08 16:56:41 +01:00
José Fonseca
42678dba94
mesa: Allocate tokens from the heap.
...
The recent increase ST_MAX_SHADER_TOKENS to 8K causes stack overflows on
windows.
Failure to allocate is not being propagated to the caller. This is not
a regression since the previous _mesa_malloc result wasn't being
checked as well. Unfortunately it is not easy to fix, as the callers of
these functions do not have failure propagation mechanism either, and
so on. So leaving a just fixme note for now.
2009-06-08 16:56:41 +01:00
Brian Paul
33d6327770
mesa: better error message for invalid texture unit index
2009-06-08 09:53:00 -06:00
Brian Paul
0bced6a326
mesa: bump MAX_PROGRAM_ENV_PARAMS from 128 to 256
...
Also, MAX_NV_VERTEX_PROGRAM_PARAMS should be 96, not 128 (or 256).
2009-06-08 09:53:00 -06:00
Keith Whitwell
0d3c8fbf12
mesa/vbo: drop all references to vbo on destroy
...
We were adding references to the input arrays, but failing to drop
them on destruction. This could lead to a 64kb buffer being leaked
each context destruction.
2009-06-08 16:27:43 +01:00
Brian Paul
fce4ee12a6
mesa: EXT_vertex_array_bgra fixes
...
1) Pass the correct format when calling update_array in
_mesa_VertexAttribPointerARB.
2) glVertexAttribPointerNV accepts GL_BGRA format too.
3) raise INVALID_VALUE error when format is BGRA and normalized is
false in glVertexAttribPointerARB
(cherry picked from commit 4adb190a16 )
2009-06-08 07:25:24 -06:00
Maciej Cencora
4adb190a16
mesa: EXT_vertex_array_bgra fixes
...
1) Pass the correct format when calling update_array in
_mesa_VertexAttribPointerARB.
2) glVertexAttribPointerNV accepts GL_BGRA format too.
3) raise INVALID_VALUE error when format is BGRA and normalized is
false in glVertexAttribPointerARB
2009-06-08 07:23:56 -06:00
Jakob Bornecrantz
8d2324d355
trace/rbug: Sleep on windows when blocked
2009-06-08 15:01:48 +02:00
Jakob Bornecrantz
4d9d0e6230
stw: If stfb not set don't call into mesa
2009-06-08 14:45:56 +02:00
Jakob Bornecrantz
283e84bfb3
progs/tests: Add some scissor tests
2009-06-08 14:45:40 +02:00
José Fonseca
78dad27564
Revert "scons: Less aggressive optimizations for MSVC 64bit compiler."
...
This reverts commit fc7f924782 .
2009-06-08 11:13:41 +01:00
Dave Airlie
8064a517b2
llvm: fix compile on gcc 4.4
2009-06-08 18:26:27 +10:00
Maciej Cencora
db63f63897
r300: fix regression caused by 056bc77547c304021a0faf204897ed238a5cf424
...
Fixes GPU hangs in software TCL path
2009-06-08 07:21:14 +10:00
Ben Skeggs
1a7739ae26
nouveau: forgotten makefile...
2009-06-07 19:29:29 +10:00
Dave Airlie
545e574cd9
Merge remote branch 'origin/master' into radeon-rewrite
2009-06-07 16:51:32 +10:00
Michel Dänzer
e2aedfa620
r300: Endianness fixes for recent vertex path changes.
...
Signed-off-by: Maciej Cencora <m.cencora@gmail.com >
2009-06-07 16:40:09 +10:00
Maciej Cencora
58982f8af1
r300: vertex array stride = 0 means that data are tightly packed in the array
2009-06-07 16:40:04 +10:00
Maciej Cencora
ca13937ef9
r300: GL_(U)SHORT and GL_(U)BYTE with < 4 components can also be HW accelerated
...
Also when index format is GL_UBYTE, convert it to GL_USHORT not GL_UINT.
Fix license header too.
Reported by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-06-07 16:39:58 +10:00
Maciej Cencora
a8c7c96be7
r300: remove unused code
2009-06-07 16:39:54 +10:00
Maciej Cencora
72c78b9992
r300: rewrite vertex setup for software T&L path using functions from software TCL path
2009-06-07 16:39:47 +10:00
Maciej Cencora
6cd0628f9f
r300: prepare for some code duplication removal
2009-06-07 16:39:43 +10:00
Maciej Cencora
365799caea
r300: enable EXT_vertex_array_bgra extensions
2009-06-07 16:39:39 +10:00
Maciej Cencora
fd80128e15
r300: add hw accelerated support for different vertex data formats
2009-06-07 16:39:33 +10:00
Maciej Cencora
e98082997c
r300: prepare for different vertex data type support
2009-06-07 16:39:28 +10:00
Maciej Cencora
a27b689d08
r300: fixup vertex attributes ordering
...
Always allocate the vertex program input registers in the same order as the vertex attributes are passed in vertex arrays.
2009-06-07 16:39:23 +10:00
Maciej Cencora
ab60a44331
r300: always pass 4 color components to RS unit
...
Even if we don't pass all 4 color components to vertex shader unit, the vertex program can generate the missing components.
2009-06-07 16:39:16 +10:00
Ben Skeggs
f1edfa09ea
nv50: fix multi-texturing
2009-06-06 16:24:09 +10:00
Ben Skeggs
6c1627a51c
nv50: support non-normalized texture coords
2009-06-06 16:24:08 +10:00
Brian Paul
cfff2a6189
mesa: bump version to 7.5-rc3
2009-06-05 17:16:47 -06:00
Corbin Simpson
b7aa5b1d10
r300-gallium: Use VAP_CLIP_CNTL.
...
Makes tri-userclip work with HW TCL.
2009-06-05 13:46:59 -07:00
Corbin Simpson
1a359d9835
r300-gallium: Emit UCP.
2009-06-05 11:21:09 -07:00
Corbin Simpson
9e4590dff7
r300-gallium: Improve vs emit.
2009-06-05 10:18:20 -07:00
Michal Krol
4c034441a8
mesa: Fix wglext.h prototypes.
2009-06-05 15:01:08 +02:00
Ben Skeggs
d06e380e02
nv50: use larger tile sizes
2009-06-05 22:53:24 +10:00
Ben Skeggs
a471497345
nv50: use nouveau_bo for query buffers
2009-06-05 22:53:24 +10:00
Ben Skeggs
1a92c71a66
nv50: create textures with nouveau_bo, for flexibility with tiling later
2009-06-05 22:53:23 +10:00
Michal Krol
b04470b0bc
util: Fix winsock include.
2009-06-05 14:32:31 +02:00
Corbin Simpson
90bfff0a29
r300-gallium: Mute some debug info.
...
Most of it is no longer interesting.
2009-06-05 00:12:26 -07:00
Corbin Simpson
4c66c5bf92
r300-gallium: vs: Fix negation calculation.
...
Still doesn't draw right, but at least it's the right numbers now.
Thanks to taiu in #dri-devel.
2009-06-04 23:56:32 -07:00
Corbin Simpson
571b36831b
r300-gallium: Fix pasta.
...
Trivial but annoying.
2009-06-04 23:56:08 -07:00
Corbin Simpson
8652ad6899
r300-gallium: Improve vs debug more.
...
Still not showing me why my stuff's failing, but getting there.
2009-06-04 23:27:46 -07:00
Corbin Simpson
31609acbe9
r300-gallium: vs: Add negation, SUB.
...
Doesn't work. WTF.
2009-06-04 23:27:46 -07:00
Corbin Simpson
fb7d1fb0f0
r300: Moar vs debug.
2009-06-04 23:27:46 -07:00
Ben Skeggs
36705ee044
nouveau: plug in our map_buffer_range and friends
2009-06-05 14:48:45 +10:00
Ben Skeggs
40ed449918
nouveau: fix build with libdrm_nouveau 0.6
2009-06-05 14:37:04 +10:00
Ben Skeggs
6b3ca672eb
nouveau: remove unneeded code from ws, use pipe_buffer_ instead of ws->
2009-06-05 14:37:03 +10:00
Ben Skeggs
80e9e1ee81
nouveau: move channel creation into pipe drivers
2009-06-05 14:37:03 +10:00
Ben Skeggs
1b207d9bb8
nouveau: call notifier/grobj etc funcs directly
...
libdrm_nouveau is linked with the winsys, there's no good reason to do all
this through yet another layer.
2009-06-05 14:37:03 +10:00
Ben Skeggs
d4d584b16e
nv04: remove u_simple_screen usage
2009-06-05 14:37:02 +10:00
Ben Skeggs
251c47117b
nv10: remove u_simple_screen usage
2009-06-05 14:37:02 +10:00
Ben Skeggs
74c45add47
nv20: remove u_simple_screen usage
2009-06-05 14:37:01 +10:00
Ben Skeggs
901d7c3057
nv30: remove u_simple_screen usage
2009-06-05 14:37:01 +10:00
Ben Skeggs
74adb150d5
nv40: remove u_simple_screen usage
2009-06-05 14:37:01 +10:00
Ben Skeggs
bc466be695
nouveau: add pipe_buffer/fence code to pipe drivers, move nv50 over
2009-06-05 14:37:01 +10:00
Ben Skeggs
072fdc1fd3
nouveau: pass nouveau_bo instead of pipe_buffer to so_ calls
2009-06-05 14:37:00 +10:00
Ben Skeggs
04cef8a037
nouveau: call nouveau_pushbuf directly rather than going through nvws
2009-06-05 14:37:00 +10:00
Dan Nicholson
6453605785
osmesa: Link with -ldl for dlopen code
...
Now that the dlopen wrappers are built into libmesa.a, we need to link
standalone libOSMesa with libdl to resolve dlopen and friends on
platforms that need it.
(cherry picked from commit 4795dd5950 )
2009-06-04 19:47:41 -07:00
Dan Nicholson
5df6468589
osmesa: Allow building standalone in all three channel widths
...
autoconf had been designating the 8 bit libOSMesa as the default
standalone osmesa, but the Makefile expected it to be linked to libGL.
Fix up the osmesa Makefile so that it allows any of the combinations of
standalone and channel width to be built.
Fixes bug #21980 .
(cherry picked from commit 7441dcd90b )
2009-06-04 19:47:32 -07:00
Dan Nicholson
4795dd5950
osmesa: Link with -ldl for dlopen code
...
Now that the dlopen wrappers are built into libmesa.a, we need to link
standalone libOSMesa with libdl to resolve dlopen and friends on
platforms that need it.
2009-06-04 19:45:32 -07:00
Dan Nicholson
7441dcd90b
osmesa: Allow building standalone in all three channel widths
...
autoconf had been designating the 8 bit libOSMesa as the default
standalone osmesa, but the Makefile expected it to be linked to libGL.
Fix up the osmesa Makefile so that it allows any of the combinations of
standalone and channel width to be built.
Fixes bug #21980 .
2009-06-04 19:04:36 -07:00
Jakob Bornecrantz
61ffba44fd
trace/rbug: Use condvar on system that has it for blocking
2009-06-05 03:01:34 +01:00
Jakob Bornecrantz
d4c578ae41
gallium: Make pipe thread say if it has condvars or not
2009-06-05 02:57:19 +01:00
Alex Deucher
8c27d99eb8
re-arrange state structure
...
- split out renderbuffers
- split out shaders
- split our viewports
Only send the state needed.
2009-06-04 20:22:14 -04:00
Jakob Bornecrantz
76b3072e9b
trace/rbug: Add new contexts functions to trace rbug
2009-06-04 23:45:29 +01:00
Jakob Bornecrantz
384bbe278d
rbug: Update rbug protocol with new context calls
2009-06-04 23:45:29 +01:00
Alex Deucher
b591436230
Don't program VGT_OUT_DEALLOC_CNTL/VGT_VERTEX_REUSE_BLOCK_CNTL
...
These are chip specific and are programmed by the drm.
This should fix hangs on some chips.
2009-06-04 16:57:20 -04:00
Brian Paul
185fbcce36
mesa: call _mesa_ funcs, not gl funcs for debugging
2009-06-04 14:26:51 -06:00
Alex Deucher
4782bebe44
use the float interface for viewport updates
2009-06-04 15:30:37 -04:00
Brian Paul
9d58724c51
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/main/context.c
2009-06-04 13:16:13 -06:00
Brian Paul
9424d81d18
softpipe: separate case for PIPE_PRIM_POLYGON in sp_vbuf_draw()
...
Because of flat shading, we can't use same code as PIPE_PRIM_TRIANGLE_FAN.
This is a follow-on to commit a59575d8fb .
(cherry picked from commit 086ecea179 )
2009-06-04 13:13:14 -06:00
Brian Paul
6907650211
softpipe: fix incorrect tri vertex order for PIPE_PRIM_POLYGON rendering
...
This fixes incorrect front/back-face orientation.
(cherry picked from commit a64bbdaa3e )
2009-06-04 13:12:13 -06:00
Brian Paul
d37795c453
st/mesa: increase ST_MAX_SHADER_TOKENS to 8k
2009-06-04 13:10:31 -06:00
Brian Paul
45e744dddc
tgsi: increase MAX_LABELS to 4096
2009-06-04 13:10:31 -06:00
Brian Paul
81a0ef3f20
mesa: update wglext.h to latest version
2009-06-04 10:30:25 -06:00
Brian Paul
d33c315d9e
mesa: remove PFNGL typedefs that are in glext.h
2009-06-04 10:29:44 -06:00
Brian Paul
73a48a8af3
mesa: upgrade glext.h to version 52
...
A number of the PFNGL* function typedefs are now in glext.h and must be
omitted from the gl.h file. gl.h will be pruned in the next commit.
2009-06-04 10:27:47 -06:00
Eric Anholt
1ba96651e1
intel: Add support for tiled textures.
...
This is about a 30% performance win in OA with high settings on my GM45,
and experiments with 915GM indicate that it'll be around a 20% win there.
Currently, 915-class hardware is seriously hurt by the fact that we use
fence regs to control the tiling even for 3D instructions that could live
without them, so we spend a bunch of time waiting on previous rendering in
order to pull fences off. Thus, the texture_tiling driconf option defaults
off there for now.
2009-06-04 14:00:43 +00:00
Eric Anholt
165ae5e2fb
i915: Don't rely on fence regs when we don't have to.
...
We're on the way to telling the kernel about when we need fence regs on our
objects or not, and this will cut the number of places needing them.
2009-06-04 10:34:52 +00:00
Eric Anholt
1b6f7fb7d5
i915: Remove some long-dead i830 code.
2009-06-04 10:34:52 +00:00
Brian Paul
091fcf3a27
Revert "softpipe: fix flat shading provoking vertex for PIPE_PRIM_POLYGON"
...
This reverts commit 5d75124db4 .
2009-06-03 19:53:53 -06:00
Brian Paul
ab6508e399
mesa: fix parity error for tri strips with 1st provoking vertex
2009-06-03 19:52:32 -06:00
Brian Paul
8b875b732f
tnl: fix first provoking vertex case for unfilled triangles
2009-06-03 19:03:27 -06:00
Brian Paul
086ecea179
softpipe: separate case for PIPE_PRIM_POLYGON in sp_vbuf_draw()
...
Because of flat shading, we can't use same code as PIPE_PRIM_TRIANGLE_FAN.
This is a follow-on to commit a59575d8fb .
2009-06-03 18:33:07 -06:00
Brian Paul
a64bbdaa3e
softpipe: fix incorrect tri vertex order for PIPE_PRIM_POLYGON rendering
...
This fixes incorrect front/back-face orientation.
2009-06-03 18:31:55 -06:00
Brian Paul
1f1aa0c20c
tnl: fix first provoking vertex bug for line loops
2009-06-03 17:28:31 -06:00
Brian Paul
f25e1007c2
swrast: always do span clipping in _swrast_write_rgba_span()
...
It's possible for mis-behaving vertex programs to produce vertex data
with very large/NaN values. This doesn't get handled reliably by the
clipper code so we may try to rasterize triangles that extend beyond
the viewport/window. Always clip spans to avoid invalid memory accesses
later.
2009-06-03 17:16:00 -06:00
Brian Paul
0b6a0b367f
vbo: minor reformatting
2009-06-03 17:16:00 -06:00
Brian Paul
aa18e54ac9
vbo: move/refactor debug code
2009-06-03 17:16:00 -06:00
Brian Paul
13f6d07521
vbo: added debug code to check array data validity (disabled)
2009-06-03 17:16:00 -06:00
Brian Paul
e446ef50eb
vbo: new debug/dump code (disabled)
2009-06-03 17:16:00 -06:00
Brian Paul
9200954370
mesa: added NaN checking code (disabled)
2009-06-03 17:16:00 -06:00
Brian Paul
035de6a82b
mesa: check/prevent NaN for EX2/LG2
2009-06-03 17:16:00 -06:00
Brian Paul
87b2db988e
tnl: updated clip debug code (disabled)
2009-06-03 17:16:00 -06:00
Brian Paul
e7927626c1
mesa: added buffer object debug code (disabled)
2009-06-03 17:16:00 -06:00
Brian Paul
4f4280b435
tnl: add some floating point sanity checks (disabled)
2009-06-03 17:16:00 -06:00
Brian Paul
ab4fd18584
vbo: tweak out-of-bounds VBO access error message
...
Subtract 1 from _MaxElement to be clearer.
2009-06-03 17:15:59 -06:00
Alex Deucher
e355f1d642
fill in r700ColorMask, cleanup
2009-06-03 15:52:09 -04:00
Alex Deucher
ac274b68d7
start to fill in ShadeModel()
2009-06-03 15:14:44 -04:00
Alex Deucher
ada26c4059
dump command buffer
2009-06-03 14:29:06 -04:00
Alex Deucher
f5d479d7f5
Clean up scissor and viewport code
...
Switch to common functions where applicable
2009-06-03 14:19:26 -04:00
Ian Romanick
1ad1576836
Thank you git for doing the right thing.
2009-06-03 17:55:42 +01:00
Ian Romanick
c428f467b6
Fix compiling indirect.c when GLX_DIRECT_RENDERING is not defined
...
DO NOT HAND-EDIT GLX PROTOCOL FILES. Seriously. How can you miss the giant
comment at the top of the file?
2009-06-03 17:53:40 +01:00
Ian Romanick
7f8000db8b
Fast path when rebinding the same texture in single context environment
...
If there is no shared context, there is no purpose in rebinding the same
texture. In some artificial tests this improves performance 10% - 30%.
2009-06-03 17:50:37 +01:00
Brian Paul
54576130a8
st/mesa: minor clean-ups, reformatting, etc
2009-06-02 21:46:17 -06:00
Brian Paul
5cd47e0361
docs: remove version info carried over from 7.5
2009-06-02 21:41:03 -06:00
Brian Paul
8086352fef
docs: clarify GL_ARB_copy_buffer driver support
2009-06-02 21:35:11 -06:00
Brian Paul
dd174ea215
st/mesa: implement/enable GL_ARB_copy_buffer extension
2009-06-02 21:35:11 -06:00
Brian Paul
2813c08b35
mesa: fix error test mistake in _mesa_CopyBufferSubData()
2009-06-02 21:35:11 -06:00
Brian Paul
2e708fa909
docs: added GL_ARB_copy_buffer extension
2009-06-02 21:35:11 -06:00
Brian Paul
3a7399e2c4
mesa: enable GL_ARB_copy_buffer for software drivers
2009-06-02 21:35:11 -06:00
Brian Paul
08e43ebfb2
mesa: plug in new _mesa_CopyBufferSubData() functions
2009-06-02 21:35:11 -06:00
Brian Paul
dc0b71f00d
mesa: _mesa_CopyBufferSubData() function, and driver fall-back
2009-06-02 21:35:11 -06:00
Brian Paul
96a30b06db
mesa: new state for GL_ARB_copy_buffer
2009-06-02 21:35:10 -06:00
Brian Paul
76b438878e
mesa: new CopyBufferSubData() driver hook
2009-06-02 21:35:10 -06:00
Brian Paul
751977075f
glapi: regenerated files for GL_ARB_copy_buffer
2009-06-02 21:35:10 -06:00
Brian Paul
68892872ef
glapi: include ARB_copy_buffer.xml
2009-06-02 21:35:09 -06:00
Brian Paul
4a1e4f9881
glapi: GL_ARB_copy_buffer xml info
2009-06-02 21:35:09 -06:00
José Fonseca
fc7f924782
scons: Less aggressive optimizations for MSVC 64bit compiler.
...
MSVC 64bit compiler takes forever on some of the files.
Might want to revisit this again later.
2009-06-02 18:41:12 -07:00
José Fonseca
0f50c4fab8
scons: Output nice summary messages instead of long command lines.
...
You can still get the old behavior by passing the option quiet=no to scons.
2009-06-02 18:23:12 -07:00
José Fonseca
273117ceed
util: Unsaved change missing from last commit.
2009-06-02 16:41:45 -07:00
Alex Deucher
116f40a1c4
Disable clear code for now
2009-06-02 19:23:16 -04:00
Alex Deucher
b55d0dd3ba
fix an overflow in SPI_VS_OUT_CONFIG
...
VS must always export at least 1 param.
2009-06-02 19:20:24 -04:00
Joakim Sindholt
45b77830eb
r300-gallium: strip swtcl to the bare minimum
...
This was originally taken from i915 and it shows.
Basically most the stuff in r300_render.c was never needed and
shouldn't have worked in the first place
2009-06-02 22:23:17 +02:00
José Fonseca
840af5fd62
util: Support Z24S8/Z24X8 -> unsigned conversion.
2009-06-02 11:46:53 -07:00
José Fonseca
c91df4c153
util: Fix 24 to 32 bit expansion binary arithmetic expression.
...
When approaching y = x * 0xffffffff / 0xffffff with bit arithmetic, the
8 least significant bits of y should come from the
8 most significant bits of x.
2009-06-02 11:46:06 -07:00
Brian Paul
12e94d892e
mesa: release VBO and PBO references upon context destruction
2009-06-02 10:29:39 -06:00
Brian Paul
cb3a9f984d
mesa: add #define FEATURE_ARB_pixel_buffer_object
2009-06-02 10:29:38 -06:00
Ian Romanick
16fbd39129
intel: Clip to window after calling Driver.TexImage2D
...
This prevents the width / height from being clipped to the window size before
the texture is allocated. This matches intelCopyTexImage1D.
This should fix bug #21227
Signed-off-by: Ian Romanick <ian.romanick@intel.com >
(cherry picked from commit 129f311673 )
2009-06-02 16:52:03 +01:00
Ian Romanick
129f311673
intel: Clip to window after calling Driver.TexImage2D
...
This prevents the width / height from being clipped to the window size before
the texture is allocated. This matches intelCopyTexImage1D.
This should fix bug #21227
Signed-off-by: Ian Romanick <ian.romanick@intel.com >
2009-06-02 16:50:11 +01:00
Eric Anholt
a945e203d4
i915: Don't put VBOs in graphics memory unless required for an operation.
...
This saves doing swtnl from uncached memory, which is painful. Improves
clutter test-text performance by 10% since it started using VBOs.
2009-06-02 06:55:10 -07:00
Eric Anholt
0ab8e2622e
i965: Support OPCODE_TRUNC in the brw_wm_fp.c code.
...
This gets two more glean glsl1 tests using the non-GLSL path.
2009-06-02 06:21:54 -07:00
Keith Whitwell
1aef032d43
gallium/draw: Free specialized versions of driver shaders
...
The pstipple, aaline and aapoint code would create specialized versions
of shaders and upload them to the driver -- but never free them.
2009-06-01 20:35:38 -07:00
Keith Whitwell
003cfd4dd2
draw: free more token arrays
...
The AA line and point code also needs to free token arrays after
building driver shaders.
2009-06-01 20:35:38 -07:00
Keith Whitwell
69a765df1c
draw: avoid leaking tokens when building pstipple fragment shader
...
Add missing FREE() after MALLOC().
2009-06-01 20:35:38 -07:00
Keith Whitwell
503632557e
mesa/st: restore flush to copy_texsubimage (was previously finish)
...
Need a flush here even though the original finish was overkill.
2009-06-01 20:34:44 -07:00
José Fonseca
557d2bb423
wgl: Destroy the framebuffer when the window is destroyed.
2009-06-01 20:20:48 -07:00
Brian Paul
2ecc2ece9c
docs: implemented GL_EXT_provoking_vertex
2009-06-01 20:45:08 -06:00
Brian Paul
a444d245e5
mesa: enable GL_EXT_provoking_vertex for sw drivers
2009-06-01 20:43:57 -06:00
Brian Paul
82bc6e5ae3
tnl: implement GL_EXT_provoking_vertex
2009-06-01 20:43:09 -06:00
Keith Whitwell
97f5953ced
progs/vpglsl: add similar support for point rendering as progs/vp
2009-06-01 18:40:21 -07:00
Jakob Bornecrantz
f989390af6
st/gl: Fix mip gen for compressed textures
2009-06-01 18:40:12 -07:00
Keith Whitwell
00e7a60077
trivial/tri-z: add controls for depthrange min/max
...
Also add key to set up quake-1 style ztrick rendering with clear depth
1.0, deptrange(1.0, 0.0) and depthfunc GL_GREATER.
2009-06-01 18:39:58 -07:00
José Fonseca
3c756ed39f
progs/wgl: Small cleanup to wglinfo.
2009-06-01 18:23:20 -07:00
José Fonseca
76ad2b4a5a
progs/wgl: Use an invisible window in wglinfo.
2009-06-01 18:23:20 -07:00
Brian Paul
9f6ec50f8c
Merge branch 'mesa_7_5_branch'
2009-06-01 15:01:33 -06:00
Brian Paul
0e8a5a8474
st/mesa: fix incorrect sprite origin when drawing to FBO/texture
...
Need to take the draw buffer's up/down orientation into consideration
when setting the sprite_coord_mode field.
Fixes inverted sprites when drawing into an FBO.
2009-06-01 14:59:11 -06:00
Brian Paul
427554211b
draw: reset extra_vp_outputs.slot to zero in widepoint_flush()
...
Fixes a crash when clearing the window with a quad after drawing large
points. We were asking the draw module how many vertex shader outputs
there were and got 3 instead of 2. This led to creating vertices with
too many attributes and trying to read invalid memory.
We reset extra_vp_outputs.slot to zero in the aaline/aapoint stage's
flush functions already.
This omission was just an oversight in the wide_point stage.
2009-06-01 14:28:57 -06:00
Corbin Simpson
1fa023ae48
r300-gallium: Slightly hacky fix for glxgears-style TCL.
2009-06-01 12:04:29 -07:00
Brian Paul
a5d033e89b
demos: add missing dependencies for util files
2009-06-01 11:23:39 -06:00
Nicolai Hähnle
c1ccc7d539
radeon: Provide a more detailled GL_RENDERER string.
...
Display the chip family and PCI ID. This can be parsed easily,
and essentially all information that the driver has about the chip can be
deduced from it.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-06-01 19:02:17 +02:00
Dan Nicholson
bc302b2a33
Use separate $(MINSTALL) for installing libraries
...
The special feature of bin/minstall to copy symlinks is only ever needed
when installing libraries which may have .so symlinks. All the headers
and directories can use a normal install program.
These two modes are separated as $(INSTALL) and $(MINSTALL) to allow the
user (or autoconf) to override installing normal files as they please.
An autoconf check for the install program has been added and will be
used in preference to minstall when available.
Fixes bug 16053.
2009-06-01 06:32:52 -07:00
Jakob Bornecrantz
85e0572756
progs/rbug: Add small remote debugging cli applications
2009-06-01 11:39:25 +01:00
Jakob Bornecrantz
01fa34cb98
trace/rbug: Add rbug integration for remote debugging
2009-06-01 11:19:56 +01:00
Jakob Bornecrantz
dfa4ebcbcc
rbug: Add Gallium Remote Debugger Protocol code
...
This is the (de)marshalling and connection managment code
2009-06-01 11:19:39 +01:00
Jakob Bornecrantz
aee1a6f704
util: Add simple network functions
2009-06-01 02:18:15 -07:00
José Fonseca
ea3ee4791e
wgl: Cleanup framebuffer destruction logic.
2009-05-31 17:16:26 -07:00
José Fonseca
0ea519f931
wgl: Ensure we only create framebuffers for HDC associated with a window.
2009-05-31 11:10:22 -07:00
Cooper Yuan
8e28d64e9c
R6xx/r7xx: Fix blinn's lighting shader
2009-05-31 16:51:07 +08:00
Cooper Yuan
377d8b3673
R6xx/r7xx: Fix texture perspective gradients issue
2009-05-31 16:41:19 +08:00
José Fonseca
fe69b6bdc7
wgl: Use the right pixel format.
...
There is no current pixel format. Each HDC has its pixelformat which is
kept by gdi and set/get via the SetPixelFormat/GetPixelFormat functions.
Now the HDC's pixelformat is kept in the stw_framebuffer, which is
created during the SetPixelFormat.
2009-05-30 20:29:03 -07:00
José Fonseca
be7c56be06
wgl: Fix debugging output.
2009-05-30 20:29:03 -07:00
José Fonseca
76f2bacb07
wgl: Rename function.
2009-05-30 20:29:03 -07:00
José Fonseca
1124f786c1
wgl: Remove unused field.
2009-05-30 20:29:03 -07:00
José Fonseca
5bb2074798
mesa: Output warnings to debugger on Windows.
...
Stderr of Windows applications without console is not usually
visible.
2009-05-30 20:29:02 -07:00
José Fonseca
8aef306c34
mesa: Check/propagate return value on st_make_current.
...
Prevents segmentation fault when trying to set the viewport/scissor
after a context/drawable visual mismatch.
2009-05-30 20:29:02 -07:00
José Fonseca
29c6c8eb18
mesa: Add success/failures return value to _mesa_make_current.
2009-05-30 20:29:02 -07:00
Brian Paul
bedf7fa49f
Merge branch 'mesa_7_5_branch'
2009-05-30 20:10:04 -06:00
Brian Paul
6c3cefdda6
Revert "softpipe: fix flat shading provoking vertex for PIPE_PRIM_POLYGON"
...
This reverts commit 5d75124db4 .
This fixed unclipped polygons, but broke clipped polygons.
A better fix from the mesa 7.5 branch will be merged next...
2009-05-30 20:09:19 -06:00
Brian Paul
a59575d8fb
softpipe: fix incorrect provoking vertex color for PIPE_PRIM_POLYGON
...
This fixes the incorrect colors seen when rendering flat-shaded polygons.
Note that clipped polygons were correct, but unclipped polygons were wrong.
See the glean/clipFlat test for regression testing.
2009-05-30 20:07:18 -06:00
Alex Deucher
d8694cd3f6
get rid of chip_object struct
2009-05-29 15:37:04 -04:00
Alex Deucher
cb39377253
more cleanup
2009-05-29 15:04:44 -04:00
Alex Deucher
5a8b67f363
more cleanup
2009-05-29 14:55:12 -04:00
Alex Deucher
e6eb0ce6ef
more cleanup
2009-05-29 14:45:07 -04:00
Alex Deucher
949c489f59
more cleanup
2009-05-29 14:23:04 -04:00
Alex Deucher
97ed5cffcb
remove more old r300 bits
2009-05-29 13:56:58 -04:00
Alex Deucher
616692cac5
more cleanup
2009-05-29 13:53:57 -04:00
Alex Deucher
70a0301c5b
Remove unused functions
2009-05-29 13:41:00 -04:00
Alex Deucher
37c3731819
Fix spelling in function name
2009-05-29 13:21:28 -04:00
Alex Deucher
9bcc421e68
R6xx/r7xx: remove old sw tcl bits
2009-05-29 13:16:23 -04:00
Alex Deucher
41a44ff891
R6xx/R7xx: switch to common clear with draw code
2009-05-29 13:07:05 -04:00
Alex Deucher
846b24ea82
r6xx/r7xx: switch to common dma functions for vecs
2009-05-29 12:49:45 -04:00
Brian Paul
fa0ca31586
softpipe: update comments for max texture size
2009-05-29 08:22:21 -06:00
Alex Deucher
9b10d19d4a
Remove subpixel offset from viewport
...
remove subpixel offset inherited from r100 code.
based on 038f0bf591
2009-05-29 10:04:03 -04:00
Brian Paul
425c39058b
softpipe: increase max 2D/cube texture size to 4K x 4K
2009-05-29 00:55:54 -06:00
Alex Deucher
7f022fb5cd
Argh. fix last commit. clears are still broken
2009-05-28 17:18:17 -04:00
Alex Deucher
3f14745946
R6xx/r7xx: re-enable clears
...
flush cache and wait for idle after drawing. Probably
just need the cache flush. This gets redbook hello working
properly.
2009-05-28 17:09:19 -04:00
Cooper Yuan
5ff3368c1f
R6xx, add edge rules for triangles
2009-05-28 16:51:49 -04:00
Brian Paul
b631d5fbf4
st: set pipe_rasterizer_state::flatshade_first according to provoking vertex state
2009-05-28 12:33:30 -06:00
Brian Paul
f2f89b01d2
mesa: glGet queries for GL_EXT_provoking_vertex
2009-05-28 12:31:56 -06:00
Brian Paul
fe86e50896
mesa: exec/dlist functions for glProvokingVertexEXT()
2009-05-28 12:31:18 -06:00
Brian Paul
89966cdb1b
mesa: data structure updates for GL_EXT_provoking_vertex
2009-05-28 12:30:25 -06:00
Brian Paul
bd6c44458f
mesa: regenerated enums for GL_EXT_provoking_vertex
2009-05-28 12:29:23 -06:00
Brian Paul
b9c245238c
mesa: regenerated API files for GL_EXT_provoking_vertex
2009-05-28 12:28:18 -06:00
Brian Paul
8c12c9bf76
mesa: GL API changes for GL_EXT_provoking_vertex
...
This creates the new glProvokingVertexEXT() entrypoint.
2009-05-28 12:26:19 -06:00
Corbin Simpson
b70fcd620d
r300-gallium, radeon-gallium: Make add_buffer indicate when a flush is needed.
...
On a side note, why is RADEON_MAX_BOS 24? Should ask airlied about that.
2009-05-28 07:46:34 -07:00
Jerome Glisse
5dcbcbfca4
r300: when using cs path emit scissor in the cmdbuffer
2009-05-28 13:48:38 +02:00
Jerome Glisse
2f9189d538
r300: rework texture offset emission.
2009-05-28 11:40:58 +02:00
Ben Skeggs
534f1e8f02
nv50: some mipmapping fixes
2009-05-28 16:06:25 +10:00
Christoph Bumiller
c11c107f7d
nv50: negate sources directly where supported
2009-05-28 16:06:25 +10:00
Christoph Bumiller
87eea6e2b2
nv50: introduce emit_cvt and use it
...
This makes some code cleaner, and we can now easily
do CEIL and TRUNC.
2009-05-28 16:06:24 +10:00
Christoph Bumiller
3accd7ebe9
nv50: fix TXP
...
For TXP we need to divide texture coords by their w component, or
use the coords' 1/w in the perspective interpolation instruction.
This also tries to support 1D, 3D and CUBE textures, and lets the
instruction only load the components that are used.
2009-05-28 16:06:24 +10:00
Christoph Bumiller
94ba165dff
nv50: use multiple constant buffers
...
Use different buffers for immds, FP params, and VP params.
One has to map constant buffer indices in shader code to buffers
defined via CB_DEF. In principle, we could use more buffers so
we'd have to change the shader code less frequently.
2009-05-28 16:06:24 +10:00
Christoph Bumiller
f9268ccd7f
nv50: don't look for unfreed temps in free_nv50_pc
...
Since we stopped using alloc_temp to get hw indices for FP attrs
there shouldn't be any non-deallocated temps left.
2009-05-28 16:06:23 +10:00
Christoph Bumiller
7ab96f4f73
nv50: release hw TEMPs early
...
Since we know when we don't use a TEMP or FP ATTR register anymore,
we can release their hw resources early.
2009-05-28 16:06:23 +10:00
Christoph Bumiller
708c711f83
nv50: allow immediates for MOV, ADD and MUL
...
Immediates are inlined now where possible, so we need to set
pc->allow32 to FALSE in LIT where we have the conditional MOV,
since immediates swallow the predicate bits.
2009-05-28 16:06:22 +10:00
Christoph Bumiller
d015cba88f
nv50: enable half insns for MOV and MUL
2009-05-28 16:06:22 +10:00
Christoph Bumiller
44b3bfaa75
nv50: make sure half-long insns are paired
...
I chose to just convert unpaired 32 bit length instructions
after parsing all instructions, although it might be possible
to determine beforehand whether there would be any lone ones,
and then even do some swapping to bring them together ...
2009-05-28 16:06:21 +10:00
Christoph Bumiller
de651a228f
nv50: enable KIL in register 19a8
2009-05-28 16:06:21 +10:00
Christoph Bumiller
dac709d0cf
nv50: don't overwrite sources before they're used
...
This would have happened in p.e. ADD TEMP[0], TEMP[0].xyxy, TEMP[1]
or RCP/RSQ TEMP[i], TEMP[i].
2009-05-28 16:06:21 +10:00
Christoph Bumiller
f579a99cc6
nv50: put FP outputs where they belong
...
Depth output in fragment programs should end up in the first
register after the color outputs.
2009-05-28 16:06:20 +10:00
Christoph Bumiller
dd9ded42b9
nv50: modified FP attribute loading
...
VP outputs that should be loadable in the FP are mapped to
interpolant indices by HPOS, COL0 etc.; of course HPOS is
always written, so the highest byte of 1988 is a bitmask that
selects which components of HPOS are used for interpolants,
i.e. the FP inputs in COL0 start at index POPCNT(1988[24:28]).
2009-05-28 16:06:19 +10:00
Christoph Bumiller
e88ec312df
nv50: inspect decl semantic and interpolation mode
...
Record interpolation mode for attributes while parsing declarations,
and also remember the indices of FP color inputs and FP depth output,
which has to end up in the highest output register.
2009-05-28 16:06:19 +10:00
Christoph Bumiller
bcecb8ff66
nv50: record last access to temp and attr regs
...
We now inspect the TGSI instructions in tx_prep to determine where
temps and FP attrs are last accessed.
This will enable us to reclaim some temporaries early and we also
use it to omit pre-loading FP attributes that aren't used.
2009-05-28 16:06:18 +10:00
Christoph Bumiller
7e7d3a87ec
nv50: save some space in immediate buffer
...
We could do even better (like just allocating 1 value in alloc_immd),
but that's fine for now I guess.
2009-05-28 16:06:18 +10:00
Christoph Bumiller
aad31d69ce
nv50: fix SIGN_SET case in tgsi_src
2009-05-28 16:06:17 +10:00
Christoph Bumiller
4a7cf8f66f
nv50: set dst.z,w to 0,1 in SCS and XPD
...
According to tgsi-instruction-set.txt, if they are written, z and w
should be set to 0 and 1 respectively in SCS, and w to 1.0 in XPD.
2009-05-28 16:06:17 +10:00
Christoph Bumiller
229992d281
nv50: make LRP instruction nicer
2009-05-28 16:06:17 +10:00
Christoph Bumiller
9417582f39
nv50: fix some memory leaks in shader assembler
2009-05-28 16:06:16 +10:00
Ben Skeggs
65e3fb7b46
nouveau: explicitly request mappable buffers for the moment
2009-05-28 16:06:16 +10:00
Mike Kaplinksiy
713b636a0e
draw: Fix assertion failure at fetch_emit_prepare
2009-05-27 22:53:59 -07:00
Brian Paul
5be48307d5
demos: remove some old debug/test code
2009-05-27 19:37:32 -06:00
Brian Paul
b86067c610
softpipe: comments
2009-05-27 19:36:59 -06:00
Brian Paul
31deacb8d3
softpipe: include sp_winsys.h to silence warning (unprototyped function)
2009-05-27 19:30:07 -06:00
Brian Paul
5d75124db4
softpipe: fix flat shading provoking vertex for PIPE_PRIM_POLYGON
...
Use the first vertex, not the last.
2009-05-27 19:27:31 -06:00
Brian Paul
c13bd74885
st/mesa: init Format field of vertex arrays for feedback mode
...
Fixes segfault in glRasterPos()
2009-05-27 19:24:09 -06:00
Jerome Glisse
3a6dd3ebb3
radeon: emit scissor before emiting vertices
2009-05-27 21:50:03 +02:00
Jerome Glisse
6141c9ba71
radeon: emit scissor when using cs submission style.
2009-05-27 09:36:07 +02:00
Eric Anholt
8ec6e03679
i915: Fall back on NPOT textured metaops on 830-class.
2009-05-26 20:50:54 -07:00
Eric Anholt
0e83e8f51a
i915: Restore the Viewport and DepthRange functions on 8xx.
...
Fixes failed viewport updates on glxgears (and other apps) resize since
e41780fedc .
Bug #20473 .
2009-05-26 19:50:23 -07:00
Chris Wilson
9178b31546
intel: Override MaxRenderbufferSize with hardware constraints
...
Limit the maximum renderbuffer size to 8192 on i965 and to 2048 on
earlier hardware.
2009-05-26 15:51:33 -07:00
Alex Deucher
98bc311717
enable surface sync function
...
- needs to be more fine-grained
2009-05-26 14:30:26 -04:00
Alex Deucher
f3eaba017c
r6xx: fix more r6xx specific cases
2009-05-26 12:21:54 -04:00
Alex Deucher
930b42693e
R6xx: select proper shader format
2009-05-26 11:36:55 -04:00
Alex Deucher
17417fc8ee
fix segfault when running glxinfo
2009-05-26 11:13:44 -04:00
Alex Deucher
4a28974cf5
add missing RS780 pci id
2009-05-26 10:44:44 -04:00
Alex Deucher
ced2f1b94c
fix build when HAVE_LIBDRM_RADEON is defined
2009-05-26 10:33:23 -04:00
Jerome Glisse
9dee2f20a2
radeon: on update drawable don't firevertices as it might be call from GetLock
...
To avoid locking bug we shouldn't not call firevertices from this path
as it's call from radeon get lock.
2009-05-25 16:05:45 +02:00
Jerome Glisse
714f5e689f
r200: emit scissor when dri2 is enabled
...
In DRI1 kernel emit scissor but in dri2 cs path we have to
explicitly program them.
2009-05-25 15:47:39 +02:00
Jerome Glisse
39ef33708c
r200: fix multitexturing in dri2 path
2009-05-25 13:17:22 +02:00
Jerome Glisse
80f1ac87f2
r200: emit cliprect with indexed primitive
2009-05-25 11:29:32 +02:00
Jerome Glisse
9b1efcb87c
radeon: realloc dma if needed after revalidate
...
Revalidate can trigger flushing and dma buffer deallocation,
so retry allocation on such case.
2009-05-24 16:24:53 +02:00
Nicolai Hähnle
7dd184dc4d
radeon: Remove drawable & readable from radeon_dri_mirror
...
The duplication of state data caused a crash due to double-free on destruction
of context, because a variable wasn't correctly null'ed out.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com >
2009-05-24 15:41:53 +02:00
Brian Paul
2d30dafadd
mesa: fix warning message in vbo_exec_DrawRangeElements()
2009-05-22 15:49:38 -06:00
Jerome Glisse
434f920042
radeon: reading back to scratch reg through status map doesn't work
...
For some unknown reasons the scratch reg value doesn't endup in the status
map at the scratch reg offset, this is a temporary work around until we
figure out why it doesn't work.
2009-05-22 23:44:44 +02:00
Brian Paul
68d412f31c
mesa: add missing update_min() call in update_arrays()
2009-05-22 15:35:49 -06:00
Brian Paul
2ead49f98b
mesa: reduce gl_array_object::VertexAttrib[] array from 32 to 16 elements
...
This array was mistakenly dimensioned with VERT_ATTRIB_MAX (32) but it
should really be MAX_VERTEX_GENERIC_ATTRIBS (16).
The generic vertex attributes are in addition to the conventional arrays
(except in NV vertex program mode- they alias/overlay in that case) so
the total of all conventional attributes plus generic attributes should
total 32 (not 48).
2009-05-22 14:57:51 -06:00
Brian Paul
8e3f6c0f96
mesa: use Elements() for loop limit
2009-05-22 14:42:26 -06:00
Brian Paul
842b4cd3cd
mesa: use Elements() for loop limit
2009-05-22 14:32:45 -06:00
Brian Paul
ce7a049191
mesa: use Elements() for loop limit
2009-05-22 14:32:37 -06:00
Brian Paul
8091aa8633
mesa: use Elements() for loop limit
2009-05-22 14:28:24 -06:00
Brian Paul
2a3d118a8e
mesa: use Elements() for loop limit
2009-05-22 14:27:42 -06:00
Brian Paul
180df4d328
mesa: simplify adjust_buffer_object_ref_counts()
2009-05-22 14:27:26 -06:00
Brian Paul
bf4dfd6563
mesa: minor code clean-up
2009-05-22 14:24:21 -06:00
Brian Paul
d30163ad42
mesa: use Elements() for loop limit
2009-05-22 14:23:02 -06:00
Brian Paul
b625fbaef2
vbo: s/32/VERT_ATTRIB_MAX/
2009-05-22 14:22:40 -06:00
Brian Paul
ebb991ca0d
mesa: use Elements() for loop bound
2009-05-22 14:16:00 -06:00
Brian Paul
a65f385b8d
mesa: minor code simplification
2009-05-22 14:14:53 -06:00
Brian Paul
fac334e6d3
Merge branch 'mesa_7_5_branch'
2009-05-22 14:09:35 -06:00
Brian Paul
1045481dd9
mesa: fix loop over generic attribs in update_arrays()
2009-05-22 13:50:31 -06:00
Brian Paul
4b55e36952
vbo: asst. reformatting, clean-ups
2009-05-22 13:44:59 -06:00
Brian Paul
9be72f54ac
Merge branch 'mesa_7_5_branch'
2009-05-22 13:21:23 -06:00
Brian Paul
c3538969e1
vbo: fix crash in vbo_exec_bind_arrays()
...
When a vertex shader uses generic vertex attribute 0, but not gl_Vertex,
we need to set attribute[16] to point to attribute[0]. We were setting the
attribute size, but not the pointer.
Fixes crash in glsl/multitex.c when using the VertCoord attribute instead
of gl_Vertex.
2009-05-22 13:15:41 -06:00
Brian Paul
891a2bdd7d
demos: extend glsl/multitex.c to use a vertex buffer object
2009-05-22 13:12:28 -06:00
Brian Paul
96370113f1
demos/util: add funcs for GL_ARB_buffer_object
2009-05-22 13:12:01 -06:00
Brian Paul
58fadc6242
demos: fix multitex.c VertCoord attribute mapping
...
If the multitex.vert shader uses the VertCoord generic vertex attribute
instead of the pre-defined gl_Vertex attribute, we need to make sure that
VertCoord gets bound to generic vertex attribute zero.
That's because we need to call glVertexAttrib2fv(0, xy) after all the other
vertex attributes have been set since setting generic attribute 0 triggers
vertex submission. Before, we wound up issuing the vertex attributes in
the order 0, 1, 2 which caused the first vertex to be submitted before all
the attributes were set. Now, the attributes are set in 1, 2, 0 order.
2009-05-22 13:00:49 -06:00
Brian Paul
1b3f5df1e0
Merge branch 'mesa_7_5_branch'
2009-05-22 09:40:50 -06:00
Brian Paul
995456f930
mesa: allow GL_BITMAP type in _mesa_image_image_stride()
...
It's possible to hand a GL_COLOR_INDEX/GL_BITMAP image to glTexImage3D()
which gets converted to RGBA via the glPixelMap tables.
This fixes a failure with piglit/fdo10370 with Gallium.
2009-05-22 09:35:02 -06:00
Brian Paul
a545f1ab6d
mesa: added some assertions
2009-05-22 07:51:35 -06:00
Brian Paul
42ae2a8648
mesa: use Elements() macro to limit loops instead of constants
2009-05-22 07:51:13 -06:00
Brian Paul
882cd6c839
mesa: remove MAX_VERTEX_PROGRAM_ATTRIBS
...
Use MAX_VERTEX_GENERIC_ATTRIBS instead. No need for two #defines for
the same quantity.
2009-05-22 07:30:05 -06:00
Brian Paul
4a95185c9f
mesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBS
...
Be clearer that this is the number of generic vertex program/shader
attributes, not counting the legacy attributes (pos, normal, color, etc).
2009-05-22 07:26:08 -06:00
Brian Paul
4dc426c016
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcs
2009-05-22 07:19:27 -06:00
Brian Paul
42b747e57d
mesa: added comment
2009-05-22 07:14:16 -06:00
Brian Paul
70c4b81e88
mesa: add missing glGet*() case for GL_VERTEX_ARRAY_BINDING_APPLE
2009-05-21 21:49:57 -06:00
Brian Paul
8b91778f46
vbo: fix build breakage...oops
2009-05-21 17:07:33 -06:00
Brian Paul
3bfe312d01
vbo: comments, whitespace clean-ups
2009-05-21 17:03:52 -06:00
Brian Paul
d2a74d76c9
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS
2009-05-21 17:03:21 -06:00
Brian Paul
7e2fb12981
Merge branch 'mesa_7_5_branch'
2009-05-21 16:57:28 -06:00
Brian Paul
8da09e6924
vbo: fix incorrect loop limit in bind_array_obj()
...
The generic_array[] is 16 elements in size, but the loop was doing 32
iterations. The out of bounds array write was clobbering the following
inputs[] array but as luck would have it, that didn't matter.
2009-05-21 16:54:35 -06:00
Brian Paul
d4fb7615b5
mesa: use MAX_ values instead of literals
2009-05-21 16:52:45 -06:00
Brian Paul
54a5ffbfa1
mesa: freshen comments for update_array()
2009-05-21 16:10:45 -06:00
Brian Paul
667a4037fa
mesa: minor code simplification in _mesa_GetVertexAttrib*NV()
2009-05-21 16:10:45 -06:00
Brian Paul
024de60348
mesa: comment for _mesa_GetVertexAttribfvARB()
2009-05-21 16:10:45 -06:00
Brian Paul
254845fad0
mesa: minor code simplification in _mesa_GetVertexAttribfvARB()
2009-05-21 16:10:45 -06:00
Brian Paul
6a2211f000
mesa: remove const qualifier
2009-05-21 16:10:45 -06:00
Brian Paul
a554d7c4d8
mesa: VertexAttribPointer comments
2009-05-21 16:10:45 -06:00
Brian Paul
8fe3134622
mesa: call _mesa_update_array_object_max_element() before printing array info
2009-05-21 16:10:45 -06:00
Brian Paul
8fa0cb2b42
mesa: added gl_array_object::Weight array field
...
We don't really implement vertex weights but in the VBO code this
fixes and odd case for the legacy_array[] setup. Before, the
vbo->draw_prims() call was always indicating that the vertex weight
array was present/enabled when it really wasn't.
2009-05-21 16:10:45 -06:00
Brian Paul
1889890c88
mesa: check FEATURE_point_size_array for PointSize array
2009-05-21 16:10:45 -06:00
Brian Paul
aac19609bf
mesa: fix some potential state-restore issues in pop_texture_group()
...
Call the _mesa_set_enable() functions instead of driver functions, etc.
Also, add missing code for 1D/2D texture arrays.
2009-05-21 16:10:45 -06:00
Brian Paul
de1cfc5e8a
mesa: new _mesa_update_array_object_max_element() function
...
This will replace the code in state.c
2009-05-21 16:10:45 -06:00
Brian Paul
dda82137d2
vbo: return VP_NONE from get_program_mode() if running fixed-func vertex program
...
If we're running a vertex program to emulated fixed-function, we still need
to treat vertex arrays/attributes as if we're in fixed-function mode.
This should probably be back-ported to Mesa 7.5 after a bit more testing.
2009-05-21 16:10:45 -06:00
Brian Paul
a1f6f82e82
vbo: move vp_mode enum to vbo_exec.h, use enum instead of GLuint
2009-05-21 16:10:45 -06:00
Alex Deucher
b52cdb81e2
r6xx/r7xx: fix segfault in vertex shader setup
2009-05-21 17:40:27 -04:00
Alex Deucher
1b84d228d5
r6xx: fix count on START_3D packet
2009-05-21 17:38:14 -04:00
Eric Anholt
bd0861e274
i965: fix whitespace in brw_tex_layout.c
...
The broken indentation was driving me crazy, so fix other stuff while
I'm here.
2009-05-21 10:41:49 -07:00
Eric Anholt
3a521d84ec
i956: Make state dependency of SF on drawbuffer bounds match Mesa's.
...
Noticed while debugging a weird 1D FBO testcase that left its existing
viewport and projection matrix in place when switching drawbuffers. Didn't
fix the testcase, though.
2009-05-21 10:41:39 -07:00
Eric Anholt
e78a6aa2b9
intel: Fall back on any rendering to texture with no miptree.
...
Fixes segfault on an fbo.c negative test for FBO with texture width/height
of 0. Previously we just tested for border != 0 to work around this
segfault.
2009-05-21 10:40:11 -07:00
Eric Anholt
8bba183b9e
intel: Mark the FBO as incomplete if there's no intel_renderbuffer for it.
...
This happens to rendering with textures with a border, which had resulted
in a segfault on dereferencing the irb.
2009-05-21 10:40:11 -07:00
Eric Anholt
467f18f7a5
intel: Don't segfault on glGenerateMipmaps of a cube map with one face defined.
...
This presumably applies to SGIS_generate_mipmaps as well.
2009-05-21 10:40:11 -07:00
Eric Anholt
4da58bbab0
intel: Use _mesa_CheckFramebufferStatusEXT insteaad of glCheck...
...
Fixes a segfault in our oglconform fbo test.
2009-05-21 10:40:11 -07:00
Brian Paul
02f73c43b4
mesa: added debug functions for dumping color/depth/stencil buffers
2009-05-21 09:17:09 -06:00
Brian Paul
840c09fc71
i965: rename var: s/tmp/vs_inputs/
2009-05-21 09:17:09 -06:00
Brian Paul
f7ca97f85e
mesa: remove pointless null ptr check, improved some error messages
2009-05-21 09:17:09 -06:00
Brian Paul
39d7524f7b
mesa: added _mesa_print_arrays() for debugging
2009-05-21 09:17:09 -06:00
Brian Paul
15f21bf357
mesa: updated comment for _MaxElement field
...
It's the largest array index, plus one.
2009-05-21 09:17:09 -06:00
Brian Paul
a185bcbdec
mesa: move gl_array_attrib::_MaxElement to gl_array_object::_MaxElement
...
This value is per array object.
2009-05-21 09:17:08 -06:00
Brian Paul
899c524a49
vbo: s/8/MAX_TEXTURE_COORD_UNITS/
2009-05-21 09:17:08 -06:00
Jonathan Adamczewski
2c007517b5
cell: perform triangle cull a little earlier
...
In spu_tri.c:setup_sort_vertices() triangles are culled after the
vertices are sorted. This patch moves the check a little earlier
and performs the actual check a little faster through intrinsics and
a little trickery.
Reduced code size and less work is done before a triangle is deemed
OK to skip.
2009-05-21 08:19:00 -06:00
Jonathan Adamczewski
b4824520ec
cell: unroll inner loop of spu_render.c:cmd_render()
...
It was taking approximately 50 cycles to extract the vertex indices,
calculate the vertex_header pointers and call tri_draw() for each
three vertices - .
Unrolled, it takes less than 100 cycles to extract, unpack,
calculate pointers and call tri_draw() eight times. It does have a
nasty jump-tabled switch. I'm sure that there's a better way...
Code size of spu_render.o gets larger due to the extra constants and
work in the inner loop, there are extra stack saves and loads
because there are more registers in use, and an assert. spu_tri.o
gets a little smaller.
2009-05-21 08:18:03 -06:00
Brian Paul
5b27b4ad37
st: add support for GL_EXT_vertex_array_bgra
2009-05-21 08:15:54 -06:00
Carl Worth
d2f4c2b632
minstall: Don't copy over an identical file
...
The rationale here is to avoid updating a timestamp for a file that
hasn't changed. Needless updates of the timestamp can ripple into
other projects, (xserver, etc.), useless recompiling due to a
'make install' in mesa that didn't actually change anything.
2009-05-21 07:52:13 -06:00
Jerome Glisse
d7cc0eb479
radeon: maxbuffer size is in bytes
2009-05-21 13:49:15 +02:00
Corbin Simpson
3af0952bc9
r300-gallium: r500-fs: POW.
...
I feel so unclean.
2009-05-20 23:22:16 -07:00
Corbin Simpson
cfd241e8a6
r300-gallium: r500-fs: LRP.
...
Goddammit. This cannot be the "easy way." :C
2009-05-20 21:52:11 -07:00
Corbin Simpson
f1f0893eba
r300-gallium: r500-fs: Combine function.
2009-05-20 16:53:45 -07:00
Corbin Simpson
d67fb5ea1d
r300-gallium: Prevent assert when fogcoords are present.
...
Seems like this file is the source of all bad logic. (Pun intended.)
2009-05-20 16:05:11 -07:00
Corbin Simpson
d04c85d01b
r300-gallium: Another constantbuf shader recompile test.
...
Less briefly... Shaders need to be recompiled if their constantbuf
offsets have changed. However, since we only change them from shaders if
immediates need to be emitted, we shouldn't bother if the shader doesn't
use immediates.
2009-05-20 14:55:03 -07:00
Corbin Simpson
4151c0ea91
r300-gallium: Raise constantbuf limits.
...
Still not correct, but really I don't care.
2009-05-20 14:38:22 -07:00
Corbin Simpson
364a4a8293
r300-gallium: fs: Remove cruft from way back when.
2009-05-20 14:17:27 -07:00
Corbin Simpson
0ba7f76233
radeon-gallium: Add surface_buffer_create callback.
2009-05-20 13:21:17 -07:00
Jerome Glisse
a13e96359b
r200: fix vbo array rendering
2009-05-20 22:19:40 +02:00
Corbin Simpson
9e8de1b911
r300-gallium: Make surface_copy actually load the texture in shader.
2009-05-20 12:22:24 -07:00
Corbin Simpson
b22b6f0743
r300-gallium: Add missing R481 PCI ID.
...
Per 74cb2aba on xf86-video-ati.
2009-05-20 12:08:00 -07:00
Corbin Simpson
65946ef081
r300-gallium: Make surface_copy work, and refactor buffer validation.
2009-05-20 11:46:26 -07:00
Michel Dänzer
01daeadf8c
radeon: Increase reference count of current renderbuffers.
...
Fixes
glxinfo: main/renderbuffer.c:2159: _mesa_reference_renderbuffer: Assertion
`oldRb->Magic == 0xaabbccdd' failed.
2009-05-20 17:00:57 +02:00
Michel Dänzer
b9bd1abf26
Merge branch 'master' into radeon-rewrite
...
Conflicts:
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_texstate.c
2009-05-20 17:00:48 +02:00
Jerome Glisse
c696dd0f62
radeon: set max texture size
...
This still need some work to actually report somethings reasonable
if no memory manager is available.
2009-05-20 16:34:06 +02:00
Corbin Simpson
4550423211
radeon-gallium: Don't permit reading and writing a BO in one CS.
...
This fixes some silent problems in current libdrm_radeon.
surface_copy still locks up hard.
2009-05-20 07:18:08 -07:00
root
c28e0e7d97
Add missing file from local.
2009-05-20 09:16:21 -04:00
Jerome Glisse
8308bf9ee1
r200: fix indexed draw color order and cs missmatch
2009-05-20 13:21:24 +02:00
Brian Paul
0c75cb5afe
st: reformatting, comments, var renaming
2009-05-19 20:05:28 -06:00
root
3149b87ac4
Makeup checkin for radeon code change paired with r6/7 code.
2009-05-19 16:47:39 -04:00
Brian Paul
d0eccc4187
Merge branch 'mesa_7_5_branch'
2009-05-19 10:07:45 -06:00
Mathias Fröhlich
042d9a5132
mesa: allow depth/stencil textures to be attached to GL_STENCIL_ATTACHMENT
...
See sourceforge bug #2793846 .
2009-05-19 09:59:01 -06:00
Brian Paul
c99a60c40d
mesa: assign trb->Base.StencilBits in update_wrapper().
...
When we render to a depth/stencil texture there are stencil bits.
2009-05-19 09:57:01 -06:00
Brian Paul
43d8ace88d
mesa: print more info when valid_texture_object() fails
2009-05-19 09:21:39 -06:00
Richard Li
465588cd0e
Fix nop insertion bug. redbook hello can run.
2009-05-19 10:28:40 -04:00
Jakob Bornecrantz
bd59dd69ba
trace: Improve shader wrapping
2009-05-18 20:54:09 +01:00
Jakob Bornecrantz
7d11a392d7
st/dri: Only create new textures if drawable has changed
2009-05-18 20:54:09 +01:00
Corbin Simpson
d0639d067e
r300-gallium: Fix (another) wrong value in MSPOS.
...
Again, thanks to agd5f.
2009-05-18 09:51:10 -07:00
Corbin Simpson
026f4c97dc
radeon-gallium: Remove BO validation debug.
...
It appears that that area of code "just works" much like classic Mesa's
version, so might as well not waste scrollback on it.
2009-05-18 09:51:10 -07:00
Corbin Simpson
5236ea3900
r300-gallium: Cleanup viewport state setup.
2009-05-18 09:51:09 -07:00
Corbin Simpson
301d238c1a
r300-gallium: Always do VTE, never software viewport.
...
This makes glxgears draw properly with SW TCL.
2009-05-18 09:51:09 -07:00
Brian Paul
edfbf7dccb
Merge branch 'mesa_7_5_branch'
...
Conflicts:
Makefile
src/mesa/main/version.h
2009-05-18 10:36:50 -06:00
Brian Paul
7ce105d2e6
st/mesa: fix incorrect src/dst stride params to _mesa_generate_mipmap_level()
...
The stride needs to be in texels, not bytes.
2009-05-18 10:28:04 -06:00
Brian Paul
adabd0e81e
mesa: comments for _mesa_generate_mipmap_level()
2009-05-18 10:27:31 -06:00
Brian Paul
30320f0afb
softpipe: add texture target sanity check assertion
2009-05-18 10:13:44 -06:00
Brian Paul
14e5bff97b
st: fix incorrect target parameter to screen->is_format_supported()
...
We were passing a GL texture target instead of a pipe_texture_target enum.
2009-05-18 10:12:40 -06:00
Brian Paul
df37cde309
mesa: added linux-osmesa-static config
...
Contributed by Nicolas Noble. See SF bug #2792536
2009-05-18 08:47:22 -06:00
Brian Paul
6e61700541
docs: link to 7.5 relnotes
2009-05-18 07:17:46 -06:00
Brian Paul
da0d4e1db6
docs: emphasize the incomplete status of the nouveau/R300 gallium drivers
2009-05-18 07:17:36 -06:00
Aidan Thornton
f2445dfd85
Initialize psp->waitX/waitGL for swrast_dri.so.
...
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21053 .
2009-05-18 12:47:00 +02:00
Jerome Glisse
d039cf4574
radeon: fix DRI1 cmd stream
2009-05-18 10:13:57 +02:00
Corbin Simpson
27206add27
r300-gallium: Enable GLSL for r500.
...
Before you get all excited, this is *not* to be construed as actual support
for GLSL shaders. The GL version is still 1.3, and stuff still sucks. Just
flicking it on so that it can be tested and developed a bit easier.
2009-05-17 21:41:25 -07:00
Corbin Simpson
9569221563
r300-gallium: r500-fs: DDX and DDY support.
...
Oh, look, GLSL instructions. I wonder what I'll do next.
2009-05-17 21:40:16 -07:00
Corbin Simpson
0036f2ccba
dri-gallium: Add GLSL support.
...
Oh, look, it's more features. :3
2009-05-17 21:39:11 -07:00
Corbin Simpson
06a7b798f2
r300-gallium: Add half-right COS and SIN.
...
HW trig does a premultiply by 2pi, where Mesa does another premultiply by pi.
This is a problem.
2009-05-17 21:10:07 -07:00
Corbin Simpson
572d7d1358
r300-gallium: Size mismatch.
2009-05-17 20:49:39 -07:00
Corbin Simpson
6a40d1e9d9
r300-gallium, radeon-gallium: Nuke gb_pipes from orbit.
...
See the previous commit for an explanation. This is just all the support code
for GB_TILE_CONFIG.
2009-05-17 17:03:15 -07:00
Corbin Simpson
d6e085bd76
r300-gallium: Don't set GB_TILE_CONFIG (in userspace.)
...
This accompanies kernel patches that make GB_TILE_CONFIG's various members
completely controlled in DRM.
GB_TILE_CONFIG has the following controls:
- The number of GB (pixel) pipes enabled
- The size and style of tiling
- Subpixel precision (either 1/12 or 1/16)
Per airlied and glisse, userspace and kernel will now agree (always) on
a subpixel precision of 1/12, and tiling will always be kernel-controlled.
2009-05-17 16:44:39 -07:00
Corbin Simpson
60665ae627
r300-gallium: Clean up more invariant state.
...
GA_ENHANCE is now the kernel's problem.
2009-05-17 13:23:39 -07:00
Corbin Simpson
e5f5390f4b
r300-gallium: Update XXX.
...
Lops work fine as long as HW TCL is off. (I think I know why.)
2009-05-17 12:51:18 -07:00
Corbin Simpson
fbcfcd9f5c
r300-gallium: Correct default MSPOS.
...
Per agd5f.
2009-05-17 11:58:53 -07:00
Corbin Simpson
45435abcb9
r300-gallium: vs: Fix vert shader init.
...
Makes the last three commits suck much less. :3
2009-05-17 10:34:41 -07:00
Corbin Simpson
8dae8f28e5
r300-gallium: r500-fs: Enable depth writes, kinda.
...
Should work, but doesn't. Hm.
2009-05-17 10:30:59 -07:00
Corbin Simpson
7e97219ff8
r300-gallium: Comment out useless debugging code.
...
Those parts are nearly solid compared to the shaders.
2009-05-17 09:44:14 -07:00
Corbin Simpson
764bf9501a
r300-gallium: vs: Dupe tokens, better debug, count spurious insts.
2009-05-17 09:39:06 -07:00
Corbin Simpson
08ec7e0d32
r300-gallium: Die on bad texture formats.
...
Odds are good that we'll die later anyway, so we might as well do it before
we start dancing on random memory.
2009-05-16 11:17:05 -07:00
Corbin Simpson
17b395638b
r300-gallium: Update floating-point params too.
...
Even though we *can* render 10,000-pixel-wide lines, let's not advertise it.
2009-05-16 10:56:17 -07:00
Corbin Simpson
13f8e7bc9c
r300-gallium: Update screen caps.
...
Anisotropic filtering should work, and OQ is broken.
2009-05-16 10:46:55 -07:00
Corbin Simpson
0e8c6e56e4
intel-gallium: Fix trace_drm integration.
...
Compile-tested only, sorry.
2009-05-16 10:07:58 -07:00
Corbin Simpson
5e39a8c450
Create common trace_drm code, add to radeon_winsys.
2009-05-16 10:07:58 -07:00
Corbin Simpson
13131adbf1
r300-gallium: Various cleanups leftover from before.
...
BEGIN/END_CS pair, a few asserts, and a slightly more correct VTE setup.
2009-05-16 10:07:58 -07:00
Keith Whitwell
57fd202375
gallium: remove occlusion_count flag from depth-stencil state
...
Drivers can just keep track of whether they are within a query
by monitoring the begin/end query callbacks. The flag adds no
information beyond that.
Only softpipe was examining this flag -- it has been fixed up
and retested with demos/arbocclude.
2009-05-16 17:26:39 +01:00
Maciej Cencora
73d2a4a047
r300: cleanup vertex program related functions
...
- move vertex program related functions to r300_vertprog.c
- use _mesa_bitcount instead of self-made bit_count function
- remove duplicated field in r300_vertex_shader_fragment.body union
- rename r300_vertex_shader_fragment to r300_vertex_shader_hw_code
- rename r300_vertex_program field native to error
- remove unnecessary r300_vertex_shader_state structure
- remove unused r300_vertex_program and r300_vertex_program_cont fields
- remove disabled code
2009-05-16 11:42:03 -04:00
Maciej Cencora
1b49f1ca7f
r300: minor code movement
2009-05-16 11:42:03 -04:00
Maciej Cencora
f8c30793d1
r300: more cleanup
...
- remove unnecessary r300TranslateFragmentShader call from r300UpdateShaderStates (it is already called in r300UpdateShaders)
- remove unnecessary null ptr checks
2009-05-16 11:42:03 -04:00
Maciej Cencora
1961caeda8
r300: move some code to common path
2009-05-16 11:42:03 -04:00
Maciej Cencora
12ed56f1dd
r300: rename functions
...
Be consistent with function naming: use Setup/Emit names for functions that modify hardware state
2009-05-16 11:42:03 -04:00
Maciej Cencora
6f1a86ca1e
r300: move forward declarations to where they belong
2009-05-16 11:42:02 -04:00
Maciej Cencora
2240c0d333
r300: software fallbacking handling rewrite
...
Until now falling back to software rasterizer worked only for TCL enabled cards.
For non TCL cards we used to plug our rendering functions in r300InitSwtcl, and we had never restored original functions for software rasterizer.
2009-05-16 11:42:02 -04:00
Maciej Cencora
621f65ab86
r300: r300EmitArrays should never fail
2009-05-16 11:42:02 -04:00
Maciej Cencora
d6da805c4e
r300: remove unnecessary switch cases
2009-05-16 11:42:02 -04:00
Maciej Cencora
42f16aa4e0
r300: further cleanup
...
- move extensions init into seperate function
- move options handling into seperate function
- create new structure to hold options values
- use context->options.hw_tcl_enabled field instead of global hw_tcl_on and future_hw_tcl_on variables
2009-05-16 11:42:02 -04:00
Jakob Bornecrantz
3259f52a92
gallium-intel: Enable trace driver
2009-05-16 01:51:30 +01:00
Jakob Bornecrantz
f04c38fa1f
trace: Export enabled status
2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
ee05658798
trace: Unwrap buffer in texture_blanket
2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
ab95f389a5
trace: If either shader is disabled don't draw
2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
3b4da4e9da
trace: Put shaders on a list in the context
2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
c30f661189
trace: Move state dump functions to tr_dump_state.[c|h]
2009-05-16 01:50:53 +01:00
Eric Anholt
22690482e6
intel: Don't complain on falling back from PBO fastpaths.
...
Instead, stash the debug info under the handy debug flag.
Bug #20053
2009-05-15 17:32:21 -07:00
Richard Li
2a7a2c6b77
Fix r6 code bugs.
2009-05-15 19:49:17 -04:00
Eric Anholt
0307e609aa
mesa: Mark FBOs with compressed color attachments as FBO-incomplete.
...
Both EXT_fbo and ARB_fbo agree on this. Fixes a segfault in the metaops
mipmap generation in Intel for SGIS_generate_mipmap of S3TC textures in
Regnum Online.
Bug #21654 .
2009-05-15 16:47:37 -07:00
Jakob Bornecrantz
97ccdee68a
gallium-intel: Build with scons
2009-05-15 22:54:07 +01:00
Jakob Bornecrantz
c4538e326a
st/egl: Use proper Makefile
2009-05-15 22:52:30 +01:00
Steinar H. Gunderson
b197a8ade3
i915: Fix 945 cube map layout for the small mipmaps along the bottom.
...
Bug #21691 .
2009-05-15 12:50:11 -07:00
Eric Anholt
4c6f829899
i915: Use Stencil.Enabled instead of Stencil._Enabled in DrawBuffers.
...
The _Enabled field isn't updated at the point that DrawBuffers is called,
and the Driver.Enable() function does the testing for stencil buffer
presence anyway.
bug #21608 for Radeon
2009-05-15 12:45:33 -07:00
Eric Anholt
5c5a468848
i915: Only use the new 945 cube layout for compressed textures.
...
The docs actually explain this, but not in a terribly clear manner.
This nearly fixes the piglit cubemap testcase, except that something's
going wrong with the nearest filtering at 2x2 sizes in the testcase.
Looks good by visual inspection, though.
Bug #21692
2009-05-15 11:43:39 -07:00
Brian Paul
483e247804
mesa: bump version to 7.5-rc2
2009-05-15 08:03:56 -06:00
Brian Paul
65b9cd74e3
docs: updates from the 7.4 branch
2009-05-15 08:02:40 -06:00
Eric Anholt
dc657f3929
i965: Fix varying payload reg assignment for the non-GLSL-instructions path.
...
I don't have a testcase for this, but it seems clearly wrong.
2009-05-14 11:41:04 -07:00
Eric Anholt
0f5113deed
i965: Fix register allocation of GLSL fp inputs.
...
Before, if the VP output something that is in the attributes coming into
the WM but which isn't used by the WM, then WM would end up reading subsequent
varyings from the wrong places. This was visible with a GLSL demo
using gl_PointSize in the VS and a varying in the WM, as point size is in
the VUE but not used by the WM. There is now a regression test in piglit,
glsl-unused-varying.
2009-05-14 11:41:04 -07:00
Eric Anholt
64980125c7
intel: Use FRONT_AND_BACK for StencilOp as well.
2009-05-14 11:41:04 -07:00
Eric Anholt
d866abeffc
intel: Use GL_FRONT_AND_BACK for stencil clearing.
...
This comes from a radeon-rewrite fallback fix, but may also fix stencil
clear failure when the polygon winding mode is flipped.
2009-05-14 11:41:03 -07:00
Corbin Simpson
96922d1b71
r300-gallium: Correct VTE setup for surface_fill, make surface_copy emit right.
2009-05-14 09:47:07 -07:00
Robert Ellison
ab6c4fa582
i965: fix 1D texture borders with GL_CLAMP_TO_BORDER
...
With 1D textures, GL_TEXTURE_WRAP_T should be ignored (only
GL_TEXTURE_WRAP_S should be respected). But the i965 hardware
seems to follow the value of GL_TEXTURE_WRAP_T even when sampling
1D textures.
This fix forces GL_TEXTURE_WRAP_T to be GL_REPEAT whenever 1D
textures are used; this allows the texture to be sampled
correctly, avoiding "imaginary" border elements in the T direction.
This bug was demonstrated in the Piglit tex1d-2dborder test.
With this fix, that test passes.
2009-05-14 10:36:33 -06:00
Robert Ellison
bc3270e99f
i965: send all warnings through _mesa_warning()
...
One warning message:
drm_i915_getparam: -22
was still being sent to fprintf(). This causes all Piglit tests to fail,
even with MESA_DEBUG=0.
Using _mesa_warning() to emit the message allows the general Mesa controls
for messages like this to be applied.
2009-05-14 10:36:33 -06:00
Jerome Glisse
76a64958a4
r300: don't send now forbidden register to kernel when with memory manager
2009-05-14 17:25:24 +02:00
Michel Dänzer
09c04db3c9
r300: Make sure to drop current hardware state reference to texture objects.
...
Fixes potential texture object leaks.
2009-05-14 11:13:06 +02:00
Corbin Simpson
d3912e301f
r300-gallium: Clean up outdated comments.
2009-05-13 17:24:47 -07:00
Corbin Simpson
15601e9702
r300-gallium: Space accounting for textures.
2009-05-13 17:01:03 -07:00
Alex Deucher
7cd57e35b6
R1xx/r2xx: Don't use an alpha texture format for GLX_TEXTURE_FORMAT_RGB_EXT
...
In r*00SetTexBuffer2(), if the passed in text glx_texture_format
is GLX_TEXTURE_FORMAT_RGB_EXT, then we should use an RGB-only
texture format, even if the DRI buffer has four channels.
https://bugs.freedesktop.org/show_bug.cgi?id=21609
2009-05-13 19:43:04 -04:00
Owen W. Taylor
ca792be42b
radeon: Don't crash generating mipmaps when pixels=NULL
...
When a NULL value of pixels is passed to TexImage2D and
SGIS_generate_mipmap is enabled, don't try to generate the
mipmap tree: we don't have data yet for the texture and will
crash.
https://bugs.freedesktop.org/show_bug.cgi?id=21648
2009-05-13 19:06:24 -04:00
Owen W. Taylor
ea6a74abbe
Don't use an alpha texture format for GLX_TEXTURE_FORMAT_RGB_EXT
...
In r300SetTexBuffer2(), if the passed in text glx_texture_format
is GLX_TEXTURE_FORMAT_RGB_EXT, then we should use an RGB-only
texture format, even if the DRI buffer has four channels.
https://bugs.freedesktop.org/show_bug.cgi?id=21609
2009-05-13 19:04:18 -04:00
Owen W. Taylor
34eab5dd9c
Call _mesa_update_stencil() before accessing ctx->Stencil._Enabled
...
ctx->Stencil._Enabled is derived state and not immediately updated
when the stencil parameters are changed; we need to make sure that
it is up-to-date before accessing it.
https://bugs.freedesktop.org/show_bug.cgi?id=21608
2009-05-13 19:02:51 -04:00
Owen W. Taylor
038f0bf591
Remove subpixel offset from viewport
...
Remove an eigth-pixel offset of the viewport inherited from
R100 code. This seems not to be necessary and causes blurring
when sampling textures 1:1.
https://bugs.freedesktop.org/show_bug.cgi?id=20340
2009-05-13 18:57:47 -04:00
Brian Paul
ca327b1688
Merge branch 'mesa_7_5_branch'
2009-05-13 11:33:52 -06:00
Brian Paul
99960393ed
intel: added null ptr check
...
Fixes segfault in context tear-down when glClear was never called.
2009-05-13 11:33:16 -06:00
Brian Paul
ac5bf63f74
docs: GL_APPLE_vertex_array_object for Gallium drivers and Intel DRI drivers
2009-05-13 11:24:11 -06:00
Brian Paul
a566b6d8ff
intel: enable GL_APPLE_vertex_array_object
...
No special driver changes are needed for this extension.
2009-05-13 11:19:33 -06:00
Brian Paul
a892acef98
st/mesa: enable GL_APPLE_vertex_array_object for gallium drivers
2009-05-13 11:22:21 -06:00
Brian Paul
3039acfc5d
Merge branch 'mesa_7_5_branch'
...
Conflicts:
src/mesa/main/arrayobj.c
src/mesa/main/arrayobj.h
src/mesa/main/context.c
2009-05-13 10:33:21 -06:00
Brian Paul
2e4e346890
intel: create a private gl_array_object for intel_clear_tris(), fix bug 21638
...
gl_array_object encapsulates a set of vertex arrays (see the
GL_APPLE_vertex_array_object extension).
Create a private gl_array_object for drawing the quad for intel_clear_tris()
so we don't have to worry about the user's vertex array state.
This fixes the no-op glClear bug #21638 and removes the need to call
_mesa_PushClientAttrib() and _mesa_PopClientAttrib().
2009-05-13 10:28:00 -06:00
Brian Paul
3e74faa029
mesa: delete array objects before buffer objects during context tear-down
...
The former may point to the later.
2009-05-13 09:47:13 -06:00
Brian Paul
7ae4ce9e22
mesa: clean-up vertex array object VBO unbinding and delete/refcounting
...
Don't really delete vertex array objects until the refcount hits zero.
At that time, unbind any pointers to VBOs.
(cherry picked from commit 32b851c807 )
2009-05-13 09:32:53 -06:00
Brian Paul
5568f2f601
mesa: reference counting for gl_array_object
...
Every kind of object that can be shared by multiple contexts should be
refcounted.
(cherry picked from commit 1030bf0ded )
2009-05-13 09:27:31 -06:00
Brian Paul
10c4a10b97
i965: enable additional code in emit_fb_write()
...
Not 100% sure this is right, but the invalid assertion is fixed...
2009-05-12 15:14:34 -06:00
Brian Paul
5590798f6d
i965: increase BRW_EU_MAX_INSN
2009-05-12 15:14:34 -06:00
Brian Paul
4d244fb899
i965: comment
2009-05-12 15:14:34 -06:00
Joakim Sindholt
167a6b0804
r300-gallium: add missing semicolon
...
Yeah, that was stupid
2009-05-12 22:01:59 +02:00
Joakim Sindholt
62c0c7d81a
r300-gallium: duplicate tokens in create_fs_state
...
This was all phoenix64's idea. Credit goes to him
2009-05-12 21:41:48 +02:00
Joakim Sindholt
723bc9452f
progs/trivial: update .gitignore with new binaries
2009-05-12 21:00:39 +02:00
Eric Anholt
d4a42b0ce6
intel: Skip the DRI2 renderbuffer update when doing Viewport on an FBO.
2009-05-12 10:21:00 -07:00
Eric Anholt
aa422b2625
intel: Map write-only buffer objects through the GTT when possible.
...
This looks to be a win of a few percent in cairogears with new vbo code,
thanks to not polluting caches.
2009-05-12 10:08:19 -07:00
Eric Anholt
0fc5fa85bf
i915: Fix driver after HW glGenerateMipmap commit.
2009-05-12 10:08:19 -07:00
Brian Paul
6d63dec41f
swrast: update/restore the opt_sample_rgb/rgba_2d() functions
2009-05-12 09:05:31 -06:00
Jerome Glisse
c514c1f994
radeon: glReadBuffer set _NEW_BUFFERS, not _NEW_PIXEL
...
This was broken with last merge see 62043b2757
for explanations
2009-05-12 13:05:57 +02:00
Jerome Glisse
05c19ec7f0
r300/r500: make sure we detect constant buffer changes
...
This was broken with last merge see f48473e425
for explanations.
2009-05-12 13:04:32 +02:00
Tormod Volden
0bfa8dfaaf
radeon: avoid segfault in radeon_update_renderbuffers() if using DRI1
...
Basically the same as 43d9020ff1 for intel. Bug 21688.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com >
2009-05-12 12:43:08 +02:00
Michel Dänzer
46b81b0cc8
glXChooseVisual: Only consider fbconfig if we can get the corresponding visual.
...
This can fail, e.g. when XLIB_SKIP_ARGB_VISUALS=1 is set.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524794 and
http://bugs.freedesktop.org/show_bug.cgi?id=21600 .
2009-05-12 09:34:13 +02:00
Ian Romanick
64f36ff9fb
Test either GL_FRONT_LEFT or GL_FRONT for front-buffer rendering
...
For non-stereo visuals, which is all we support, we treat
GL_FRONT_LEFT as GL_FRONT. However, they are technically different,
and they have different enum values. Test for either one to determine
if we're in front-buffer rendering mode.
This fix was suggested by Pierre Willenbrock.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
(cherry picked from commit 2085cf2462 )
2009-05-11 17:16:11 -07:00
Brian Paul
e7cb125b2d
Merge branch 'mesa_7_5_branch'
...
Conflicts:
Makefile
src/mesa/main/version.h
2009-05-11 16:27:50 -06:00
Brian Paul
f104e4d666
st: do proper refcounting for framebuffer surfaces
2009-05-11 16:09:39 -06:00
Brian Paul
f5cf181c65
trivial: destroy window upon exit
2009-05-11 16:08:01 -06:00
Joakim Sindholt
783e43064b
r300-gallium: unbreak build
2009-05-11 21:44:49 +02:00
Corbin Simpson
64f60bc046
r300-gallium: Setup surface in r300_surface_copy.
...
I haven't tested, but this may unbreak surface copies.
2009-05-11 10:09:59 -07:00
Corbin Simpson
b315ec43ee
r300-gallium: Cleanup some compile warnings.
2009-05-11 10:07:40 -07:00
Corbin Simpson
e9f8b7f1b9
r300-gallium: Cleanup PSC for HW TCL.
...
Still dies in assert, but at least it's not my assert anymore. :3
2009-05-11 09:57:57 -07:00
Corbin Simpson
f38a02212f
radeon-gallium: Forgot a typedef.
2009-05-11 09:55:28 -07:00
Corbin Simpson
2e22bd8460
radeon-gallium: Support new info ioctls in addition to classic getparams.
...
This makes non-hybrid kernels like newttm from drm-next-radeon work
while avoiding breakage with Fedora/Ubuntu/etc.
2009-05-11 09:05:33 -07:00
Brian Paul
7c3d7353d7
mesa: updated comments for _mesa_generate_mipmap()
2009-05-11 10:02:27 -06:00
Brian Paul
6697311b21
i965: handle extended swizzle terms (0,1) in get_src_reg()
...
Fixes failed assertion in progs/glsl/twoside.c (but still wrong rendering).
2009-05-11 09:47:32 -06:00
Brian Paul
7c2fe42ded
mesa: better handling/printing of driver-specific opcodes, register files
...
Drivers such as i965 define extra instruction opcodes and register files.
Improve the program printing code to handle those opcodes/files better.
2009-05-11 09:47:32 -06:00
Brian Paul
2223615e0a
mesa: Fixed a texture memory leak
...
The current texture for any particular texture unit is given an additional
reference in update_texture_state(); but if the context is closed before
that texture can be released (which is quite frequent in normal use, unless
a program unbinds and deletes the texture and renders without it to force
a call to update_texture_state(), the memory is lost.
This affects general Mesa; but the i965 is particularly affected because
it allocates a considerable amount of additional memory for each allocated
texture.
(cherry picked from master, commit c230767d69 )
2009-05-11 09:46:56 -06:00
Joel Bosveld
98bb5c610d
radeon: add support for new dri2 interfaces & fix single buffer rendering
2009-05-10 18:26:40 +02:00
Jerome Glisse
221b30d595
Merge commit 'origin/master' into radeon-rewrite
...
Conflicts:
src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_fragprog.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_texmem.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/r300/r500_fragprog.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/radeon/radeon_state.c
2009-05-10 16:57:22 +02:00
Brian Paul
31865904d8
mesa: added more gallium Makefiles to tarball list
2009-05-09 16:21:16 -06:00
Hanno Böck
c8c0953294
gallium: replace lib with $(LIB_DIR)
2009-05-09 16:17:37 -06:00
Jerome Glisse
13e0ff0df1
radeon: don't include cs uncondionaly
2009-05-09 12:56:27 +02:00
Corbin Simpson
53c2cc8fef
radeon-gallium: Clean up some of the BO counting logic.
2009-05-09 00:45:48 -07:00
Corbin Simpson
a738d2b4c2
r300-gallium: vs: Make imms work, cleanup some of the switches.
2009-05-09 00:45:48 -07:00
Corbin Simpson
c4c5bf31a7
r300-gallium: Start VS dumper.
2009-05-09 00:45:48 -07:00
Corbin Simpson
7e347a0f49
r300-gallium: vs: Add SLT, clean up MAX.
...
This should be all the opcodes for basic TCL.
2009-05-09 00:45:48 -07:00
Corbin Simpson
9b10777148
r300-gallium: vs: Add MAX.
2009-05-09 00:45:48 -07:00
Corbin Simpson
e669ce01d4
r300-gallium: vs: Add scalar setup, RSQ.
...
Icky icky icky icky. Icky icky, icky icky. Icky.
2009-05-09 00:45:48 -07:00
Corbin Simpson
c6d2b4a495
r300-gallium: vs: Add writemasks.
2009-05-09 00:45:47 -07:00
Corbin Simpson
ce758a21b9
r300-gallium: Fix bad cast. Space accounting completely works now.
...
Boy, is my face red. :C
2009-05-08 22:05:18 -07:00
Corbin Simpson
1b26c2bbae
r300-gallium, radeon: BO handling fixes, some useful asserts.
2009-05-08 19:41:08 -07:00
Corbin Simpson
bed917641c
radeon-gallium: Shut up Valgrind.
2009-05-08 19:41:08 -07:00
Corbin Simpson
cd59933d9f
r300-gallium, radeon: A couple cleanups.
...
Trying to track down goddamn bugs. :C
2009-05-08 19:41:08 -07:00
Corbin Simpson
4816764777
r300-gallium: Finish space accounting.
...
Still broken...
2009-05-08 19:41:08 -07:00
Richard Li
e2dcebd2e6
R6xx/R7xx: WIP r6xx-rewrite code
2009-05-08 19:23:45 -04:00
Robert Ellison
1d11220771
i965: improve debug logging
...
Looking for memory leaks that were causing crashes in my environment
in a situation where valgrind would not work, I ended up improving
the i965 debug traces so I could better see where the memory was
being allocated and where it was going, in the regions and miptrees
code, and in the state caches. These traces were specific enough
that external scripts could determine what elements were not being
released, and where the memory leaks were.
I also ended up creating my own backtrace code in intel_regions.c,
to determine exactly where regions were being allocated and for what,
since valgrind wasn't working. Because it was useful, I left it in,
but disabled and compiled out. It can be activated by changing a flag
at the top of the file.
2009-05-08 16:57:08 -06:00
Robert Ellison
fc6d89145d
i965: fix memory leak in context/renderbuffer region management
...
A temporary change to the intelMakeCurrent() function to make
it work with frame buffer objects causes the static regions
associated with the context (the front_region, back_region,
and depth_region) to take on an additional reference, with
no corresponding release. This causes a memory leak if a
program repeatedly creates and destroys contexts.
The fix is the corresponding hack, to unreference these
regions when the context is deleted, but only if the
framebuffer objects are still present and the same
regions are still referenced within.
Both sets of code have comment blocks referring to each
other.
2009-05-08 16:47:59 -06:00
Robert Ellison
44a4abfd4f
i965: fix segfault on low memory conditions
...
When out of memory (in at least one case, triggered by a longrunning
memory leak), this code will segfault and crash. By checking for the
out-of-memory condition, the system can continue, and will report
the out-of-memory error later, a much preferable outcome.
2009-05-08 16:32:29 -06:00
Robert Ellison
c230767d69
mesa: Fixed a texture memory leak
...
The current texture for any particular texture unit is given an additional
reference in update_texture_state(); but if the context is closed before
that texture can be released (which is quite frequent in normal use, unless
a program unbinds and deletes the texture and renders without it to force
a call to update_texture_state(), the memory is lost.
This affects general Mesa; but the i965 is particularly affected because
it allocates a considerable amount of additional memory for each allocated
texture.
2009-05-08 16:32:28 -06:00
Eric Anholt
1d663ae292
intel: Add a metaops version of glGenerateMipmapEXT/SGIS_generate_mipmaps.
...
In addition to being HW accelerated, it avoids the incorrect
(black) rendering of the mipmaps that SW was doing in fbo-generatemipmap.
Improves the performance of the mipmap generation and drawing in
fbo-generatemipmap by 30%.
2009-05-08 14:18:04 -07:00
Eric Anholt
b6e94f71c2
intel: Put the constant texcoords used in metaops into a vbo.
...
Make this be its own function for setup/teardown of the binding of these
texcoords. No performance difference in the engine demo (I just felt dirty
not using a VBO for this), and I think it should be more resilient to
interference from current GL state.
2009-05-08 14:18:04 -07:00
Brian Paul
9b3d748f02
mesa: omit files that were removed from git
2009-05-08 15:07:22 -06:00
Brian Paul
6fec2eb143
mesa: set version to 7.5-rc1
2009-05-08 15:04:12 -06:00
Brian Paul
f09e5a5b63
i965: const qualifiers
2009-05-08 14:34:27 -06:00
Brian Paul
4e762395ef
mesa: raise MAX_VARYING (number of shader varying vars) to 16
...
16 is the limit for now because of various 32-bit bitfields.
2009-05-08 14:35:48 -06:00
Brian Paul
17a354a119
mesa: assertions to check for too many vertex outputs or fragment inputs
2009-05-08 14:35:48 -06:00
Brian Paul
cc58fbcf2c
glsl: check number of varying variables against the limit
...
Link fails if too many varying vars.
2009-05-08 14:35:48 -06:00
Brian Paul
87fbc9a14e
mesa: issue warning for out of bounds array indexes
2009-05-08 12:45:08 -06:00
Brian Paul
e2cf522de0
i965: don't use GRF regs 126,127 for WM programs
...
They seem to be used for something else and using them for shader temps
seems to lead to GPU lock-ups.
Call _mesa_warning() when we run out of temps.
Also, clean up some debug code.
2009-05-08 12:45:08 -06:00
Brian Paul
40cba5489d
glsl: set vertex/fragment program Ids to aid with debugging
2009-05-08 12:45:08 -06:00
Brian Paul
ccaa6463a7
mesa: more shader debug code (disabled)
2009-05-08 12:45:08 -06:00
Jerome Glisse
a67c29a268
radeon: IRQ always enabled in DRI2 path no need to query kernel for it
2009-05-08 16:40:21 +02:00
José Fonseca
b6e2261096
wgl: Grow the maximum number of pixel formats to cope with the new accum pixel formats.
...
Fix a segfault when using softpipe.
2009-05-08 14:57:30 +01:00
Keith Whitwell
e90beb93a8
mesa/st: keep surface_copy arguments positive
...
The src/dest x,y, and w,h arguments of the pipe->surface_copy
function are unsigned and the drivers aren't expecting negative
(or extremly-large unsigned) values as inputs. Trim the requests
at the state-tracker level before passing down.
2009-05-08 14:57:30 +01:00
Keith Whitwell
507f4e7a74
mesa/st: remove redundant call to st_finish in CopyTexSubImage
...
Rendering should already have been flushed, any synchronization will
be done by the driver or memory manager.
2009-05-08 14:57:30 +01:00
José Fonseca
44a996b185
wgl: Export pixelformats with accumulation bits.
2009-05-08 14:57:30 +01:00
Keith Whitwell
33d2ca7624
mesa/st: cope with non-ibo index data in st_draw_feedback.c
...
Previously only non-indexed or indicies-in-a-vbo cases were handled in
this code. This change adds the missing regular indices-in-memory
case.
2009-05-08 14:57:30 +01:00
Keith Whitwell
e6a3801f3d
util/upload: catch failures to map_range and return error
...
Caller may be able to do something about this - eg flush and retry.
2009-05-08 14:57:30 +01:00
Keith Whitwell
222d7841e9
scons: mingw is broken with -O1 and higher
2009-05-08 14:57:30 +01:00
Keith Whitwell
ee79827186
stw: fix potential uninitialized use of curctx
2009-05-08 14:57:29 +01:00
José Fonseca
d5eac43a2e
wgl: Enforce a minimum 1x1 framebuffer size.
2009-05-08 14:57:29 +01:00
José Fonseca
d78b5952c1
wgl: Add assertion for missing function.
2009-05-08 14:57:29 +01:00
José Fonseca
692263aad6
wgl: Remove unused variable.
2009-05-08 14:57:29 +01:00
José Fonseca
d88faf91e9
mesa: Make _mesa_share_state thread safe.
2009-05-08 14:57:29 +01:00
José Fonseca
4d28fcfeaa
wgl: Implement ShareLists.
2009-05-08 14:57:28 +01:00
Keith Whitwell
d56b0e6847
progs/trivial: add test for vertex program invarient transform
2009-05-08 14:57:28 +01:00
Keith Whitwell
b6e8256899
mesa: more complete fix for transform_invarient glitches
...
Add a new flag mvp_with_dp4 in the context, and use that to switch
both ffvertex.c and programopt.c vertex transformation code to
either DP4 or MUL/MAD implementations.
2009-05-08 14:57:28 +01:00
Keith Whitwell
751f73e281
mesa/main: set PREFER_DP4 to match position_invarient code
...
This is a quick fix for z fighting in quake4 caused by the mismatch
between vertex transformation here and in the position_invarient code.
Full fix would be to make this driver-tunable and adjust both
position_invarient and ffvertex_prog.c code to respect driver
preferences.
2009-05-08 14:57:28 +01:00
José Fonseca
1ed90091be
wgl: Implemente SwapLayerBuffers.
2009-05-08 14:57:28 +01:00
José Fonseca
0d0417cc75
scons: Don't use deprecated Options.
2009-05-08 14:57:27 +01:00
José Fonseca
be3f9dd26c
util: Limit the stack walk to avoid referencing undefined memory.
2009-05-08 14:57:27 +01:00
Keith Whitwell
f628d7f5ee
gallium/tgsi: hack around linker/archiver breakage
...
Add a dummy function which exists only so that tgsi_text_translate()
doesn't get magic-ed out of the libtgsi.a archive by the build system.
Don't remove unless you know this has been fixed - check on
mingw/scons builds as well.
2009-05-08 14:57:27 +01:00
Keith Whitwell
e99729d63d
progs/trivial: add vbo-noninterleaved test
2009-05-08 14:57:27 +01:00
José Fonseca
d075cb4fc8
wgl: Include alpha bits in pixel format's cColorBits field.
2009-05-08 14:57:26 +01:00
Keith Whitwell
af09ba96e9
gallium/draw: cope with unused vertex_elements
2009-05-08 14:57:26 +01:00
Keith Whitwell
482be01db0
trivial: add line-flat.c
2009-05-08 14:57:26 +01:00
José Fonseca
bb9ea58f95
wgl: UINT_PTR null value is an integral type, so return 0 instead of NULL.
2009-05-08 14:57:26 +01:00
José Fonseca
1248ff7d45
pb: Save the stack backtrace when creating/mapping a debug buffer.
2009-05-08 14:57:26 +01:00
José Fonseca
606a547613
pb: Dump the fenced buffer sizes.
2009-05-08 14:57:26 +01:00
Keith Whitwell
d5c2ad8514
mesa/st: keep surface_copy arguments positive
...
The src/dest x,y, and w,h arguments of the pipe->surface_copy
function are unsigned and the drivers aren't expecting negative
(or extremly-large unsigned) values as inputs. Trim the requests
at the state-tracker level before passing down.
2009-05-08 10:04:14 +01:00
Keith Whitwell
6826bad6a7
mesa/st: remove redundant call to st_finish in CopyTexSubImage
...
Rendering should already have been flushed, any synchronization will
be done by the driver or memory manager.
2009-05-08 10:04:14 +01:00
José Fonseca
626b6f37ea
wgl: Export pixelformats with accumulation bits.
2009-05-08 10:04:14 +01:00
Keith Whitwell
01280cff53
mesa/st: cope with non-ibo index data in st_draw_feedback.c
...
Previously only non-indexed or indicies-in-a-vbo cases were handled in
this code. This change adds the missing regular indices-in-memory
case.
2009-05-08 10:04:14 +01:00
Keith Whitwell
4a333c64fa
util/upload: catch failures to map_range and return error
...
Caller may be able to do something about this - eg flush and retry.
2009-05-08 10:04:14 +01:00
Keith Whitwell
5f5181021e
scons: mingw is broken with -O1 and higher
2009-05-08 10:04:13 +01:00
Keith Whitwell
48c7aa2648
stw: fix potential uninitialized use of curctx
2009-05-08 10:04:13 +01:00
José Fonseca
26ffd44586
wgl: Enforce a minimum 1x1 framebuffer size.
2009-05-08 10:04:13 +01:00
José Fonseca
3a43ea4946
wgl: Add assertion for missing function.
2009-05-08 10:04:13 +01:00
José Fonseca
082a086e9d
wgl: Remove unused variable.
2009-05-08 10:04:13 +01:00
José Fonseca
b25168c34c
mesa: Make _mesa_share_state thread safe.
2009-05-08 10:04:13 +01:00
José Fonseca
25a4156a8b
wgl: Implement ShareLists.
2009-05-08 10:04:13 +01:00
Maciej Cencora
a7bb95bf14
r300: add missing texture format
...
Fixes piglit/texdepth
2009-05-07 20:15:45 -04:00
Maciej Cencora
dc8c717759
r300: moar cleanup
...
- remove unused r300UpdateClipPlanes function
- move reg definition to r300_reg.h
- remove incorrect forward definition of tnl_UpdateFixedFunctionProgram and add proper #include
- remove unreachable code
2009-05-07 20:15:40 -04:00
Maciej Cencora
14365aa0ef
r300: fix compiler warnings
2009-05-07 20:15:34 -04:00
Ben Skeggs
71b1c92405
nouveau: respect GALLIUM_STATE_TRACKERS_DIRS
2009-05-08 09:33:02 +10:00
Ben Skeggs
9e02fa4532
nouveau: remove dri1 code now we're using the dri state tracker
2009-05-08 09:33:02 +10:00
Ben Skeggs
b7f2b7e936
nouveau: use dri state tracker for dri1
2009-05-08 09:32:56 +10:00
Brian Paul
fa95ecb467
mesa: make the array object save/remove functions static
2009-05-07 14:34:09 -06:00
Brian Paul
32b851c807
mesa: clean-up vertex array object VBO unbinding and delete/refcounting
...
Don't really delete vertex array objects until the refcount hits zero.
At that time, unbind any pointers to VBOs.
2009-05-07 14:34:09 -06:00
Brian Paul
56cfa4de91
demos: delete vertex array objects upon exit
2009-05-07 14:34:09 -06:00
Brian Paul
1030bf0ded
mesa: reference counting for gl_array_object
...
Every kind of object that can be shared by multiple contexts should be
refcounted.
2009-05-07 14:34:09 -06:00
Brian Paul
9bb6684799
mesa: array object comments
2009-05-07 14:34:09 -06:00
Brian Paul
4f6b704f97
mesa: move the NullBufferObj from GLcontext to gl_shared_state
...
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
2009-05-07 14:34:09 -06:00
Brian Paul
105c8529e7
mesa: fix comments, s/texture/buffer/
2009-05-07 14:34:09 -06:00
Brian Paul
f37cccde3c
vbo: in glDraw[Range]Element() code, check for out of bounds indexes
...
No-op the bad drawing command rather than go out of bounds and render
garbage. Print a warning to alert the developer to the bad drawing call.
2009-05-07 11:01:02 -06:00
Brian Paul
6359ecebec
mesa: remove unused gl_buffer_object::OnCard field
2009-05-07 10:12:33 -06:00
Brian Paul
dcca97a3e3
mesa: added gl_buffer_object::Written flag (for debug purposes)
...
The flag is set when we data has been written into the buffer object.
2009-05-07 10:12:33 -06:00
Brian Paul
b9d0f947f2
mesa: Compute gl_client_array->_MaxElement during array validation
...
Used to be done in the glVertex/Normal/Color/etc/Pointer() calls but
if the VBO was reallocated the size could change.
New _NEW_BUFFER_OBJECT state flag.
2009-05-07 10:12:33 -06:00
Brian Paul
800b14cd37
mesa: GLvector4f:: flags is a GLbitfield, update comments too.
2009-05-07 10:12:33 -06:00
Brian Paul
1f75c2daea
mesa: add storage_count field to GLvector4f. Useful for debugging.
2009-05-07 10:12:33 -06:00
Brian Paul
828aa76f36
mesa: use array->BufferObj instead of ctx->Array.ArrayBufferObj
...
No difference, but a little more understandable.
2009-05-07 10:12:33 -06:00
Brian Paul
0077c879b5
mesa: added _ElementSize field to gl_client_array
...
Will be handy for bounds checking later...
2009-05-07 10:12:33 -06:00
Brian Paul
a6c8e900af
mesa: use local var to make code a bit more concise
2009-05-07 10:12:33 -06:00
Brian Paul
b102c1d8f9
mesa: fix/add comments
2009-05-07 10:12:33 -06:00
Brian Paul
7e3bd457e8
mesa: use _mesa_sizeof_type() in vbo split code
2009-05-07 10:12:33 -06:00
Brian Paul
3acdab82cb
mesa: vbo code reformatting, clean-up, comments
2009-05-07 10:12:33 -06:00
Brian Paul
87ba2285fe
mesa: add GL_DOUBLE case in _mesa_sizeof_type()
2009-05-07 10:12:32 -06:00
Brian Paul
2369f14245
mesa: in vbo split code, map buffers read-only, not write-only
...
And use GL_ELEMENT_ARRAY_BUFFER where appropriate.
2009-05-07 10:12:32 -06:00
Brian Paul
74bec42b45
mesa: limit number of error raised by invalid GL_TEXTURE_MAX_ANISOTROPY_EXT
2009-05-07 10:12:32 -06:00
Brian Paul
ad32489987
tnl: added some clip debug/print code (disabled)
2009-05-07 10:12:32 -06:00
Brian Paul
424507953c
mesa: reformatting, updated comments, const-correctness
2009-05-07 10:12:32 -06:00
Brian Paul
134ac52dec
tnl: replace 0x3f with CILP_FRUSTUM_BITS
2009-05-07 10:12:32 -06:00
Brian Paul
f56893ea17
i965: relAddr local var (to make debug/test a little easier)
2009-05-07 09:59:13 -06:00
Brian Paul
9a4890dac7
Merge branch 'mesa_7_5_branch'
2009-05-07 09:46:53 -06:00
Brian Paul
6a3004b9ae
swrast: fix span clipping bug
...
If a horizontal span of pixels was located at x < 0 we could sometimes
read/write outside of renderbuffer bounds.
2009-05-07 09:43:15 -06:00
Brian Paul
cc71704644
mesa: unmap buffer objects during context tear-down
2009-05-07 09:36:21 -06:00
Eric Anholt
3d048e5750
i965: Remove bad constant buffer constant-reg-already-loaded optimization.
...
Thanks to branching, the state of c->current_const[i].index at the point
of emitting constant loads for this instruction may not match the actual
constant currently loaded in the reg at runtime. Fixes a regression in my
GLSL program for idr's class since b58b3a786a .
2009-05-06 21:44:13 -07:00
Eric Anholt
156a79f5bd
intel: Unmap buffers if needed at DeleteBuffer time.
...
This fixes a crash in glean's pbo test, which tripped over the assert when a
context was destroyed while a buffer was still mapped (Mesa doesn't call
UnmapBuffer in that case). Regression in
c6bde8873f
2009-05-06 20:44:34 -07:00
Owen W. Taylor
cfc3ac8d6e
When clearing the stencil buffer, don't use a two-sided stencil
...
In radeon_clear_tris(), when clearing the stencil buffer,
pass GL_FRONT_AND_BACK to _mesa_StencilFuncSeparate(), to avoid
triggering a software fallback on r300 and below.
https://bugs.freedesktop.org/show_bug.cgi?id=21601
2009-05-06 17:10:06 -04:00
Brian Paul
58544a28ad
mesa: remove unnecessary buffer size check
2009-05-06 12:38:35 -06:00
Brian Paul
bb1fb2a544
mesa: code consolidation in glDraw[Range]Elements() validation
2009-05-06 12:38:35 -06:00
Brian Paul
88af3f8783
mesa: new comments, minor reformatting
2009-05-06 12:38:35 -06:00
Brian Paul
a13df193c2
mesa: use elementBuf local var instead of ctx->Array.ElementArrayBufferObj
...
Makes no real difference, but more consistant.
2009-05-06 12:38:35 -06:00
Eric Anholt
f831d2d41b
i965: Remove the forced lack of caching for renderbuffer surface state.
...
This snuck in with the multi-draw-buffers commit, and is a major penalty
to performance. It doesn't appear to be required, as the only dependency
the surface BO has is on the state key (and if there's some other dependency,
it should just be in the key).
This brings openarena performance up to almost 2% faster than Mesa 7.4.
2009-05-06 10:54:32 -07:00
Eric Anholt
4cb87840ff
i965: Remove _NEW_PROGRAM from brw_wm_surfaces setup dependencies.
...
This was a leftover from the brw_wm_constant_buffer change.
2009-05-06 10:54:32 -07:00
Brian Paul
9b678af796
mesa: be smarter about allocating vert/frag program constants
...
Try to re-use constants/literals more often to make best use of the
constant buffer space.
See bug 21354.
2009-05-06 08:53:41 -06:00
Eric Anholt
71fb9d62ec
i965: Split WM constant buffer update from other WM surfaces.
...
This can avoid re-uploading constant data when it isn't necessary, and is
a step towards not updating other surfaces just because constants change.
It also brings the upload of the constant buffer next to the creation.
This brings openarena performance up another 4%, to 91% of the Mesa 7.4 branch.
2009-05-06 06:44:14 -07:00
Eric Anholt
9490d86808
i965: Disentangle VS constant surface state from WM surface state.
...
Also, only create VS surface state if there's a VS constant buffer to be
uploaded, and set the contents of the buffer at the same time as creation.
2009-05-06 06:44:14 -07:00
Eric Anholt
d277547dc6
i965: Don't create constant buffers if they won't be used.
...
Really, the creation and upload of constants should be in the same place,
since they should only happen together, and a state flag should be
triggered by them so that we don't thrash state around so much for just
updating constants. But this still recovers openarena performance by
another 19%, leaving us 16% behind Mesa 7.4 branch.
2009-05-06 06:44:13 -07:00
Dave Airlie
7f65fea95e
radeon: hopefully fixup radeon cube state emission for kms
2009-05-06 14:43:07 +10:00
Dave Airlie
d7f62e5405
r100/r200: try and allocate miptree correct for hw.
...
This doesn't make things worse but according to sroland it
is how the GPU hw expects things on the r100/r200
2009-05-06 14:06:13 +10:00
Dave Airlie
acf086ebfa
r200: fix cubic emission.
...
Still doesn't fix cubemaps, I really missed the whole drmsupports
thing when testing this all originally
2009-05-06 13:34:34 +10:00
Brian Paul
51325f44d1
mesa: only use fallback texture when using shaders, not fixed-function (take two)
...
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture. The fallback texture returning
(0,0,0,1) should only be used with shaders. For fixed function, the texture
unit is truly disabled/ignored.
Fixes glean fbo test regression.
2009-05-05 16:31:44 -06:00
Brian Paul
823815a485
Revert "mesa: only use fallback texture when using shaders, not fixed-function"
...
This reverts commit a0edbfb28f .
This patch didn't completely fix the problem. The next patch will.
2009-05-05 16:30:30 -06:00
Brian Paul
a0edbfb28f
mesa: only use fallback texture when using shaders, not fixed-function
...
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture. The fallback texture returning
(0,0,0,1) should only be used with shaders.
Fixes glean fbo test regression.
2009-05-05 16:29:04 -06:00
Brian Paul
01e16befd4
mesa: only use fallback texture when using shaders, not fixed-function
...
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture. The fallback texture returning
(0,0,0,1) should only be used with shaders.
Fixes glean fbo test regression.
2009-05-05 16:21:20 -06:00
Brian Paul
c0d3761c16
mesa: minor simplification in enable_texture(), updated comments
2009-05-05 16:17:55 -06:00
Roland Scheidegger
5f8381724e
r200: fix some cube map issues
...
remove the r100-ism of swapping cube faces which doesn't apply to r200,
and also use precalculated offsets.
Note that cube textures will still not work on r100 and r200 since mipmap
layout is level-first order (for r300) whereas r100/r200 require
face-first (and possibly also 2k alignment for face at least with tiling).
2009-05-05 21:01:36 +02:00
Roland Scheidegger
3503af07c4
r200: fix another section size mismatch
2009-05-05 20:17:37 +02:00
Brian Paul
b3fc832ac7
Merge branch 'mesa_7_5_branch'
2009-05-05 10:13:13 -06:00
Brian Paul
95b7771ea7
gallium: remove redundant cube face #defines
2009-05-05 10:13:11 -06:00
Brian Paul
79ada8c633
gallium: fix texcoords for cubemap mipmap generation
...
We need to use (s,t,r) cubemap coords when sampling from the cubemap texture
so the rendered quad gets texture samples from the correct cube face.
2009-05-05 10:11:51 -06:00
Roland Scheidegger
b2577937b6
r200: fix CS section size mismatch (bug 21565)
2009-05-05 17:45:50 +02:00
Keith Whitwell
077c904b76
progs/trivial: add test for vertex program invarient transform
2009-05-05 13:14:54 +01:00
Keith Whitwell
113403ef51
mesa: more complete fix for transform_invarient glitches
...
Add a new flag mvp_with_dp4 in the context, and use that to switch
both ffvertex.c and programopt.c vertex transformation code to
either DP4 or MUL/MAD implementations.
2009-05-05 13:14:53 +01:00
Keith Whitwell
22b417b75c
mesa/main: set PREFER_DP4 to match position_invarient code
...
This is a quick fix for z fighting in quake4 caused by the mismatch
between vertex transformation here and in the position_invarient code.
Full fix would be to make this driver-tunable and adjust both
position_invarient and ffvertex_prog.c code to respect driver
preferences.
2009-05-05 13:14:52 +01:00
José Fonseca
c6bfb4c559
wgl: Implemente SwapLayerBuffers.
2009-05-05 13:14:51 +01:00
José Fonseca
e9fb90ab88
scons: Don't use deprecated Options.
2009-05-05 13:14:51 +01:00
José Fonseca
3537c3420d
util: Limit the stack walk to avoid referencing undefined memory.
2009-05-05 13:14:50 +01:00
Keith Whitwell
b865501bda
gallium/tgsi: hack around linker/archiver breakage
...
Add a dummy function which exists only so that tgsi_text_translate()
doesn't get magic-ed out of the libtgsi.a archive by the build system.
Don't remove unless you know this has been fixed - check on
mingw/scons builds as well.
2009-05-05 13:14:49 +01:00
Keith Whitwell
5f2569a1b9
progs/trivial: add vbo-noninterleaved test
2009-05-05 13:14:48 +01:00
José Fonseca
6b89c35c9f
wgl: Include alpha bits in pixel format's cColorBits field.
2009-05-05 13:14:47 +01:00
Keith Whitwell
c6b3c2f34b
gallium/draw: cope with unused vertex_elements
2009-05-05 13:14:46 +01:00
Keith Whitwell
4d548bd069
trivial: add line-flat.c
2009-05-05 13:14:45 +01:00
José Fonseca
ccec9f76d5
wgl: UINT_PTR null value is an integral type, so return 0 instead of NULL.
2009-05-05 13:14:44 +01:00
José Fonseca
a47f15ba1d
pb: Save the stack backtrace when creating/mapping a debug buffer.
2009-05-05 13:14:42 +01:00
José Fonseca
4fd6f296f8
pb: Dump the fenced buffer sizes.
2009-05-05 13:14:38 +01:00
Stephane Marchesin
8edb50ff1e
nv04: small fix again
2009-05-05 12:03:38 +02:00
Stephane Marchesin
39ebeead56
Fix an nv04 bug (thanks Mhopf).
2009-05-05 11:29:58 +02:00
Dave Airlie
f616995e5e
radeon/r200: enable all the optional drm support bits
2009-05-05 10:51:44 +10:00
Brian Paul
f95c0c06c0
mesa: also print program params/constants when dumping shaders to disk
2009-05-04 11:14:35 -06:00
Brian Paul
27dbdb1684
mesa: remove some unfinished/devel code
2009-05-04 11:13:35 -06:00
Maciej Cencora
0b22615c2c
r300: set proper texture row alignment for IGP chips
...
Looks like r400 based IGP chips require 64 byte alignment
2009-05-04 12:09:36 -04:00
Brian Paul
dd4c142e90
glx: replace Xmalloc() calls with Xcalloc()
...
Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton.
2009-05-04 07:52:55 -06:00
Brian Paul
986d4a9ec6
draw: added some inf/nan debug code (disabled)
2009-05-01 18:35:59 -06:00
Brian Paul
08bc3d1750
gallium/glx: say we're direct rendering
2009-05-01 18:35:59 -06:00
Brian Paul
62043b2757
mesa: in glReadBufer() set _NEW_BUFFERS, not _NEW_PIXEL
...
Since GL_READ_BUFFER is historically part of the gl_pixel_attrib group
it made sense to signal changes with _NEW_PIXEL. But now with FBOs it's
also part of the framebuffer state.
Now _NEW_PIXEL strictly indicates pixels transfer state changes.
This change avoids framebuffer state validation when any random bit of
pixel-transfer state is set.
DRI drivers updated too: don't check _NEW_COLOR when updating framebuffer
state. I think that was just copied from the Xlib driver because we care
about dither enable/disable state there.
2009-05-01 18:31:04 -06:00
Brian Paul
a7ef5b76d6
Merge branch 'mesa_7_5_branch'
2009-05-01 18:21:02 -06:00
Brian Paul
0a56a49687
st: create renderbuffer's pipe_surface in st_render_texture()
...
Previously we created the pipe_surface during framebuffer validation.
But if we did a glCopyTex[Sub]Image() before anything else we wouldn't yet
have the surface. This fixes that.
2009-05-01 18:17:34 -06:00
Brian Paul
63f0130980
mesa: fix state validation bug for glCopyTex[Sub]Image()
...
We need to make sure the framebuffer state is up to date to make sure we
read pixels from the right buffer when doing a texture image copy.
2009-05-01 18:04:07 -06:00
Zack Rusin
54324d9e0c
vg: remove a silly demo and add a bit better one
2009-05-01 19:08:32 -04:00
Brian Paul
602833b107
st: if st_swapbuffers() is called for single-buffered visual don't crash
...
Furthermore, return pointer(s) to the front color buffer(s).
2009-05-01 16:44:04 -06:00
Brian Paul
b57b6c2d2c
xlib winsys: use new st_swapbuffers() function
...
The front/back buffer pointers are truly swapped (when there is an actual
front buffer).
This fixes some issues seen with apps/tests that draw to both the front
and back color buffers. The true swap allows us to avoid the (potentially)
slow surface_copy() call in update_framebuffer_state() and is cleaner
overall.
2009-05-01 12:54:20 -06:00
Brian Paul
3f52a853f7
st: when creating an on-demand front color buffer, init to back buffer image
...
When we create a new front color buffer (user called glDrawBuffer(GL_FRONT))
initialize it to the contents of the back buffer. Any previous call to
SwapBuffers() would have done that in effect, so make it reality.
2009-05-01 12:54:16 -06:00
Brian Paul
b85b315ebb
st: added st_renderbuffer::defined flag
...
Indicates whether there's defined image contents, or garbage/don't care.
This is set when we draw into a renderbuffer and cleared when we resize/
reallocate a renderbuffer or do a buffer swap (back buffer becomes undefined).
We use this to determine whether the front color buffer has been drawn to,
and whether to display its contents upon glFlush/Finish(), when the new
st_swapbuffers() function is used.
2009-05-01 12:25:42 -06:00
Brian Paul
30b3d80091
mesa: fix comment
2009-05-01 12:12:43 -06:00
Brian Paul
06cd826fcb
Merge branch 'mesa_7_5_branch'
2009-05-01 11:57:00 -06:00
Tom Fogal
36edcebb90
Fix symbol list for mangled Mesa on Darwin.
...
When building mangled Mesa on Darwin, the exported symbols are
named `_mgluWhatever' instead of simply `_gluWhatever'. When
using a list of exported symbols via the system ld's
`-exported_symbols_list' command line option (as done by mklib),
this resulted in error messages about exporting symbols which do
not exist.
Fortunately the file format accepts simple wildcards. This throws
a wildcard so that the symbol list will match both the mangled and
non-mangled names, preventing the warning and actually exporting
the correct symbols in one shot.
2009-05-01 11:55:50 -06:00
Brian Paul
d6318ba8a8
docs: asst updates to openvg.html
2009-05-01 11:37:09 -06:00
Brian Paul
3534539557
set: new st_swapbuffers() which does a true front/back buffer swap
...
The pointers to the front/back renderbuffers are exchanged.
This new function isn't actually used yet...
2009-05-01 11:24:08 -06:00
Zack Rusin
544dd4b11f
OpenVG 1.0 State Tracker
...
Import of the OpenVG 1.0 state tracker for Gallium.
2009-05-01 12:51:59 -04:00
Zack Rusin
fbceedd2de
actually add debug to the debug config
2009-05-01 12:51:01 -04:00
José Fonseca
293f576db7
egl_xlib: Pass RTLD_LAZY to dlopen.
...
dlopen manpage mandates that either RTLD_LAZY or RTLD_NOW flags must be
passed. Not doing so was causing a NULL return on debian unstable x86-64.
2009-05-01 12:51:01 -04:00
Ian Romanick
2085cf2462
Test either GL_FRONT_LEFT or GL_FRONT for front-buffer rendering
...
For non-stereo visuals, which is all we support, we treat
GL_FRONT_LEFT as GL_FRONT. However, they are technically different,
and they have different enum values. Test for either one to determine
if we're in front-buffer rendering mode.
This fix was suggested by Pierre Willenbrock.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2009-05-01 09:49:06 -07:00
Brian Paul
cd6734288d
st: when double buffered, only create front color buffer on demand
...
Before we always created the front color buffer, even if was never used.
This can save some memory.
2009-05-01 10:19:00 -06:00
Brian Paul
b9196c1fa3
Merge branch 'const-buffer-changes'
...
Conflicts:
src/mesa/drivers/dri/i965/brw_curbe.c
src/mesa/drivers/dri/i965/brw_vs_emit.c
src/mesa/drivers/dri/i965/brw_wm_glsl.c
2009-05-01 09:37:14 -06:00
Brian Paul
3f25219c7b
mesa: create/use a fallback texture when bound texture is incomplete
...
When a GLSL sampler reads from an incomplete texture it should
return (0,0,0,1). Instead of jumping through hoops in all the drivers
to make this happen, just create/install a fallback texture with those
texel values.
Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some
GPU lockups when trying to sample from missing surfaces. If a binding
table entry is NULL, it seems that sampling sometimes works, but not
always (lockup).
Todo: create a fallback texture for each type of texture target?
2009-05-01 09:30:32 -06:00
Brian Paul
7ca0427338
docs: initial 7.6 release notes page
2009-05-01 09:24:19 -06:00
Brian Paul
666e5bf4a6
mesa: bump version to 7.6 (devel)
2009-05-01 09:22:20 -06:00
Brian Paul
8a488b1be7
mesa: remove -devel suffix from version
2009-05-01 09:19:59 -06:00
Brian Paul
3eafd25aa3
configs: bump MESA_MINOR to 5
2009-05-01 09:15:14 -06:00
Brian Paul
edd2bbe4a7
docs: fix typo
2009-05-01 09:08:39 -06:00
Corbin Simpson
2953b18004
radeon: Don't even bother with things too big to fit into our card.
2009-05-01 07:29:14 -07:00
Corbin Simpson
5b15cc312f
r300-gallium, radeon-winsys: Hide radeon_cs from r300 pipe.
2009-05-01 06:01:52 -07:00
Corbin Simpson
c11ad489e7
r300-gallium, radeon-winsys: Space accounting.
...
It is no longer optional in current libdrm, so it was time to actually
start counting our BOs.
2009-05-01 05:54:53 -07:00
Corbin Simpson
d7f4ac9f34
r300-gallium, radeon-winsys: Reorganize r300_winsys header, break ABI.
...
Make things more consistent, prepare for more function hooks.
2009-05-01 05:03:56 -07:00
Corbin Simpson
a609f78cf6
r300-gallium: Don't bother with conditional double define.
...
We'll just forever leave it in r300_winsys.h since it's needed for
whichever winsys is hosting the pipe.
2009-05-01 04:47:50 -07:00
Corbin Simpson
1f43cc1d84
radeon: Fix cast and comment.
2009-05-01 04:39:04 -07:00
Brian Paul
e4e7ecc221
docs: asst. updates for 7.5 release
2009-04-30 17:17:31 -06:00
Brian Paul
a405cc7b72
docs: bring in 7.4 doc updates from mesa_7_4_branch
2009-04-30 17:13:22 -06:00
Brian Paul
675b1cacf7
docs: notes about new version number meaning in release notes
2009-04-30 17:11:20 -06:00
Brian Paul
aef475c889
mesa: update linux-static, linux-x86-static configs
2009-04-30 17:04:01 -06:00
Brian Paul
3dfe672c85
demos: silence warning
2009-04-30 17:03:54 -06:00
Tormod Volden
eef79d50bf
mklib: replace if/expr with case
...
Saves forking an expr for every object.
2009-04-30 16:55:54 -06:00
Tormod Volden
9cb3cdec76
mesa: Prepend "-Wl," to linking options
...
Let mklib ignore -Wl options inside the object list when building
static libraries
2009-04-30 16:52:56 -06:00
Brian Paul
60927f97f7
i915simple: remove duplicated i915_context.c in C_SOURCES
2009-04-30 16:52:02 -06:00
Michel Dänzer
c28707b507
r300: Increase reference count of texture objects referenced by current state.
...
Fixes a use-after-free reported in
http://bugs.freedesktop.org/show_bug.cgi?id=20539 , so this possibly fixes that
bug. It has been confirmed to fix
http://bugs.freedesktop.org/show_bug.cgi?id=17895 .
2009-04-30 13:21:08 +02:00
Michel Dänzer
ba27fe3710
gallium: Add SCons build support for the DRI state tracker.
2009-04-30 09:39:29 +02:00
Dan Nicholson
cc68cd20d9
egl: Don't install demodriver
...
I don't think anyone besides a developer would ever want to use the demo
egl driver. Furthermore, egl would only ever load demodriver if it was
set via EGL_DRIVER in the environment. In that case, I think you can
point it to your mesa source directory.
2009-04-29 20:46:37 -07:00
Jakob Bornecrantz
289dc69418
progs/tests: Update ignores
2009-04-29 20:44:03 +01:00
Jakob Bornecrantz
1793d5adac
progs/tests: Add mipmap_comp for mipmap testing with compressed textures
2009-04-29 20:18:12 +01:00
Tom Fogal
a9c97c5f2a
Use variable library name in pkg-config output.
...
Previously the pkg-config output files would contain e.g. `-lGL'
and `-lGLU', even if the user modified their configuration to
build libraries with different names. This modifies the
pkg-config inputs, and corresponding makery, so that modifying the
output library name will cause the appropriate updated name to
appear in the pkg-config `-l' option.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-04-29 12:15:07 -07:00
Dan Nicholson
66f9786256
autoconf: Add switch for optional EGL
...
EGL doesn't build on all platforms, so allow people to opt out.
2009-04-29 12:15:07 -07:00
Dan Nicholson
356f311c4a
autoconf: Clean up some m4 usage
...
m4_fatal is equivalent to m4_errprint + m4_exit.
2009-04-29 12:15:07 -07:00
Brian Paul
dca190e943
mesa: added _mesa_check_soa_dependencies() function
...
This function will check an instruction to see if there's data dependencies
between the dst and src registers if executed in an SOA manner.
2009-04-29 13:04:42 -06:00
Brian Paul
8fa6c1ac92
tgsi: added tgsi_check_soa_dependencies() and related debug code (disabled)
...
The TGSI interpeter operates in SOA style. We need to check for data
dependencies in instructions which read from and write to the same register.
For now just adding some debug code to detect that condition. Actual fixes
to follow.
2009-04-29 11:56:57 -06:00
Brian Paul
0e85dcb66b
mesa: added _mesa_check_soa_dependencies() function
...
This function will check an instruction to see if there's data dependencies
between the dst and src registers if executed in an SOA manner.
2009-04-29 11:52:06 -06:00
Brian Paul
46ddcbc1a9
softpipe: return PIPE_UNREFERENCED in softpipe_is_buffer/texture_referenced()
...
This allows the engine demo to run again (avoid crash in VBO code).
This stuff still needs to be revisited someday though...
2009-04-28 14:29:27 -06:00
Keith Whitwell
801a33ae44
mesa/st: protect internal flushes with FLUSH_CURRENT
...
Already doing this for driver.flush()
2009-04-28 18:15:18 +01:00
Keith Whitwell
c0bff53334
mesa/main: protect driver.finish with FLUSH_CURRENT
...
Already doing this for driver.flush()
2009-04-28 18:15:18 +01:00
Keith Whitwell
106f2b031c
mesa/st: remove duplicate offset calculation
2009-04-28 18:15:17 +01:00
Keith Whitwell
eb979cef85
gallium/draw: add ability to print out active pipeline stages
2009-04-28 18:15:17 +01:00
Keith Whitwell
afc0c59dbd
mesa/st: translate VERT_ATTRIB_GENERIC8..15 in st_translate_vertex_program
...
It seems quake4 can hit these attributes sometimes.
2009-04-28 18:15:17 +01:00
Keith Whitwell
fd402791f9
progs: add fflushes for cygwin
2009-04-28 18:15:17 +01:00
Keith Whitwell
b91e5f8e19
util/indices: remove debug prints
2009-04-28 18:15:16 +01:00
Keith Whitwell
afd16512bc
mesa/st: workaround for crashes in st_copy_texsubimage
...
Proper fix for this hasn't been identified, but avoid crashing.
2009-04-28 18:15:16 +01:00
José Fonseca
43e24a5928
wgl: Store current HDC/HGLRC in stw_context.
...
Less TLS lookups.
2009-04-28 18:15:16 +01:00
Alex Deucher
55db6ce537
R300: add quadpipe overrides
...
RV410 SE chips only have 1 quadpipe.
Also, handle other R300 chip with quadpipe override.
2009-04-28 12:50:38 -04:00
Alex Deucher
09c91a1565
R300: add quadpipe overrides
...
RV410 SE chips only have 1 quadpipe.
Also, handle other R300 chip with quadpipe override
2009-04-28 12:37:29 -04:00
Brian Paul
43d9020ff1
i965: avoid segfault in intel_update_renderbuffers() if using DRI1
2009-04-28 09:58:44 -06:00
Brian Paul
dcf571aff9
swrast: add missing break in clamp_rect_coord_linear()
...
See bug 21461.
2009-04-28 09:05:19 -06:00
Brian Paul
e0d5ff1a8a
demos: asst. updates, clean-ups
2009-04-28 07:31:30 -06:00
Thomas Hellstrom
2c994ad3cb
gallium dri st: Propagate the drawable info when we bind to new drawables.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 14:45:30 +02:00
Thomas Hellstrom
8cfa6546c9
gallium dri st: Use st_get_current() instead of GET_CURRENT_CONTEXT()
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 14:22:33 +02:00
Thomas Hellstrom
3d2bba0d10
st: Add an st_get_current() function.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 14:22:33 +02:00
Jakob Bornecrantz
aef3bccbda
gallium-intel: Create a i965_dri.so symlink
...
This is only used for debuging the gem backend on i965
chipset using the softpipe pipe driver.
Usage: "export INTEL_SOFTPIPE=y" and point LIBGL_DRIVERS_PATH
to "$MESA/lib/gallium" where $MESA is the mesa root.
2009-04-28 13:00:34 +01:00
Dave Airlie
5ca4f3c5da
radeno: cleanup the startup path further
2009-04-28 15:44:10 +10:00
Dave Airlie
a9d64873d7
radeon: further cleanup dri1 screen init
2009-04-28 15:35:52 +10:00
Dave Airlie
7731d93165
r300: remove unused debugging in set tex buffer paths
2009-04-28 15:27:31 +10:00
Dave Airlie
4e7d603fae
radeon: remove kernel mm, dri2 path takes care of it
2009-04-28 15:26:24 +10:00
Jakob Bornecrantz
c9b336bc93
gallium-intel: Fix build of dri driver
2009-04-28 01:17:44 +02:00
Thomas Hellstrom
171c7f91cd
gallium dri st: Fix up some comments and minor bugs.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 13:05:54 +02:00
Corbin Simpson
81ded8092a
radeon-r300: Fix a bit of breakage.
...
Not really sure why reordering the ioctls makes them work again.
2009-04-28 03:28:57 -07:00
Corbin Simpson
1ae877d95a
radeon: Use PCI_MATCH_ANY for xorg driver.
...
Might as well.
2009-04-28 03:28:37 -07:00
Thomas Hellstrom
05af5a7f59
gallium: Rename the dri state tracker lib to libdridrm.a
2009-04-28 11:58:27 +02:00
Thomas Hellstrom
0929b2bf3c
gallium: indent and cleanfile the dri state-tracker.
2009-04-28 11:54:25 +02:00
Thomas Hellstrom
ca1f5f7e6c
gallium: Update the dri2 state tracker to support dri1.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 11:50:40 +02:00
Thomas Hellstrom
a70c4f352e
gallium: Add a dri1 api
...
that a driver needs to implement on top of the drm api to support dri1.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 11:45:36 +02:00
Thomas Hellstrom
2e5acd24b0
gallium: Move the dri2 state tracker since we're about to extend it to dri1.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 11:35:29 +02:00
Thomas Hellstrom
638261b353
gallium: Update the drm_api.
...
Make it possible to pass state-tracker-specific data to the
init_screen function, and even open the door for device-specific
state-tracker screen initialization.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-28 11:25:56 +02:00
Maciej Cencora
ce0d10dd6c
r300: fix fragment program limits
2009-04-27 14:33:24 -04:00
Maciej Cencora
3c6bffa761
r300: fallback only if stencil test is enabled
2009-04-27 14:33:24 -04:00
Maciej Cencora
e33e28f52a
r300: do front/back color selection in HW for software TCL path
2009-04-27 14:33:23 -04:00
Maciej Cencora
3d83a709b9
r300: fix valgrind warnings
2009-04-27 14:33:23 -04:00
Maciej Cencora
78c0e6aefc
r300: fix point size clamping when point is not attenuated
2009-04-27 14:33:23 -04:00
Robert Ellison
359a58230e
Avoid a segfault in shader compilation
...
If a shader reaches an out-of-memory condition while adding
a new function (reallocating the function list), a segfault
will occur during cleanup (because the num_functions field
is non-zero, but the functions pointer is NULL).
This fixes that segfault by zeroing out the num_functions
field if reallocation fails.
2009-04-27 12:11:24 -06:00
José Fonseca
76b9da9e98
wgl: Cope with pre-existing threads.
...
DllMain is called with DLL_THREAD_ATTACH only by threads created after
the DLL is loaded by the process.
2009-04-27 18:48:11 +01:00
Brian Paul
dd4802176f
i965: #include prog_print.h to silence warning
2009-04-27 10:46:30 -06:00
Brian Paul
777b9ff43e
i965: only upload constant buffer data when we actually need the const buffer
...
Make the use_const_buffer field per-program and only call the code which
updates the constant buffer's data if the flag is set.
This should undo the perf regression from 20f3497e4b
(cherry picked from master, commit dc9705d12d )
2009-04-27 10:45:41 -06:00
José Fonseca
c384ccb0c4
wgl: Implement WGL_EXT_extensions_string extension.
2009-04-27 17:30:05 +01:00
José Fonseca
3ebcf2dd74
util: Remove unix includes.
2009-04-27 17:13:40 +01:00
Brian Paul
dc9705d12d
i965: only upload constant buffer data when we actually need the const buffer
...
Make the use_const_buffer field per-program and only call the code which
updates the constant buffer's data if the flag is set.
This should undo the perf regression from 20f3497e4b
2009-04-27 09:51:46 -06:00
Keith Whitwell
5250eec652
util/time: add util_time_sleep() for windows userspace
...
Somebody with a clue could probably do a better implemenation...
2009-04-27 14:43:57 +01:00
Keith Whitwell
5ed7764fd6
mesa/st: fix incorrect face, level in compress_with_blit
...
We were incorrectly applying the destination texture face and level
when requesting a transfer to the temporary texture, which has only
one face and level. This would obviously cause problems uploading to
compressed cube and mipmap textures.
2009-04-27 14:43:57 +01:00
Shuang He
e326600609
demos: Clean up allocated Textures and Display Lists when demo quit
2009-04-27 07:13:33 -06:00
Maciej Cencora
033d1365e6
r300: fix performance regression
...
This performance regression on non TCL hw was introduced by ed4c6cbe01 .
This patch depends on "r300: always route 4 texcoord components to RS" and "r300: add point attenuation stage for TCL fallbacks".
2009-04-27 19:08:41 +10:00
Maciej Cencora
7f6b13be86
r300: add point attenuation stage for TCL fallbacks
2009-04-27 19:08:12 +10:00
Maciej Cencora
d014d7d1bb
r300: always route 4 texcoord components to RS
...
Routing <4 components may lead to lock up.
Thanks to Alex Deucher for suggestion.
2009-04-27 19:07:50 +10:00
Maciej Cencora
22c0652c38
r300: flush stdout to get consistent debugging info
2009-04-27 19:07:16 +10:00
Maciej Cencora
7ff2dcbbdc
r300: add atom print function for kernel mm path
2009-04-27 19:06:38 +10:00
Maciej Cencora
25dd867c58
r300: handle texcoords properly
...
add 1D texture case and setup default Q value to 1.0
2009-04-27 19:06:00 +10:00
Maciej Cencora
199710914a
r300: remove unnecessary function calls
...
ae_create_context is called by vbo_CreateContext
ae_invalidate_state is called by vbo_InvalidateState
2009-04-27 19:05:37 +10:00
Maciej Cencora
607c6cf188
r300: rename state
...
According to r300_reg.h from radeon drm module 0x4f30 is ZB_ZMASK_OFFSET.
Also cleanup as trailing whitespaces.
2009-04-27 19:04:52 +10:00
Maciej Cencora
931c89f6f6
r300: remove unnecessary function calls
...
r300SetEarlyZState is called during r300UpdateShaderStates which is called for every rendering operation.
2009-04-27 19:04:21 +10:00
Brian Paul
b58b3a786a
i965: rework GLSL/WM register allocation
...
Use a bitvector of used/free flags.
If we run out of temps, examine the live intervals of the temp regs in
the program and free those which are no longer alive.
Also, enable the new WM const buffer code.
2009-04-24 16:33:46 -06:00
Brian Paul
7da3f9403b
mesa: refactor code and make _mesa_find_temp_intervals() public
2009-04-24 16:28:36 -06:00
Micah Dowty
b618827fac
util: Add debug_printf_once
2009-04-24 23:59:21 +02:00
José Fonseca
99b77d05d2
mesa: Call _mesa_snprintf instead of snprintf.
...
snprintf not directly available on Windows.
2009-04-27 13:09:58 +01:00
José Fonseca
b504721cc7
stw: Use a statically initiallized gl proc table.
...
It doesn't change anyway.
2009-04-27 12:53:54 +01:00
Maciej Cencora
4486e40143
r300: always emit output insts after all KIL insts
2009-04-27 19:02:39 +10:00
Corbin Simpson
904b563fd0
r300-gallium: Correctly flush Draw.
...
Should help with a few non-TCL bugs.
2009-04-26 10:06:02 -07:00
Mathias Gottschlag
86d2144412
r300-gallium: Add a draw_flush() to r300_flush().
...
This fixes some missing primitives which had been drawn right before the next glClear().
2009-04-26 10:01:17 -07:00
Corbin Simpson
233c6fb694
r300-gallium: Fix vertex shader OVM counting.
...
Attribs must be packed: position, point size, colors, texcoords.
Thanks to osiris for pointing it out.
2009-04-25 16:54:47 -07:00
Corbin Simpson
f45a7a1d1f
r300-gallium: Clean up FB state emit.
2009-04-25 16:54:47 -07:00
Mathias Gottschlag
d9f2d0752b
r300-gallium: Set framebuffer pitch on every framebuffer change.
...
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com >
2009-04-25 16:54:47 -07:00
Jakob Bornecrantz
a098e60903
gallium-intel: Fix warning
2009-04-25 12:56:52 +01:00
Jakob Bornecrantz
5f701f22f0
gallium-intel: Cache software switch
2009-04-25 12:56:52 +01:00
Jakob Bornecrantz
f44f1155a9
gallium-intel: Link dri2 driver with softpipe
2009-04-25 12:56:52 +01:00
Samuel Thibault
d18dd6ad11
GNU/Hurd fixes
...
Here is a couple of fixes for GNU/Hurd:
- dri_interface.h: no libdrm support either.
- configure.ac:
- GNU/Hurd is a GNU OS with _GNU_SOURCE and PTHREADS.
- GNU needs a couple of flags like other OSes
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-04-24 19:10:01 -07:00
Ian Romanick
022319b92c
intel: Fix more issues with the combined depth-stencil attachment
2009-04-24 16:39:00 -07:00
Ian Romanick
302ba83116
intel: Initialize region ptr to prevent assertion in intel_region_reference
2009-04-24 16:30:13 -07:00
Brian Paul
91eb8baaca
tgis: SSE code generator doesn't yet support indirect addressing of temp regs
...
Fall back to interpreter in this case.
2009-04-24 17:18:02 -06:00
Ian Romanick
f2272b5b2f
intel / DRI2: When available, use DRI2GetBuffersWithFormat
...
This interface gives the driver two important features. First, it can
allocate the (fake) front-buffer only when needed. Second, it can
tell the buffer allocator the format of buffers being allocated. This
enables support for back-buffer and depth-buffer with different bits
per pixel.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kristian Høgsberg <krh@redhat.com >
2009-04-24 12:48:20 -07:00
Ian Romanick
dbf87f2312
DRI2: Implement interface for drivers to access DRI2GetBuffersWithFormat
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kristian Høgsberg <krh@redhat.com >
2009-04-24 12:48:20 -07:00
Ian Romanick
d8d7b2c395
DRI2: Implement protocol for DRI2GetBuffersWithFormat
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kristian Høgsberg <krh@redhat.com >
2009-04-24 12:48:20 -07:00
Jerome Glisse
32d185eb60
r300: fix cliprect values
2009-04-24 19:54:01 +02:00
Brian Paul
1c9786894c
mesa: fix up error/warning/debug output newlines
...
As of commit 23ad86cfb9 all messages go
through output_if_debug().
Add new parameter to output_if_debug() to indicate whether to emit a newline.
_mesa_warning() and _mesa_error() calls should not end their strings with \n.
_mesa_debug() calls should end their text with \n.
2009-04-24 10:50:40 -06:00
Brian Paul
3321b6984e
i965: use drm_intel_gem_bo_map/unmap_gtt() when possible, otherwise dri_bo_subdata()
...
This wraps up the unfinished business from commit a9a363f829
2009-04-24 09:52:05 -06:00
Alan Hourihane
b2a69ae879
demos: ensure display lists are destroyed for next generation
2009-04-24 16:45:36 +01:00
Brian Paul
027ed1b505
mesa: signal _NEW_PROGRAM_CONSTANTS instead of _NEW_PROGRAM
...
Use _NEW_PROGRAM_CONSTANTS when changing constant/uniform buffer values.
Binding a new program/shader sets both _NEW_PROGRAM and _NEW_PROGRAM_CONSTANTS.
2009-04-24 09:43:44 -06:00
Jerome Glisse
5dec94696e
r300: emit cliprect when in dri2 mode
2009-04-24 15:03:23 +02:00
Keith Whitwell
29d9abf72d
pipebuffer: don't fail when validating mapped buffers
...
This can be almost impossible to avoid - hopefully we won't encounter
a situation where this is a true requirement. Would probably require
drivers to flush between hardware and software vertex processing.
2009-04-24 12:43:04 +01:00
Keith Whitwell
a86ef37655
shadowtex: fflush stdout for cygwin
2009-04-24 12:16:39 +01:00
Jakob Bornecrantz
f4a286e5f5
util: Add more entry points for dumping to bmp
2009-04-24 13:02:26 +02:00
Keith Whitwell
eb5d96968f
demos/readpix: add option to draw triangle instead of drawpix
2009-04-24 10:09:14 +01:00
Keith Whitwell
510a44eea7
tests/mipmap_view: add a bunch of keystrokes for testing render-to-texture
...
Move between mipmaps, render a triangle, reload textures with either
the original arch (and GenMipmaps) or via straightforward glTexImage.
2009-04-24 10:09:14 +01:00
Roland Scheidegger
ff71587b27
i965: fix point size issue
...
need to clamp point size to user set min/max values, even for constant
point size. Fixes glean pointAtten test.
2009-04-24 02:40:05 +02:00
Brian Paul
1d00399593
mesa: more informative error messages
2009-04-23 17:54:34 -06:00
Brian Paul
a9a363f829
i965: revert part of commit 4f4907d69f
...
The drm_intel_gem_bo_map_gtt() call that replaced dri_bo_map() is
producing errors like:
intel_bufmgr_gem.c:689: Error preparing buffer map 39 (vp_const_buffer): Invalid argument .
and returning NULL, causing a segfault in the memcpy().
Just reverting until we can get to the root issue...
2009-04-23 17:41:23 -06:00
Roland Scheidegger
ae69a04650
i915: fix fix for anisotropic filtering
...
forgot to commit the changes to actually support 4x aniso filtering...
2009-04-23 23:10:51 +02:00
Eric Anholt
8374379572
i965: Support drawing to FBO cube faces other than positive X.
...
Also fixes drawing to 3D texture depth levels.
2009-04-23 11:13:04 -07:00
Eric Anholt
4f4907d69f
intel: Take advantage of GL_READ_ONLY_ARB to map to GEM bo_map write flag.
...
This is a CPU win in general, but in particular reduces the pain of
Mesa's calculation of min/max indices in DrawElements (wtf?).
2009-04-23 11:13:04 -07:00
Michel Dänzer
f3c7d6ff86
gallium: Handle non-NULL data pointer in EXA ModifyPixmapHeader hook.
...
Need to use the data pointed to for pixmap contents in that case.
Fixes RENDER based text rendering.
2009-04-23 14:47:31 +01:00
Michel Dänzer
e0da812c5b
gallium: Make the intel xorg winsys start up with any Intel chipset.
...
For unsupported devices the screen/context creation should fail cleanly later
on.
2009-04-23 13:19:56 +01:00
Michel Dänzer
13cb8264d8
gallium/intel/gem: Use softpipe rather than i915simple if INTEL_SOFTPIPE is set.
2009-04-23 12:57:46 +01:00
Michel Dänzer
49ba80dff3
gallium: Always include xorg-server.h before other X server headers.
...
Various breakage otherwise, e.g. _XSERVER64 not being defined on 64 bit leading
to inconsistent definitions of X server internal structs.
2009-04-23 12:20:22 +01:00
Michel Dänzer
17ee25ba6f
gallium: Fix up xorg state tracker build.
2009-04-23 12:17:28 +01:00
Brian Paul
6b0c9366a3
mesa: minor state-update changes in histogram code
...
Call FLUSH_VERTICES() in _mesa_Histogram().
No need to signal _NEW_PIXEL in ResetHistogram(), ResetMinmax().
2009-04-22 16:41:05 -06:00
Brian Paul
725d50601c
mesa: fix comment typo
2009-04-22 16:38:04 -06:00
Brian Paul
c5a97eda32
gallium: license, copyright
2009-04-22 15:12:22 -06:00
Brian Paul
984f2bb629
st: comments, license, copyright
2009-04-22 15:10:36 -06:00
Brian Paul
8ee6ab6acb
mesa: fix _mesa_dump_textures(), add null ptr check
...
Calling _mesa_dump_textures() deleted the textures... oops!!!
2009-04-22 15:03:05 -06:00
Brian Paul
ebfbd8c4fe
i965: disable debug printf
2009-04-22 13:46:58 -06:00
Brian Paul
ac22178eb0
i965: enable VS constant buffers
...
In the VS constants can now be handled in two different ways:
1. If there's room in the GRF, put constants there. They're preloaded from
the CURBE prior to VS execution. This is the historical approach. The
problem is the GRF may not have room for all the shader's constants and
temps and misc registers. Hence...
2. Use a separate constant buffer which is read from using a READ message.
This allows a very large number of constants and frees up GRF regs for
shader temporaries. This is the new approach. May be a little slower
than 1.
1 vs. 2 is chosen according to how many constants and temps the shader needs.
2009-04-22 11:52:16 -06:00
Brian Paul
5c8fb6acc1
i965: define BRW_MAX_GRF
2009-04-22 11:47:59 -06:00
Brian Paul
21a422d97e
i965: remove old code to init surface-related cache IDs
...
These types are only found in the new surface state cache now.
2009-04-22 11:29:49 -06:00
Brian Paul
c0c58cf5cf
i965: comments, reformatting
2009-04-22 11:28:24 -06:00
Brian Paul
fa92756400
mesa: Fix buffer overflow when parsing generic vertex attributes.
2009-04-22 18:18:29 +01:00
Brian Paul
4843e54fc6
i965: actually use the new, second surface state cache
2009-04-22 11:12:07 -06:00
Brian Paul
f9af97c7a5
i965: checkpoint commit: use two state caches instead of one
...
The new, second cache will only be used for surface-related items.
Since we can create many surfaces the original, single cache could get
filled quickly. When we cleared it, we had to regenerate shaders, etc.
With two caches, we can avoid doing that.
2009-04-22 11:08:46 -06:00
Brian Paul
a071a8d2e7
i965: remove unused state atom entries
2009-04-22 10:44:36 -06:00
Roland Scheidegger
50853be894
intel: fix max anisotropy supported
...
i915 actually supports up to 4 (according to header file - not tested),
i965 up to 16 (code already handled this but slightly broken), so don't use 2
for all chips, even though angular dependency is very high.
2009-04-22 17:38:06 +02:00
Brian Paul
f428255bde
i965: the brw_constant_buffer state atom is no longer dynamic
...
No more dynamic atoms so we can simplify the state validation code a little.
2009-04-22 09:23:15 -06:00
Brian Paul
e5681fc176
i965: add _NEW_PROGRAM_CONSTANTS to mesa_bits[] list
2009-04-22 09:16:21 -06:00
Brian Paul
a36dd5d54e
i915: check the new _NEW_PROGRAM_CONSTANT flag
2009-04-22 09:14:53 -06:00
Brian Paul
1dbab84e21
i965: use _NEW_PROGRAM_CONSTANTS and always create new const buffers
...
When program constants change we create a new VS constant buffer
instead of re-using the old one. This allows us to have several
const buffers in flight with vertex rendering.
2009-04-22 09:14:16 -06:00
Brian Paul
6b6a23c0f7
i965: updates to some debug code
2009-04-22 09:07:46 -06:00
Brian Paul
817dcdd280
i965: use new _NEW_PROGRAM_CONSTANTS flag instead of dynamic flags
2009-04-22 09:07:02 -06:00
Brian Paul
f48473e425
r200/r300/r500: add _NEW_PROGRAM_CONSTANTS flag
...
Make sure we detect constant buffer changes indicated by the new flag.
Should be able to remove _NEW_PROGRAM (and _NEW_MODELVIEW, _NEW_LIGHT, etc)
from several places (someday.
2009-04-22 08:59:47 -06:00
Brian Paul
7843243dee
st: also check _NEW_PROGRAM flag for vertex shader constant buffers
...
This is a follow-on to commit c1a3b85280 .
Note that (at this time) wherever _NEW_PROGRAM_CONSTANTS is set we're still
setting _NEW_PROGRAM so this won't really make any difference (for now).
2009-04-22 07:58:25 -06:00
Dave Airlie
466c78c935
Merge remote branch 'origin/master' into radeon-rewrite
2009-04-22 21:41:57 +10:00
Thomas Hellstrom
f057f6543d
gallium: Reinstate unconditional flushes.
...
Lost in commit e50dd26ca6 .
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-22 11:42:46 +02:00
Keith Whitwell
009749b4a8
mesa: protect driver.flush() with FLUSH_CURRENT
...
Need to do this to ensure vbo code unmaps its buffers before calling
the driver, which may be sitting on top of a memory manager which
objects to firing commands from a mapped buffer.
2009-04-22 09:03:17 +01:00
Brian Paul
c1a3b85280
st: play it safe for now and check _NEW_PROGRAM for shader const buffer atom
...
When a new program is bound but no constants are updated we still need
to update the Gallium const buffer.
2009-04-21 17:00:54 -06:00
Brian Paul
7872b8e37e
swrast: simplify state update logic for fragment shader const buffers
2009-04-21 17:00:01 -06:00
Brian Paul
3eeefa47d0
st: use the static atoms[] array directly
...
We can simplify this now that we no longer have any dynamic atoms.
2009-04-21 16:50:34 -06:00
Brian Paul
f4f39902fd
st: do away with dynamic state atom for const buffers
...
Just use the new _NEW_PROGRAM_CONSTANTS flag instead.
2009-04-21 16:47:30 -06:00
Brian Paul
64e331eb52
mesa: new _NEW_PROGRAM_CONSTANTS flag
...
This state flag will be used to indicate that vertex/fragment program
constants have changed. _NEW_PROGRAM will be used to indicate changes
to the vertex/fragment shader itself, or misc related state.
_NEW_PROGRAM_CONSTANTS is also set whenever a program parameter that's
tracking GL state has changed. For example, if the projection matrix is
in the parameter list, calling glFrustum() will cause _NEW_PROGRAM_CONSTANTS
to be set. This will let to remove the need for dynamic state atoms in
some drivers.
For now, we still set _NEW_PROGRAM in all the places we used to. We'll no
longer set _NEW_PROGRAM in glUniform() after drivers/etc have been updated.
2009-04-21 16:21:32 -06:00
Brian Paul
8a22e24fae
mesa: print internal.current[i] attrib
2009-04-21 16:21:32 -06:00
Brian Paul
ac1fc3f465
mesa: print parameter list dirty state flag mask
2009-04-21 16:21:32 -06:00
Brian Paul
08e7f09f34
i965: const correctness
2009-04-21 16:21:32 -06:00
Richard Li
604dd37f66
R6xx/R7xx: remove unused files
2009-04-21 15:04:54 -04:00
Richard Li
581093d27c
R6xx/R7xx: add updated reg file
2009-04-21 14:30:52 -04:00
Michel Dänzer
6bd4bc785e
Update GALLIUM_AUXILIARY_DIRS in configure.ac to match configs/default.
2009-04-21 18:32:42 +01:00
Richard Li
27c07b6b28
Initial pull of code from r6xx-r7xx-support branch
...
Not functional yet.
2009-04-21 12:54:20 -04:00
Maciej Cencora
584303ac8e
r300: r300 hw doesn't support any input modifiers in tex insts
2009-04-21 12:14:35 -04:00
Mathias Gottschlag
b8fff1f9f1
r300-gallium: Fix CS size mismatch
...
This fixes some warnings which appear because the driver assumes a wrong
cs size (13 vs 16 register writes in some cases).
2009-04-21 09:52:30 -06:00
Brian Paul
dad1c1be18
demos: check that GL version is 2.0 or higher
2009-04-21 07:27:27 -06:00
Brian Paul
25e3a53403
st: report GL_OUT_OF_MEMORY instead of asserting
2009-04-21 07:27:26 -06:00
Keith Whitwell
e20f837f67
trivial/tri-viewport: add keys for frustrum/ortho and z coordinate
2009-04-21 11:40:59 +01:00
Keith Whitwell
6e05224bc4
trivial/tri-viewport: add more out-of-bounds background quads
2009-04-21 11:13:16 +01:00
Keith Whitwell
a38f7d9e68
trivial/tri_viewport: add space==reset key
2009-04-21 11:13:15 +01:00
Keith Whitwell
6bfcffa79e
trivial/tri_viewport: add width/height keys
2009-04-21 11:13:15 +01:00
Brian Paul
d27d79db4a
softpipe: fix softpipe_is_buffer/texture_referenced() regression
...
Return the conservative PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE
value for now.
This fixes a bunch of regressions seen in piglit and glean.
2009-04-20 14:57:00 -06:00
Brian Paul
5d5db81076
swrast: fix pointer arithmetic error in get_texel_array()
...
This came from commit 1b2ab02367
2009-04-20 14:15:04 -06:00
José Fonseca
29280ac69e
gdi: Don't implement broken gl_dispatch_stub_xxx.
2009-04-20 16:44:37 +01:00
José Fonseca
be6037d459
wgl: Don't implement broken gl_dispatch_stub_xxx.
...
These don't respect the stdcall, so they crash upon return.
2009-04-20 16:44:37 +01:00
José Fonseca
708218119b
mesa: Correct the gl_dispatch_stub_xxx prototypes.
2009-04-20 16:44:37 +01:00
José Fonseca
01397a66c7
mesa: Handle failure to create a transfer.
2009-04-20 16:44:36 +01:00
Keith Whitwell
d017749b3e
mesa/progs: fix scons build after recent demo moves
2009-04-20 16:17:50 +01:00
Keith Whitwell
c691f96e98
trivial/tri-viewport.c - add guide lines, more triangles, make interactive
...
This is becoming more like a test than a trivial/ example.
2009-04-20 16:12:11 +01:00
Keith Whitwell
53c6467aea
st: assert on pipe_buffer_create failure
...
This needs a proper fix to propogate the out-of-memory condition back
up to Mesa and the app as a GL error. Until then, at least catch the
problem at its source.
2009-04-20 16:12:11 +01:00
Keith Whitwell
70588fc83c
tests/mipmap_view: add linear/nearest key
2009-04-20 16:12:11 +01:00
Keith Whitwell
c7c76ba561
util: don't set unused blend state
...
Try to avoid creating multiple blend atoms.
2009-04-20 16:12:11 +01:00
Jakob Bornecrantz
8ae52413c7
trace: Add initializer for static variables
2009-04-20 16:07:44 +02:00
Maciej Cencora
6900046aad
r300: fix register-negate branch merge regression
2009-04-20 07:31:44 -06:00
Michel Dänzer
c76a2444a3
gallium: Fix glDraw/CopyPixels fragment program leak.
2009-04-20 13:05:18 +02:00
Maciej Cencora
65fe0c86ff
r300: fix missing function declaration
2009-04-19 15:04:54 -04:00
Maciej Cencora
bcef4b63eb
r300: revert part of cb4bef7ae0
...
Some debugging code got there by accident
2009-04-19 15:04:44 -04:00
Jakob Bornecrantz
f2d2b3d8e2
trace: Enable dumping to be turned on and off
2009-04-19 16:24:41 +01:00
Jakob Bornecrantz
439c42ae8b
st: Wait to create bitmap transfer until needed
2009-04-19 16:24:41 +01:00
Jakob Bornecrantz
373e671683
autoconf: Build gallium softpipe when driver=xlib
2009-04-19 16:24:41 +01:00
Jakob Bornecrantz
90a23e340f
progs/demos: Update ignore
2009-04-19 16:24:29 +01:00
Jakob Bornecrantz
59c8e738c4
progs/glsl: Update ignore
2009-04-19 16:23:49 +01:00
Maciej Cencora
78878a13fe
r300: cleanup includes
2009-04-19 22:15:05 +10:00
Maciej Cencora
a2d49eeaeb
r300: move common fp functions to seperate file
2009-04-19 22:15:01 +10:00
Maciej Cencora
300661d12a
r300: more r300/r500 unification
...
reuse insert_WPOS_trailer function
2009-04-19 22:14:56 +10:00
Maciej Cencora
155cc1647f
r300: more prepare for merge
2009-04-19 22:14:53 +10:00
Maciej Cencora
97104c2559
r300: further r300/r500 merge preparation
2009-04-19 22:14:50 +10:00
Maciej Cencora
33af54af0d
r300: merge r300/r500 fragment program compiler structure
2009-04-19 22:14:46 +10:00
Maciej Cencora
aa04e7d475
r300: merge r300/r500 fragment program structures
2009-04-19 22:14:42 +10:00
Maciej Cencora
27d4546f60
r300: r300/r500 fp shader merge WIP
2009-04-19 22:14:39 +10:00
Maciej Cencora
cb4bef7ae0
r300: general cleanup
...
- remove unused fields
- remove unused defines and macros
- flatten one structure
2009-04-19 22:14:36 +10:00
Maciej Cencora
b552446b95
r300: remove unnecessary forward function declaration
2009-04-19 22:13:06 +10:00
Maciej Cencora
3fd0084154
r300: context creation cleanup
...
- move constant values initialization to seperate function
- remove obvious comments
2009-04-19 22:12:31 +10:00
Dave Airlie
3230cb5f53
radeon: update clear state with latest intel code
2009-04-19 22:04:42 +10:00
José Fonseca
dc1153ce83
softpipe: Simplify softpipe_create's prototype.
2009-04-18 23:15:26 +01:00
José Fonseca
876e95dcc8
softpipe: Fix softpipe_is_texture_referenced prototype.
2009-04-18 23:15:26 +01:00
José Fonseca
eb63e8cc75
softpipe: Remove softpipe_winsys.
...
Not used by softpipe anyway.
2009-04-18 23:15:26 +01:00
Brian Paul
c0565e86b4
demos: added glsl/texaaline.c program and overhaul the Makefile
2009-04-18 14:18:59 -06:00
Brian Paul
3595732f28
demos: updated .gitignore list
2009-04-18 13:18:44 -06:00
Brian Paul
c953f6620c
docs: removed/added demo programs
2009-04-18 13:16:35 -06:00
Brian Paul
d61070b659
demos: move demos/texobj.c to tests/
2009-04-18 13:12:50 -06:00
Brian Paul
30e80f6e55
demos: move demos/occlude.c (old HP extension) to tests
2009-04-18 13:10:51 -06:00
Brian Paul
22af013f85
demos: move tests/dinoshade.c to demos/
2009-04-18 13:08:48 -06:00
Brian Paul
49c3e7172d
demos: move tests/projtex.c to demos/
...
And fix compiler warnings.
2009-04-18 13:05:51 -06:00
Brian Paul
292e192093
demos: move tests/fbotexture.c to demos/
2009-04-18 13:00:48 -06:00
Brian Paul
f47495ec42
demos: move texdown.c to tests/
2009-04-18 12:58:00 -06:00
Brian Paul
dfd69a27f8
demos: move glutfx demo to tests/
2009-04-18 12:57:13 -06:00
Brian Paul
6a495d26af
demos: move streaming_rect.c demo to tests/
2009-04-18 12:55:55 -06:00
Brian Paul
118856641f
demos: move glslnoise.c demo to glsl/noise2.c
2009-04-18 12:54:27 -06:00
Brian Paul
927dc39de0
i965: use region width, height in brw_update_renderbuffer_surface()
...
Fixes a regression from commit 2c30fd84df
seen with DRI1.
2009-04-18 10:42:15 -06:00
Brian Paul
957a625b2d
intel: #include polygon.h to silence warning
2009-04-18 10:40:21 -06:00
Brian Paul
3e750ce5c4
demos: fix incorrect assertion
2009-04-18 10:20:26 -06:00
Brian Paul
c5af2ed60f
mesa: add switch case for GL_VERTEX_STATE_PROGRAM_NV in _mesa_new_program()
...
Fixes bug seen in progs/tests/vptest1.c
2009-04-18 10:08:54 -06:00
Brian Paul
2bf326af10
demos: fix usage text
2009-04-18 10:08:15 -06:00
Michel Dänzer
54fb6f0053
intel: Handle ARB_vertex_buffer_object state in intel_clear_tris().
...
Fixes gearsvbo app by Michael Clark.
2009-04-18 15:47:14 +02:00
Brian Paul
538a823882
demos: new glsl/array.c demo
...
Test variable indexing into a uniform array in a vertex shader.
2009-04-17 16:23:33 -06:00
Brian Paul
794d488e6d
intel: make sure polygon mode is set properly in intel_clear_tris()
...
Fixes progs/glsl/skinning.c demo.
2009-04-17 16:11:05 -06:00
Brian Paul
36b0f26721
mesa: suppress extra newline
2009-04-17 16:10:26 -06:00
Brian Paul
0bc214a834
i915: fix broken indirect constant buffer reads
...
The READ message's msg_control value can be 0 or 1 to indicate that the
Oword should be read into the lower or upper half of the target register.
It seems that the other half of the register gets clobbered though. So
we read into two dest registers then use a MOV to combine the upper/lower
halves.
2009-04-17 16:10:26 -06:00
Brian Paul
905130852a
mesa: build a float[4] value in _mesa_add_sampler() to avoid random values
2009-04-17 16:10:26 -06:00
Brian Paul
4c13cb65a0
dri: build DRI swrast driver too
2009-04-17 16:10:26 -06:00
Brian Paul
e1a8852aa4
dri: __driUtilMessage(): not all messages are errors
2009-04-17 16:10:26 -06:00
Brian Paul
08ac96e55b
mesa: minor tweak to error message
2009-04-17 16:10:26 -06:00
Brian Paul
f8f23e33c2
i965: updated CURBE allocation code
...
Now that we have real constant buffers, the demands on the CURBE are lessened.
When we use real VS/WM constant buffers we only use the CURBE for clip planes.
2009-04-17 16:10:26 -06:00
Jakob Bornecrantz
867afa4c09
xlib/trace: Fixup xlib trace
2009-04-17 21:33:12 +02:00
José Fonseca
86ed894e47
pipe: Get the p_atomic_dec_zero logic right this time.
2009-04-17 18:40:46 +01:00
Brian Paul
90c880f089
demos: move glewInit() call, fixes crash/bug 21247
2009-04-17 09:16:48 -06:00
Michel Dänzer
3b76072915
gallium: Fix PIPE_ATOMIC_GCC_INTRINSIC build.
2009-04-17 17:02:34 +02:00
Brian Paul
047efcd050
demos: move glewInit() after glutCreateWindow()
...
Fixes segfault. See bug 21239. However, the demo doesn't render
properly. Probably a bug in the GL_ATI_fragment_shader code.
2009-04-17 08:11:00 -06:00
Jakob Bornecrantz
44d0e0caf4
trace: Keep screen objects on lists
2009-04-17 16:03:01 +02:00
Jakob Bornecrantz
1e42f68fd6
trace: Fix is_referenced functions
2009-04-17 16:03:01 +02:00
Jakob Bornecrantz
5800e0aad1
trace: Simplify trace_buffer function
2009-04-17 16:03:01 +02:00
José Fonseca
dbb90436f8
pipe: Fix InterlockedDecrement usage.
2009-04-17 15:01:38 +01:00
José Fonseca
995a168dea
wgl: Put commas in the right places.
2009-04-17 14:55:49 +01:00
José Fonseca
5458f8eff6
wgl: Flip the pixel format order.
...
List 32bit pixel formats first, as nobody is interested in 16bit pixel
formats nowadays.
2009-04-17 14:53:29 +01:00
Thomas Hellstrom
e50dd26ca6
gallium: Create OGL state tracker wrappers for various CPU access operations.
...
There are two usage types of buffer CPU accesses:
One where we try to use the buffer contents for multiple draw commands in
a batch. (batch := sequence of commands that are flushed together),
like incrementally adding bitmaps to a bitmap texture that is reallocated
on flush.
And one where we assume we can safely overwrite the old buffer contexts, like
glTexSubImage. In this case we need to make sure all old drawing commands
referencing the buffer are flushed before we map the buffer.
This is easily forgotten.
Add wrappers for the most common of these operations. The first type is
prefixed with "st_no_flush" and the second type is prefixed with
"st_cond_flush", where "cond" indicates that we attmpt to only flush
if there is indeed unflushed draw commands referencing the buffer.
Prefixed functions are
screen::get_tex_transfer
pipe_buffer_write
pipe_buffer_read
pipe_buffer_map
Please use the wrappers whenever possible.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-17 13:18:05 +02:00
Zack Rusin
ee2a5f307a
egl: don't crash with one more khronos api
2009-04-17 07:11:16 -04:00
Keith Whitwell
687f331a1f
gallium: simplify further the logic for selecting mutex implementation
...
Cleaner than the previous cleanup...
2009-04-17 11:02:07 +01:00
Keith Whitwell
29a2f6fead
util: flush stdout before emitting debug_printf on stderr
...
A lot of the mesa demos emit commentary on stdout, try to keep it in
sync with the corresponding output from debug_printf().
2009-04-17 11:02:07 +01:00
Keith Whitwell
db93dcecc8
gallium: add #warning to mutex-based atomic implementation
...
Some builds end up picking this up.
2009-04-17 11:02:07 +01:00
José Fonseca
3a618da6e1
python/retrace: Rename module as it conflicts with a builtin module.
...
And there is no way to override a builtin module... sigh
2009-04-17 10:07:53 +01:00
José Fonseca
56c2cd7ae2
scons: Cleanup.
2009-04-17 09:49:41 +01:00
Brian Paul
189db329ca
demos: set init window size, not pos
2009-04-16 22:07:53 -06:00
Brian Paul
a902b6ba48
docs: separate compilation units in 7.5
2009-04-16 22:07:53 -06:00
Brian Paul
eb0d464903
Merge branch 'register-negate'
2009-04-16 22:02:54 -06:00
Alan Coopersmith
7571d5d3b0
egl/main/Makefile: Add dependency of install target on default build target
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com >
2009-04-16 20:07:47 -07:00
Maciej Cencora
9028335371
r300: we always want non NDC coords format for swtcl
2009-04-17 11:27:36 +10:00
Maciej Cencora
d7d5c97a21
r300: cleanup frag prog setup a little
...
Use proper fields for marking if fp is translated, and if is translated succesfully.
Now if fp gets translated (even unsuccesfully) fp->translated is true. If the translation failed (i.e. because we exceeded limit of
maximum texture indirections) the fp->error is set. With a little updated fallback function it prevents non native fragment programs
from beeing translated with every frame (the translation would fail anyway so there's no point to try again).
Also implement IsProgramNative function for GL_FRAGMENT_PROGRAM_ARB (it should give some performance boost in apps that checks if
program is native and falls back to simpler shader to meet hw limits if necessary) and cleanup indentation (remove whitespaces on empty
lines).
2009-04-17 11:27:31 +10:00
Maciej Cencora
a92bc56e24
r300: update r500 path for reordered WPOS and FOG fp attributes
...
Report and regression testing by Fabio Pedretti.
2009-04-17 11:27:27 +10:00
Eric Anholt
f17ea143cb
i915: Remove dead i830TexEnv and i915TexEnv.
...
These LOD bias updates are covered by the texture state uploads in
*_texstate.c now.
2009-04-16 12:04:34 -07:00
Eric Anholt
2c30fd84df
intel: Add support for argb1555, argb4444 FBOs and fix rgb565 fbo readpixels.
...
Also enable them all regardless of screen bpp, as 32 bpp what I've been
testing against, and haven't been able to detect any screen bpp-specific
troubles with them.
2009-04-16 12:04:30 -07:00
Brian Paul
33b865f70d
i965: disable using immediate values for MOV instructions
...
For some reason, MOV instructions using immediate src values don't seem
to work reliably on the GLSL path. Disable them for now (falling back to
const buffer reads). This fixes a bunch of glean glsl1 failures.
2009-04-16 11:08:23 -06:00
Brian Paul
a25632d890
i965: minor debug output changes
2009-04-16 11:08:23 -06:00
Brian Paul
fc76781456
i965: const buffer debug code (disabled)
2009-04-16 11:08:23 -06:00
Brian Paul
ee32e9b475
i965: implement relative addressing for VS constant buffer reads
...
A scatter-read should be possible, but we're just using two READs for
the time being.
2009-04-16 11:08:23 -06:00
Brian Paul
19ac3e2729
i965: handle address reg in get_dst()
2009-04-16 11:08:23 -06:00
Brian Paul
f2cfbfa2ba
i965: fix const buffer temp register clobbering
...
Calls to release_tmps() were causing the temps holding constants to get
recycled.
2009-04-16 11:08:23 -06:00
Lars Henning Wendt
d82876e850
mesa: fix bad mask bit in clip plane restore code for glPopAttrib()
2009-04-16 10:15:10 -06:00
Roland Scheidegger
69cbf3c686
intel: fix small compressed texture upload
...
need to round up height for _mesa_copy_rect otherwise
textures with height smaller than 4 won't get copied to the miptree at all
Also fix up the confusing debug output (don't output unitialized values,
and output if data is present and the compressed flag)
2009-04-16 17:47:25 +02:00
Brian Paul
666702baec
mesa: add distclean target to top-level Makefile
2009-04-16 09:31:45 -06:00
Brian Paul
0d0028e6df
demos: use larger buffer for snprintf() call, see bug 21220
2009-04-16 09:25:52 -06:00
Keith Whitwell
8b2ebd1531
vbo: cache last dlist vertex in malloced memory
...
Avoids repeated mapping of the VBO buffer on display list replay. We
need access to the final vertex in order to update the GL current attrib
values.
2009-04-16 12:19:19 +01:00
José Fonseca
e80d1e367a
Merge branch 'gallium-s3tc'
2009-04-16 10:51:42 +01:00
Dave Airlie
3264352c57
dri: attempt to actually refcount the __DRIDrawable
...
valgrind was showing a race between the drawable getting destroyed
by the X resource freeing code, and the context getting destroyed
later and freeing the drawable.
However I've no idea if some other combination of things could cause
this code to leak.
2009-04-16 13:06:24 +10:00
Dave Airlie
143b416af6
radeon: take a bo reference when adding to validate list
2009-04-16 13:06:08 +10:00
Jakob Bornecrantz
82e92eeab0
progs/tests: Make texcompress2 get texture
2009-04-15 23:36:22 +02:00
Jakob Bornecrantz
5a118d4650
util: Fix surface usage
2009-04-15 23:33:07 +02:00
Brian Paul
255c33d733
st: remove XXX comment
2009-04-15 09:54:04 -06:00
Brian Paul
7b24e58a0c
st: check for fast memcpy path in decompress_with_blit()
2009-04-15 09:52:04 -06:00
Brian Paul
66cdbf945a
st: st_equal_formats() function to compare gallium/GL pixel formats
2009-04-15 09:51:38 -06:00
Brian Paul
51b339af2e
st: decompress_with_blit() path for glGetTexImage().
...
Decompress a texture by rendering a textured quad.
2009-04-15 09:37:22 -06:00
Brian Paul
49b40f9bf4
gallium: new, simple RGBA surface create/destroy helpers
...
Use these for quickly creating an RGBA drawing surface.
2009-04-15 09:36:03 -06:00
Thomas Hellstrom
b83cf05d0d
r300-gallium: Fixup for commit 9b75627fab.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-15 17:24:06 +02:00
Thomas Hellstrom
9b75627fab
gallium: Make sure we flush before some texture / buffer operations.
...
Also implement context member functions to optimize away those
flushes whenever possible.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-15 17:16:58 +02:00
Brian Paul
f94053eb7d
tests: another extended swizzle test
2009-04-15 19:55:28 -06:00
Corbin Simpson
1a84072db9
r300-gallium: Use viewport state.
2009-04-15 15:10:24 -07:00
Corbin Simpson
a4e0a46a8d
r300-gallium: Don't use indexbufs for now.
...
They aren't working, so best to turn it off.
2009-04-15 15:10:24 -07:00
Corbin Simpson
a5f68b40cb
r300-gallium: Point size is at OVM position 15, not 1.
...
Or so sayeth osiris, and he would know. :3
2009-04-15 15:10:23 -07:00
Corbin Simpson
ada7ced189
r300-gallium: vs: Dot products.
2009-04-15 15:10:23 -07:00
Eric Anholt
43257c1470
i965: Clean up output of WM SS state dump, and add format output.
2009-04-15 12:55:51 -07:00
Eric Anholt
bbae8791d1
i915: Use DEBUG_WM (like 965) for printing the fragment program out.
...
This is nice when paired with INTEL_DEBUG=batch for debugging what's going
out to the hardware.
2009-04-15 12:55:51 -07:00
Eric Anholt
0af7e9170f
i915: Add decode of dest buffer variables (destination format)
2009-04-15 12:55:51 -07:00
Eric Anholt
c710430f3a
mesa: Update texenv program when _NEW_ARRAYS is updated as well.
...
This fixes a regression in fbotest1 on 915, where a transition from
color+vertex array enabled to texcoord0+vertex array enabled wouldn't trigger
program update on the second _mesa_update_state of DrawArrays, and we'd sample
a constant texcoord of 0,0,0,1 instead of the array.
The double state update in DrawArrays from
1680ef8696 still needs fixing.
2009-04-15 12:55:50 -07:00
Eric Anholt
8bc3a6eb19
intel: Fix segfault when doing SW mipmap generation with a PBO texture upload.
...
Triggered in test-fbo from clutter since
37fb2d9b23 .
2009-04-15 12:55:50 -07:00
José Fonseca
af9d202b26
mesa: TGSI translation of multiple render targets.
2009-04-15 20:08:33 +01:00
Brian Paul
05471828dc
glx: added null pointer check in glXGetFBConfigs()
...
Fixes segfault seen with glxinfo with NVIDIA OpenGL.
2009-04-15 08:01:45 -06:00
Brian Paul
7db7ff878d
mesa: merge the prog_src_register::NegateBase and NegateAbs fields
...
There's really no need for two negation fields. This came from the
GL_NV_fragment_program extension. The new, unified Negate bitfield applies
after the absolute value step.
2009-04-14 22:14:30 -06:00
Brian Paul
0115a4f8f1
mesa: remove unused matrixType param from ctx->Driver.UniformMatrix() functions
2009-04-14 20:00:28 -06:00
Brian Paul
62c45ec951
mesa: move #define for GL_PROGRAM_BINARY_LENGTH_OES
2009-04-14 19:56:59 -06:00
Brian Paul
fe278f1e60
mesa: remove NV vertex/fragment program print/debug code
...
The code in prog_print.c can be used instead.
2009-04-14 19:53:37 -06:00
Brian Paul
cdc7f681c8
mesa: use standard offsetof() macro
2009-04-14 19:44:16 -06:00
Brian Paul
92cc997003
i965: fix VS constant buffer reads
...
This mostly came down to finding the right MRF incantation in the
brw_dp_READ_4_vs() function.
Note: this feature is still disabled (but getting close to done).
2009-04-14 16:05:37 -06:00
Adam Jackson
a3c3c1f143
glx: Make glXGetScreenDriver() work for DRI2
2009-04-14 17:56:29 -04:00
José Fonseca
71793e0f79
scons: Support winddk 6001.18002.
2009-04-14 21:43:10 +01:00
José Fonseca
5ccbccb3c1
scons: Recent Windows DDK do not include LIB.EXE.
...
Have to use LINK /LIB instead. The biggest problem is when the command
line is very long and all the options are included in a argument file --
link doesn't like if /LIB is included in the argument file.
2009-04-14 21:43:10 +01:00
José Fonseca
1ea7f0fef0
mesa: Fix gcc assembly enable logic.
...
The i386 symbol is defined on WINDDK.
2009-04-14 21:43:10 +01:00
Ian Romanick
153012b29b
DRI2: Don't fault on NULL DrawBuffer
...
It is possible for ctx->DrawBuffer to be NULL, so don't fault when
that happens. This change is not being committed to master because it
doesn't appear to be necessary there.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Cherry picked from mesa_7_4_branch, commit 49e0c74ddd
2009-04-14 14:32:52 -06:00
Brian Paul
cafea75280
i965: checkpoint commit: VS constant buffers
...
Hook up a constant buffer, binding table, etc for the VS unit.
This will allow using large constant buffers with vertex shaders.
The new code is disabled at this time (use_const_buffer=FALSE).
2009-04-14 11:08:42 -06:00
Younes Manton
43c7ffaea6
dri glx: Swap before checking for cliprects.
...
We don't update drawables anymore unless they are completely
uninitialized, so we need to swap even if we don't have
cliprects yet, otherwise we never end up calling the driver's
SwapBuffers(). The driver should update the drawable in its
SwapBuffers() anyway.
See 8e753d0404 ,
"dri glx: Fix dri_util::driBindContext" for the change that
exposed it.
2009-04-13 21:34:53 -04:00
Ben Skeggs
352de305bd
nv50: fix mrt clear
2009-04-13 14:41:06 +10:00
Jerome Glisse
1fd76ae930
r200: fix texture level for compiz case
2009-04-12 15:51:31 +02:00
Jerome Glisse
02b130fd4b
r200: validate vertex buffer
2009-04-12 14:25:36 +02:00
Jerome Glisse
8181f8fbf9
radeon: emit scissor when using cs path
2009-04-12 13:11:06 +02:00
Corbin Simpson
9340c994b7
r300-gallium: Split up vertex format tallying for HW and SW TCL.
...
This makes things draw (again) with HW TCL. Yay?
2009-04-10 18:35:58 -07:00
Corbin Simpson
1b5b083d5c
r300-gallium: Finish up cleanup of vertex format state.
...
This makes texcoords route properly, and also fixes a few asserts.
2009-04-10 18:35:57 -07:00
Corbin Simpson
e825609d81
r300-gallium: Clean up vertex format setup.
2009-04-10 18:35:57 -07:00
Brian Paul
4e96c81969
i965: remove unused var
2009-04-10 16:22:41 -06:00
Brian Paul
60ad4b0bf0
i965: clean-up in prepare_wm_surfaces()
2009-04-10 16:22:41 -06:00
Brian Paul
3444567050
mesa: reduce makefile output
2009-04-10 16:22:41 -06:00
Alex Deucher
9b162cdda7
Fix build errors from merge
2009-04-10 17:36:31 -04:00
Alex Deucher
04f335fd16
Merge branch 'radeon-rewrite' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa into r6xx-rewrite
2009-04-10 17:16:08 -04:00
Alex Deucher
c0419f190c
Remove r500 stuff
2009-04-10 16:36:18 -04:00
José Fonseca
11084d5827
wgl: Protect the framebuffer with a lock.
...
Unfortunately this doesn't catch all the cases, as the mesa state tracker
can still use the framebuffer without giving the wgl state tracker
the chance to lock it.
2009-04-10 19:50:35 +01:00
José Fonseca
6fc244c68d
wgl: Note down the gallium pixel formats, instead of re-guessing them.
2009-04-10 19:50:35 +01:00
José Fonseca
aa405a2a77
wgl: Query the screen for supported formats.
2009-04-10 19:50:35 +01:00
José Fonseca
0bca413ce9
wgl: Walk through the pixel formats combinations.
2009-04-10 19:50:35 +01:00
José Fonseca
e5d700721b
wgl: Keep copies of the PIXELFORMATDESCRIPTOR structures.
2009-04-10 19:50:34 +01:00
Robert Noland
48f0543b39
Build dri drivers for powerpc and sparc on FreeBSD.
2009-04-10 12:55:50 -05:00
Brian Paul
d60b4f7885
mesa: asst. progs/test/Makefile files
2009-04-10 08:54:37 -06:00
Brian Paul
23a911b4a6
i965: added null const_buffer pointer check in update_constant_buffer()
2009-04-10 08:36:19 -06:00
Brian Paul
ded05d32d5
intel: added screen->dri2.loader null pointer check in intel_flush()
...
Fixes segfaults when rendering to front buffer.
2009-04-10 08:36:19 -06:00
Brian Paul
88999de8b7
gallium: remove pipe_texture::compressed field
...
The format field encodes compressed vs. uncompressed already. We can easily
check if a texture is compressed with pf_is_compressed(texture->format).
2009-04-10 08:05:10 -06:00
José Fonseca
0a2269703c
wgl: Slightly simplify pixelformat creation.
2009-04-10 13:26:36 +01:00
José Fonseca
f8f4b03442
progs: Port glxinfo to wgl.
2009-04-10 13:26:35 +01:00
José Fonseca
46857f3c66
mesa: Don't define WGL_ARB_extensions_string in mesa_wgl.h.
...
It breaks wglext.h as it doesn't define PFNWGLGETEXTENSIONSSTRINGARBPROC.
2009-04-10 13:26:35 +01:00
José Fonseca
87b04ce59b
wgl: Move pixel format information into device structure.
2009-04-10 13:26:35 +01:00
José Fonseca
3f2420e2e0
wgl: Combine alpha pixelformat info in color.
2009-04-10 13:26:35 +01:00
José Fonseca
2921a49033
stw: Reorder the pixelformats, so that no alpha pixelformats get chosen before alpha.
...
Some applications might not handle a alpha visual when when they did not
request for one.
2009-04-10 13:26:35 +01:00
José Fonseca
0dd81ec97b
stw: Don't make assumptions about integer size.
2009-04-10 13:26:34 +01:00
José Fonseca
f14497a9cd
stw: Free the mesa framebuffer.
2009-04-10 13:26:34 +01:00
Michal Krol
5fae9514c2
tgsi/sse2: Cleanup NRM/NRM4 implementation.
...
Fix comments.
Make sure .w is set to 1.0 for NRM.
Optimise for non-.xyzw writemasks.
2009-04-10 11:58:49 +02:00
Michal Krol
05c70f8f5d
rtasm: Silence `static function not used' warning.
2009-04-10 09:07:22 +02:00
Michal Krol
13be57df3a
draw: Silence pointer-to-integer cast warning.
2009-04-10 09:07:19 +02:00
Michal Krol
f4cc0692e6
draw: Fix vertex_header initialisation.
2009-04-10 09:07:17 +02:00
Brian Paul
6c2d1e6839
swrast: remove some unneeded CHAN_TYPE!=GL_FLOAT code
2009-04-09 20:37:48 -06:00
Brian Paul
92d3b2a4da
gallium: comments for surface_copy(), surface_fill() in p_context.h
2009-04-09 18:40:24 -06:00
Brian Paul
20f3497e4b
i965: re-org of some of the new constant buffer code
...
Plus, begin the new code for vertex shader const buffers.
2009-04-09 18:37:03 -06:00
Brian Paul
08a1e1ebcb
demos: fix aspect ratio in Reshape()
2009-04-09 17:04:58 -06:00
Brian Paul
2078e6cf55
i965: new SURF_INDEX_ macros
...
Used to map drawables, textures and constant buffers to surface binding
table indexes.
2009-04-09 17:04:09 -06:00
Brian Paul
7e0d4598fb
gallium: change // comment to /* */ style
2009-04-09 16:10:43 -06:00
Brian Paul
985e71866a
gallium: updated comments in p_screen.h
2009-04-09 16:03:50 -06:00
Brian Paul
a35e745826
i965simple: remove pipe_texture::compressed reference
2009-04-09 15:33:09 -06:00
Michal Krol
c27c670ad8
tgsi/sse2: Fix build.
2009-04-09 23:24:57 +02:00
Michal Krol
5f31890861
draw: Fix LIT instruction.
2009-04-09 23:19:22 +02:00
Ian Romanick
6a6e478e55
intel / DRI2: Accept fake front-buffer from loader
...
Handle the loader returning a fake front-buffer. Since the driver
never specifically requests a fake front-buffer, the driver assumes
that it will never receive both a fake and a real front-buffer.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kristian Høgsberg <krh@redhat.com >
2009-04-09 14:18:14 -07:00
Ian Romanick
e6386e0d9a
DRI2: Assume that there is always a front buffer
...
Assume that the front-buffer exists even if the server didn't tell the
client that it exists.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kristian Høgsberg <krh@redhat.com >
2009-04-09 14:18:14 -07:00
Ian Romanick
43cf0d1eeb
intel / DRI2: Track and flush front-buffer rendering
...
Track two flags: whether or not front-buffer rendering is currently
enabled and whether or not front-buffer rendering has been enabled
since the last glFlush. If the second flag is set, the front-buffer
is flushed via a loader call back. If the first flag is cleared, the
second flag is cleared at this time.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kristian Høgsberg <krh@redhat.com >
2009-04-09 14:18:14 -07:00
Ian Romanick
82634ee8df
DRI2: Provide an interface for drivers to flush front-buffer rendering
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kristian Høgsberg <krh@redhat.com >
2009-04-09 14:18:14 -07:00
José Fonseca
c09ef3e747
python: Fix bad pointer.
2009-04-09 22:11:48 +01:00
Brian Paul
311f77198e
st: remove another unneeded 'is compressed' comparison
2009-04-09 15:02:48 -06:00
Brian Paul
1f4a7f3a2e
st: remove unneeded "is compressed" check
...
The format indicates compressed vs. uncompressed.
2009-04-09 15:02:48 -06:00
Brian Paul
e53d6ab39b
st: rearrange some code to be a little more clear
2009-04-09 15:02:48 -06:00
Brian Paul
227aa0070d
gallium: remove unneeded compressed=0 assignment
2009-04-09 15:02:48 -06:00
Brian Paul
f97df61d26
gallium: remove unneeded compressed=0 assignment
2009-04-09 15:02:47 -06:00
Brian Paul
f122015674
st: remove comp_byte parameter to st_texture_create()
...
We can determine if the texture is compressed by checking the format.
2009-04-09 15:02:47 -06:00
Brian Paul
1ad2484f03
st: consolidate format->usage computation
2009-04-09 15:02:47 -06:00
Brian Paul
eaca19edbb
st: add const qualifiers, use GL types
2009-04-09 15:02:47 -06:00
Brian Paul
d11d903c1b
st: make loops over 3D texture slices a litte more intuitive
2009-04-09 15:02:47 -06:00
Brian Paul
5facd7986a
st: reformatting and clean-ups in texture code
2009-04-09 15:02:47 -06:00
Michal Krol
790a18f2c2
tgsi/sse2: Fix ARL instruction.
2009-04-09 22:51:15 +02:00
Michal Krol
c54b219975
tgsi/sse2: Fix LIT instruction.
2009-04-09 22:51:13 +02:00
José Fonseca
7cfd3b3bdf
trace: Dump the fence, not its pointer.
2009-04-09 21:28:31 +01:00
José Fonseca
16c9bb81fd
wgl: Remove unused member.
2009-04-09 21:27:43 +01:00
José Fonseca
0da3a13d6a
trace: Use 'flags' name consistently.
2009-04-09 21:27:03 +01:00
José Fonseca
7ea265888f
gallium: Use "flags" consistently.
2009-04-09 21:26:15 +01:00
Alex Deucher
69edb8a156
R600/r700: add new cmdbuf macros
2009-04-09 16:05:50 -04:00
José Fonseca
fa2b9e4306
gdi: Use stw_* names.
2009-04-09 20:45:44 +01:00
José Fonseca
81660a44dc
wgl: Use more stw_* names.
2009-04-09 20:45:43 +01:00
José Fonseca
4bbb5eb96a
wgl: Use hooks instead of subclassing the window.
...
Subclassing the window is invasive: we might call an old window proc even
after it was removed. Glut and another bug just in the wrong time was
provoking this. Hooks don't have this problem.
2009-04-09 20:45:43 +01:00
Brian Paul
deff099215
mesa: fix potential recursive locking deadlock in _mesa_HashWalk()
...
If the walk callback called _mesa_HashRemove() we'd deadlock.
2009-04-09 10:53:43 -06:00
Brian Paul
3163ea1453
i965: free shader's constant buffer in brwDeleteProgram()
...
Fixes mem leak observed with texcombine test.
2009-04-09 10:33:16 -06:00
Alex Deucher
e24e4ae2e8
R6xx/R7xx: r300 -> r600 symbols
2009-04-09 10:55:41 -04:00
José Fonseca
564ba25386
wgl: Catch the attempt of releasing a context which is not current.
2009-04-09 15:22:15 +01:00
José Fonseca
858d3da441
wgl: Move the framebuffer list to the device. Avoid recursive locking.
2009-04-09 15:22:15 +01:00
José Fonseca
8ef4129003
wgl: More symbol naming normalization.
2009-04-09 15:22:15 +01:00
José Fonseca
d8ffccc80b
stw: Use wglext.h's defines and prototypes.
2009-04-09 15:22:15 +01:00
José Fonseca
19068d93c8
stw: Normalize symbols prefix.
2009-04-09 15:22:15 +01:00
José Fonseca
7e563200b8
wgl: Add const qualifier to global constant data.
2009-04-09 15:22:15 +01:00
Brian Paul
8131123eff
i965: set BRW_MASK_DISABLE flag in "send" instruction in brw_dp_READ_4()
...
This fixes the random results that were seen when fetching a constant
inside an IF/ELSE clause. Disabling the execution mask ensures that all
the components of the register are written.
2009-04-08 19:37:33 -06:00
Brian Paul
43fc20e4e1
i965: clean-ups, debug code in brw_wm_glsl.c
2009-04-08 19:37:33 -06:00
Brian Paul
42cd3014f8
i965: init current_const[i].index = -1
2009-04-08 19:37:33 -06:00
Brian Paul
ed9ba19bbb
i965: move the fetch_constants() call before setting conditional mod state
...
Before, the instruction's CondUpdate field was mistakenly effecting the
constant-fetch operation.
Fixes progs/glsl/bump.c demo. But there are some other issues related
to condition flags and IF/ELSE that need investigation...
2009-04-08 19:37:33 -06:00
Brian Paul
f4468384b6
mesa: minor datatype changes in optimization code
2009-04-08 19:37:33 -06:00
Ben Skeggs
0da2781f2f
nv50: adapt for new clear interface
...
this is so much nicer :)
2009-04-09 11:36:28 +10:00
Dave Airlie
5e361c47ab
r300: fix color tiling
2009-04-09 10:51:10 +10:00
Maciej Cencora
1ec0efa7d3
r300: reorder fog coordinate and WPOS fp attributes
...
HW TCL path currently assumed fog, WPOS order. The order was inverted for SW TCL path.
This hopefully fixes rest of fog and WPOS related bugs.
Additionally fix some indentation, don't route unnecessary components of fog coordinates for performance reasons and simplify vertex
attribute emitting for SW TCL path.
2009-04-09 10:31:51 +10:00
Maciej Cencora
3b1d544001
r300: fix regression from swtcl rewrite
...
Fix wrong attribute emit and revert to previous behaviour of calculating VAP_OUT_VTX_FMT_1 register value.
We can't use r300VAPOutputCntl1 function because it assumes that all texture coords have 4 components and that is the case for HW TCL
path, but not for SW TCL.
2009-04-09 10:31:36 +10:00
Dave Airlie
d1a9b1f513
Merge remote branch 'origin/master' into radeon-rewrite
...
Conflicts:
src/mesa/drivers/dri/r200/r200_tex.c
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_swtcl.c
src/mesa/drivers/dri/r300/r300_tex.c
src/mesa/drivers/dri/r300/r300_texmem.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/radeon/radeon_tex.c
2009-04-09 10:31:08 +10:00
Corbin Simpson
8648c26858
r300-gallium: Properly emit indexbufs.
...
This fixes hardlocks with anything using elts.
2009-04-08 15:31:04 -07:00
Corbin Simpson
b3639d43f2
r300-gallium: Add vertex shader constant emit.
2009-04-08 15:31:04 -07:00
Jakob Bornecrantz
b3c1c5cf2c
mesa: Report name for missing s3tc functions
2009-04-09 00:13:10 +02:00
Jakob Bornecrantz
55ed2a7365
st: If the hw supports it do hw conversion of texture uploads
2009-04-09 00:13:10 +02:00
José Fonseca
71504c7700
python/retrace: Try to cope with failures creating textures.
2009-04-08 21:41:04 +01:00
José Fonseca
c89eba0f31
python: Don't try to finish a null fence.
2009-04-08 21:41:04 +01:00
José Fonseca
4342d6a91f
python/retrace: Use colors on windows console.
2009-04-08 21:41:03 +01:00
Alex Deucher
4138bdb3b1
R600: initial copy of r300 code
2009-04-08 15:16:35 -04:00
Robert Ellison
23ad86cfb9
Mesa: allow suppression of debug messages in a debug build
...
For testing, it's very useful to be able to test on a debug build,
while suppressing the debug messages (messages that are by default
suppressed in a release build), in order to see the same behavior
that users of release builds will see.
For example, the "piglit" test suite will flag an error on
programs that produce unexpected output, which means that a
debug build will always fail due to the extra debug messages.
This change introduces a new value to the MESA_DEBUG
environment variable. In a debug build, explicitly setting MESA_DEBUG
to "0" will suppress all debug messages (both from _mesa_debug() and
from _mesa_warning()). (The former behavior was that debug
messages were never suppressed in debug builds.)
Behavior of non-debug builds has not changed. In such a build,
_mesa_debug() messages are always suppressed, and _mesa_warning()
messages will be suppressed unless MESA_DEBUG is set *to any value*.
2009-04-08 11:10:46 -06:00
Alan Hourihane
a97c846d61
gallium: when using gl_PointCoord ensure we use the correct attribute.
2009-04-08 16:39:17 +01:00
José Fonseca
84e784665a
python/retrace: Allow to specify the range of calls of interest.
2009-04-08 16:26:06 +01:00
José Fonseca
e0e5d5014e
trace: Make calls dumping threadsafe.
2009-04-08 16:26:05 +01:00
José Fonseca
d2cdf6253c
trace: Make call no global.
2009-04-08 16:26:05 +01:00
José Fonseca
c14562d3b1
python/retrace: Handle recent traces.
...
Try to keep backwards compatability with old traces as much as possible.
2009-04-08 16:26:05 +01:00
José Fonseca
aaea658dbe
python: Fix method renaming.
2009-04-08 16:26:05 +01:00
José Fonseca
724929db3c
python: Cope with null surfaces.
2009-04-08 16:26:05 +01:00
José Fonseca
923b4413a6
wgl: Integrate the trace driver on debug builds.
2009-04-08 16:26:05 +01:00
José Fonseca
927eb8fe4c
trace: Simplify cast wrappers.
2009-04-08 16:26:05 +01:00
José Fonseca
7000b9d74a
trace: Match pipe_context::clear prototype.
2009-04-08 16:26:04 +01:00
Brian Paul
a3277c542b
gallium: handle the case of util_pack_z_stencil(format=PIPE_FORMAT_S8_UNORM)
...
Fixes failed assertion in glean fbo test.
2009-04-08 08:23:45 -06:00
Brian Paul
9f784647ad
docs: bump Gallium version number
2009-04-08 08:23:45 -06:00
Brian Paul
f6b71d02c7
docs: updated Cell driver info
2009-04-08 08:23:45 -06:00
Brian Paul
ce01de5075
docs: more info for 7.4 release notes
2009-04-08 08:23:45 -06:00
José Fonseca
629700ed7e
mesa: Don't attempt to free the dummy program.
2009-04-08 11:32:43 +01:00
Brian Paul
105758105a
st: implement glCopyTexImage() for GL_DEPTH24_STENCIL8 internal format
2009-04-07 17:56:40 -06:00
Brian Paul
b7615e5240
st: implement GL_DEPTH_STENCIL format for glReadPixels and DrawPixels()
2009-04-07 17:32:29 -06:00
Brian Paul
fbcd78b5d1
softpipe: minor debug-help changes in softpipe_transfer_map()
2009-04-07 17:31:49 -06:00
Brian Paul
ac1ff1b9fe
mesa: add another special/optimized case in _mesa_unpack_depth_span()
2009-04-07 17:31:14 -06:00
Brian Paul
228f20e324
swrast: fix point rendering function selection
...
Need to clamp default point size to min/max range before checking if it's one.
Fixes glean pointAtten test.
2009-04-07 13:44:13 -06:00
Brian Paul
d03053688f
mesa: fix incorrect component ordering for sRGB8 texture fetch/store
...
This format is layered on MESA_FORMAT_RGB888 so the component order is
actually BGR.
Fixes glean pixelFormat failures.
2009-04-07 13:17:42 -06:00
Brian Paul
0f0e24f6ef
glsl: enable the new linear scan register allocator code
...
Seems to b working well enough to enable all the time.
Optimizations can be disabled with "export MESA_GLSL=nopt" if needed.
2009-04-07 11:10:27 -06:00
Brian Paul
439909a87d
docs: document the MESA_GLSL env var, other misc GLSL updates
2009-04-07 11:09:53 -06:00
Brian Paul
4069447f73
glsl: don't optimize program if MESA_GLSL=nopt
2009-04-07 11:01:15 -06:00
Alex Deucher
90ffce4973
radeon: fix compiler warning
2009-04-07 12:37:10 -04:00
Brian Paul
3e79d65083
swrast: restore !shader check around add_specular()
...
Fixes a regression from commit 76ac75af8e .
2009-04-07 07:04:14 -06:00
Maciej Cencora
e2ce1d80d1
r300: swtcl rewrite and cleanup
...
- remove unused variables
- silence compiler warnings
- fix twosided lighting
- fix point attenuation
- unify indentation
2009-04-07 21:08:40 +10:00
Corbin Simpson
799f43f2e0
r300-gallium: vs: Add MAD.
2009-04-06 23:36:34 -07:00
Corbin Simpson
00bb3deed2
r300-gallium: vs: Add MUL.
2009-04-06 23:26:38 -07:00
Corbin Simpson
6a1be41af9
r300-gallium: Fix surface_copy too.
2009-04-06 23:25:27 -07:00
Corbin Simpson
ffbf3f4952
r300-gallium: Properly setup HW/SW TCL controls.
...
This keeps non-TCL chipsets from locking up, and also fully unbreaks
RADEON_NO_TCL rendering.
2009-04-06 23:18:56 -07:00
Dave Airlie
86556f8bda
radeon/r200/r300: fix missing dma buffer validation
...
this make gnome shell run
2009-04-07 15:08:56 +10:00
Dave Airlie
23478f1c03
radeon: fix bocs wrapper
2009-04-07 15:08:56 +10:00
Brian Paul
3630da9916
swrast: more texcombine clean-ups
2009-04-06 21:37:20 -06:00
Brian Paul
1b2ab02367
swrast: asst. clean-ups in texcombine code
2009-04-06 20:08:43 -06:00
Brian Paul
76ac75af8e
swrast: fix secondary color add for glBitmap
...
Also, clean up the logic involved in choosing per-vertex vs. per-fragment
primary+secondary color addition.
2009-04-06 17:18:58 -06:00
José Fonseca
b4c0e1f9e1
stw: Choose a color buffer format that matches the visual.
...
The massive ifs are ugly, but it's not worth to automate this for just a
handful of formats.
Fixes conform bcolor.c.
2009-04-06 23:09:02 +01:00
Brian Paul
f4d744af24
softpipe: clean up the buffer clear and tile cache code a little
2009-04-06 15:31:58 -06:00
Brian Paul
87c356a222
swrast: fix incorrect arithmetic for GL_ADD_SIGNED/GL_COMBINE4_NV mode
2009-04-06 14:38:09 -06:00
Brian Paul
89276e2aaf
st: as with swrast, interpret texture border color according to texture format
...
Depending on the hardware driver this might not be needed, but it will
cause no harm.
2009-04-06 14:06:08 -06:00
Brian Paul
a07e68df68
st: rename a helper function
2009-04-06 14:00:03 -06:00
Brian Paul
b48eb05f1f
swrast: fix texture border color interpretation
...
The texture border color must be interpreted according to the texture's
base format. For example, for a GL_ALPHA texture, sampling the border
color should return (0,0,0,borderAlpha). This wasn't an issue here until
I removed the legacy texenv code (we always use the combiner path now).
2009-04-06 13:53:46 -06:00
José Fonseca
8332925c3c
mesa: Fix orientation adjustment for reading stencil pixels.
...
Fixes conform spcorner.c & spclear.c failure.
2009-04-06 20:38:37 +01:00
Eric Anholt
6b187cc8a5
intel: Avoid dri2 GetBuffers round-trips for internal Viewport calls.
...
This gets us the savings for driver-internal viewport calls that
dd1c68f151 was attempting, without relying
on Xlib internals or clients handling X events.
2009-04-06 11:17:25 -07:00
Eric Anholt
e7aef006e5
i965: Use GTT maps when available to upload vertex arrays and system VBOs.
...
This speeds up OA on my GM45 by 21% (more than the original CPU cost of
the upload path). We might still be able to squeeze a few more percent out
by avoiding repeatedly mapping/unmapping buffers as we upload elements into
them.
2009-04-06 10:58:52 -07:00
Eric Anholt
5cca1ceb81
intel: Clean up some a leftover from sedding of bufmgr context->screen move.
2009-04-06 10:31:13 -07:00
José Fonseca
2d56d0839e
r300-gallium: Skeleton for integrating into the python statetracker.
2009-04-06 15:51:27 +01:00
Jerome Glisse
741aaaa288
radeon: add support for new ttm
2009-04-06 11:58:08 +02:00
Michel Dänzer
e798bf8053
radeon: Expose a 32 bit RGBA fbconfig even when the screen depth is 16.
...
Otherwise current xserver / libGL no longer expose a 32 bit RGBA GLX visual,
and compiz fails.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=20479 .
2009-04-06 08:59:57 +02:00
Corbin Simpson
36ae0766b9
r300-gallium: vp: Moar.
2009-04-05 02:05:08 -07:00
Corbin Simpson
84d76607ec
r300-gallium: vs: Use a tab to properly set up OVM.
2009-04-05 01:32:55 -07:00
Corbin Simpson
50ee103cf0
r300-gallium: Re-translate shaders if constants change.
2009-04-05 01:32:28 -07:00
Corbin Simpson
ce7963f338
r300-gallium: Properly interface with Draw for vert shaders.
2009-04-05 01:00:25 -07:00
Corbin Simpson
484795ff14
r300-gallium: Update state handlers/setters for vertex shaders.
2009-04-05 00:15:19 -07:00
Corbin Simpson
316b244ff1
r300-gallium: vs: Moar vert shaders.
2009-04-04 23:44:37 -07:00
Corbin Simpson
7cd535b478
r300-gallium: vs: Expand instruction emission.
2009-04-04 22:57:45 -07:00
Corbin Simpson
a4a853e593
r300-gallium: Update clear() code.
...
We have a huge optimization opportunity, but for now we'll just use the util.
2009-04-04 22:30:14 -07:00
Brian Paul
7a164411ab
cell: update clear() code to catch up to gallium changes
2009-04-04 13:45:54 -06:00
Michal Krol
1bf6af141f
python/regress: Clean up driver clear() interface.
2009-04-04 21:16:37 +02:00
Michel Dänzer
eb168e26aa
gallium: Clean up driver clear() interface.
...
Only allows clearing currently bound buffers, but colour and depth/stencil in
a single call.
2009-04-04 19:01:51 +02:00
Michel Dänzer
ba14b043bc
gallium: Add utility helper for packing combined depth/stencil values.
2009-04-04 16:04:59 +02:00
Michal Krol
b0ce915186
python/regress: Remove trailing whitespace.
2009-04-04 13:42:31 +02:00
Michal Krol
4661817dac
python/regress: Initial fragment shader test suite.
2009-04-04 13:35:53 +02:00
Michal Krol
2d8bf51ffc
python/regress: Use X8R8G8B8 rendertarget in vertex shader test.
2009-04-04 13:35:51 +02:00
Corbin Simpson
024817649f
radeon: A bit of indent and line break cleanup.
2009-04-04 02:43:09 -07:00
Corbin Simpson
48688e5e8f
r300-gallium: Calculate vert shader inputs for HW TCL.
...
This is definitely not perfect.
2009-04-04 02:38:13 -07:00
Corbin Simpson
21f1cdbe07
radeon: If the CS emit fails, dump it to stderr.
2009-04-04 02:20:29 -07:00
Corbin Simpson
23639ddbae
r300-gallium: Fix bad register write.
2009-04-04 02:19:48 -07:00
Corbin Simpson
5c50218d00
r300-gallium: Move swtcl_emit to render to reflect its true purpose.
2009-04-04 02:12:30 -07:00
Corbin Simpson
b7ffe1e876
Add scons build support for radeon/r300.
2009-04-04 00:36:05 -07:00
Corbin Simpson
d6fd672bf9
radeon: Fix compile warnings, compile errors.
2009-04-04 00:36:05 -07:00
Corbin Simpson
be1dbba0a4
r300-gallium: Clean up compile warnings and strict compile errors.
2009-04-04 00:36:04 -07:00
Corbin Simpson
a7dc04fa73
r300-gallium: r500 surface_copy fragment shader.
2009-04-04 00:36:04 -07:00
Brian Paul
4d363cc16d
intel: #include texgetimage.h
2009-04-03 17:43:03 -06:00
Brian Paul
a4bec69e72
mesa: move glGetTexImage(), glGetCompresssedTexImage() code into new file
2009-04-03 17:42:22 -06:00
Brian Paul
c7eb423c49
mesa: remove the noClamp parameter to _mesa_pack_rgba_span_float()
...
It was only set to GL_TRUE in one place where it isn't really needed
(glGetTexImage(sRGB format)).
2009-04-03 17:28:35 -06:00
Brian Paul
35d88e1ac2
mesa: clamp colors to [0,1] for glGetTexImage() when format is GL_LUMINANCE
...
For luminance, we add R+G+B and it seems we should always clamp in case.
2009-04-03 17:10:31 -06:00
Brian Paul
b7cb6650c1
mesa: whitespace and comment clean-up
2009-04-03 16:51:04 -06:00
Brian Paul
a5ce781282
mesa: remove extra semicolons
2009-04-03 16:37:36 -06:00
Brian Paul
5d3b1494b6
softpipe: add additional surface formats in tile cache code
2009-04-03 15:43:13 -06:00
Brian Paul
80197a0c1b
mesa: in mesa_add_named_constant(), avoid adding duplicate constants
2009-04-03 15:42:14 -06:00
Brian Paul
866bdd0509
mesa: fix parameter counting in ARB vertex/fragment program parsing
...
Duplicated unnamed constants were getting counted more than once.
2009-04-03 15:41:10 -06:00
Brian Paul
a4173956eb
mesa: replace >= with > when testing if we've exceeded max local params
...
Now a program that uses 256 locals works as it should.
2009-04-03 13:48:43 -06:00
Brian Paul
ce461ffc5a
mesa: only clear matrix MAT_DIRTY_INVERSE flag when we actually compute the inverse
...
If _math_matrix_analyse() got called before we allocated the inverse
matrix array we could lose the flag indicating that we needed to compute
the inverse. This could happen with certain vertex shader cases.
2009-04-03 12:49:03 -06:00
Brian Paul
b8a200ac9d
mesa: for OPCODE_LIT, use _mesa_pow() instead of exp() and log()
...
Also, s/pow/_mesa_pow/
2009-04-03 11:06:27 -06:00
Michal Krol
a7b6a28b0c
python/regress: Use A8R8G8B8 rendertarget format.
2009-04-03 18:55:28 +02:00
Brian Paul
7391ba1e9d
mesa: rename some gl_light fields to be clearer
...
EyeDirection -> SpotDirection
_NormDirection -> _NormSpotDirection
2009-04-03 10:09:28 -06:00
Brian Paul
650d147289
mesa: don't normalize spot light direction until validation time
...
In glLight() we're only supposed to transform the direction by the modelview
matrix, not normalized it too.
2009-04-03 10:09:27 -06:00
Michal Krol
be4c2d9a33
python/regress: vertex shader srcmod swz test does not use TEMP[0].
2009-04-03 17:55:21 +02:00
Michal Krol
e3d5e0aead
tgsi/exec: Actually enable switch-case for FLR.
2009-04-03 17:26:01 +02:00
Brian Paul
cbd305394a
i965: remove unused var
2009-04-03 09:08:00 -06:00
Brian Paul
29ae40f5dc
glx: remove unused local var in determineTextureFormat()
2009-04-03 09:07:04 -06:00
Brian Paul
5c5d78e191
mesa: replace assertion with conditional in _mesa_opcode_string()
2009-04-03 09:07:04 -06:00
Brian Paul
0139637975
i965: more const buffer debug code
2009-04-03 09:07:04 -06:00
Brian Paul
21982a2cd5
i965: added brw_same_reg()
2009-04-03 09:07:04 -06:00
Brian Paul
a330a6fcd0
i965: s/GL_FALSE/BRW_COMPRESSION_NONE/
2009-04-03 09:07:04 -06:00
Brian Paul
1e299ff828
i965: another checkpoint commit of new constant buffer support
...
Everything is in place now for using a true constant buffer for GLSL fragment
shaders. Still some bugs to find though.
2009-04-03 09:07:04 -06:00
Brian Paul
30adf05181
i965: fix response length param in brw_dp_READ_4()
...
We were accidentally clobbering the next register.
2009-04-03 09:07:04 -06:00
Brian Paul
3423986243
i965: change args to get_src_reg() to prep for new constant buffer support
2009-04-03 09:07:04 -06:00
Brian Paul
597cd5b94e
i965: check-point commit of new constant buffer support
...
Currently, shader constants are stored in the GRF (loaded from the CURBE
prior to shader execution). This severly limits the number of constants
and temps that we can support.
This new code will support (practically) unlimited size constant buffers
and free up registers in the GRF. We allocate a new buffer object for the
constants and read them with "Read" messages/instructions. When only a
small number of constants are used, we can still use the old method.
The code works for fragment shaders only (and is actually disabled) for now.
Need to do the same thing for vertex shaders and need to add the necessary
code-gen to fetch the constants which are referenced by the shader
instructions.
2009-04-03 09:07:04 -06:00
Brian Paul
ba8b25a46c
i965: remove unused code for sampling a constant buffer
2009-04-03 09:07:04 -06:00
Brian Paul
8c093a1fb0
i965: code to setup a constant buffer sampler
...
This code won't actually be used and will be removed in a subsequent commit.
Just committing for posterity.
2009-04-03 09:07:04 -06:00
Brian Paul
a9c62a2340
i965: do negation and Abs in get_src_reg_imm()
...
Fixes regression seen with progs/glsl/bump.c
2009-04-03 09:07:04 -06:00
Brian Paul
5f1ce6b87e
i965: comments
2009-04-03 09:07:03 -06:00
Brian Paul
ed8f54aa65
i965: code to debug/dump instruction immediates
2009-04-03 09:07:03 -06:00
Brian Paul
1ee0e22646
i965: minor code movement, new comment
2009-04-03 09:07:03 -06:00
Brian Paul
8127e49b93
i965: added new brw_dp_READ_4() function
...
Used to read float[4] vectors from the constant buffer/surface.
2009-04-03 09:07:03 -06:00
Brian Paul
6b18a8d3e7
i965: new and updated comments
2009-04-03 09:07:03 -06:00
Brian Paul
264058f38a
mesa: more error message info
2009-04-03 09:07:03 -06:00
Brian Paul
f5a4d20e4a
mesa: clean up formatting and use 'return' instead of 'break' consistantly
2009-04-03 09:07:03 -06:00
Brian Paul
1146d40b9c
i965: comments for brw_SAMPLE()
2009-04-03 09:07:03 -06:00
Brian Paul
e1a1a5a638
i965: comments for sampling code
2009-04-03 09:07:03 -06:00
Brian Paul
154cd7a723
i965: add support for float literal instruction operands
...
Call the get_src_reg_imm() function when it's permissible to generate a
literal value src register.
2009-04-03 09:07:03 -06:00
Brian Paul
966cd4f1af
i965: remove 'nr' param from get_src/dst_reg() functions
...
The value was always 1.
2009-04-03 09:07:03 -06:00
Brian Paul
f1b9a5cff1
i965: fix comment typo
2009-04-03 09:07:03 -06:00
Brian Paul
d5346a925c
i965: comments, clean-up in prepare_wm_surfaces()
2009-04-03 09:07:03 -06:00
Brian Paul
5d7f3ae15c
i965: remove unneeded #includes
2009-04-03 09:07:03 -06:00
Brian Paul
7709b26e6b
i965: formatting clean-ups
2009-04-03 09:07:03 -06:00
Brian Paul
4999721022
i965: comments, whitespace changes
2009-04-03 09:07:03 -06:00
Brian Paul
c82851598f
i965: rename scratch_buffer -> scratch_bo to be consistant with other buffers
2009-04-03 09:07:03 -06:00
Brian Paul
bf28b576cb
i965: fix indentation
2009-04-03 09:07:03 -06:00
Brian Paul
9f146943ec
i965: whitespace changes, comments
2009-04-03 09:07:03 -06:00
Michal Krol
dfab375c07
tgsi/text: Allow optional component selection for indirect registers.
2009-04-03 17:06:36 +02:00
Michal Krol
3b7c9a9a16
python/regress: vertex shader FRC test does not use IN[1].
2009-04-03 16:37:34 +02:00
Michal Krol
37661516ea
python/regress: Add relative addressing tests.
2009-04-03 16:37:13 +02:00
Michal Krol
d2ed91201e
util/debug: Initialise local variables.
2009-04-03 14:59:25 +02:00
Michal Krol
cc770e0a0c
tgsi/text: Allow -|src| variant of -(|src|).
2009-04-03 14:59:22 +02:00
Alan Hourihane
f7039fde4f
mesa: ensure pbo stencil buffers are mapped before use
2009-04-03 12:49:53 +01:00
Michal Krol
016052c18f
python/regress: Add vertex shader source modifier tests.
2009-04-03 08:27:50 +02:00
Christoph Bumiller
030533dd10
nv50: fix viewport state update
2009-04-03 08:33:19 +10:00
Roland Scheidegger
ebc1478e50
mesa: fix TexParameter functions
...
premature return in TexParameterf caused mesa to never call Driver.TexParameter
breaking drivers relying on this (fix bug #20966 ).
While here, also fix using ctx->ErrorValue when deciding to call
Driver.TexParameter. Errors are sticky and uncleared errors thus would cause
this to no longer get called. Since we thus need return value of
set_tex_parameter[if] can also optimize this to only call when value changed.
2009-04-02 23:38:34 +02:00
Brian Paul
7b9bf39543
mesa: don't call ctx->Driver.ReadPixels() if width or height is zero
2009-04-02 13:05:55 -06:00
Brian Paul
f6a3f1f52a
mesa: don't call ctx->Driver.Draw/CopyPixels() if width or height is zero
2009-04-02 13:05:22 -06:00
Brian Paul
46d09cb53d
glsl: fix segfault in linker when vertex or fragment shader was missing
2009-04-02 11:15:53 -06:00
Jakob Bornecrantz
29a1ed599b
progs: Ignores
2009-04-02 17:00:25 +02:00
Michal Krol
39c2fae657
python/regress: Do not generate HTML summary for vertex shader test.
2009-04-02 12:21:50 +02:00
Thomas Hellstrom
96fd3df59a
glx: MakeCurrent fixes.
...
1) If MakeContextCurrent is called with (NULL, None, None), Don't
send the request to the X server if the current context is direct.
2) Return BadMatch in some error cases according to the glx spec.
3) If MakeContextCurrent is called for a context which is current in
another thread, return BadAccess according to the glx spec.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-02 11:33:20 +02:00
Thomas Hellstrom
8e753d0404
dri glx: Fix dri_util::driBindContext
...
1) Don't error-check here. It's done in glx makeCurrent.
2) Allow ctx and the dri drawables to be NULL for future use. This is
currently blocked in glx makeCurrent.
3) Avoid updating dri drawables unless they are completely uninitialized.
Since the updating was done outside of the lock, the driver need to
verify and redo it anyway.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-02 11:33:19 +02:00
Thomas Hellstrom
c952b3e907
dri glx: Propagate driver MakeCurrent errors.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-02 11:33:19 +02:00
Dave Airlie
05304d41f2
radeon/r200/r300: fix up the whole buffer space checking.
...
This fixes up the buffer validation scheme, so that we keep a list
of buffers to validate so cmdbuf flushes during a pipeline get
all the buffers revalidated on the next emit.
This also fixes radeonFlush to not flush unless we have something
useful to send to the GPU, like a DMA buffer or something not state
2009-04-02 18:58:49 +10:00
Michal Krol
fbabeb9b56
python/regress: Do not create zbuf for vertex shader test.
2009-04-02 10:00:11 +02:00
Michal Krol
336a4f84e8
python/regress: Add more vertex shader test cases.
2009-04-02 10:00:09 +02:00
Dave Airlie
4170216009
radeon/common: use glCtx not ctx
2009-04-02 14:47:51 +10:00
Dave Airlie
e00ef43d79
radeon/r200/r300: collapse context destruction down to a common path.
...
Context destruction was nearly the same over all the drivers,
so collapse it down.
2009-04-02 14:44:29 +10:00
Dave Airlie
104d542205
radeon: tiling support
2009-04-02 14:44:08 +10:00
Brian Paul
bd32640f77
swrast: remove unused integer lerp functions
2009-04-01 20:24:23 -06:00
Brian Paul
7fbae9f41d
mesa: get rid of gl_texture_object::_BorderChan
2009-04-01 20:24:23 -06:00
Brian Paul
79c55e55f8
dri: use BorderColor instead of _BorderChan
2009-04-01 20:24:23 -06:00
Brian Paul
7aed2b0c30
swrast: remove old texture_apply() code; always use texture combine code
2009-04-01 20:24:22 -06:00
Brian Paul
84b24efe8d
swrast: fix bad optimization check
2009-04-01 20:24:22 -06:00
Brian Paul
0d8d904823
swrast: remove unused parameter
2009-04-01 20:24:22 -06:00
Brian Paul
aef2e1c1dc
swrast: minor improvements, clean-ups in texcombine code
2009-04-01 20:24:22 -06:00
Brian Paul
efe3d10aea
mesa: simplify ycbcr->rgb conversion code
2009-04-01 20:24:22 -06:00
Brian Paul
611128365d
mesa: convert more texture fetch functions to return GLfloat
2009-04-01 20:24:22 -06:00
Brian Paul
cb5bd7d4d4
mesa: switch texel fetch functions from GLchan to GLfloat
2009-04-01 20:24:22 -06:00
Brian Paul
0695413d2b
swrast: use float4_array typedef to simplify the code a bit
2009-04-01 20:24:22 -06:00
Brian Paul
bd9b2be828
mesa: texture combine clean-ups
...
Use MAX_COMBINER_TERMS instead of 4.
Rename some vars.
Update comments.
2009-04-01 20:20:03 -06:00
Brian Paul
a35ad020f9
swrast: refactor depth/shadow sampling code
2009-04-01 20:17:19 -06:00
Brian Paul
933f3b13c3
swrast: general clean-up of texture combine code
2009-04-01 20:17:19 -06:00
Brian Paul
de2afd8688
swrast: do texture sampling/combining in floating point
...
The code's cleaner and a step toward supporting float-valued texture sampling.
Some optimizations for common cases can be added and re-enabled...
2009-04-01 20:17:19 -06:00
Brian Paul
f8304bf1ed
demos: added progs/glsl/linktest.c to test linking of separate compilation units
2009-04-01 19:54:35 -06:00
Brian Paul
49fb750a68
glsl: implement compiling/linking of separate compilation units
...
A shader program may consist of multiple shaders (source code units).
If we find there are unresolved functions after compiling the unit that
defines main(), we'll concatenate all the respective vertex or fragment
shaders then recompile.
This isn't foolproof but should work in most cases.
2009-04-01 19:54:35 -06:00
Brian Paul
1ab225017e
mesa: use correct tex unit lod bias for TXB instruction
2009-04-01 18:50:07 -06:00
Brian Paul
9cc79fc2dc
swrast: fix glDrawBuffer(GL_FRONT_AND_BACK)
...
We weren't putting the right colors into the back buffer in this mode.
2009-04-01 18:44:15 -06:00
Dave Airlie
617c5262c6
r300: fix qtdemo qt4 startup
2009-04-02 11:30:03 +11:00
Brian Paul
e4b27b4a69
mesa: fix a recursive display list problem
...
This fixes an issue when compiling glCallList() into another display list
when the mode is GL_COMPILE_AND_EXECUTE.
Before, the call to glCallList() called _mesa_save_CallList() which called
neutral_CallList() which then called _mesa_save_CallList() again. In the
end, the parent display list contained two calls to the child display list
instead of one.
Let's be on the lookout for regressions caused by this change for a while
before we cherry-pick this elsewhere.
2009-04-01 17:39:26 -06:00
Corbin Simpson
935e6b1924
r300-gallium: Translate vertex shader magic numbers.
2009-04-01 15:52:32 -07:00
Corbin Simpson
28fa809c9e
r300-gallium: Fix compiler warnings.
...
"const" is the right keyword, but I can't do that without adding a bunch
of really annoying and ugly const casts everywhere, and frankly,
that's really stupid, so instead, just don't make them const.
2009-04-01 15:24:28 -07:00
Corbin Simpson
c4fb791909
r300-gallium: Add vertex shader for surface_copy.
2009-04-01 15:14:19 -07:00
José Fonseca
8d72caea3f
util: Fix x86_64 build.
2009-04-01 22:05:07 +01:00
José Fonseca
346e127732
util: Lookup symbol names from addresses.
...
Nice for stack backtraces.
Windows-only for now.
2009-04-01 21:29:58 +01:00
Michal Krol
d11a476ead
tgsi: Fix structure members initialisation.
2009-04-01 22:06:53 +02:00
Michal Krol
4900545bba
python/regress: Add vertex shader LRP test.
2009-04-01 16:06:22 +02:00
Michal Krol
16c281dfb5
python/regress: Add vertex shader FRC test.
2009-04-01 16:06:20 +02:00
Brian Paul
f8dd6594bf
glsl: fix texgen state variable tokens in emit_statevars()
...
This fixes broken variable indexing into the gl_Eye/ObjectPlaneS/T/R/Q arrays.
See bug 20986.
2009-04-01 07:37:08 -06:00
Brian Paul
2555bed7fc
mesa: minor tweaks in append_token() for printing state var strings
2009-04-01 07:37:08 -06:00
Michal Krol
daec1035a2
tgsi: Lookup alternate instruction mnemonics when parsing tgsi text.
2009-04-01 11:49:55 +02:00
Michal Krol
1aa4b79dc7
tgsi: Provide alternate instruction mnemonics in tgsi info.
2009-04-01 11:45:25 +02:00
Michal Krol
9d77663abb
tgsi/doc: Fix typo.
2009-04-01 11:25:58 +02:00
Michal Krol
998234ced2
python/regress: Add vertex shader EX2 test.
2009-04-01 11:25:02 +02:00
Michal Krol
449bab61b3
python/regress: Add vertex shader DST test.
2009-04-01 11:09:37 +02:00
Michal Krol
65cbe7e69c
python/regress: Fix vertex shader XPD test.
2009-04-01 11:08:41 +02:00
Michal Krol
dd6f1771c9
python/regress: Indent.
2009-04-01 10:58:46 +02:00
Michal Krol
5d8677469b
python/regress: Add vertex shader test for XPD.
2009-04-01 10:56:53 +02:00
Michal Krol
541d74423a
python/regress: Rename test files from *.txt to *.sh -- won't be .gitignored.
2009-04-01 10:34:08 +02:00
Michal Krol
e8b5d170ab
python/regress: Add more vertex shader tests.
2009-04-01 10:34:05 +02:00
Dave Airlie
f9d272fa41
radeon: go back and repick texture formats.
...
This might trip up some serious FBO users, will have to see, but
it avoids the slow paths for all the demos I have.
2009-04-01 16:13:30 +10:00
Dave Airlie
6e30fe4873
radeon: fixup render buffer cleanups
...
this fixes qtdemo-qt4 starting and a leak in glxgears exit
2009-04-01 15:41:58 +10:00
Corbin Simpson
27d886ae33
r300-gallium: Backwards test.
...
Wow, how long's that been there? Embarrassing.
2009-03-31 20:24:50 -07:00
Corbin Simpson
7540c847f1
r300-gallium: Moar vert shader emit.
2009-03-31 20:23:55 -07:00
Corbin Simpson
ddd0c94f04
r300-gallium: Add vertex shader emit.
2009-03-31 18:58:03 -07:00
Corbin Simpson
63529c731a
r300-gallium: Stubs for vertex shaders.
2009-03-31 18:32:10 -07:00
Brian Paul
a44f54912e
tgsi: added some helpful debug functions in the tgsi interpreter
...
Check for NaN/Inf, print exec vectors, print temp registers.
2009-03-31 16:21:51 -06:00
Brian Paul
919f57078b
mesa: fix bug in GPU codegen for fixed-function two-sided lighting
...
The 'dots' register wasn't getting properly un-negated and un-swizzled
after emitting the code for back-face lighting. So, if more than one
light source was enabled, the specular exponent for the next light source
was wrong.
During execution we were evaluating pow(x, y) where y was negative instead
of positive. This led to the outcome being zero or NaN.
This fixes the occasional black triangles seen in isosurf when hacked to
enable two-sided lighting.
2009-03-31 16:21:51 -06:00
Brian Paul
ef6f1027ff
draw: added Nan/Inf assertion in debug code
2009-03-31 16:21:51 -06:00
Brian Paul
d0f28b6dd9
softpipe: use util_is_inf_or_nan()
...
And print/warn NaN/Inf in print_vertex().
2009-03-31 16:21:51 -06:00
Brian Paul
3705d03b0f
gallium: added util_is_inf_or_nan() function to u_math.h
2009-03-31 16:21:51 -06:00
Brian Paul
53d507562b
mesa: minor reformatting, whitespace changes
2009-03-31 16:21:51 -06:00
Michal Krol
3f3db46911
python/regress: Initial commit for vertex shader regression tests.
2009-04-01 00:20:56 +02:00
Jeremy Huddleston
093ad509fc
Updated CPU_TO_LE32 to work on darwin
2009-03-31 15:08:49 -07:00
Jeremy Huddleston
f25c6b164f
Fix compiling indirect.c when GLX_DIRECT_RENDERING is not defined
...
(cherry picked from commit b65bc1b6cb )
2009-03-31 15:01:45 -07:00
José Fonseca
10b987ae7f
python/test: New test for surface copies.
2009-03-31 19:16:17 +01:00
José Fonseca
89ecefb887
python/test: Ignore test output files.
2009-03-31 18:39:18 +01:00
José Fonseca
e2cdc99788
python/test: Cleanup.
2009-03-31 18:39:06 +01:00
José Fonseca
f784906eb9
python/test: Dump classification tree to text file too.
2009-03-31 18:38:48 +01:00
José Fonseca
fee78c0c1f
python/test: Set executable permission bit.
2009-03-31 18:02:27 +01:00
José Fonseca
4d9dd3ecef
python/test: New test for rendering into textures.
2009-03-31 18:01:32 +01:00
José Fonseca
fcc2598fff
util: Enable assembly breakpointt on x86_64.
...
A breakpoint is much nicer than abort when gdb is attached.
2009-03-31 18:00:46 +01:00
José Fonseca
71384f29f1
python/test: Limit tree depth.
2009-03-31 17:23:48 +01:00
José Fonseca
65554af5c3
python/test: Infer type (continuous/discrete) from object type.
2009-03-31 17:21:52 +01:00
José Fonseca
bdfc411b44
python/test: Flush stdout to keep in sync with debug info on stderr.
2009-03-31 16:39:11 +01:00
José Fonseca
10b808156b
python/test: Dump a classification tree of the results when finished testing.
2009-03-31 16:38:03 +01:00
José Fonseca
6dd0a5f3d6
python/test: New test for texture transfers.
2009-03-31 12:29:13 +01:00
José Fonseca
7d5d5a6cb7
python/test: More descriptive test name.
2009-03-31 12:29:13 +01:00
José Fonseca
b4b4986f1f
python: Make get/put_tile_raw more user friendlier.
2009-03-31 12:29:13 +01:00
José Fonseca
e848a86dba
python: Add nblocksx/y members to surfaces.
2009-03-31 12:29:13 +01:00
José Fonseca
382306c573
gallium: Move pf_is_depth_stencil to p_format.h.
2009-03-31 12:29:13 +01:00
Dave Airlie
d81a48757a
radeon/dri2: if the depth buffer is 16-bit force cpp == 2
...
This is because the DDX always allocates using the drawable sizes.
which gives me twice the depth buffer I asked for, dumb.
2009-03-31 15:50:19 +10:00
Dave Airlie
2f3be8ab14
radeon: fix pixel readback for RGB8 tests
2009-03-31 14:43:14 +10:00
Dave Airlie
5ad32cfd21
r200: fix glean pixelFormats regression
2009-03-31 13:39:57 +10:00
Dave Airlie
5c7fc1cb8e
r300: fix stencil clears
2009-03-31 20:10:48 +10:00
Roland Scheidegger
4d89eff0b6
fix ugly copy/paste error in mipmap generation code
2009-03-31 03:19:29 +02:00
Dave Airlie
226c876a52
r200: only set all dirty on kernel clears
2009-03-31 10:46:27 +10:00
Dave Airlie
e1d1657493
radeon/r200: fix glean failures on readPixSanity since EXT_DEPTH_STENCIL support
2009-03-31 10:36:06 +10:00
Dave Airlie
1570bde279
r200: fix veclinear emission
2009-03-31 10:35:16 +10:00
Corbin Simpson
3eeeaf04e3
r300-gallium: RGBA, not ARGB, after all.
...
Clearly, something else is wrong.
2009-03-30 17:31:58 -07:00
Corbin Simpson
aafbbf7744
r300-gallium: r500-fs: If recompiling a shader, overwrite old insts.
2009-03-30 17:20:12 -07:00
Corbin Simpson
70de577b14
r300-gallium: Properly redo shaders when constant buffer changes size.
2009-03-30 16:58:20 -07:00
Corbin Simpson
70d39c7053
r300-gallium: Allow surface_fill to clear depth/stencil buffers too.
2009-03-30 16:51:01 -07:00
Corbin Simpson
4bfe784dca
r300-gallium: Emit the "right" sequence of colors.
...
ARGB, not RGBA.
2009-03-30 16:15:04 -07:00
Corbin Simpson
a56020fe17
r300-gallium: Fix hardlock when no colors or textures are present.
2009-03-30 15:50:09 -07:00
Corbin Simpson
7620b3943b
r300-gallium: Fix strange build error.
...
Why didn't this come up before?
2009-03-30 15:47:00 -07:00
Corbin Simpson
458bfe7e8d
r300-gallium: Handful of small leftovers.
2009-03-30 13:55:46 -07:00
Adam Jackson
37fb2d9b23
intel: Avoid mapping the texture image for CopyTex{,Sub}Image
...
We don't upload the pixels with the CPU in that case, so the map will
only serve as a way of triggering cache flushes over a bunch of data we
don't touch.
2009-03-30 16:32:11 -04:00
José Fonseca
f24ce49969
python: Use depth buffer in the triangle example.
2009-03-30 19:49:11 +01:00
José Fonseca
b4de7c4c5f
python: Read rgba8 with a single transfer.
2009-03-30 19:48:30 +01:00
José Fonseca
ffaff2736f
python: Cleanup.
2009-03-30 18:29:35 +01:00
José Fonseca
76d43ed4c9
python: Don't use deprecated clear_value field.
2009-03-30 18:26:40 +01:00
José Fonseca
5e815cf26f
python/test: Move the test description logic to the base class.
2009-03-30 18:18:15 +01:00
José Fonseca
a8251d041a
python/test: Move the image comparison logic to the base test class.
2009-03-30 17:51:55 +01:00
José Fonseca
af25470a54
python: Force unsigned comparison.
2009-03-30 17:19:11 +01:00
José Fonseca
844868048f
python: Set correct transfer mode.
2009-03-30 17:19:10 +01:00
José Fonseca
28de69d681
python: Set the surface GPU access flags.
...
Make python surface just a dumb (texture, face, level, zslice) tuple.
2009-03-30 17:19:10 +01:00
José Fonseca
68342f9036
python: Hide away the surface usage flags.
...
Surfaces are now by definition GPU views. So CPU access flags don't make
any sense when creating a surface.
For now we are forcing surfaces to be GPU read/write, but that will go away
soon.
2009-03-30 17:19:10 +01:00
Michal Krol
e08a0f4790
tgsi: Condition codes are implied in KILP.
2009-03-30 17:13:52 +02:00
Michal Krol
bd4c1c133b
tgsi: Explain symbols used in instruction set documentation.
2009-03-30 17:12:58 +02:00
Michal Krol
25e491e68c
tgsi: Document BRA opcode.
2009-03-30 15:39:29 +02:00
José Fonseca
1c989c24ae
python: Dont touch old pipe_winsys.
2009-03-30 14:24:20 +01:00
José Fonseca
29933fc6fe
python: Update instructions for windows.
2009-03-30 14:11:03 +01:00
José Fonseca
a20bae3d17
scons: Get python extensions building correctly on windows.
2009-03-30 14:11:03 +01:00
Dave Airlie
3b09f6544a
radeon: fix readback problem for piglit tests
2009-03-30 12:28:55 +10:00
Roland Scheidegger
a693a2998c
i965: srgb texture fixes
...
i965 can either do SRGBA8_REV format or SARGB8 format, but not SRGBA8.
Could add SRGBA8_REV support to mesa, but simply use SARGB8 for now.
While here, also add true srgb luminance / luminance_alpha support -
unfortunately the published docs fail to mention which asics support
this, tested on g43 so assume this works on any g4x.
2009-03-28 02:06:49 +01:00
Roland Scheidegger
02a579f2e7
mesa: fix a glGetTexImage issue with base-converted texture formats
...
need to respect the user-supplied base format, not the one derived from
the texture format actually used.
2009-03-28 02:06:40 +01:00
Roland Scheidegger
79e2df63af
i965: add support for signed rgba texture format
2009-03-28 02:06:18 +01:00
Roland Scheidegger
bb386a1eca
mesa: add _rev signed rgba texture format
2009-03-28 02:03:45 +01:00
Roland Scheidegger
7d00ba195c
glapi regenerate
2009-03-28 02:03:35 +01:00
Roland Scheidegger
05330b9cf3
glapi: remove a couple accidental GL_ prefixes
2009-03-28 02:02:49 +01:00
Roland Scheidegger
c6a6cc1918
mesa: add new signed rgba texture format
...
This is a (partial) backport of the signed texture format support in OGL 3.1.
Since it wasn't promoted from an existing extension roll our own.
2009-03-28 02:02:42 +01:00
Roland Scheidegger
a9bf5b5cca
gl: add new OGL 3.1 enums to glext.h
...
This is just temporary until the upstream source is updated.
2009-03-28 02:02:35 +01:00
Roland Scheidegger
0d9a715cea
gl: update glext.h to version 48
2009-03-28 02:02:28 +01:00
Roland Scheidegger
fd83289dbf
fix various small intel blitter issues
...
use color format constants instead of magic numbers
remove handling of cpp 0 or 3 (neither is possible) in various places
don't misconfigure 8 bit surface blits as rgb565
2009-03-28 01:53:59 +01:00
José Fonseca
aa011836c2
wgl: Don't flush surface if it is NULL.
...
Just a quick fix to prevent segfaults with glean.
2009-03-27 21:43:24 +00:00
José Fonseca
c03000b73e
wgl: Remove unused cruft.
2009-03-27 21:38:54 +00:00
José Fonseca
a790074810
util: Support Z24S8/Z24X8.
2009-03-27 20:23:16 +00:00
José Fonseca
e0a55dc9da
mesa: Support Z24S8 wherever S8Z24 is supported.
2009-03-27 19:51:33 +00:00
Corbin Simpson
2431a027c1
r300-gallium: Add some surface_copy.
2009-03-27 12:41:51 -07:00
Corbin Simpson
aa91f05f9d
r300-gallium: Use CMP for MOV on r300.
...
Doesn't quite fix problems, though. :c
2009-03-27 12:41:50 -07:00
José Fonseca
ec30d1b2e5
mesa: Use the python executable from sys.executable.
...
From Ramesh Dharan <rrdharan@vmware.com >
2009-03-27 19:13:21 +00:00
Carl-Johan Kjellander
c97e5e1fc1
egl: Fix newline typo in Makefiles
2009-03-26 19:20:11 +00:00
Brian Paul
2002e03a52
st: init the default texture to (0,0,0,1)
...
The default texture is used when a sampler uses an incomplete texture.
This change fixes the piglit fp-incomplete test.
2009-03-26 08:52:56 -06:00
Brian Paul
3673189326
tgsi: pass zero vector to texture sampler for 1D case instead of NULL
...
Fixes segfault when sampling 1D textures.
2009-03-26 08:40:07 -06:00
José Fonseca
a2f52f500c
python: Don't bypass vs/clip/viewport by default.
2009-03-26 12:11:27 +00:00
José Fonseca
7138cd7009
python: Fix the texture test.
2009-03-26 12:04:15 +00:00
José Fonseca
bb84ce7159
python: Make swig bindings python independent.
2009-03-26 11:29:59 +00:00
José Fonseca
d18c2ee3d5
python: Drop st_buffer.
...
It adds nothing, now that pipe_buffer has a pointer to the screen.
2009-03-26 11:19:15 +00:00
José Fonseca
ca9d2044a2
python: Use pipe_buffer_read/write.
2009-03-26 11:16:56 +00:00
José Fonseca
f4520277e1
python: Transfer only the requested tile.
2009-03-26 11:16:56 +00:00
Michal Krol
6af3be4309
python: Fix tri sample.
2009-03-26 12:07:06 +01:00
Michel Dänzer
d332f8b4ef
gallium: Remove some little-used fields from struct pipe_surface.
2009-03-26 10:53:47 +01:00
Dave Airlie
8ed405cd37
radeon/r200/r300: set correct row stride for rbs
2009-03-26 13:24:21 +10:00
Dave Airlie
e757bf964f
r300: check buffer sizes in non-tcl case + set correct VRAM limits
2009-03-26 13:24:21 +10:00
Dave Airlie
258686a973
radeon: fixup map/unmap texture to work with override BOs
...
if you hit this you've already failed but we shouldn't crash
2009-03-26 13:24:21 +10:00
Dave Airlie
4d36a19c90
r200: add fbo files to the compile
2009-03-26 11:15:07 +10:00
José Fonseca
6ce06f3fbc
python: Pass transfers to the tile functions.
2009-03-25 21:47:17 +00:00
José Fonseca
8866ff4cac
python: Catchup buffer_destroy interface change.
2009-03-25 21:47:17 +00:00
José Fonseca
57ea34214c
trace: Defer the cast to after the check for enabled trace.
...
Prevents segfault when trace is disabled.
2009-03-25 21:47:17 +00:00
José Fonseca
e866cd7401
softpipe: Include declarations.
2009-03-25 21:47:17 +00:00
José Fonseca
573346da2a
translate: Avoid unused variable warning.
2009-03-25 21:47:17 +00:00
Jakob Bornecrantz
e21d31e8ab
st/egl: Set dpms to on when showing screens
...
There is a wonderful bug in 2.6.29 that causes a hard lock on my
computer when this code is active for lvds that are turned off.
2009-03-25 21:06:40 +00:00
Jakob Bornecrantz
78abcb88fe
st/egl: Fix warning
2009-03-25 21:06:40 +00:00
José Fonseca
de89c022d5
python: Show call no in image window.
2009-03-25 21:04:17 +00:00
José Fonseca
c847b45153
trace: Update readme.
...
Actually, the trace driver with the xlib statetracker is
still causing assertion failures here..
2009-03-25 21:04:12 +00:00
José Fonseca
58351b5023
trace: Number calls.
2009-03-25 21:04:05 +00:00
José Fonseca
710bcc8050
python/retrace: Use the call no when dumping images.
...
To make it easy associate images with the calls.
2009-03-25 21:03:44 +00:00
José Fonseca
ecfa99ece1
python: Use a sequential number to identify each call.
...
TODO: Modify the trace driver to generate these on the XML file itself.
2009-03-25 21:03:40 +00:00
José Fonseca
9d97c3d0be
python/trace: Control the interpreter from command line options.
2009-03-25 21:03:38 +00:00
José Fonseca
5743483778
python: Use Ansi escape codes regardless of output is a tty or not.
2009-03-25 21:03:36 +00:00
José Fonseca
b52b78a226
python: List packages needed on debian systems.
2009-03-25 21:03:25 +00:00
José Fonseca
a6ad0c86ca
python: Allow to dump all images to disk.
2009-03-25 21:03:22 +00:00
José Fonseca
8ca95d8121
python: Tweak instructions.
2009-03-25 21:03:20 +00:00
José Fonseca
ad5f9752ce
python: s/pitch/stride/
2009-03-25 21:03:15 +00:00
José Fonseca
5381331f97
python: s/num_cbufs/nr_cbufs/
2009-03-25 21:03:10 +00:00
José Fonseca
ce518f4b0f
wgl: Use right integer type.
2009-03-25 21:01:49 +00:00
José Fonseca
601a6a5839
wgl: Use SetWindowLongPtr.
2009-03-25 21:01:49 +00:00
José Fonseca
9fb46fb4c3
util: Use size_t (for x86_64).
2009-03-25 21:01:49 +00:00
José Fonseca
8c4bd92b68
util: Don't use x86 asm on x86_64.
2009-03-25 21:01:49 +00:00
José Fonseca
079be0fd3f
draw: Use size_t (for x86_64).
2009-03-25 21:01:49 +00:00
José Fonseca
b3e03ede3e
scons: Move MSVC specific away from Mingw builds.
2009-03-25 21:01:49 +00:00
Maciej Cencora
7860b0886c
r300: cleanup swtcl a little
...
- remove disabled code
- silence compiler warnings (uinitialized values)
- remove unneeded code
2009-03-25 12:41:28 -07:00
José Fonseca
26e27ba308
scons: Support building with the Windows SDK.
...
x86_64 is also supported.
2009-03-25 19:24:49 +00:00
Brian Paul
33fa6a2755
egl: include stdint.h to get the c99 integer typedefs
...
Fixes breakage from commit 6dd9c22101
2009-03-25 13:02:44 -06:00
Alan Coopersmith
2e2f3b4086
Add Solaris to OS'es using X in eglplatform.h
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com >
2009-03-25 11:10:03 -07:00
Alan Coopersmith
707c017af6
define __builtin_expect for non-gcc compilers in two more glx files
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com >
2009-03-25 11:07:31 -07: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
Alan Coopersmith
6dd9c22101
Convert u_int*_t to C99 standard uint*_t
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com >
2009-03-25 11:07:31 -07:00
Alan Coopersmith
3cf6e62ae3
mklib improvements for Solaris
...
Move flags for linking standard C/C++ libraries from configure.ac to mklib
Use -norunpath flag when linking with Sun C++ compiler
Convert mklib -exports list into a linker mapfile
Set FINAL_LIBS correctly when -noprefix is used
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com >
2009-03-25 11:07:30 -07:00
Brian Paul
c10df26a31
glew: fix GLEW_LIB_NAME
...
This fixes rebuilding of the library every time we run make.
2009-03-25 09:01:01 -06:00
Michel Dänzer
11da7e02aa
Revert "dri2: Avoid round-tripping on DRI2GetBuffers for the same set of buffers."
...
This scheme breaks when the display connection doesn't receive ConfigureNotify
events. This caused reporoducible problems (cropped / misplaced output) when
starting a 3D application in a guest operating system in VMware Workstation.
This reverts commit dd1c68f151 .
Conflicts:
src/glx/x11/dri2_glx.c
2009-03-25 15:53:28 +01:00
Brian Paul
4934ddf5d7
gl: update include/GL/glext.h to version 48
2009-03-25 08:33:10 -06:00
Brian Paul
66b0b200ee
egl: don't use __FUNCTION__ in error messages
2009-03-25 08:18:28 -06:00
Alan Hourihane
7c8639e007
slang: ensure structure elements have their array length set
2009-03-25 14:17:33 +00:00
Corbin Simpson
def5660c9e
r300-gallium: r300-fs: Moar.
2009-03-25 07:15:49 -07:00
Corbin Simpson
1db736f74a
r300-gallium: Unify shader interfaces, enable r300 shader, start unbreaking.
...
progs/trivial/clear no longer is horrifically wrong, just kind of wrong.
2009-03-25 07:15:49 -07:00
Corbin Simpson
e36f01a7a1
r300-gallium: r500-fs: Remove unused variable.
2009-03-25 07:15:49 -07:00
Alan Coopersmith
ff421b6e0b
r300_cmdbuf.c: convert cast to a form supported by Sun cc
...
Fixes Sun cc error:
"r300_cmdbuf.c", line 142: invalid cast expression
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com >
2009-03-25 08:08:49 -06:00
Michel Dänzer
e101959b6a
r300: Texture size limit cleanups.
...
Since core Mesa MAX_TEXTURE_LEVELS was bumped, we were incorrectly advertising
a maximum texture size of 4096 on older chips, causing corrupted menu text in
Extreme Tux Racer or Armagetron.
Also make sure our texture image array can actually hold all the mipmap levels
we support...
2009-03-25 11:19:05 +01:00
Keith Whitwell
e919bfa1f1
progs/vp: more psiz tests
2009-03-25 10:07:28 +00:00
Ben Skeggs
c306bf94d6
nv50: fix typo in nv50_query.c
2009-03-25 12:16:36 +10:00
Ben Skeggs
88b19bbe65
nouveau: fix some pipe_buffer reference counting issues
2009-03-25 12:09:58 +10:00
Alan Hourihane
0be8af8a39
mesa: bump MAX_PROGRAM_TEMPS to 256 (there's some big shaders out there)
2009-03-24 23:00:26 +00:00
Younes Manton
578af51610
nouveau: Frontbuffer needs to be marked as linear.
2009-03-24 18:57:06 -04:00
Brian Paul
c4c4358e08
demos: add LDFLAGS for corender target, bug 20844
2009-03-24 16:06:50 -06:00
Keith Whitwell
993b7e1d5c
progs/vp: add pointsize + clamp test
2009-03-24 17:50:36 +00:00
Keith Whitwell
a4a0ba1adb
mesa/st: bump gallium version to 0.3
...
To distinguish from the -0.2 version still being maintained on the
gallium-mesa-7.4 branch. There are already greater interface changes
between these two branches than there were between -0.2 and -0.1.
Also stop injecting Tungsten into the vendor string - the Gallium in
the renderer string should be sufficient.
2009-03-24 16:38:27 +00:00
Keith Whitwell
eb9801ccfb
progs/trivial: add fflushes for cygwin
2009-03-24 16:35:29 +00:00
Robert Ellison
cc8afbd386
i965: fix point rasterization when rendering to FBO
...
The FBO pixel coordinate system, with (0,0) as the
upper-left pixel, is inverted in Y compared to the
normal OpenGL pixel coordinate system, which has
(0,0) as its lower-left pixel.
Viewport and polygon stipple are sensitive to this
inversion; so is point rasterization. The basic
fix is simple: when rendering to an FBO, instead
of the normal RASTRULE_UPPER_RIGHT that's
appropriate for OpenGL windows, use the Y inversion
RASTRULE_LOWER_RIGHT.
Unfortunately, current Intel documentation has this
value listed as "Reserved, but not seen as useful".
It does work on at least some i965-class devices,
though; and the worst that could happen if an
older device didn't support it would be incorrect
point rasterization to FBOs, which is what happens
already, so this fix is at least no worse than what
happens presently, and is better for some (and possibly
all) i965-class devices.
2009-03-24 10:01:23 -06:00
Keith Whitwell
2312f697a2
progs/trivial: draw non-interleaved arrays out of one vbo
2009-03-24 15:30:53 +00:00
Jakob Bornecrantz
39320c1bee
progs/tests: Build texcompress2 with scons
2009-03-24 13:26:39 +01:00
Dave Airlie
f577c8e462
radeon/r200/r300: fix warnings
2009-03-24 18:32:46 +10:00
Eric Anholt
699db6d842
i965: Fix glFrontFacing in twoside GLSL demo.
...
This also cuts instructions by just using the existing bit in the payload
rather than computing it from the determinant in the SF unit and passing it
as a varying down to the WM. Something still goes wrong with getting the
backface color right, but a simpler shader appears to get the right result.
2009-03-23 22:52:51 -07:00
Eric Anholt
411d913cce
i965: Fix fog coordinate g,b,a values when glFrontFacing isn't used.
...
Previously, we would sample (f,glFrontFacing,undef,undef) instead of the
(f,0,0,1) that fragment.fogcoord is supposed to return. Due to
glFrontFacing's presence in FOGC.y, we'll still give bad results there when
glFrontFacing is used.
Bug #19122 , piglit testcase fp-fog.
2009-03-23 22:52:17 -07:00
Eric Anholt
b013f945d8
i965: Clean up a bit of mess with unneeded variables in emit_interp.
2009-03-23 22:52:16 -07:00
Eric Anholt
bae07564c4
i965: Fix trailing "d" in debug output for 3DSTATE_VERTEX_ELEMENTS.
2009-03-23 22:28:00 -07:00
Dave Airlie
5021b47dd3
r300: remove lock.h link
2009-03-24 15:21:49 +10:00
Dave Airlie
20981c0a0b
radeon: fixup some issue with fbos and sw fallbacks
2009-03-24 15:06:19 +10:00
Dave Airlie
0a725db10c
radeon/r200/r300: set the texture depth correctly for DRI2
2009-03-24 11:19:09 +10:00
Dave Airlie
ccd18f462c
radeon: actual format is rgba8
2009-03-24 09:45:26 +10:00
Dave Airlie
2aa097f963
radeon: fix typo
2009-03-24 09:45:18 +10:00
Dave Airlie
28e082197d
radeon: setup pipes for r300
2009-03-24 09:28:52 +10:00
Dave Airlie
9f11b3311e
radeon: stupid mesa extension fail
2009-03-24 09:26:31 +10:00
Eric Anholt
c0d6e07909
i965: Fix occlusion query when no other WM state updates occur.
...
Turns out that XXX comment was important. We weren't flagging the WM to
re-update with the statistics enable, so we got zeroes out of our query.
Bug #20740 , fixes piglit occlusion_query test.
Signed-off-by: Eric Anholt <eric@anholt.net >
2009-03-23 12:37:00 -07:00
Keith Whitwell
1a28750b43
vpglsl: add missing SConscript
2009-03-23 19:01:40 +00:00
Keith Whitwell
d0d5e6a22c
draw: update aa points shader comment
2009-03-23 18:40:11 +00:00
Keith Whitwell
103a4bd711
progs/fp: pass texcoord to triangle, add a test shader
2009-03-23 18:39:36 +00:00
Michel Dänzer
e9d156e9e4
gallium: Remove remnants of reference counting internals outside of p_refcnt.h.
2009-03-23 18:03:13 +01:00
Dave Airlie
f9d3de06bd
radeon: fixup wrapper bo name
2009-03-23 19:32:10 +10:00
Dave Airlie
cb68588c93
Merge branch 'radeon-fbo-hacking' into radeon-rewrite
2009-03-23 18:56:34 +10:00
Dave Airlie
8c7e30fb95
raedon/r200/r300: mega-FBO commits.
...
Re work depth issues.
Do a lot more FBO abstactions
fixup depth/stencil buffer interactions
2009-03-23 18:54:06 +10:00
Dave Airlie
c607a664dd
radeon fbo: add draw offset calcs
2009-03-22 19:11:46 +10:00
Jakob Bornecrantz
da96767c89
debug: Add function for writing transfers to files
2009-03-22 04:59:09 +01:00
Jakob Bornecrantz
1196885293
trace: Fix args to buffer write
2009-03-22 04:33:36 +01:00
José Fonseca
3708aaeaff
util: Add a new macro for testing empty lists.
2009-03-23 12:05:07 +00:00
Brian Paul
bab6d6bfe9
softpipe: reformatting, comments, minor clean-ups
2009-03-22 18:11:12 -06:00
Brian Paul
0f82aa5f15
tgsi: minor comments
2009-03-22 18:10:10 -06:00
Dave Airlie
4a2cb696cc
radeon/r200/r300: add support for new tfp interface
...
also fixup old interface, gets rid of white boxes in compiz
2009-03-22 12:03:24 +10:00
Dave Airlie
2d26d4ac66
Merge remote branch 'origin/master' into HEAD
2009-03-22 12:01:21 +10:00
Dave Airlie
06cb6f7aa7
radeon: use mipmap fns in FBO code
2009-03-22 11:57:03 +10:00
Dave Airlie
0968512f8f
radeon: add miptree offset functions
2009-03-22 11:56:41 +10:00
Dave Airlie
c73f4fdb65
r200: fix for sure
2009-03-21 22:41:42 +10:00
Dave Airlie
4bd5ee2d97
radeon/r200: oops make correct fbo init calls
2009-03-21 22:35:01 +10:00
Dave Airlie
9f7a03d945
radeon: add xRGB span functions
...
same as ARGB need to add a parameter to get ptr32
2009-03-21 21:42:54 +10:00
Dave Airlie
218083c542
radeon: dri2 is hooked up elsewhere now
2009-03-21 22:38:28 +11:00
Dave Airlie
98f1b1e6f9
radeon/r200: add fbo init
2009-03-21 22:38:11 +11:00
Dave Airlie
6c48c93a53
radeon/r200: add fbo state changes
2009-03-21 22:36:18 +11:00
Dave Airlie
712478cfdd
r300: fix viewport inversion for FBOs
2009-03-21 22:27:01 +11:00
Michal Krol
699897e81c
tgsi: Document KIL, KILP instructions.
2009-03-21 12:26:15 +01:00
Keith Whitwell
1bb60d25e0
gallium: remove remaining references to origin_lower_left
2009-03-21 10:55:45 +00:00
Michal Krol
d7b7b63bd7
st: Silence compiler warnings.
2009-03-21 11:46:54 +01:00
Dave Airlie
8ab7c77dc2
radeon: align FBO pitch
2009-03-21 18:16:21 +10:00
Dave Airlie
56c5df33de
radeon: fixup last missing x_off/y_off
2009-03-21 18:16:02 +10:00
Dave Airlie
8a60083676
radeon: add cpp/pitch to rrb
2009-03-21 18:07:33 +10:00
Dave Airlie
e795bd3c90
radeon/fbo: add x_off and y_off in correct places
2009-03-21 18:05:54 +10:00
Dave Airlie
86dcbb5457
radeon: dPriv handling is now in cliprects code
2009-03-21 16:51:46 +10:00
Dave Airlie
9368dcb426
radeon: fixup span code for FBOs
2009-03-21 16:08:20 +10:00
Dave Airlie
fbda2ad445
r300: hw clear buffer 0 hopefully
2009-03-21 15:05:34 +10:00
Dave Airlie
ffde891a03
radeon: fix up span function setting
2009-03-21 14:31:14 +10:00
Brian Paul
401cbd0d23
gallium: remove use of origin_lower_left
...
This was used to indicate OpenGL's lower-left origin for fragment window
coordinates for polygon stipple and gl_FragCoord.
Now:
- fragment coordinate origin is always upper-left corner
- GL polygon stipple is inverted and shifted before given to gallium
- GL fragment programs that use INPUT[WPOS] are modified to use an
inverted window coord which is placed in a temp register.
Note: the origin_lower_left field still exists in pipe_rasterizer_state.
Remove it when all the drivers, etc. no longer reference it.
2009-03-20 20:29:07 -06:00
Brian Paul
1f45ae0813
mesa: add new internal state var for window size
...
Actually, window width - 1, height - 1
2009-03-20 20:29:06 -06:00
Brian Paul
12256fc2b2
mesa: linear scan register allocation for shader programs
...
This is a check-point commit; not turned on yet.
Use the linear scan register allocation algorithm to re-allocate temporary
registers. This is done by computing the live intervals for registers and
reallocating temps with that information.
For some shaders this dramatically reduces the number of temp registers
needed.
For the time being we give up on a few cases such as relative-indexed temps
and subroutine calls (but we inline most GLSL functions anyway).
2009-03-20 17:15:21 -06:00
Brian Paul
c9caecaffa
docs: updated Mesa extension enum info
2009-03-20 17:15:21 -06:00
Corbin Simpson
f411a66c06
r300-gallium: Misspelled macro name.
...
*pulls paper bag down over head*
2009-03-20 14:53:21 -07:00
Corbin Simpson
edfaa68609
r300-gallium: Put r300_cs_inlines to bed.
...
Guess it was a mistake in the first place. Oops.
2009-03-20 14:53:21 -07:00
Corbin Simpson
8066edb2a2
r300-gallium: Simplify/neaten up packet3.
...
Deck chairs on the Hindenburg. :3
2009-03-20 14:53:21 -07:00
Corbin Simpson
f142958084
r300-gallium: Clean up surface_fill, prep for surface_copy code.
2009-03-20 14:53:21 -07:00
Corbin Simpson
04fe31cd5e
r300-gallium: Properly offset scissors.
...
As per r300_reg, classic Mesa, and xf86-video-ati.
2009-03-20 14:53:20 -07:00
Corbin Simpson
adb40a94b0
r300-gallium: Clean up r300_swtcl_emit.
...
Some compile warnings, some statements without effect.
2009-03-20 14:53:20 -07:00
Corbin Simpson
f3f5e04103
r300-gallium: Clean up some emit, and some state handlers.
2009-03-20 14:53:20 -07:00
Corbin Simpson
8852ac2b35
r300-gallium: A bit more invariant state.
2009-03-20 14:53:20 -07:00
José Fonseca
48f6e75489
gallium: Explain what happens if buffer_flush_mapped_range isn't called.
2009-03-20 18:34:24 +00:00
Keith Whitwell
210b468722
gallium/util: add upload manager helper module
...
Add a module that will manage uploading and coalescing multiple
user-buffers, malloc-buffers and other random data that doesn't
happen to be in a GPU buffer already. The module stuffs multiple
little uploads into larger GPU buffers to reduce create/destroy
overheads, etc.
2009-03-20 18:07:11 +00:00
Eric Anholt
66175aac76
Fix DRI2 accelerated EXT_texture_from_pixmap with GL_RGB format.
...
This requires upgrading the interface so that the argument to
glXBindTexImageEXT isn't just dropped on the floor. Note that this only
fixes the accelerated path on Intel, as Mesa's texture format support is
missing x8r8g8b8 support (right now, GL_RGB textures get uploaded as a8r8gb8,
but in this case we're not doing the upload so we can't really work around it
that way).
Fixes bugs with compositors trying to use shaders that use alpha channels, on
windows without a valid alpha channel. Bug #19910 and likely others as well.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
2009-03-20 10:41:28 -07:00
Michal Krol
cf0122e892
progs/wgl: Send a resize message after context have been created.
2009-03-20 16:48:54 +01:00
Michal Krol
d6e877d0d7
stw: Do not err on nil context handle in MakeCurrent().
2009-03-20 16:36:23 +01:00
Michal Krol
9bbffcced4
progs/wgl: Create GL context in a thread that actually uses it.
2009-03-20 16:16:49 +01:00
Michal Krol
e8aa5a1018
progs/wgl: Make context current to get GL_RENDERER string.
2009-03-20 16:13:39 +01:00
Michal Krol
5465f3adf9
stw: Use u_handle_table to maintain context list.
2009-03-20 15:45:00 +01:00
Dave Airlie
22443d5cc0
r300: init fbos
2009-03-20 22:34:30 +10:00
Dave Airlie
ba890ad35b
more fbo fillin
2009-03-20 22:29:15 +10:00
Dave Airlie
e3faf5b51d
r300: enable FBO for a test
2009-03-20 22:15:22 +10:00
Dave Airlie
230abc06f8
radeon: some more fbo work
2009-03-20 22:07:05 +10:00
Michal Krol
36e985e96e
winsys/gdi: Init state tracker's per-thread data.
2009-03-20 13:06:28 +01:00
Michal Krol
4489f9efee
stw: Keep per-thread storage for current context and pixel format.
2009-03-20 13:05:51 +01:00
Michal Krol
3d4246e22e
slang: Use _mesa_snprintf() wrapper.
2009-03-20 12:19:40 +01:00
Dave Airlie
fabce837f9
radeon: initial couch code copy from radeon
2009-03-20 18:23:38 +10:00
Dave Airlie
407e8ae5b1
Merge remote branch 'main/master' into radeon-rewrite
...
Conflicts:
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_swtcl.c
src/mesa/drivers/dri/r300/radeon_ioctl.c
src/mesa/drivers/dri/radeon/radeon_screen.c
2009-03-20 10:52:17 +10:00
Alan Hourihane
114bb54324
slang: initialize the context
2009-03-19 22:38:01 +00:00
Alan Hourihane
e3aedec868
slang: support uniform arrays
2009-03-19 22:06:53 +00:00
Jakob Bornecrantz
c9a318a7c6
trace: Formalize on a standard for data size pair
2009-03-19 19:18:38 +01:00
Brian Paul
bbd208b60c
glslcompiler: added new options to override debug/optimization pragmas
2009-03-19 10:29:13 -06:00
Brian Paul
65fc2ca82a
glsl: change GLSL #pragma initialization
...
Initialize the shader's pragma settings before calling the compiler.
Added pragma "Ignore" fields to allow overriding the #pragma directives found
in shader source code.
2009-03-19 10:29:13 -06:00
Alan Hourihane
a57d7edf06
egl: fix comment
2009-03-19 15:39:01 +00:00
Alan Hourihane
9ed03af8c0
egl: try harder for eglGetProcAddress()
2009-03-19 15:37:25 +00:00
Brian Paul
214132adfe
glsl: when debug pragma is on, emit comments about function calls/inlines
...
BTW, the debug pragma syntax is "#pragma debug(on)"
2009-03-19 09:26:20 -06:00
Alan Hourihane
264c3d218a
mesa: check renderbuffer is defined before use.
2009-03-19 13:59:09 +00:00
Dave Airlie
bdaa0341ca
radeon/r200/r300: cleanup some of the renderbuffer code
2009-03-19 15:31:03 +10:00
Dave Airlie
c0c06803fe
radeon: fix up locking like the intel driver for pageflip/swaps
2009-03-19 14:46:52 +10:00
Jakob Bornecrantz
9e84e7def1
st/gl: Only transfer needed parts in st_TexSubimage
2009-03-19 02:23:06 +01:00
Alan Hourihane
989856bde4
slang: if/else/break & if/else/continue work for unrolled loops
2009-03-19 10:17:30 +00:00
Michal Krol
1342664434
wgl: Add an `-s' option to wglthreads to force single-threaded operation.
2009-03-19 11:16:01 +01:00
Michal Krol
355e9bb45c
swrast: Silence compiler warnings, give better structure to the code as a result.
2009-03-19 10:39:57 +01:00
Michal Krol
4b55a4f74d
tgsi: Document vs_2_0 instruction set operations.
2009-03-19 09:53:34 +01:00
Michal Krol
7c50917b42
tgsi: Document vs_1_1 instruction set operations.
2009-03-19 09:53:31 +01:00
Michal Krol
a1f4b5d8b8
tgsi: Begin documenting ps_2_x instruction set operations.
2009-03-19 09:53:29 +01:00
Corbin Simpson
db83ee1647
r300-gallium: Emit viewport state.
...
Note that this will break you, hard, if you're not using RADEON_NO_TCL.
I really need to start vertex shaders soon.
2009-03-18 15:44:04 -07:00
Corbin Simpson
3a648d0cf2
r300-gallium: Viewport state storage.
2009-03-18 15:44:04 -07:00
Corbin Simpson
5b97ba4eb0
r300-gallium: Fixup registers for viewport state.
2009-03-18 15:44:04 -07:00
Brian Paul
a577471c54
mesa: use the IROUND() macro in pixel packing code
...
It turns out some tests are sensitive to rounding vs. truncating when
converting float color values to integers in glReadPixels(). In particular,
this matters when the destination format is 5/6/5 or 4/4/4/4, etc.
2009-03-18 15:45:38 -06:00
Alan Hourihane
cac1ce09ac
slang: redo the last commit for if/break & if/continue tests as it
...
wasn't good enough for deeply nested if's.
2009-03-18 21:42:14 +00:00
Alan Hourihane
192b7bc706
Revert "slang: if we detect an if/break or if/continue within a loop and we're"
...
This reverts commit 752296b8f3 .
2009-03-18 21:40:03 +00:00
Alan Hourihane
752296b8f3
slang: if we detect an if/break or if/continue within a loop and we're
...
trying to unroll, bail, and fallback to doing the real loop.
2009-03-18 21:17:35 +00:00
Keith Whitwell
08d44512e9
st: call _glapi_check_multithread from st_make_current
...
This function is called from many OS-dependent versions of MakeCurrent.
Move the check for multithreading to this central location to avoid
having to make this check from all the callers.
2009-03-18 19:14:45 +00:00
Thomas Hellstrom
caf99be999
stw: Fix makeCurrent.
...
Flush if we change current context.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-18 18:02:58 +00:00
José Fonseca
1f118c2557
progs: Build the wgl examples with scons.
2009-03-18 16:40:57 +00:00
Jakob Bornecrantz
3f17030d9c
progs/trivial: Make quad-tex-sub repeat patterns
2009-03-18 17:27:34 +01:00
Brian Paul
4c460cfd2b
tests: remove/update old comments
2009-03-18 10:24:19 -06:00
Brian Paul
0b0e2159f2
st: need to free/realloc pipe texture when we're handed image level > last_level
...
Fixes progs/tests/tri-fbo-tex-mip.c
2009-03-18 10:24:19 -06:00
Brian Paul
a0509f7d28
st: clean up some if-statment code
2009-03-18 10:24:19 -06:00
Brian Paul
9808ae688a
softpipe: more texture transfer fixes.
...
Need to null-out pointers after freeing transfer objects.
Fix mix-ups between tc->transfer and tc->tex_trans fields.
2009-03-18 10:24:19 -06:00
Brian Paul
71e3aa14fb
softpipe: need to set tc->transfer=NULL after destroying the transfer object
...
This fixes a number of crashes/regressions in programs such as lodbias.c,
mipmap_limits.c, etc.
2009-03-18 10:24:19 -06:00
Brian Paul
3151f5d75a
st: update texture comments
2009-03-18 10:24:19 -06:00
Jakob Bornecrantz
87bcb328c1
progs/trivial: Add quad-tex-sub
...
Tests glTexSubImage
2009-03-18 17:17:45 +01:00
Dan Nicholson
13345a9540
Use the specified X11 headers for xlib mesa
...
The xlib build was using the system's Xlib headers or bombing if they
weren't available.
2009-03-18 07:37:08 -07:00
Keith Whitwell
f02aaa83c1
tests: add simplest mipgen test
2009-03-18 14:13:59 +00:00
Keith Whitwell
33c1bec73b
pipe/atomic: dont use ms interlock calls from gcc
2009-03-18 13:27:53 +00:00
Keith Whitwell
0c550b0425
util: avoid clashprone UINT, UBYTE enum values
2009-03-18 13:04:43 +00:00
Keith Whitwell
5488fe84f9
draw: use AOS_ERROR rather than clash-prone ERROR() macro
2009-03-18 13:04:43 +00:00
Keith Whitwell
eddfad3955
pipe/atomic: clean up #ifdef maze
2009-03-18 13:04:43 +00:00
Jakob Bornecrantz
a528eb51eb
progs/tests: Update mipmap_limits to show image and colors
2009-03-18 13:30:34 +01:00
Thomas Hellstrom
d405ba3151
xlib st: Fix makeCurrent.
...
Flush if we change context.
Also reinstate the old optimization of doing nothing if
nothing changes.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-18 11:58:40 +01:00
Jakob Bornecrantz
ae36fadb7f
progs/trivial: Add tri-fbo-tex-mip
...
Tests rendering to mip levels other then first
2009-03-18 11:30:34 +01:00
Ben Skeggs
e00ae524e2
nouveau: rewrite winsys in terms of drm_api, support dri2 state tracker
...
drm_api is a set of hooks used by the dri2 state tracker, this wraps our
dri1 code around the same set of hooks.
Currently the dri2 build will produce nouveau_dri2.so which you'll need
to install as nouveau_dri.so if you wish to try it. The dri2 state
tracker doesn't make it easy for a driver to support both paths in the
same binary.
2009-03-18 09:44:40 +10:00
Ben Skeggs
b46fcf25be
st/dri2: use pipe_screen.is_format_supported to choose depth/stencil format
2009-03-18 09:44:40 +10:00
Corbin Simpson
5deefb7ea5
r300-gallium: Move all unsorted state into invariant state.
...
Gotta just slowly whittle this down.
2009-03-17 13:14:03 -07:00
Corbin Simpson
f822ac0fff
r300-gallium: Emit invariant state, no matter what.
...
It's called "invariant" for a reason. :3
2009-03-17 13:14:03 -07:00
Corbin Simpson
9d5e6f66f0
r300-gallium: Quick little cleanup of surface_fill state.
2009-03-17 13:14:02 -07:00
José Fonseca
05318c5afa
tgsi: Restore statement ordering.
2009-03-17 19:50:42 +00:00
Corbin Simpson
e87f26a9b6
r300-gallium: Debugging for the more sensitive card registers.
...
These are nearly always the cause of hardlocks, so let's dump them.
2009-03-17 11:51:15 -07:00
Corbin Simpson
0f0d0b62ff
r300-gallium: r500-fs: Fixup immediate->constant counting a bit.
2009-03-17 11:51:14 -07:00
Corbin Simpson
fbd758c55e
r300-gallium: More query stuff.
...
Should work, but doesn't. At least it doesn't hardlock.
2009-03-17 11:51:14 -07:00
Brian Paul
c334ce273e
swrast: use better _swrast_compute_lambda() function
...
The MAX-based function can produce values that are non-monotonic for a span
which causes glitches in texture filtering. The sqrt-based one avoids that.
This is perhaps slightly slower than before, but the difference
probably isn't noticable given we're doing software mipmap filtering.
Issue reported by Nir Radian <nirr@horizonsemi.com >
2009-03-17 10:28:32 -06:00
Vinson Lee
1eee1bac1f
mesa: update/fix doxygen comments
2009-03-17 09:34:30 -06:00
José Fonseca
c1f8de9954
util: Realloc takes bytes.
2009-03-17 14:38:55 +00:00
Michal Krol
f20a0155f3
wgl: Port sharedtex_mt to WGL.
2009-03-17 14:27:47 +01:00
Michal Krol
ed3781fdc5
tgsi: Document ps_2_0 instruction set operations.
2009-03-17 12:42:45 +01:00
Michal Krol
223bf49b20
tgsi: Document ps_1_4 instruction set operations.
2009-03-17 12:42:43 +01:00
Michal Krol
95ef9803da
tgsi: Document ps_1_1 instruction set operations.
2009-03-17 12:42:41 +01:00
Michal Krol
f07400592f
tgsi: Begin documenting GLSL instruction set operations.
2009-03-17 12:42:38 +01:00
Michal Krol
0ff360c829
tgsi: Begin documenting NV_geometry_program4 instruction set operations.
2009-03-17 12:42:36 +01:00
Thomas Hellstrom
1d2b14cf56
xdemos: Fix sharedtex_mt.
...
1) Don't allow multiple threads sharing current context,
even if they are mutex protected.
2) Remove all XLockDisplay(), XUnLockDisplay() calls, as they were
only workarounds for xcb.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-17 11:38:00 +01:00
Michal Krol
7f1062584e
python: Return on unknown pixel format.
2009-03-17 11:34:42 +01:00
Michal Krol
c337bafeb9
gallium: Use _new' name, new' is a reserved keyword in C++.
2009-03-17 10:56:00 +01:00
Michal Krol
1e23dac869
gallium: Provide unprotected atomic implementation for display and miniport interfaces.
2009-03-17 10:54:08 +01:00
Michal Krol
709b3128f3
python: Fix build after refcount rework.
2009-03-17 10:43:04 +01:00
Michal Krol
7b0c459bb4
python: Include `p_winsys_screen.h'.
2009-03-17 10:33:25 +01:00
Michal Krol
4e1c925ef5
python: Do not pass screen object to pipe_buffer_reference.
2009-03-17 10:26:38 +01:00
Michal Krol
627c2d2f0a
tgsi: Silence const pointer cast warnings.
2009-03-17 10:18:24 +01:00
Corbin Simpson
175f58baa9
r300-gallium: r500-fs: Properly set up TEX/OUT.
2009-03-17 02:13:03 -07:00
Corbin Simpson
307e68f739
r300-gallium: r500-fs: Texture insts, ABS, moar comments.
2009-03-17 02:13:03 -07:00
Corbin Simpson
93ef9ec5eb
r300-gallium: Clean up some code, un-special-case scalar ops.
2009-03-17 02:13:03 -07:00
Corbin Simpson
f1d93f6082
r300-gallium: r500-fs: CMP/MOV/SWZ, negation, ADD/MAD/MUL/SUB.
...
Also a fair amount of cleanup.
2009-03-17 02:13:02 -07:00
Corbin Simpson
add896aec8
r300-gallium: Fix relocation for textures.
...
This keeps texture emit from invalidating CS.
2009-03-17 02:13:02 -07:00
Jakob Bornecrantz
b95789ddb9
trace: Fix memory leak
2009-03-16 21:34:03 +01:00
José Fonseca
cddf629282
util: bitmask data type.
2009-03-16 19:37:08 +00:00
Jakob Bornecrantz
068fd6d50b
trace: Re-init refcounters just incase
2009-03-16 20:33:30 +01:00
Jakob Bornecrantz
f73066fbd5
trace: Dump buffer data via buffer writes
2009-03-16 20:15:25 +01:00
Jakob Bornecrantz
2f52c7f901
progs/trivial: Ignores
2009-03-16 20:15:25 +01:00
Jakob Bornecrantz
2004b99b83
progs/tests: Ignores
2009-03-16 20:15:18 +01:00
Michal Krol
d8445e8fe1
python: Use transfer object to read from a surface.
2009-03-16 16:48:18 +01:00
Michal Krol
fcf93aa06d
python: pipe_vertex_buffer's pitch member has been renamed to stride.
2009-03-16 16:12:04 +01:00
Michal Krol
56282d79f6
python: size is not a member of pipe_constant_buffer any more.
2009-03-16 16:12:02 +01:00
Corbin Simpson
5ad1721540
r300-gallium: r500-fs: Add ABS.
2009-03-16 06:49:22 -07:00
Corbin Simpson
567aead92a
r300-gallium: r500-fs: Clamp only when saturation flags are set.
2009-03-16 06:49:22 -07:00
Corbin Simpson
3cce08e313
r300-gallium: r500-fs: Working ADD and MUL, add more sop stuff.
2009-03-16 06:49:22 -07:00
Corbin Simpson
b9ecd7273b
r300-gallium: Cleanup a few things.
2009-03-16 06:49:22 -07:00
Corbin Simpson
d16533cc87
r300-gallium: r500-fs: MUL.
2009-03-16 06:49:22 -07:00
Corbin Simpson
fe1c94d8d3
r300-gallium: r500-fs: Stub out the simple scalar ops.
...
COS, SIN, and CSC are not simple.
2009-03-16 06:49:21 -07:00
Corbin Simpson
a22e40c29c
r300-gallium: r500-fs: Add DPH.
2009-03-16 06:49:21 -07:00
Corbin Simpson
65ec17f320
r300-gallium: r500-fs: Add dot products.
...
We're cookin' now.
2009-03-16 06:49:21 -07:00
Michal Krol
c97b671d64
gallium: Implement atomic for MSVC on x86.
2009-03-16 13:42:22 +01:00
Michal Krol
a7d42e11b4
gallium: Implement atomic interface for windows user mode subsystem.
2009-03-16 13:15:50 +01:00
José Fonseca
102cb5c9cd
scons: Promote declaration-after-statement to error. Detect more warnings.
2009-03-16 12:01:44 +00:00
José Fonseca
e5a3aa5672
progs: Try to read the texture from the current dir, if full path fails.
2009-03-16 12:01:44 +00:00
Michel Dänzer
aa85973f95
Fixup previous commit.
...
radeonScheduleSwap() already takes the lock in the SwapBuffers case, only
the CopySubBuffer case was missing it.
2009-03-16 12:51:50 +01:00
Michal Krol
ed7bb2c196
gallium: Use macro parameter names consistently.
2009-03-16 12:39:07 +01:00
Michal Krol
bf6ed0b962
gallium: pipe_mutex_init() is of type void.
...
Both the windows and fallback versions are void already.
2009-03-16 12:36:22 +01:00
Michal Krol
13dad5294b
gallium: Include p_compiler.h for integer types.
2009-03-16 12:27:47 +01:00
Michal Krol
47c18b35b0
softpipe: Use p_atomic_read, not atomic_read.
2009-03-16 12:22:50 +01:00
Thomas Hellstrom
cf25ef9072
gallium: Use struct pipe_atomic for pipe refcounts.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-16 11:40:47 +01:00
Thomas Hellstrom
fc1ef97c33
gallium: Add simple atomic class api.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-16 11:40:18 +01:00
Michel Dänzer
9c591c52c7
radeon: Take the hardware lock for swaps and flips.
...
Otherwise they fail with AIGLX at least.
2009-03-16 11:33:14 +01:00
Michal Krol
1f3fe40554
tgsi: Begin documenting NV_gpu_program4 instruction set operations.
2009-03-16 10:24:16 +01:00
Michal Krol
bf3759e0d4
tgsi: Document NV_vertex_program3 instruction set operations.`
2009-03-16 10:04:51 +01:00
Michal Krol
ad908465f1
wgl: Port glthreads to WGL.
2009-03-16 09:45:23 +01:00
Michal Krol
9ba52e1268
mesa: Silence compiler warnings.
2009-03-16 09:13:29 +01:00
Corbin Simpson
877aaad06d
r300-gallium: r500-fs: Actually handle consts and imms correctly.
...
This makes mad.txt draw correctly. Yay!
2009-03-16 00:31:54 -07:00
Corbin Simpson
5bc4562849
r300-gallium: Emit constants as floats, not uints.
2009-03-16 00:31:54 -07:00
michal
97e4caa33a
python: Include missing `p_compiler.h' header.
2009-03-16 08:18:10 +01:00
michal
5494251890
python: Do not pass shader_state to util shader functions.
2009-03-16 08:18:06 +01:00
michal
38b074495a
python: Use transfer objects to initialise texture data.
2009-03-16 08:18:03 +01:00
michal
f6c3edb308
python: Use new bypass_vs_clip_and_viewport rasteriser flag.
2009-03-16 08:17:59 +01:00
Corbin Simpson
f197a8b916
r300-gallium: Fix vertex memory offsets.
...
Wow, I must have been asleep when I made that mistake.
2009-03-15 23:42:42 -07:00
Corbin Simpson
4f5678c1eb
radeon-gallium: Add my R580 to the xorg PCI ID list.
...
At some point, going to have to grab the big list from xf86-video-ati.
2009-03-15 23:07:31 -07:00
Corbin Simpson
44adea1a09
r300-gallium: r500-fs: Setup immediates.
...
Textures still not working. RS block shenanigans expected.
2009-03-15 23:07:31 -07:00
Corbin Simpson
1e56bb890b
dri2-gallium: Add occlusion query support at the state tracker level.
2009-03-15 23:07:31 -07:00
Corbin Simpson
7c204c9753
r300-gallium: Actually set stride when creating textures.
...
Duh.
2009-03-15 23:07:31 -07:00
Corbin Simpson
61c65a6c7e
r300-gallium: r500-fs: Add writemasks and some flexibility for MOV/SWZ.
2009-03-15 23:07:30 -07:00
Corbin Simpson
c5742cab19
r300-gallium: Always rasterize at least one color.
2009-03-15 23:07:30 -07:00
Corbin Simpson
954a9fadad
r300-gallium: Fix spacing.
...
It was driving me crazy.
2009-03-15 23:07:30 -07:00
Michal Krol
8ae04f3c46
vbo: Silence integer-to-pointer warnings.
2009-03-15 10:23:15 +01:00
Younes Manton
474399ddd6
mesa: .gitignore
2009-03-14 20:20:56 -04:00
Younes Manton
8b45de9aa1
nouveau: bypass_vs_clip_and_viewport
2009-03-14 20:19:47 -04:00
Keith Whitwell
683e7091a9
gallium: consolidate bypass_vs and bypass_clipping flags
...
The draw module provides a similar interface to the driver which
is retained as various bits of hardware may be able to take on
incremental parts of the vertex pipeline. However, there's no
need to advertise all this complexity to the state tracker.
There are basically two modes now - normal and passthrough/screen-coords.
2009-03-13 16:42:57 +00:00
Keith Whitwell
fa0f48504a
gallium: no need to keep a copy of shader tokens in state tracker
...
Any driver who needs a copy of the shader tokens must organize to
do so itself. This has been the case for a long time, but there
was still defensive code in the state tracker, which is now removed.
Any bugs resulting from this need to be fixed in the offending driver...
2009-03-13 16:24:22 +00:00
Keith Whitwell
b3be1651f4
mesa/st: add check for null front renderbuffer
...
Not sure if this indicates a problem elsewhere, but without this check
trivial/tri-fbo.c segfaults on resize. With the patch, it renders
correctly.
2009-03-13 15:53:48 +00:00
Keith Whitwell
af34fa316d
mesa/st: don't call finish in st_glFlush()
...
It is not the state tracker's responsibilty to inject sleeps and
pessimize performance in the hope of avoiding buffer synchronization
issues in buggy drivers.
Calling finish() here will just hide problems that need to be fixed
elsewhere.
2009-03-13 15:53:48 +00:00
Brian Paul
7d6478cfcc
i965: more register number assertions
2009-03-13 09:23:44 -06:00
Brian Paul
a10ec13143
i965: add some register number assertions
...
Haven't seen failures yet, but if/when there are, more investigation will
be done.
2009-03-13 09:23:43 -06:00
Brian Paul
2cf296186e
i965: remove unused PROGRAM_INTERNAL_PARAM, added comment
2009-03-13 09:23:43 -06:00
Brian Paul
24d4ee98d4
i965: move declarations before code
2009-03-13 09:23:43 -06:00
Brian Paul
460ee86d60
i965: debug code, use gl_register_file type
2009-03-13 09:23:43 -06:00
Brian Paul
4eda17d192
mesa: glUseProgram() debug code (disabled)
2009-03-13 09:23:43 -06:00
Jakob Bornecrantz
d5d5b27224
trace: Fix some typos
2009-03-13 05:40:10 +01:00
Brian Paul
583d293734
mesa: improve another _mesa_problem() call
2009-03-13 08:46:03 -06:00
Brian Paul
ccad1e4528
mesa: add GL_DUDV_ATI cases in calculate_derived_texenv()
2009-03-13 08:46:03 -06:00
Brian Paul
fcb0d8968d
mesa: more info in _mesa_problem() call
2009-03-13 08:46:03 -06:00
Brian Paul
4681a1d1ee
mesa: added 1D/3D fetch_texel functions for DUDV8
2009-03-13 08:46:03 -06:00
Thomas Hellstrom
8132405d52
xdemos: Add multithreaded sharedtex_mt.
...
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-13 15:06:54 +01:00
Keith Whitwell
48012157ba
vp: add test for pointsize output
2009-03-13 11:57:15 +00:00
José Fonseca
f22574be95
scons: Use -Wdeclaration-after-statement
2009-03-13 11:48:14 +00:00
José Fonseca
188a3334f8
progs: Add util to cpp path.
2009-03-13 11:48:13 +00:00
Keith Whitwell
dbc3e8e93f
progs/vp: add keys for point prims, etc, and various new tests
2009-03-13 11:32:32 +00:00
Jakob Bornecrantz
f500f3a72c
gallium: Remove do_flip argument from surface_copy
...
I should have gotten most uses and implementation
correctly fixed, but things might break.
Feel free to blame me.
2009-03-13 01:38:20 +01:00
Brian Paul
f786e46cf4
mesa: added GL_DU8DV8_ATI case in _mesa_components_in_format()
...
This gets hit when glTexSubImage2D() is called with format==GL_DU8DV8_ATI.
2009-03-12 19:42:14 -06:00
Brian Paul
1826ff3fb3
mesa: override_internal_format() function for debug/test purposes (disabled)
2009-03-12 18:25:09 -06:00
Brian Paul
8a8919a7dd
mesa: improve some error messages
2009-03-12 18:25:09 -06:00
Brian Paul
3b946cde45
i965: move declaration before code
2009-03-12 18:25:09 -06:00
Brian Paul
dbc9a1d33b
i965: fix const correctness
2009-03-12 18:25:09 -06:00
Brian Paul
6b9c1446b3
i915: move declarations before code
2009-03-12 18:25:09 -06:00
Brian Paul
6c5804172a
i965: comments
2009-03-12 18:25:09 -06:00
Brian Paul
8e1b2bac8b
config: add -Wdeclaration-after-statement to linux config
...
Should help to catch Windows build issues earlier.
2009-03-12 17:21:20 -06:00
Brian Paul
8b2ecfdd5c
demos: move declaration before code
2009-03-12 17:21:05 -06:00
Brian Paul
41a6a2b831
wgl: add new dispatch stubs
2009-03-12 16:16:08 -06:00
Brian Paul
47053782b8
mesa: move declarations before code
2009-03-12 16:13:44 -06:00
Brian Paul
363fc6d64f
mesa: fix glRead/DrawBuffer(GL_AUXn) error value
...
If GL_AUX[123] are passed to glRead/DrawBuffer() when those buffers don't
exist, need to generate GL_INVALID_OPERATION, not GL_INVALID_ENUM.
This regression came from commit 555f0a8818
2009-03-12 14:17:27 -06:00
Robert Ellison
29309b45b0
i965: fix polygon stipple when rendering to FBO
...
The polygon stipple pattern, like the viewport and the
polygon face orientation, must be inverted on the i965
when rendering to a FBO (which itself has an inverted pixel
coordinate system compared to raw Mesa).
In addition, the polygon stipple offset, which orients
the stipple to the window system, disappears when rendering
to an FBO (because the window system offset doesn't apply,
and there's no associated FBO offset).
With these fixes, the conform triangle and polygon stipple
tests pass when rendering to texture.
2009-03-12 11:58:43 -06:00
Michal Krol
a9a214cc7f
tgsi: Localise SCS code.
2009-03-12 18:32:38 +01:00
Michal Krol
321634d80b
tgsi: Rewrite NRM opcode, store 1.0 in W component.
2009-03-12 18:32:36 +01:00
Michal Krol
d4ea9a2652
tgsi: Begin documenting NV_fragment_program2 instruction set operations.
2009-03-12 18:32:34 +01:00
Michal Krol
98399eeda0
tgsi: Begin documenting ARB_fragment_program instruction set operations.
2009-03-12 18:32:32 +01:00
Michal Krol
d76b3bb0a8
tgsi: Document ARB_vertex_program instruction set operations.
2009-03-12 18:32:29 +01:00
Michal Krol
8823d01f14
tgsi: Begin documenting NV_vertex_program2 instruction set operations.
2009-03-12 18:32:27 +01:00
Keith Whitwell
f16da8d509
trivial: draw non-interleaved arrays
2009-03-12 17:21:50 +00:00
Keith Whitwell
10812b0791
stw: fix uninitialized variable issue
2009-03-12 16:57:30 +00:00
Keith Whitwell
d885c9dad1
util: fix debug_assert() to avoid unused variable warnings in release builds
2009-03-12 16:57:30 +00:00
Jakob Bornecrantz
e8ee34e7f3
trace: Wrap pipe_buffers
2009-03-12 16:35:43 +01:00
Jakob Bornecrantz
53e5248b0a
trace: Add dump util functions for wrapped pointers
2009-03-12 16:35:43 +01:00
Brian Paul
6aa6ae8cff
demos: fix error string, comment
2009-03-12 09:31:59 -06:00
Brian Paul
862dccd560
mesa: fix transposed red/blue in store_texel_rgb888/bgr888() functions
2009-03-12 09:30:08 -06:00
Brian Paul
4626e57e17
demos: fix typo
2009-03-12 09:19:28 -06:00
Keith Whitwell
1e074dcb7b
demos: use glGenerateMipmapEXT entrypoint in cubemap.c
...
glGenerateMipmap() is part of ARB_framebuffer_object, which many mesa
drivers don't advertise. Add check for EXT_framebuffer_object.
2009-03-12 14:30:49 +00:00
Roland Scheidegger
45b8e76b5c
mesa test prog for ATI_envmap_bumpmap
2009-03-12 15:07:22 +01:00
Roland Scheidegger
3327cc64e7
i965: add support for ATI_envmap_bumpmap
2009-03-12 15:06:17 +01:00
Roland Scheidegger
36010806a1
regenerate glapi
2009-03-12 15:04:47 +01:00
Roland Scheidegger
114152e068
mesa: add support for ATI_envmap_bumpmap
...
add new entrypoints, new texture format, etc
translate in texenvprogram.c for drivers using the mesa-generated tex env
fragment program
also handled in swrast, but not tested (cannot work due to negative texel
results not handled correctly)
2009-03-12 15:01:16 +01:00
Jakob Bornecrantz
b7d841b59e
progs/glsl: Ignore
2009-03-12 14:05:50 +01:00
Jakob Bornecrantz
808f322799
trace: Move buffer functions from winsys to screen
2009-03-11 22:47:15 +01:00
Jakob Bornecrantz
4225120503
trace: Remove all whitespace at EOL
2009-03-11 22:47:15 +01:00
Jakob Bornecrantz
5d418f7155
trace: Fixup trace a bit
2009-03-11 22:47:14 +01:00
Keith Whitwell
81569c2f69
mesa: add missing _glthread_INIT_MUTEX in _mesa_new_framebuffer()
2009-03-12 10:09:51 +00:00
Robert Ellison
6dceeb2eb8
i965: fix polygon face orientation when rendering to FBO
...
In the i965, the FBO coordinate system is inverted from the standard
OpenGL/Mesa coordinate system; that means that the viewport and the
polygon face orientation have to be inverted if rendering to a FBO.
The viewport was already being handled correctly; but polygon face
was not. This caused a conform failure when rendering to texture with
two-sided lighting enabled.
This fixes the problem in the i965 driver, and adds to the comment about
the gl_framebuffer "Name" field so that this isn't a surprise to other
driver writers.
2009-03-11 21:19:45 -06:00
Brian Paul
548be3846d
mesa: remove some last remnants of GL_MESA_program_debug
2009-03-11 20:08:37 -06:00
Brian Paul
4dfa3757c5
mesa: minor comments
2009-03-11 19:34:41 -06:00
Brian Paul
590f6fe050
mesa: remove gl_texture_object::_Function field and associated code
...
It was only used in one place in swrast.
2009-03-11 19:23:01 -06:00
Brian Paul
7d9cb242fd
intel: include main/viewport.h
2009-03-11 19:04:22 -06:00
Corbin Simpson
d375a3bdda
r300-gallium: Don't flush textures more than necessary.
2009-03-11 15:23:10 -07:00
Corbin Simpson
f78bd5922d
r300-gallium: Fix texture filters.
2009-03-11 15:23:10 -07:00
Corbin Simpson
cec2170632
r300-gallium: r500-fs: More texture fixes.
2009-03-11 15:23:09 -07:00
Corbin Simpson
c4c1774bbb
r300-gallium: r500-fs: Add shader dumper and more tex work.
2009-03-11 15:23:09 -07:00
Corbin Simpson
ddf31d0e31
r300-gallium: Fix CS count for texture emit.
2009-03-11 15:23:09 -07:00
Corbin Simpson
6b1596aed3
r300-gallium: r500-fs: Add SWZ.
2009-03-11 15:23:09 -07:00
Corbin Simpson
ddba20b064
r300-gallium: Fix CS count in fb state emit.
2009-03-11 15:23:08 -07:00
Corbin Simpson
d13e4bd1cb
r300-gallium: Start swizzles.
2009-03-11 15:23:08 -07:00
Corbin Simpson
8b21250305
r300-gallium: Begin R500 fragment shader assembler.
...
I love it so much. I also hate it a lot.
2009-03-11 15:23:08 -07:00
Brian Paul
04465bb6df
i965: fix lock-ups when GLSL program wrote to gl_FragDepth
...
It seems the code that set up the FB_WRITE message was incomplete in this
case. The number of payload registers was wrong and that caused a hang.
It would be good to have a second set of eyes take a look at this...
2009-03-11 13:13:17 -06:00
Jakob Bornecrantz
b6b198ea1b
trace: Fixup trace a bit
2009-03-11 14:43:28 +01:00
Alan Hourihane
b6c7db8deb
xdemos: On termination with esc close the contexts correctly.
2009-03-11 13:35:27 +00:00
Michal Krol
5146b3f8fc
tgsi: Implement RFL, SFL, STR, X2D opcodes.
2009-03-11 13:49:43 +01:00
Michal Krol
9ffe66760c
tgsi: Begin documenting NV_fragment_program instruction set operations.
2009-03-11 12:52:20 +01:00
Michal Krol
ae7ae570ef
tgsi: Implement RCC opcode.
2009-03-11 12:11:50 +01:00
Michal Krol
94cf8ea3b6
tgsi: Document NV_vertex_program1_1 instruction set operations.
2009-03-11 12:11:48 +01:00
Brian Paul
ddf7d8fe01
i965: more code clean-ups, comments
2009-03-10 18:27:48 -06:00
Brian Paul
76ff6d40f4
i965: minor code clean-ups, comments
2009-03-10 18:27:48 -06:00
Brian Paul
9c781de015
i965: use new cast wrappers
2009-03-10 18:27:48 -06:00
Brian Paul
294a473f7a
i965: added cast wrappers, comments
2009-03-10 18:27:48 -06:00
Brian Paul
13177f03fc
i965: asst. code clean-ups, comments
2009-03-10 18:27:48 -06:00
Brian Paul
6bed5caf88
i965: fix typos in comments
2009-03-10 18:27:48 -06:00
Brian Paul
d861d589a8
glsl: remove _slang_attach_storage() function
...
This was used to handle both variable declarations and references to variables.
Instead, just do storage allocation and assignment for declarations and
references, respectively.
This is a step toward better var/uniform allocation (only allocate storage
for vars/uniforms that are actually referenced by the code).
2009-03-10 18:25:38 -06:00
Brian Paul
b78463cbad
glsl: some clean-ups, remove old assertions, add new assertions
2009-03-10 18:25:38 -06:00
Brian Paul
0522624c83
glsl: remove stray/unneeded totalSize assignment
2009-03-10 18:25:38 -06:00
Brian Paul
3c1ce2d649
mesa: fix dumb sizeof() vs. strlen() mix-up
2009-03-10 10:16:47 -06:00
Brian Paul
8dff9f349f
glsl: fix typo: s/vec4_tex1d_proj/vec4_tex_1d_proj/
...
This regression came from commit c0b59420ee .
2009-03-10 09:05:55 -06:00
Keith Whitwell
a58065d4e2
progs/tests: compile with SCons and glew
...
Also get mingw cross-compilation of these tests working
2009-03-10 13:11:23 +00:00
Keith Whitwell
225de01f83
trivial: add a logic op test
2009-03-10 12:06:27 +00:00
Keith Whitwell
646f518e78
vpglsl: add simple mov.glsl
2009-03-10 12:06:27 +00:00
Michal Krol
38afa29340
tgsi: Untabify.
2009-03-10 10:27:29 +01:00
Michal Krol
ca066f05cd
tgsi: Implement CLAMP opcode.
2009-03-10 10:27:27 +01:00
Michal Krol
fb88908f5c
tgsi: Consider INDEX, NEGATE, MULTIPLYMATRIX opcodes for removal.
2009-03-10 10:27:24 +01:00
Michal Krol
56603044e9
tgsi: ARL and FLOOR opcodes have the same implementation.
2009-03-10 10:27:21 +01:00
Michal Krol
2f8c4efe24
tgsi: ARL is a vector instruction.
2009-03-10 10:27:18 +01:00
Michal Krol
bbf84cca57
tgsi: Note that LOG and EXP are approximations.
2009-03-10 10:27:15 +01:00
Michal Krol
5d0f69e33d
tgsi: Document EXT_vertex_shader instruction set operations.
2009-03-10 10:27:13 +01:00
Corbin Simpson
42fc3d3fa9
radeon-gallium: Unbreak non-RADEON_SOFTPIPE.
...
Hehe, sleep may be necessary now.
2009-03-10 02:08:59 -07:00
Corbin Simpson
d559796d6f
r300-gallium: Initial, broken, query setup.
...
Not going to bother unbreaking it here until it's unbroken elsewhere.
2009-03-10 01:54:24 -07:00
Corbin Simpson
fdfde00cd8
radeon-gallium: Unbreak RADEON_SOFTPIPE.
...
And there was much rejoicing.
2009-03-10 01:52:02 -07:00
Corbin Simpson
8dbe4f0c35
r300-gallium: Unbreak fallback in surface_fill.
2009-03-10 00:57:32 -07:00
Corbin Simpson
b7219853af
r300-gallium: Fix a handful of compiler warnings.
...
Missing INLINE, missing declarations, extraneous definitions. The usual.
2009-03-10 00:36:08 -07:00
Corbin Simpson
9d9e0815be
r300-gallium: First stab at texture support.
2009-03-10 00:27:13 -07:00
Corbin Simpson
c9da0283e7
r300-gallium: Moar fixes in the register file.
...
Sorry, but it's confusing when format0 in r300_reg != format0 in the docs.
2009-03-10 00:10:24 -07:00
Dave Airlie
0fc6c2644c
radeon: remove unused lines
2009-03-10 11:00:14 +10:00
Dave Airlie
14c3bddbac
r200: enable hw clears
2009-03-10 19:03:07 +10:00
Brian Paul
22bac2a1a0
xmesa: set back-buffer's drawable field
...
Fixes back-buffer rendering when MESA_BACK_BUFFER=pixmap
2009-03-09 16:27:56 -06:00
Keith Whitwell
ce0ac9006a
vpglsl: build with scons and glew
2009-03-09 18:51:14 +00:00
Brian Paul
0e28e1a72f
demos: in progs/demos/cubemap.c press c/f to cycle through clamp/filter modes
...
Also generate a mipmap for the default checker images.
2009-03-09 11:49:57 -06:00
Brian Paul
6f915b10d5
i965: fix cube map lock-up / corruption
...
If we're using anything but GL_NEAREST sampling of a cube map, we need to
use the BRW_TEXCOORDMODE_CUBE texcoord wrap mode. Before this, the GPU
would either lock up or subsequent texture filtering would be corrupted.
2009-03-09 11:49:57 -06:00
Michel Dänzer
2b6235c9f7
scons: Also link in additional LLVM components.
...
They don't seem necessary here, but they shouldn't hurt either...
2009-03-09 17:46:49 +01:00
Kamalneet Singh
37fdfe89dd
linux-llvm config: Linking with required llvm libs
2009-03-09 17:42:59 +01:00
Michel Dänzer
a6f768f029
scons: Also define USE_XSHM for the glx/xlib state tracker build.
...
Fixes an inconsisten definition of struct xmesa_buffer between there and
winsys/xlib, resulting in a crash in XPutImage.
2009-03-09 17:39:14 +01:00
Brian Paul
886ceb556e
st: silence warning
2009-03-09 09:42:26 -06:00
Brian Paul
62ef614eb3
st: remove unused DrawPixels code
2009-03-09 09:42:26 -06:00
Brian Paul
44af5a953f
st: use pointer_to_offset() cast wrapper to convert pointers to uint
...
Silences warnings with 64-bit builds. See comments for details.
2009-03-09 09:42:26 -06:00
Brian Paul
9457d9ff44
mesa: reorder register file enums
2009-03-09 09:42:26 -06:00
Keith Whitwell
48b1fe12b1
trivial: add tri-stipple to SConscript
2009-03-09 15:20:12 +00:00
Keith Whitwell
fe60dbc536
st: also check for a8 texture support in bitmap code
2009-03-09 15:20:11 +00:00
Roland Scheidegger
1ebc92b0d0
fix typo in fragment pipe alu define, should fix dot3_rgb tex combine
2009-03-09 15:53:41 +01:00
Keith Whitwell
ef5fd0b66a
vbo: yet tighter still usage of FLUSH_NEED_CURRENT
...
Previous change broke redbook/polys and probably others. I'm fairly
sure that drivers like r300 don't need to touch
ctx->Driver.NeedVertices, but this code is incredibly fragile and I'm
not confident about removing it from there. Hopefully this gets
things working again.
2009-03-09 14:40:34 +00:00
Keith Whitwell
fb8a9875f6
fp: enable a second texture unit and add a kil test for it
2009-03-09 14:08:52 +00:00
Michel Dänzer
317687cd94
Fix up another instance of _mesa_unreference_framebuffer().
2009-03-09 13:30:17 +01:00
Keith Whitwell
0756dc876c
vbo: stricter checks on Driver.NeedFlush
...
This variable is being used in the r300 driver to trigger a flush under
circumstances unrelated to the use in the vbo module. Tighten up the
checks in vbo so as to avoid conflict with r300.
Reported by Maciej Cencora <m.cencora@gmail.com >
2009-03-09 12:18:51 +00:00
Michel Dänzer
a2aedf95d8
gallium: Fix p_refcnt.h for C++ compilers.
2009-03-09 12:58:16 +01:00
Michal Krol
9438ffda50
tgsi: Implement CND, CND0 opcodes.
2009-03-09 08:51:44 +01:00
Michal Krol
5ee3c79959
tgsi: Remove redundant micro_ge() -- use micro_le().
2009-03-09 08:51:41 +01:00
Michal Krol
0d727fa0f0
tgsi: Document ATI_fragment_shader instruction set operations.
2009-03-09 08:51:39 +01:00
Dave Airlie
c122cc4097
r300: emit texture in GTT or VRAM
2009-03-09 13:44:03 +10:00
Dave Airlie
778cf80d9e
r300: move firevertices out into the main place its needed.
...
This fixes a hang on context destruction on rs690
2009-03-09 13:06:10 +11:00
Corbin Simpson
40ca02a045
r300-gallium: Unbreak trivial/point.
...
Oops, forgot to remove that.
Edit: And trivial/line and trivial/tri.
2009-03-08 15:05:49 -07:00
Michal Krol
8766677ac4
tgsi: Document NV_vertex_program instruction set operations.
2009-03-08 19:16:36 +01:00
Corbin Simpson
2305642b2e
r300-gallium: Correct vertex format setup, cleanup regs and debugging.
...
trivial/point no longer hardlocks.
2009-03-07 13:28:03 -08:00
Corbin Simpson
46de433d27
r300-gallium: Clean up RS.
...
Wow, there were buggies by the boatload in there.
2009-03-07 13:28:02 -08:00
Corbin Simpson
8262974625
r300-gallium: Move a few registers.
...
These shouldn't be written if not on TCL HW.
2009-03-07 13:28:02 -08:00
Brian Paul
460e5b11c9
mesa: s/int/GLsizeiptr/ to silence warning with 64-bit build
2009-03-07 13:30:03 -07:00
Brian Paul
799f55803d
gallium: use unsigned long to silence warnings with 64-bit build
2009-03-07 13:23:08 -07:00
Brian Paul
3377cd535e
r300: remove assignment to removed StringPos field
2009-03-07 13:20:50 -07:00
Brian Paul
4045a2c7d3
mesa: move shared context state functions to new shared.c file
2009-03-07 13:14:37 -07:00
Brian Paul
2e798e4b7e
vbo: make bind_array_obj() code a little more concise
2009-03-07 12:42:34 -07:00
Brian Paul
39c203507a
mesa: use @ to silence some Makefile output
2009-03-07 12:36:16 -07:00
Brian Paul
2c37851595
mesa: move glViewport and glDepthRange functions into new viewport.c file
...
A bit of refactoring with an eye toward ES2 and GL 3.1
2009-03-07 12:33:11 -07:00
Brian Paul
4de5abee39
swrast: remove old comment
2009-03-07 12:11:44 -07:00
Brian Paul
2ee5ba0411
swrast: rename s_buffers.c -> s_clear.c
2009-03-07 12:09:33 -07:00
Brian Paul
b4026d9be8
mesa: gl_register_file enum typedef
2009-03-07 12:02:52 -07:00
Brian Paul
69e07bdeb4
mesa: remove GL_MESA_program_debug extension
...
This was never fully fleshed out and hasn't been used.
2009-03-07 11:53:18 -07:00
Brian Paul
34e77493ce
mesa: silence warning
2009-03-07 11:49:45 -07:00
Brian Paul
0f04a1d3f8
mesa: remove last of _mesa_unreference_framebuffer() calls
2009-03-07 11:32:18 -07:00
Dave Airlie
1386e8a6ba
radeon: fix cut-n-paste typo
2009-03-08 02:41:30 +10:00
Maciej Cencora
b125af1d25
r300: shut up valgrind
...
It complained about uninitialized values
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-07 16:20:16 +01:00
Corbin Simpson
ec1476bf31
r300-gallium: Typo in assert.
2009-03-07 00:55:10 -08:00
Corbin Simpson
709ebabb26
r300-gallium: Emit vertex size.
...
Not actually going to make a difference right now, but might as well.
2009-03-07 00:51:11 -08:00
Corbin Simpson
dcd7f1c055
r300-gallium: A bit more vertex format fixup.
2009-03-07 00:42:12 -08:00
Ben Skeggs
67f2c6054c
nouveau: use bo_handle_ref instead of bo_fake to get front-buffer bo
...
This'll work on non-GEM also as the DDX will just pass an offset, and
libdrm_nouveau knows to treat "handle" as a VRAM offset. When running
on GEM the DDX (it doesn't yet, but will) passes a buffer handle
instead.
2009-03-07 17:49:10 +10:00
Ben Skeggs
22125f63b9
nv50: simplify tesla object selection
...
GeForce 8/9 are a bit more consistent than nv40 so far, so this was
overkill before.
2009-03-07 17:49:10 +10:00
Ben Skeggs
51fa4d47ea
nouveau: fix more breakage from pipe_reference..
2009-03-07 17:49:09 +10:00
Ben Skeggs
ca95d71a4b
nouveau: make stateobjs start off with refcount of 1
2009-03-07 17:49:09 +10:00
Victor Stinner
f2ec26cf52
Fix nv50_screen_create()
...
Setup screen->pipe before using it (screen->constbuf =
screen->pipe.buffer_create(...))
2009-03-07 17:49:08 +10:00
Victor Stinner
19229fcf3a
Fix nouveau_pipe_create() / nouveau_context_init(): raise an error if the screen/pipe creation failed
2009-03-07 17:49:08 +10:00
Dave Airlie
f881035fd8
rs690: fix r300 swtcl bug in DMA code.
...
When we finish emitting swtcl objects, we request space in the cmdbuf,
and flush if no space exists. However in this case we also flush
the DMA buffer we just put the vertices we wanted to send in.
This checks in advance if we have space in the buffer.
2009-03-07 17:23:40 +11:00
Alan Coopersmith
a06dd4de87
Add Solaris to OS'es using PROT_EXEC mmap() to get executable heap space
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com >
2009-03-06 20:06:26 -08:00
Corbin Simpson
6ebd6c898a
r300-gallium: Fix masking on vertex formats.
...
Gah, what a simple yet terrible mistake.
2009-03-06 19:07:54 -08:00
Corbin Simpson
95476635c5
r300-gallium: Remove unknown regs.
...
Leftovers from fglrx traces, probably.
2009-03-06 19:07:53 -08:00
Corbin Simpson
e23e93b7b4
r300-gallium: Actually do framebuffer setup.
...
Can't believe this wasn't wired up.
2009-03-06 19:07:53 -08:00
Corbin Simpson
fc96ac3c04
r300-gallium: Make sure registers are inside BEGIN/END CS.
2009-03-06 19:07:53 -08:00
Corbin Simpson
7e45d68d4d
r300-gallium: Separate out fog block.
...
We'll never actually use fog block. (I hope.)
2009-03-06 19:07:53 -08:00
Brian Paul
0945b78244
glsl: call the program optimizer
...
This still needs more testing bug glean and Mesa GLSL tests seem OK.
2009-03-06 16:21:21 -07:00
Brian Paul
e60b3067d8
i965: check if we run out of GRF/temp registers
...
Before this change we would up emitting instructions with invalid register
numbers. This typically (but not always) hung the GPU. For now, just
prevent emitting bad instructions to avoid hangs. Still need to do some
kind of proper error recovery.
2009-03-06 16:21:21 -07:00
Brian Paul
d42cfa6e6e
mesa: added _mesa_read_shader() function to read shaders from files
...
Useful for debugging to override an application's shader.
2009-03-06 16:21:21 -07:00
Brian Paul
2eacc4aafa
i965: bump up BRW_EU_MAX_INSN
...
This is the size of the intermediate instruction buffer.
2009-03-06 16:21:20 -07:00
Brian Paul
82f1c0be13
mesa: add new program optimizer code
...
This is pretty simplistic for now, but helps with certain shaders.
2009-03-06 16:21:20 -07:00
Brian Paul
faae1994c9
i965: comments
2009-03-06 16:21:20 -07:00
Brian Paul
f874dc6395
i965: comments and minor clean-ups
2009-03-06 16:21:20 -07:00
Brian Paul
5cbd1170da
i965: avoid unnecessary calls to brw_wm_is_glsl()
...
This function scans the shader to see if it has any GLSL features like
conditionals and loops. Calling this during state validation is expensive.
Just call it when the shader is given to the driver and save the result.
There's some new/temporary assertions to be sure we don't get out of sync
on this.
2009-03-06 16:21:20 -07:00
Maciej Cencora
99e4809f5d
r300: fix depth write regression (found by Nicolai Haehnle)
...
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-06 22:19:44 +01:00
Maciej Cencora
0828bfaa45
r300: enable EXT_fog_coord extension
...
Remove fixed function fog setup.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-06 22:19:44 +01:00
Maciej Cencora
7ad7abc4cd
r300: route fog coord and W pos correctly
...
Also cleanup sw tcl vertex buffer setup
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-06 22:19:43 +01:00
Maciej Cencora
d8b8fb6895
r300: rewrite and hopefully simplify RS setup
...
Testing and regression fixes by Markus Amsler
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-06 22:19:43 +01:00
Maciej Cencora
25dfbb03f8
r300: add few macros for RS setup
...
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-06 22:19:43 +01:00
Maciej Cencora
ee56c5e73b
r300: silence valgrind
...
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-06 22:19:43 +01:00
Maciej Cencora
3fa6a6df75
r300: Print reg address when debugging is enabled
...
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-03-06 22:19:43 +01:00
Keith Whitwell
185ff38895
fp: add some more texture, position and kill tests
2009-03-06 21:15:19 +00:00
Keith Whitwell
2dd9a0197c
fp: new kill + position test
2009-03-06 21:00:18 +00:00
Keith Whitwell
52a68b9078
fp: dont reference fragment.position.zw
2009-03-06 21:00:18 +00:00
Keith Whitwell
b258320dbd
engine: also print fps data to stdout
...
Useful for figuring out how much of a perf impact the glBitmap fps
display has on a given driver.
2009-03-06 21:00:18 +00:00
Maciej Cencora
005ad1a71d
r300: don't crash on sw tcl hw if point size vertex attrib is sent
2009-03-06 21:55:12 +01:00
Corbin Simpson
9c3796417f
r300-gallium: GA enhancements.
...
Basically an errata fixup register.
2009-03-06 11:28:08 -08:00
Corbin Simpson
17331a77f6
r300-gallium: Flat/smooth shading state.
2009-03-06 11:17:55 -08:00
Corbin Simpson
d965c15777
r300-gallium: Pick up a few more bits of rs_state.
...
Including two registers that already should have been covered...huh...
2009-03-06 10:30:15 -08:00
José Fonseca
0bbcb47901
wgl: Check support for all other depth/stencil formats.
2009-03-06 18:04:25 +00:00
José Fonseca
78071fe767
wgl: Choose a supported S8Z24/Z24S8/X8Z24/Z24X8.
2009-03-06 18:04:25 +00:00
Jeremy Huddleston
7817fea0b6
Updated darwin config for when X11 is not in the same location as we're installing to
2009-03-06 11:21:45 -05:00
José Fonseca
8bbb6b352a
mesa: Reads must also be done with lock held.
...
Otherwise two threads might think each made the refcount go zero.
2009-03-06 14:03:04 +00:00
José Fonseca
f6159ba4d5
mesa: Fix typo.
...
Windows threads block if one over-unlocks them.
2009-03-06 14:03:04 +00:00
Dave Airlie
760068cc8d
r300: fix uninit variable warning
2009-03-06 23:42:35 +11:00
Dave Airlie
e0313ef061
r300: fix swtcl codepaths
2009-03-06 23:42:17 +11:00
Eric Anholt
19e134051c
intel: Fix bpp setting of blits to 8bpp targets.
...
This was causing hangs in cairogears, as we would blit to the 8bpp target
(A8 texture) as 16bpp, and stomp over state objects.
2009-03-05 23:43:43 -08:00
Dave Airlie
c6ac53bc40
radeon: implement userspace clears
...
This is pretty much Eric Anholts implementation of clear using the GL state machine
from the Intel drivers.
It works quite well for now for us, probably could do with trying to use Z engine for
clears.
2009-03-06 16:07:23 +10:00
Eric Anholt
d0ec7c109c
i965: fix 3DPRIMITIVE batch decode of the vertex count field.
2009-03-05 19:42:19 -08:00
Eric Anholt
cade74e3f4
i965: Stop dumping programs after the first all-zeroes entry.
2009-03-05 19:42:18 -08:00
Eric Anholt
40bc2748c2
intel: Add always_flush_batch driconf option for making small batchbuffers.
...
This can improve debugging with INTEL_DEBUG=batch,sync by giving smaller
batchbuffers.
2009-03-05 19:42:18 -08:00
Eric Anholt
f3687284c1
intel: Add always_flush_cache driconf option for debugging cache flush failure.
...
I keep wanting to hack this knob in as a one-time thing, so it seemed useful
to have all the time.
2009-03-05 19:42:17 -08:00
Eric Anholt
9882695052
i965: Add a note about why the _NEW_STENCIL is required in draw_buffers.
2009-03-05 19:42:17 -08:00
Eric Anholt
f085147258
intel: Remove a gratuitous MI_FLUSH after clearing with a blit.
...
The 3D destination shares the same cache so we don't have any trouble with
the later commands needing the writes flushed inside of the same batchbuffer.
2009-03-05 19:42:16 -08:00
Eric Anholt
0d31e340f8
i965: Remove dead flushing code.
2009-03-05 19:42:16 -08:00
Joel Bosveld
8acca48cd5
st/xorg: Install to XORG_DRIVER_INSTALL_DIR
2009-03-06 01:31:49 +01:00
Brian Paul
9ffc1784b4
i965: comments and formatting fixes
2009-03-05 17:25:25 -07:00
Brian Paul
3485801978
i965: fix emit_math1() function used for scalar instructions
...
Instructions such as RCP, RSQ, LOG must smear the result of the function
across the dest register's X, Y, Z and W channels (subject to write masking).
Before this change, only the X component was getting written.
Among other things, this fixes cube map texture sampling in GLSL shaders
(since cube lookups involve normalizing the texcoord).
2009-03-05 17:25:25 -07:00
Brian Paul
be8c0b25ea
mesa: added some assertions
2009-03-05 17:25:25 -07:00
Brian Paul
f787baff80
mesa: when printing src regs, use |reg| for absolute value
...
And check opcode number to avoid crashing on driver-private opcodes.
2009-03-05 17:25:25 -07:00
Brian Paul
ee41bb2ed0
i965: fix screen depth test in intel_validate_framebuffer)_
...
front_region may be null.
2009-03-05 17:25:25 -07:00
Brian Paul
20f49252e1
i965: init dest reg CondMask = COND_TR (the proper default)
...
Plus fix up a debug printf.
2009-03-05 17:25:25 -07:00
Corbin Simpson
0b723b8b89
r300-gallium: Move RS block setup to CSO.
2009-03-05 12:41:54 -08:00
Corbin Simpson
ac2acda036
r300-gallium: Move scissor state.
...
Keep it grouped with all the other parameterized state.
2009-03-05 12:41:54 -08:00
Corbin Simpson
626ac95335
r300-gallium: Fix up vertex count.
2009-03-05 12:41:53 -08:00
Corbin Simpson
a3b168df48
r300-gallium: Use only one CS section for vertex_format.
2009-03-05 12:41:53 -08:00
Dave Airlie
b074aacdb2
r200: cs emit state fixups
2009-03-06 05:42:37 +10:00
Dave Airlie
a03a4dd524
r200: remove depth check for dri2
2009-03-06 04:48:20 +10:00
Dave Airlie
7ba9eb1e85
r200: temporary sw clear code
2009-03-06 04:48:20 +10:00
Brian Paul
9d9a7edfbc
Revert "softpipe: added null ptr check for align_free() call in vbuf code"
...
This reverts commit 6db24f449d .
With a null ptr check in align_free() this is no longer needed.
2009-03-05 10:01:53 -07:00
Brian Paul
ca640ca959
gallium: added null ptr check in align_free()
2009-03-05 10:01:28 -07:00
Brian Paul
3ba370ad7f
mesa: add wglext.h to tarball list
2009-03-05 10:01:28 -07:00
Brian Paul
493b69a0c8
gl: added include/GL/wglext.h
2009-03-05 10:01:28 -07:00
Brian Paul
6db24f449d
softpipe: added null ptr check for align_free() call in vbuf code
...
Fixes GALLIUM_NOCELL path. See bug 20475.
2009-03-05 09:49:27 -07:00
Corbin Simpson
df8755edbe
r300-gallium: C++ compat fix.
...
Oops. :3
2009-03-05 08:41:30 -08:00
Joakim Sindholt
dc527de95e
radeon-gallium: fix dri2 build
2009-03-05 08:41:30 -08:00
Brian Paul
8d5b8a4615
gl: update glext.h to version 46
2009-03-05 08:25:37 -07:00
Dave Airlie
9d72a75917
radeon: use t->bo to figure out of settexbuffer override is in action
2009-03-05 19:00:17 +10:00
Dave Airlie
eba8008916
r200: port over state emits for kms from radeon
...
this needs testing on real hw
2009-03-05 18:58:48 +10:00
Dave Airlie
5c80eb7ec1
r200: add set tex buffer support
2009-03-06 02:37:10 +10:00
Corbin Simpson
86a06f0674
radeon-gallium: Add Xorg state tracker Radeon winsys stub.
2009-03-04 20:52:45 -08:00
Corbin Simpson
fc1859c264
radeon-gallium: Only build drivers for state trackers that are enabled.
2009-03-04 20:46:10 -08:00
Brian Paul
b5d3c17427
tests: add new mapbufrange.c test to test GL_ARB_map_buffer_range
...
This only tests the most basic functionality for now.
2009-03-04 21:03:29 -07:00
Brian Paul
5c18ff2bf8
fix incorrect prototype for glMapBufferRange() in glext.h
...
Needs to return void *
2009-03-04 20:26:23 -07:00
Robert Ellison
3468315087
i965: add software fallback for conformant 3D textures and GL_CLAMP
...
The i965 hardware cannot do GL_CLAMP behavior on textures; an earlier
commit forced a software fallback if strict conformance was required
(i.e. the INTEL_STRICT_CONFORMANCE environment variable was set) and
2D textures were used, but it was somewhat flawed - it could trigger
the software fallback even if 2D textures weren't enabled, as long
as one texture unit was enabled.
This fixes that, and adds software fallback for GL_CLAMP behavior with
1D and 3D textures.
It also adds support for a particular setting of the INTEL_STRICT_CONFORMANCE
environment variable, which forces software fallbacks to be taken *all*
the time. This is helpful with debugging. The value is:
export INTEL_STRICT_CONFORMANCE=2
2009-03-04 16:59:00 -07:00
Corbin Simpson
1281bac3ba
radeon-gallium: Enable EGL and Xorg state trackers.
...
Compile-tested only, but I have high hopes.
2009-03-04 15:50:01 -08:00
Corbin Simpson
07ffb00d30
radeon-gallium: DRI2 state tracker, part 3.
...
Properly setup the build process for adding in xorg and egl trackers,
and finally put radeon_context and radeon_screen to bed.
2009-03-04 15:50:00 -08:00
Corbin Simpson
04ae9c3fdd
r300-gallium: Add unaccelerated surface_copy.
2009-03-04 15:50:00 -08:00
Brian Paul
bed3a8e1f6
mesa: call _mesa_get_cpu_string() to get CPU info for GL_RENDERER string
2009-03-04 16:48:05 -07:00
Brian Paul
7979c6024c
mesa: call _mesa_get_cpu_features() during one-time-init
2009-03-04 16:43:39 -07:00
Brian Paul
2cbc4655a8
mesa: new cpuinfo.c file to init/query cpu info and extensions
2009-03-04 16:43:39 -07:00
Brian Paul
16d72437ea
mesa: _mesa_get_x86_features() only needs to do its thing once
2009-03-04 16:43:39 -07:00
Jakob Bornecrantz
b417c978a9
st/xorg: Clean up xorg_exa.c a bit
2009-03-05 00:10:12 +01:00
Jakob Bornecrantz
b611f81477
st/xorg: Change format function a bit
2009-03-05 00:10:12 +01:00
Jakob Bornecrantz
dca226fefb
st/xorg: Fix transfer double free
2009-03-05 00:10:12 +01:00
Jakob Bornecrantz
5aa356d3e4
intel: Fixup from refcount changes
2009-03-05 00:10:11 +01:00
Jakob Bornecrantz
2fcfa1ac0e
mesa: Add x86/common_x86.c to libmesagallium.a
...
Thanks to Brian for the refactor commit
2009-03-05 00:10:11 +01:00
Brian Paul
9ec7f083f3
mesa: move sse.h and 3dnow.h #includes
2009-03-04 15:56:16 -07:00
Brian Paul
dd9af78650
mesa: remove unneeded x86.h header
2009-03-04 15:46:36 -07:00
Brian Paul
8538f64d09
mesa: make _mesa_init_x86_transform_asm() static
2009-03-04 15:44:38 -07:00
Brian Paul
81e366c659
mesa: rename common_x86_macros.h -> x86_xform.h
2009-03-04 15:39:50 -07:00
Brian Paul
20d289eb2d
mesa: rename x86.c -> x86_xform.c
2009-03-04 15:35:21 -07:00
Brian Paul
c751224b0a
mesa: refactor x86 code
...
Move _mesa_init_all_x86_transform_asm() into x86.c so that common_x86.c
has no dependencies on the vertex transformation code.
Plus some comments and clean-ups.
2009-03-04 15:24:03 -07:00
José Fonseca
f0c92d9656
Merge commit 'origin/master' into gallium-map-range
2009-03-04 21:46:12 +00:00
Keith Whitwell
79a05a6b3f
indices: add translate/generate functions for unfilled modes
...
Most of the time unfilled rendering requires a lot more thought than
just translating triangles to lines or points. But sometimes, you can
do exactly that, and it can be quite a bit quicker. Add code to do the
translation. The caller has to determine whether it's a legal thing
to do in the current state, in particular you'd need:
- culling disabled
- offset disabled
- same front and back fill modes
- possibly other stuff I can't think of.
2009-03-04 21:37:23 +00:00
Keith Whitwell
59311fb06c
clear-repeat: print fps, use 300x300 window size
2009-03-04 21:37:23 +00:00
Dan Nicholson
ac55db1d7d
autoconf: Restore _GNU_SOURCE for all Linux systems
...
This catches the linux-uclibc case and any others that were being set
prior to 98fcdf3f . Fixes bug 20345.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-03-04 13:19:32 -08:00
Patrice Mandin
41117b1a01
nouveau: oops, forgot to keep the NV10_SIFM object
2009-03-04 20:38:14 +01:00
Patrice Mandin
69e42ec456
nouveau: Use proper SIFM object on NV30
2009-03-04 20:34:54 +01:00
José Fonseca
8ad65a23d1
mesa: Follow ARB_map_buffer_range more stricly.
...
Namelly, FlushMappedBufferRange takes a subrange relative to the original
range.
2009-03-04 17:49:52 +00:00
José Fonseca
2a1f29c220
gallium: Use consistent semantics for map ranges in gallium.
...
Which are slightly different from ARB_map_buffer_range semantics, since
gallium still supports more than one mapping of the same buffer.
2009-03-04 17:48:26 +00:00
José Fonseca
99a540bfbe
Merge commit 'origin/master' into gallium-map-range
2009-03-04 17:42:36 +00:00
Keith Whitwell
368ca83a3f
vbo: second attempt - avoid getting buffer_ptr and buffer_map out of sync
2009-03-04 17:01:47 +00:00
José Fonseca
67cbe83a72
Merge commit 'origin/master' into gallium-map-range
2009-03-04 16:44:31 +00:00
José Fonseca
89f1f8f0b8
mesa: Clear cache->trans after destroying the transfer.
2009-03-04 16:43:45 +00:00
José Fonseca
50e38b0878
mesa: Clear cache->trans after destroying the transfer.
2009-03-04 16:43:13 +00:00
Brian Paul
ca06c0c16d
cell: update cell driver after gallium reference count changes
2009-03-04 09:34:46 -07:00
Keith Whitwell
fba923ff44
Revert "vbo: avoid getting buffer_ptr and buffer_map out of sync"
...
This fixed a minor bug but broke everything else.
This reverts commit 579ef8ab19 .
2009-03-04 16:09:14 +00:00
José Fonseca
e80d330419
gallium: Ensure map ranges are valid.
2009-03-04 16:07:51 +00:00
Keith Whitwell
579ef8ab19
vbo: avoid getting buffer_ptr and buffer_map out of sync
2009-03-04 16:06:05 +00:00
José Fonseca
5b04939b16
Merge commit 'origin/master' into gallium-map-range
2009-03-04 15:23:35 +00:00
Keith Whitwell
f9ce417aaf
vbo: use FLUSH_UPDATE_CURRENT flag to indicate whether the vbo module is active
...
Add asserts for expected values on wakeup and flush. Remove cases where
this flag is set or cleared except when waking up and flushing vbo module.
2009-03-04 15:17:16 +00:00
Brian Paul
945dcbfca6
mesa: include mfeatures.h
...
See bug 20319.
2009-03-04 07:58:38 -07:00
Dave Airlie
31f1298807
radeon: r100 clean up CS packet size calc
2009-03-04 22:26:44 +10:00
Dave Airlie
924bf0d8d3
radeon: settexbuffer support
...
This gets DRI2 compiz going
2009-03-04 22:26:20 +10:00
José Fonseca
cfd5298f24
mesa: Implement and use FlushMappedBufferRange.
2009-03-04 11:59:00 +00:00
Michel Dänzer
45bde75bd6
gallium: Remove some superfluous instances of #include "p_inlines.h".
2009-03-04 11:58:52 +01:00
Michel Dänzer
5e27cd46c0
gallium: Unify reference counting.
...
The core reference counting code is centralized in p_refcnt.h.
This has some consequences related to struct pipe_buffer:
* The screen member of struct pipe_buffer must be initialized, or
pipe_buffer_reference() will crash trying to destroy a buffer with reference
count 0. u_simple_screen takes care of this, but I may have missed some of
the drivers not using it.
* Except for rare exceptions deep in winsys code, buffers must always be
allocated via pipe_buffer_create() or via screen->*buffer_create() rather
than via winsys->*buffer_create().
2009-03-04 11:58:48 +01:00
Dave Airlie
26d0172a5b
radeon: fix texturing for r100
2009-03-04 20:24:08 +10:00
Dave Airlie
940d47de08
radeon: use swrast clear - fail on depth
...
need to write real hw user clear
2009-03-04 18:36:46 +10:00
Dave Airlie
e0de73e8a5
radeon: fixup some segfaults/exit at startup
2009-03-04 18:36:13 +10:00
Corbin Simpson
60041203d5
r300-gallium, radeon-gallium: Continue migration to DRI2 state_tracker, part 2.
...
Almost there. glxinfo still works, and AFAICT so does trivial/clear.
2009-03-03 22:16:24 -08:00
Corbin Simpson
9e67b0a174
r300-gallium, radeon-gallium: Begin migration to DRI2 state tracker, part 1.
...
s/migration/migrane/ , actually. Anyway, this has working glxinfo...
2009-03-03 22:16:24 -08:00
Brian Paul
a255472ee7
mesa: include main/dd.h in t_vb_points.c and t_vp_build.c
...
For some reason makedepend doesn't seem to find the dependency on this
header in these two files. Directly including the header is a work-around.
2009-03-03 20:45:45 -07:00
Jakob Bornecrantz
145aa57e45
st/dri2: Fake frontbuffer changes
...
Front buffer rendering works as it stands but it completely
wrong. But as it stands fake front buffer rendering is
completely broken. So we keep it as it is. But lets atleast
handle it in the get buffers code.
2009-03-04 00:39:59 +01:00
Jakob Bornecrantz
28c325f8d3
st/dri2: Hook up flush_frontbuffer
...
Doesn't do anything because we can't tell the X server about
any changes to the fake front buffer.
2009-03-04 00:35:33 +01:00
Jakob Bornecrantz
b7b046150b
st/dri2: We are strictly a dri2 driver
2009-03-04 00:31:35 +01:00
Jakob Bornecrantz
16526b7099
st/drm: s/hocks/hooks/
2009-03-03 22:18:14 +01:00
Brian Paul
3873ffe27d
gallium: remove old state tracker renderbuffer attachment assertion
...
Not needed since renderbuffers are ref-counted.
Fixes progs/demos/shadowtex.
2009-03-03 14:01:49 -07:00
Brian Paul
c37872d8c0
xlib: code to force fixed function -> shader translation (for debug, disabled)
2009-03-03 14:01:10 -07:00
Brian Paul
de1caa5507
mesa: fix sw fallback state validation bug
...
When a hw driver fell back to swrast, swrast wasn't always getting informed
of program changes. When fixed function is translated into shaders, flags
like _NEW_LIGHT, _NEW_TEXTURE, etc. should really signal _NEW_PROGRAM.
In this case, swrast wasn't seeing _NEW_PROGRAM when new fragment shaders
were generated.
2009-03-03 13:55:25 -07:00
José Fonseca
004d8f1188
mesa: Massage the interface to more closely resemble ARB_map_buffer_range
2009-03-03 18:52:51 +00:00
José Fonseca
190db8b4c3
gallium: Massage the interface to more closely resemble ARB_map_buffer_range
2009-03-03 18:52:16 +00:00
José Fonseca
317a7da2c4
wgl: Support the same combinations of single buffer pixel formats.
2009-03-03 17:56:22 +00:00
José Fonseca
1d4d27802d
Merge commit 'origin/master' into gallium-map-range
2009-03-03 15:43:12 +00:00
Keith Whitwell
39a1a24b3f
demos/engine: respect display list mode when drawing pistons
2009-03-03 15:40:14 +00:00
Dan Nicholson
4737a9fa25
autoconf: Update config.guess and config.sub from upstream
...
Grabbed the latest copies from the GNU config repo at
http://git.savannah.gnu.org/cgit/config.git .
2009-03-03 06:55:15 -08:00
José Fonseca
c7e46c1857
Merge commit 'origin/master' into gallium-map-range
2009-03-03 13:18:15 +00:00
José Fonseca
dceb09909e
Merge commit 'origin/gallium-0.1'
...
Conflicts:
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
2009-03-03 12:26:21 +00:00
José Fonseca
efcea15aaa
pipebuffer: Cleanup merge.
2009-03-03 12:25:41 +00:00
Keith Whitwell
0f3d226143
winsys: return null for DONTBLOCK flag on existing winsys
...
Add code so that existing driver behaviour doesn't change.
2009-03-03 12:11:08 +00:00
Keith Whitwell
9a9dc422b0
pb: fix up merge mistakes
2009-03-03 12:10:56 +00:00
José Fonseca
9036e0d724
pipebuffer: Fix copy'n'paste typo.
2009-03-03 12:01:01 +00:00
Keith Whitwell
916de35d67
Merge commit 'origin/gallium-0.1'
...
Conflicts:
scons/gallium.py
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
src/gallium/include/pipe/p_defines.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_exec_draw.c
2009-03-03 11:51:14 +00:00
Keith Whitwell
2785af803f
vbo: missing line from previous commit
2009-03-03 10:55:25 +00:00
Keith Whitwell
2e29b7d0f8
mesa/st: implement MapBufferRange callback
...
Using PIPE_BUFFER_USAGE_DONTBLOCK.
2009-03-03 10:47:31 +00:00
Keith Whitwell
c4d1f4607a
vbo: use MapBufferRange where available
...
Previously would have to allocate a new VBO after firing a draw command
as subsequent call to Map() on old VBO might block if the driver had
submitted the commands to hardware.
2009-03-03 10:46:12 +00:00
Keith Whitwell
eb8a1d9642
mesa: add MapBufferRange driver callbacks
...
Will be needed in coming GL extensions (GL_map_buffer_range, GL 3.0).
Will be used by the vbo module to avoid reallocating vbo's at each
draw primitive call.
2009-03-03 10:44:35 +00:00
Keith Whitwell
c64a2b7089
mesa: Add BeginVertices driver call
...
Provides notification to the VBO modules prior to the first immediate call.
Pairs with FlushVertices()
2009-03-03 10:41:57 +00:00
Jakob Bornecrantz
72cf6e8e92
intel: Add Xorg driver
2009-03-03 03:24:31 +01:00
Jakob Bornecrantz
4a1b8cbab8
intel: Add dri2 driver for gallium
2009-03-03 03:23:32 +01:00
Jakob Bornecrantz
84711c6582
st/xorg: Add Xorg state tracker
2009-03-03 03:22:46 +01:00
Jakob Bornecrantz
1d060e36f2
st/dri2: Add DRI2 a state tracker
...
This was based of the unfinnished code that Keith
Whitwell started on but never finnished. I moved
the code from the glx directory because dri drivers
can be used for more things then just glx.
2009-03-03 03:22:05 +01:00
Jakob Bornecrantz
cc9fbb16a6
intel: Increase max relocs per batchbuffer
2009-03-03 03:19:49 +01:00
Brian Paul
a3b7db0326
mesa: save some useful VBO debug/dump code (disabled)
2009-03-02 17:55:09 -07:00
Brian Paul
433f2ab2ec
mesa: more tex image debug/dumping code
2009-03-02 17:52:30 -07:00
Brian Paul
d652d26a97
mesa: comments and code documenting a bug with depth 32 TrueColor drawing/reading
...
It seems that XGetImage() from a depth 32 TrueColor window is flakey.
Drawing with XPutImage() instead of XPutPixel() seems to work better, but
still not perfectly.
Keep using the original code for now until more is learned.
2009-03-02 17:51:44 -07:00
Brian Paul
6c75d7b4e6
mesa: move call to update_texture_compare_function()
...
Another conditional can be avoided.
2009-03-02 15:21:50 -07:00
Brian Paul
e232471baa
mesa: fix texture enable regression
...
Need to clear the _ReallyEnabled field before possibly continuing the loop.
Also, set _Current pointer to NULL if the unit is no longer enabled.
Fixes piglit lodbias regression
2009-03-02 15:19:53 -07:00
Brian Paul
7e0f47c134
mesa: use _mesa_reference_texobj() when setting texUnit->Current pointer
...
Fixes piglit copytexsubimage regression.
2009-03-02 14:29:37 -07:00
Brian Paul
97dd2ddbd9
mesa: don't draw arrays if vertex position array is not enabled
...
For regular GL, we must have vertex positions in order to draw. But ES2
doesn't have that requirement (positions can be computed from any array
of data).
See bug 19911.
2009-03-02 12:27:16 -07:00
Brian Paul
f1a083d4b8
gallium: only enable depth test if a depth bufffer is available
2009-03-02 11:51:46 -07:00
Brian Paul
8fec37c0f1
mesa: remove warning/short-circuit of stencil enable w/ no stencil buffer
...
With FBOs one could enable stencil before a stencil buffer is later bound.
2009-03-02 11:49:37 -07:00
Brian Paul
91e61f435a
mesa: use Stencil._Enabled field instead of Stencil.Enabled
2009-03-02 11:49:37 -07:00
Brian Paul
f352a80aec
mesa: add ctx->Stencil._Enabled field
...
Only true if stenciling is enabled, and there's a stencil buffer.
2009-03-02 11:49:37 -07:00
Younes Manton
2755a27d7d
nouveau: Grab correct surface from temp texture for transfers.
2009-03-02 13:05:06 -05:00
Younes Manton
c9fe0f7ab5
g3dvl: Grab surface pointer when flushing front buffer in SP winsys.
2009-03-02 13:05:05 -05:00
Brian Paul
07e50058a5
swrast: use _EnabledCoordUnits for fixed-function texturing
...
Using _EnabledUnits was wrong because it included vertex texture units.
This change plus the prev commit fixes occasional failures of glean/glsl1
vertex texture test failure.
2009-03-02 11:01:16 -07:00
Brian Paul
e68208f262
mesa: fixed computation of _EnabledCoordUnits
...
This field should not include vertex textures. It indicates the coord
inputs for fragment / fixed-function processing.
2009-03-02 10:58:51 -07:00
José Fonseca
050ce17799
pipebuffer: Cleanup code & comments.
2009-03-02 17:45:35 +00:00
Dave Airlie
54b42c0a4a
radeon: remove debugging
2009-03-03 03:37:23 +10:00
José Fonseca
fe64aa0c8e
pipebuffer: Handle PIPE_BUFFER_USAGE_DONTBLOCK flag.
...
Conflicts:
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
2009-03-02 17:35:28 +00:00
José Fonseca
cfc3d5c219
gallium: New PIPE_BUFFER_USAGE_DONTBLOCK flag.
...
To prevent blocking when mapping a buffer.
2009-03-02 17:33:25 +00:00
José Fonseca
2c1d40a051
pipebuffer: Wait for the GPU to finish reading too.
...
No real change, as we're not tracking relocations read/write access yet.
2009-03-02 17:32:37 +00:00
Dave Airlie
2b85fccae5
radeon: refactor framebuffer code like intel
...
this is a step towards fbos and should fix pageflipping, but
I think the first flip seems broken.
2009-03-03 03:29:37 +10:00
José Fonseca
802a5ff507
pipebuffer: Remove unused var.
2009-03-02 17:19:12 +00:00
Brian Paul
e30f765763
mesa: clarify comments for per-unit texture bitfields
2009-03-02 09:44:32 -07:00
Brian Paul
000c3438c9
mesa: move texture_override() code into calling loop
...
We can avoid a few iterations this way.
2009-03-02 09:44:32 -07:00
Brian Paul
ebabdf9920
mesa: move update_texture_compare_function() call out of loop
2009-03-02 09:44:32 -07:00
Brian Paul
555f0a8818
mesa: remove unused AUX buffers
...
Remove all references to aux buffers 1..3. Keep AUX0 around for now just
in case, but it'll probably go too someday. I don't know of any OpenGL
drivers since the IRIX days that support aux color buffers.
2009-03-02 09:44:32 -07:00
Brian Paul
baf2c746c1
mesa: remove VF_SOURCES, simplify MATH_XFORM_SOURCES
2009-03-02 08:05:30 -07:00
José Fonseca
97a1fd158c
Merge commit 'origin/master' into gallium-map-range
2009-03-02 13:27:46 +00:00
Corbin Simpson
b70f344e22
r300-gallium: Clean up casts and indents.
2009-03-01 18:24:40 -08:00
Corbin Simpson
af8a41e5c7
r300-gallium: Split off invariant state.
...
It's kind of like a CSO todo list. :3
2009-03-01 18:12:05 -08:00
Corbin Simpson
8b8e954f9e
r300-gallium: Add RADEON_NO_TCL debugging option.
...
Just like R300_NO_TCL, when set, forces HW TCL off.
2009-02-28 14:07:17 -08:00
Corbin Simpson
0328e838c2
r300-gallium: Fix register count.
2009-02-28 14:01:28 -08:00
Corbin Simpson
ba5f184829
r300-gallium: Fix hardlocks on trivial/clear.
...
I'm so happy I could cry.
2009-02-28 13:27:28 -08:00
Corbin Simpson
731aa326ff
r300-gallium: Use rs_state emit for r300_surface, move a few things around.
...
Also a possible fix for non-TCL chipsets and trivial/clear.
2009-02-28 11:22:40 -08:00
Corbin Simpson
2b7d39da1f
r300-gallium: Move maths from r300_state to r300_state_inlines.
2009-02-28 11:22:40 -08:00
Brian Paul
23682dc629
mesa: just re-order some parts and update comments in sources.mak
2009-02-28 11:56:15 -07:00
Brian Paul
8d475822e6
mesa: rename, reorder FRAG_RESULT_x tokens
...
s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/
s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/
Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it.
Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
2009-02-28 11:49:46 -07:00
Brian Paul
7787fa10ba
mesa: add gallium state tracker sources to ALL_SOURCES
...
This should fix some missing dependency checking.
2009-02-28 11:17:27 -07:00
Brian Paul
4c4268dd31
mesa: convert some #defines to enums
...
This makes debugging with gdb a bit easier.
Ex:
(gdb) p ctx->DrawBuffer.Attachment[BUFFER_STENCIL]
Note however that gdb only seems to recognize enum types that are actually
used to declare a variable somewhere. For example, gl_buffer_index isn't
used to declare any vars so it's invisible to gdb. Work around this by
adding a dummy function in context.c that declares some vars with these
new types.
2009-02-28 11:17:26 -07:00
Brian Paul
fe35378769
demos: add progs/glsl/shadow_sampler.c to test GLSL shadow2D(), etc.
...
Heh, I wrote this program a long time ago but just discovered today that
it wasn't in git.
2009-02-28 11:09:13 -07:00
Brian Paul
c50c2e4e98
mesa: move _GenFlags = 0x0 to texgen loop
2009-02-28 11:09:13 -07:00
Brian Paul
c88c8d7993
mesa: use fp pointer in _tnl_InvalidateState()
2009-02-28 11:09:13 -07:00
Joakim Sindholt
b2b2febe2c
mesa: fix remaining FEEDBACK_TOKEN macros
...
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com >
2009-02-28 10:07:15 -08:00
Corbin Simpson
5f1fdaabd1
r300-gallium: Cleanup color formats.
2009-02-28 09:56:35 -08:00
Corbin Simpson
d1559eac6d
r300-gallium: Be more Gallium-ish in some of the math.
2009-02-28 09:56:35 -08:00
Corbin Simpson
3673fc35d6
r300-gallium: Move all state translators to r300_state_inlines.
...
Tryin' to do some cleanup.
2009-02-28 09:56:34 -08:00
Brian Paul
b7ebc270a4
mesa: move #include "bitset.h" out of mtypes.h - not needed in core Mesa
2009-02-28 10:08:22 -07:00
Brian Paul
079554a480
mesa: add a prototype to silence warnings
2009-02-28 10:06:55 -07:00
David Miller
ae5c06b9ce
mesa: Sparc's IROUND() optimization is invalid.
...
We can't use the "fstoi" instruction like this.
Unlike other floating point instructions, "fstoi" always rounds
towards zero no matter what rounding mode the FPU has been set to.
This was validated using the following test program:
--------------------
static inline int iround(float f)
{
int r;
__asm__ ("fstoi %1, %0" : "=f" (r) : "f" (f));
return r;
}
#define IROUND(x) iround(x)
#define IROUND_REF(f) ((int) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F)))
int main(void)
{
float f = -2.0;
while (f < 3.0f) {
int sparc_val = IROUND(f);
int ref_val = IROUND_REF(f);
if (sparc_val != ref_val)
printf("DIFFERENT[%f]: REF==%d SPARC==%d\n",
f, ref_val, sparc_val);
f += 0.1f;
}
return 0;
}
--------------------
which prints out things like:
--------------------
DIFFERENT[-1.900000]: REF==-2 SPARC==-1
DIFFERENT[-1.800000]: REF==-2 SPARC==-1
DIFFERENT[-1.700000]: REF==-2 SPARC==-1
DIFFERENT[-1.600000]: REF==-2 SPARC==-1
DIFFERENT[-1.000000]: REF==-1 SPARC==0
DIFFERENT[-0.900000]: REF==-1 SPARC==0
DIFFERENT[-0.800000]: REF==-1 SPARC==0
DIFFERENT[-0.700000]: REF==-1 SPARC==0
DIFFERENT[-0.600000]: REF==-1 SPARC==0
DIFFERENT[0.500000]: REF==1 SPARC==0
DIFFERENT[0.600000]: REF==1 SPARC==0
...
--------------------
So we have to remove Sparc's IROUND() definition, it's wrong.
Signed-off-by: David S. Miller <davem@davemloft.net >
2009-02-28 09:36:56 -07:00
Brian Paul
389d50baff
mesa: move GLfixed type and related macros to swrast module
...
Fixed point is only used in swrast and sw-based drivers.
2009-02-28 09:35:16 -07:00
Brian Paul
8bf25a17d2
mesa: convert macro to inline function
2009-02-28 09:35:16 -07:00
Brian Paul
bf8a187f71
mesa: replace FEEDBACK_TOKEN macro with _mesa_feedback_token() inline function
2009-02-28 09:35:15 -07:00
Brian Paul
559aec4701
mesa: comments, whitespace, reformatting
2009-02-28 09:35:15 -07:00
Brian Paul
f6021ab3c6
mesa: remove dead code
2009-02-28 09:35:15 -07:00
Brian Paul
7f25d9ebb4
mesa: move gl_attrib_node struct to attrib.c too
2009-02-28 09:35:15 -07:00
Brian Paul
55399c2951
mesa: move gl_enable_attrib struct to attrib.c, the only place it's used
2009-02-28 09:35:15 -07:00
Brian Paul
bedd20743b
mesa: lots of updated comments, formatting clean-ups
2009-02-28 09:35:15 -07:00
Corbin Simpson
3e131d7d74
r300-gallium: A handful of fixups.
2009-02-28 08:14:35 -08:00
Corbin Simpson
2b5770e652
r300-gallium: Fix C99 error.
2009-02-28 08:14:35 -08:00
Corbin Simpson
b210c3fb3f
r300-gallium: Fix RS.
...
I should just stop using "git stash" altogether.
2009-02-28 08:14:35 -08:00
Michal Krol
ba91e79dad
tgsi: More descriptive sanity diagnostic messages.
2009-02-28 16:53:37 +01:00
Michal Krol
9d49fb4f29
tgsi: More descriptive sanity diagnostic messages.
2009-02-28 15:09:43 +01:00
Brian Paul
07f96a6d8e
demos: fix renderbuffer leak in progs/tests/fbotexture.c
...
And re-org some code for testing purposes.
2009-02-27 15:57:46 -07:00
Brian Paul
c6bde8873f
intel: remove some unneeded buffer unmap calls
...
Core mesa now unmaps the buffers if needed in these cases.
2009-02-27 15:57:46 -07:00
Brian Paul
a070937c00
mesa: update fragResults array in arb_output_attrib_string()
...
Plus add some comments.
2009-02-27 13:45:49 -07:00
Corbin Simpson
49de8ec2ea
r300-gallium: Properly split up RS into r300 and r500 variants.
2009-02-27 12:25:09 -08:00
Corbin Simpson
991c945e72
radeon: Add DRM stubs.
...
Nothing really of note, unfortunately.
2009-02-27 12:25:09 -08:00
Corbin Simpson
7a10fcb7b6
Include p_compiler.h in drm_api.h for boolean typedef.
2009-02-27 12:25:09 -08:00
Corbin Simpson
fd5411fe36
r300-gallium: Turn true and false into TRUE and FALSE.
...
Match the rest of Gallium.
2009-02-27 12:25:09 -08:00
Brian Paul
67025f7893
mesa: set bufObj->Pointer = NULL after unmapping
...
Also, ctx->Driver.UnmapBuffer can never be null, so remove conditional.
2009-02-27 13:10:45 -07:00
Brian Paul
a7f434b486
mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap it
2009-02-27 13:04:38 -07:00
Brian Paul
395bcad8c0
mesa: updated comments
2009-02-27 12:56:07 -07:00
Brian Paul
75e3ccf6a5
mesa: fix incorrect error handling in glBufferDataARB()
...
If glBufferDataARB() is called while a buffer object is currently mapped
we're supposed to unmap the current buffer, then replace it. Don't generate
an error.
2009-02-27 12:56:07 -07:00
Shaohua Li
40290745ea
i915: Add support for a new G33-like chipset.
...
Signed-off-by: Shaohua Li <shaohua.li@intel.com >
Signed-off-by: Eric Anholt <eric@anholt.net >
2009-02-27 11:49:10 -08:00
Alex Deucher
863c76a7bb
R300: add support for RS600 chips
2009-02-27 14:48:24 -05:00
Keith Whitwell
43714e92e3
tgsi: don't dump interpolation info except for fragment shader inputs
...
Don't print the meaningless and confusing CONSTANT interpolation
attribute after everything else.
2009-02-27 19:34:27 +00:00
Alex Deucher
5a34ace3e6
R300: set the number of GB pipes on all r3xx-r5xx chips
2009-02-27 14:31:14 -05:00
Brian Paul
b6e2dd6e06
tests: new mapvbo.c test
...
Test that glDrawArrays() isn't effected by a glMapBuffer()/modify/glUnmapBuffer()
immediately afterward.
2009-02-27 11:46:38 -07:00
Corbin Simpson
c28298855b
r300-gallium: Add RS block setup.
...
This is still icky, and only compile-tested.
2009-02-27 10:19:22 -08:00
Corbin Simpson
4ef8c047ea
r300-gallium: Add RS600 chipsets.
2009-02-27 10:19:22 -08:00
Corbin Simpson
65021162a4
r300-gallium: A handful of tiny vfmt fixups.
...
Using a tab of inputs should work, but I keep getting bad results.
If only Rawhide's GDB wasn't broken...
2009-02-27 10:19:22 -08:00
Robert Ellison
17c7852bf9
i965: texture fixes: bordered textures, fallback rendering
...
i965 doesn't natively support GL_CLAMP; it treats it like
GL_CLAMP_TO_EDGE, which fails conformance tests.
This fix adds a clause to the check_fallbacks() test to check
whether GL_CLAMP is in use on any enabled 2D texture. If so,
and if strict conformance is required (via INTEL_STRICT_CONFORMANCE),
a software fallback is mandated.
In addition, validate textures *before* checking for fallbacks,
rather than after; otherwise, the texture state is never validated
and can't be trusted. (In particular, if texturing is enabled and
the sampler would access any level beyond level 0 of a texture, the
sampler will segfault, because texture validation sets the firstLevel
and lastLevel fields of a texture object so that the valid levels
will be mapped and accessed correctly. If texture validation doesn't
occur, only level 0 is accessed correctly, and that only because
firstLevel and lastLevel happen to be set to 0.)
2009-02-27 10:11:37 -07:00
Brian Paul
026465b9b1
gallium: fix state tracker's stencil buffer test
...
Need to check ctx->DrawBuffer->Visual.stencilBits not ctx->Visual.stencilBits
because the later only applies to the window system buffers, not user-created
FBOs.
This, plus the previous commit, fixes progs/tests/fbotexture.c
2009-02-27 10:08:46 -07:00
Brian Paul
5fc74734d9
gallium: add st_validate_framebuffer() driver function
...
Gallium only supports combined depth/stencil buffers, not separate ones.
If the user tries to create create a FBO with separate depth/stencil
renderbuffers mark the FBO as unsupported.
2009-02-27 10:08:46 -07:00
Keith Whitwell
b747e1dec4
util: set vbuf.max_index in draw_vertex_buffer()
...
(cherry picked from commit 1350f2efba5eeceebe0e711db6152c29e9889ce7)
2009-02-27 15:30:34 +00:00
Keith Whitwell
a321b8ed6e
softpipe: add dumping of post-tranfsormed vertices (disabled)
2009-02-27 15:23:21 +00:00
David Miller
cf89f06363
mesa: Fix and re-enable sparc normal asm.
...
Fix a bug reported in 2003 :-)
The output vector has 4 entries, not 3.
Unconditionally emit .register directives.
Signed-off-by: David S. Miller <davem@davemloft.net >
2009-02-27 07:54:02 -07:00
David Miller
bde27b0d94
mesa: Fix Sparc cliptest asm code and re-enable.
...
Stop using register %g7 since that is used by the "system" (ie. the
pthread implementation makes use of it).
Also, the projection vector can be NULL and we shouldn't try to access
it at all in _mesa_sparc_cliptest_points4_np(). ioquake3 would crash
due to this bug.
Finally, unconditionally emit the register directives and re-enable in
_mesa_init_all_sparc_transform_asm().
Signed-off-by: David S. Miller <davem@davemloft.net >
2009-02-27 07:53:37 -07:00
Dave Airlie
0dba8883e3
r300: make ste text buffer work with > 2048 on r500
2009-02-27 14:04:03 +10:00
Dave Airlie
26c1b0af02
radeon: add more fbconfigs
...
this makes glxgears get its background back when running under DRI2
2009-02-27 14:04:03 +10:00
Dave Airlie
7f44b62a4a
r300: remove depth offset exits in favour of rrb depth changes
2009-02-27 14:04:03 +10:00
Jakob Bornecrantz
e1d276f935
intel: Use flink for global buffer ids
...
Also fix minor drm api change
2009-02-27 03:36:48 +01:00
Jakob Bornecrantz
6a72a2d3f4
egl: Fix for minor api change
2009-02-27 03:35:01 +01:00
Jakob Bornecrantz
24a94d13c9
st/drm: Seperate get handle for global buffer ids
2009-02-27 03:35:01 +01:00
David S. Miller
18e01393b8
mesa: Fix DEBUG_MATH build on sparc.
...
Need to use '__asm__' instead of plain 'asm'.
math/m_debug_clip.c: In function ‘test_cliptest_function’:
math/m_debug_clip.c:253: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asm’
math/m_debug_clip.c:253: warning: implicit declaration of function ‘asm’
Signed-off-by: David S. Miller <davem@davemloft.net >
2009-02-26 18:59:58 -07:00
Brian Paul
7d399bf062
docs: add SPARC assembly updates
2009-02-26 18:59:58 -07:00
Brian Paul
4f8ed56d16
intel: no-op the intel_finish_render_texture() function
...
It doesn't have to do anything. See comments for more details.
2009-02-26 18:48:36 -07:00
Brian Paul
f77b720cde
intel: check texture formats in intel_validate_framebuffer()
...
We can't render into any texture format; only certain formats.
Check that render-to-texture's format is renderable in the
intel_validate_framebuffer()
There seems to be a bug somewhere that causes rendering to rgb565 textures
to be corrupted so disallow that for now. This will be revisted.
2009-02-26 18:48:36 -07:00
Brian Paul
645f220710
intel: updated comment, some debug code (disabled)
2009-02-26 18:48:35 -07:00
root
cdc63901df
i965: rename draw_regions -> color_regions
...
Be a little more specific about what these are.
2009-02-26 18:48:35 -07:00
Brian Paul
c710077807
demos: add a fourth test case to VBO test for position/color in different VBOs
2009-02-26 18:48:35 -07:00
Brian Paul
1614463235
mesa: avoid extraneous calls to ctx->Driver.BindFramebuffer()
...
Only call this driver function when we really need to bind different buffers.
2009-02-26 18:48:35 -07:00
Brian Paul
ecdf3ce436
i965: add missing init for region->width
...
This doesn't seem to really effect anything but seeing width=0 in drawing
regions was confusing.
2009-02-26 18:48:35 -07:00
Brian Paul
8ae7e7749b
mesa: replace old prog_instruction::Sampler field with Aux field
...
The i965 driver needs an extra instruction field for color output information.
It was using the Sampler field for this. Use the Aux field instead. This
will probaby be revisited at some point...
2009-02-26 18:48:35 -07:00
Brian Paul
9b78d9f651
i965: whitespace/indentation fixes
2009-02-26 18:48:35 -07:00
David S. Miller
857ac1e817
mesa: Resurrect SPARC asm code.
...
This rewrites the sparc GLAPI code so that it's PIC friendly and works
with all of the TLS/PTHREADS/64-bit/32-bit combinations properly.
As a result we can turn SPARC asm back on. Currently it's only
enabled on Linux, as that's the only place where I can test this
stuff out.
For the moment the cliptest SPARC asm routines are disabled as they
are non-working. The problem is that they use register %g7 as a
temporary which is where the threading libraries store the thread
pointer on SPARC. I will fix that code up in a future change as it's
a pretty important routine to optimize.
Like x86 we do the runtime patch as a pthread once-invoked initializer
in init_glapi_relocs().
Unlike x86, however, our GLAPI stubs on SPARC are just two instruction
sequences that branch to a trampoline and put the GLAPI offset into a
register. The trampoline is what we run-time patch. The stubs thus
all look like:
glFoo:
ba __glapi_sparc_foo_stub
sethi GLAPI_OFFSET(glFOO) * PTR_SIZE, %g3
This actually makes generate_entrypoint() a lot simpler on SPARC. For
this case in generate_entrypoint() we generate stubs using a 'call'
instead of the 'ba' above to make sure it can reach.
In order to get a proper tail call going here, in the unpatched case,
we do several tricks. To get the current PC, for example, we save the
return address register into a temporary, do a call, save the return
address register written by the call to another temporary, then
restore the original return address register value. This is to
avoid having to allocate a stack frame.
This is necessary for PIC address formation.
This new GLAPI scheme lets us get rid of the ugly SPARC GLAPI hacks in
__glXInitialize() and one_time_init().
Signed-off-by: David S. Miller <davem@davemloft.net >
2009-02-26 18:29:48 -07:00
Eric Anholt
b12dc74f86
intel: Revert disable of accelerated Bitmap, which slipped in with spans stuff.
2009-02-26 11:46:36 -08:00
Dave Airlie
294aab9b71
r200: fixup emit sizes for kms
2009-02-27 03:37:30 +10:00
Tomas Carnecky
5add2c88bd
Fix "cast to pointer from integer of different size"
...
The script generates code like:
pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80);
which causes the above mentioned warning. Add parenthesis around the
whole expression to fix it.
Signed-off-by: Tomas Carnecky <tom@dbservice.com >
2009-02-26 09:20:09 -08:00
Dave Airlie
e267a090ab
r200: port over cs emit changes from radeon
2009-02-27 03:05:42 +10:00
José Fonseca
34e719c9b3
scons: Don't build the DRI drivers in a seperate dir.
...
DRI drivers can be build side by side with other non-DRI drivers, therefore
there is no need to build gallium twice.
2009-02-26 13:45:47 +00:00
José Fonseca
af3ab2d9f3
scons: Use a cache for built files.
...
Like ccache, but works on all OSes.
2009-02-26 13:43:44 +00:00
Xiang, Haihao
68915fd6fa
i965: fix for RHW workaround
...
It is possible that an object whose vertices all are outside of a
view plane is passed to clip thread due to the RHW workaround. This
object should be rejected by clip thread. Fix bug #19879
2009-02-26 17:31:01 +08:00
Dave Airlie
2972d06526
radeon: fixup old packets emission for CS case
2009-02-26 18:26:22 +10:00
Eric Anholt
160c3617fc
intel: Disable creating DRI2 FBconfigs with depth size != color size.
...
While it's a nice idea to be able to allow clients to choose a smaller
(or bigger for 16bpp screens!) depth size, right now DRI2 hands back a buffer
with a size that matches the drawable, rather than being based off of the
visual. This led to problems in readback as parts of the driver disagreed
on what format the depth buffer was really in.
Fixes the remainder of bug #19447 .
2009-02-26 00:20:39 -08:00
Eric Anholt
2b34275a78
intel: Add span code for z24 without stencil.
...
It seems that in this case the Mesa code is handing us x8z24 values instead
of z24s8 values, so we need to not do the rotation. Fixes half of OGLconform
depthrange.c.
Bug #19447 .
2009-02-26 00:13:26 -08:00
Eric Anholt
43a4543946
intel: make template wrappers for the spans templates.
...
This is insanity, but so is copying the same blocks containing the actual
interesting code in the file three times each for the different tile formats.
2009-02-25 23:57:00 -08:00
Eric Anholt
119f34e2a5
intel: Fix up x8r8g8b8 renderbuffer format so that alpha=1 spans code happens.
...
I was lured into a false sense of security by the fact that the spans code was
already there, and a bunch of tests didn't catch the problem. oglconform's
mask.c did, though.
Bug #19970 .
2009-02-25 23:01:57 -08:00
Dave Airlie
6d7164705b
r100: fixup kms state emissions
2009-02-26 15:32:34 +10:00
Dave Airlie
6415e64cbc
radeon: avoid page flip code in DRI2
2009-02-26 15:32:34 +10:00
Dave Airlie
3ec7137a75
radeon: enable DRI2 for r100
2009-02-26 15:32:33 +10:00
Dave Airlie
925ea2d9a5
radeon: move CB/ZB state init into emit code
...
This removes the use of the sarea for this stuff so makes DRI2 easier
and emits the CB/ZB info in the correct place
2009-02-26 15:32:27 +10:00
Dan Nicholson
53b3734511
autoconf: Fixup EGL build
...
This gets the needed libraries pulled in for libEGL for autoconf.
2009-02-25 17:45:34 -08:00
Dave Airlie
158ede35d5
r300: fixup texture state emission for kms path
2009-02-26 11:09:32 +10:00
Dave Airlie
2c033f3893
r300: don't call page flip on DRI2
2009-02-26 11:09:16 +10:00
Dave Airlie
bc5f94c1e1
r300: don't flush VAP too often.
...
Flush the VAP the first time for each state atom we upload new
VAP data
2009-02-26 11:08:14 +10:00
Eric Anholt
d0415a5a01
i965: Rename CMD_CONST_BUFFER_STATE to the CS_URB_STATE used in the docs.
2009-02-25 16:17:44 -08:00
Alex Deucher
69f080cefc
R300: Add support for RS600 chips
2009-02-25 17:30:56 -05:00
Younes Manton
a0dc286b5f
nouveau: nv04-nv40 texture transfer.
2009-02-25 12:56:00 -05:00
Younes Manton
5726a5afa5
g3dvl: Update winsys stuff.
2009-02-25 12:56:00 -05:00
Brian Paul
f2a5c6b42c
egl: remove compiler flags from CFLAGS
...
The incoming CFLAGS already has -fPIC and -Wall. Don't want -g here either.
2009-02-25 08:45:08 -07:00
Brian Paul
c34c78b853
egl: use new EGL_LIB_DEPS to pass library dependencies to mklib when building libEGL
...
EGL_LIB_DEPS may need fine-tuning for some platforms. It's only defined
in configs/default ATM.
2009-02-25 08:41:13 -07:00
Brian Paul
501d6d49dd
egl: add comment/reminder to fix the CFLAGS in this Makefile
2009-02-25 07:58:17 -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
Benjamin Close
afe139f629
gallium: Fix build when exiting CFLAGS contains a path with different gl.h
...
If a path is in CFLAGS when building and that path contains gl.h
then the wrong gl.h is used when building. This can lead to very
confusing errors. The solution is rather than postpend the CFLAGS
we prepend the paths as expected allowing compilation to occur
as intended
Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com >
2009-02-25 07:55:27 -07:00
Benjamin Close
9c0dea10e9
egl: Use -dlopen rather than -dl which is non portable
...
Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com >
2009-02-25 07:54:02 -07:00
Benjamin Close
161307f178
egl: Allow compilation to succeed with FreeBSD
...
Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com >
2009-02-25 07:53:26 -07:00
Dave Airlie
199867bd45
r300: drop r300Flush for the generic one
2009-02-25 18:06:44 +10:00
Brian Paul
981b7c08ae
softpipe: minor code simplification for face/zslice offset calculation
2009-02-24 21:01:34 -07:00
Brian Paul
192b7f20eb
cell: overhaul cell teximage code
...
Updated to use the new pipe_transfer functions, etc.
Texturing is working again. Though there's some bugs in mipmap texturing
but I believe those predate the pipe_transfer changes.
2009-02-24 21:01:34 -07:00
Brian Paul
bd0370cd26
cell: don't need tex transfer for drawing surfaces
2009-02-24 21:01:34 -07:00
David S. Miller
32dc28ac7a
mesa: Build DRI by default on Linux/sparc
...
Signed-off-by: David S. Miller <davem@davemloft.net >
2009-02-24 20:06:05 -07:00
Jakob Bornecrantz
d7c6ffbc5f
intel: Adopt to the new drm_api.h
2009-02-25 02:00:29 +01:00
Jakob Bornecrantz
36348ff1da
i915: Enable winsys to get buffer from texture
2009-02-25 02:00:29 +01:00
Jakob Bornecrantz
25b32eb8d0
st/drm: Bring drm_api.h up to date with latest changes
2009-02-25 02:00:29 +01:00
Jakob Bornecrantz
f0d09bfc1c
i915: Fix some warnings
2009-02-25 02:00:29 +01:00
Jakob Bornecrantz
c92dc32dc2
i915: Clean up i915_winsys.h a bit
2009-02-25 02:00:29 +01:00
Brian Paul
bfdbbfb025
mesa: fix merge conflict (in comment)
2009-02-24 17:53:39 -07:00
Brian Paul
8e6337f582
mesa: added GLES 1/2 headers to tarball file list
2009-02-24 17:21:45 -07:00
Brian Paul
70bebf8863
mesa: add EGL headers to tarball list
2009-02-24 16:17:44 -07:00
Brian Paul
9dfc1b642e
mesa: add gallium and egl files to tarball list
2009-02-24 15:00:14 -07:00
Brian Paul
18d2745765
glsl: silence warning
2009-02-24 14:59:54 -07:00
Brian Paul
dd9742dc9f
mesa: use quotes for #include
2009-02-24 14:30:51 -07:00
Brian Paul
32ac8cb050
mesa: remove removed VMS files from Makefile
...
I'll help Jouk restore these someday if he's still maintaining VMS support...
2009-02-24 14:29:05 -07:00
Brian Paul
7fcf4c6d2b
mesa: s/sources/sources.mak/ in Makefile
2009-02-24 14:27:43 -07:00
José Fonseca
60e5fe6506
gallium: Allow to specify how much will be read / was written in buffer map/unmap.
...
This allows the pipe driver to do more efficient DMA upload/downloads, by
avoiding to read/write unneeded/unmodified data.
2009-02-24 12:29:09 +00:00
José Fonseca
693fac8ae2
gallium: Add pipe_buffer_write/read inlines.
...
Saves code, and will simplify future interface changes.
2009-02-24 11:30:25 +00:00
José Fonseca
c5dd8634c8
mesa: List new source file in SConscript.
2009-02-24 11:29:33 +00:00
José Fonseca
208dbc6832
pipebuffer: Remove unused var.
2009-02-24 11:22:24 +00:00
Dave Airlie
2ebf9b9521
r300: fix bo ref/unref, plugs DRI handle leaks
2009-02-24 12:04:49 +10:00
Brian Paul
00f0b05d5f
glsl: yet another swizzled expression fix
...
This fixes swizzled conditional expressions such "(b ? p : q).x"
2009-02-23 17:43:43 -07:00
Brian Paul
f24ec99190
gallium: include st_cb_viewport.h to silence warning
2009-02-23 15:07:31 -07:00
Brian Paul
d6edbfc04a
gallium: fix build breakage in st_cb_viewport.c
2009-02-23 15:07:11 -07:00
Brian Paul
d9881356a6
glsl: fix another swizzle-related bug
...
This fixes the case of "infinitely" nested swizzles such as EXPR.wzyx.yxwz.xxyz
This doesn't appear in typical shaders but with function inlining and the
compiler's internal use of swizzles it can happen.
New glean glsl1 test case added for this.
2009-02-23 14:05:34 -07:00
Alan Hourihane
01c0c01a6d
mesa: only call update_buffer when it's available
2009-02-23 20:29:56 +00:00
Alan Hourihane
6b72227270
gallium: add winsys interface for viewport changes to support DRI2
2009-02-23 20:28:55 +00:00
Alan Hourihane
65562453fb
glx: add support for a reallyFlush() function before swap occurs.
2009-02-23 20:28:11 +00:00
Brian Paul
4fc7cde770
mesa: include compiler.h, fixes cell build, remove Haiku special case
2009-02-23 13:02:56 -07:00
Robert Ellison
73658ff04f
i965: fix line stipple fallback for GL_LINE_STRIP primitives
...
When doing line stipple, the stipple count resets on each line segment,
unless the primitive is a GL_LINE_LOOP or a GL_LINE_STRIP.
The existing code correctly identifies the need for a software fallback
to handle conformant line stipple on GL_LINE_LOOP primitives, but
neglects to make the same assessment on GL_LINE_STRIP primitives.
This fixes it so they match.
2009-02-23 11:28:00 -07:00
José Fonseca
37f21fce3b
Merge commit 'origin/gallium-0.1'
...
Conflicts:
src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
src/gallium/auxiliary/util/u_tile.c
2009-02-23 17:21:36 +00:00
Tom Fogal
7399d56ec6
mesa: fix _glxapi_get_proc_address() for mangled names
2009-02-23 08:20:38 -07:00
Joel Bosveld
8344b85333
gallium: Install winsys/drm to DESTDIR rather than /
2009-02-23 08:19:14 -07:00
Tomas Wilhelmsson
41172c0430
mesa: fixes for building on Haiku
2009-02-23 08:11:29 -07:00
Corbin Simpson
d265706cd3
r300-gallium: Fix pasto and debug messages.
...
This could explain at least one kind of lockup. Yay?
2009-02-23 05:59:59 -08:00
Corbin Simpson
65b79383fb
r300-gallium: Cleanup some state emit, move vertex format state to r300_emit.
...
No need to explicitly update derived state, as it will be done automatically.
2009-02-23 05:59:58 -08:00
José Fonseca
67387bf33f
gallium: Define PIPE_PRIM_MAX.
2009-02-23 12:56:45 +00:00
Corbin Simpson
b003b2f6dd
r300-gallium: Fix a handful of compile warnings.
...
Some harmless, some very dangerous.
2009-02-23 04:37:58 -08:00
Corbin Simpson
f72e777911
r300-gallium: Decode passthrough shader for r300.
...
Looks pretty sane.
2009-02-23 04:37:58 -08:00
Corbin Simpson
763714d900
r300-gallium: Finish VAP/VF setup.
...
Messy, messy.
2009-02-23 04:37:58 -08:00
Corbin Simpson
d737010296
r300-gallium: Fix BEGIN_CS size.
2009-02-23 04:37:58 -08:00
José Fonseca
c7bbc9ad12
wgl: Enable the use of Win32 threads.
2009-02-23 11:52:59 +00:00
José Fonseca
1456af2f2d
mesa: Fix windows build.
2009-02-23 11:24:46 +00:00
Dave Airlie
c32a28d86e
r300: fixup old setTexOffset DRI1 extension
2009-02-23 15:41:30 +10:00
Dave Airlie
f4502f0f8c
radeon: add more debug info to the flush debug
2009-02-23 14:04:22 +10:00
Dave Airlie
018f5f92cc
r300: revert back autostate change on cacheflush emit
2009-02-23 14:04:22 +10:00
Dave Airlie
13ed7985b2
r300: use OUT_BATCH_REGVAL in a few more places
2009-02-23 14:04:20 +10:00
Dave Airlie
6ffd472b0e
r300: set u to 0 so debug logs are easier to read
2009-02-23 14:04:19 +10:00
Dave Airlie
8c23970479
radeon: stabilise r300 driver like the F10 mesa bufmgr
...
For some reason flushs caused by this CS needs flush hook,
caused the chip to lockup on r300 under compiz, whereas
the F10 driver was rock solid.
2009-02-23 14:04:18 +10:00
Dave Airlie
77161c5ff5
radeon: add some debugging for flush ioctls
2009-02-23 14:04:18 +10:00
Dave Airlie
d4bfe34cb9
radeon: make state atom print like old r300 code
2009-02-23 14:04:17 +10:00
Dave Airlie
b4a90c6213
radeon: fixup legacy bo/cs out of VRAM waiting.
...
This is similiar to the code from the F10 r300 bufmgr
2009-02-23 14:04:17 +10:00
Joakim Sindholt
ddc6ee316c
r300-gallium: Add pipe_format translators and apply them
2009-02-22 20:03:03 -08:00
Joakim Sindholt
4776ebc648
r300-gallium: Add all supported 2d texture formats
2009-02-22 20:03:02 -08:00
Joakim Sindholt
b11f1c35d5
r300-gallium: correct buffer stride calculation
2009-02-22 20:03:02 -08:00
Brian Paul
27a8432e35
mesa: remove unneeded #include
2009-02-22 16:29:30 -07:00
Brian Paul
1d5a68970f
mesa: #include, misc clean-ups
2009-02-22 16:19:29 -07:00
Brian Paul
c74992d840
mesa: remove unneeded #includes
2009-02-22 16:18:38 -07:00
Brian Paul
f2c023291a
mesa: move a bunch of compiler-related stuff into new compiler.h header
...
This trims down and cleans up imports.h and glheader.h quite a bit.
2009-02-22 15:43:29 -07:00
Brian Paul
d909dbcc43
mesa: remove unused ENABLE_TEXGENx, ENABLE_TEXMATx flags
2009-02-22 15:39:54 -07:00
Brian Paul
c7377e2d47
mesa: assorted clean-ups, var renaming, etc.
2009-02-22 15:39:54 -07:00
Brian Paul
901568d068
mesa: simplify texture combine state copying in _mesa_copy_texture_state()
...
Just copy the whole struct.
2009-02-22 15:39:54 -07:00
Brian Paul
0057f5b8cd
mesa: remove redundant assertions (same asserts in context.c)
2009-02-22 15:39:54 -07:00
Brian Paul
022e446c78
gallium: remove dependency on main/glheader.h in glxapi.c
...
Only needed it for the PUBLIC macro.
2009-02-22 15:37:57 -07:00
Ben Skeggs
e5e255a406
nv50: delay uploads until transfer object is destroyed
...
It's possible a state tracker will map/unmap a transfer object many times.
Delaying upload until the object is destroyed will prevent unnecessary
uploads to the GPU.
Also fixing a typo here, was unmapping the wrong buffer on transfer_unmap!
2009-02-22 15:47:15 +10:00
Dave Airlie
487a55af78
texmem: fix typo from brianp's changes.
...
Reported by cjb via tinderbox on irc
2009-02-22 10:37:54 +10:00
Brian Paul
4447fddc82
glapi: update find_entry() for mangled names
2009-02-21 16:07:52 -07:00
Tom Fogal
da46db60a0
mesa: added extern qualifier
2009-02-21 16:07:04 -07:00
Brian Paul
fe0ccf323d
mesa: regenerated gl_mange.h file
2009-02-21 16:01:54 -07:00
Brian Paul
d059d03034
mesa: use enums for TEXTURE_x_INDEX values
...
Plus, put them in the order of highest to lowest priority to simplify
the texture_override() loop.
2009-02-21 15:15:20 -07:00
Brian Paul
9818734e01
mesa: use an array for current texture objects
...
Use loops to consolidate lots of texture object code.
2009-02-21 14:53:25 -07:00
Brian Paul
4d24b639d1
mesa: use an array for default texture objects
...
Replace Default1D/2D/3D/Cube/etc with DefaultTex[TEXTURE_x_INDEX].
The same should be done with the Current1D/2D/3D/etc pointers...
2009-02-21 13:59:29 -07:00
Brian Paul
9705cff203
mesa: re-org texgen state
...
New gl_texgen struct allows quite a bit of code reduction.
2009-02-21 13:23:04 -07:00
Kristian Høgsberg
5b354d39d4
intel: Fix intelSetTexBuffer miptree leak.
...
The intelImage also holds a reference to the miptree, so unref that as well.
2009-02-21 14:12:53 -05:00
Eric Anholt
40dd024be6
intel: tell libdrm whether we want a cpu-ready or gpu-ready BO for regions.
...
This lets us avoid allocing new buffers for renderbuffers, finalized miptrees,
and PBO-uploaded textures when there's an unreferenced but still active one
cached, while also avoiding CPU waits for batchbuffers and CPU-uploaded
textures. The size of BOs allocated for a desktop running current GL
cairogears on i915 is cut in half with this.
Note that this means we require libdrm 2.4.5.
2009-02-21 10:53:41 -08:00
Eric Anholt
078e8a61b2
i965: Fix render target read domains.
...
We were asking for something illegal (write_domain != 0 && read_domains !=
write_domain) because at the time of writing the region surfaces were used
for texturing occasionally as well, and we weren't really clear on the model
GEM was going to use.
This reliably triggered a kernel bug with domain handling, resulting in
oglconform mustpass.c failure. Of course, it only became visible after
01bc4d441f cleaned up some gratuitous flushing.
2009-02-21 10:53:05 -08:00
Jakob Bornecrantz
bd2f921d78
trivial: Add tri-viewport
2009-02-21 12:02:19 +01:00
Jakob Bornecrantz
b3bd315e57
trivial: Fix indentation in tri
2009-02-21 12:02:18 +01:00
José Fonseca
0be216c526
pipebuffer: Allow asymmetric guard sizes for under/overflow detection.
2009-02-24 15:49:21 +00:00
José Fonseca
8f3c1cddaa
util: Don't use 0-sized arrays.
...
Not supported by MSVC.
2009-02-24 15:44:09 +00:00
Brian Paul
d6677fd9bc
softpipe: minor code movement in softpipe_get_tex_transfer()
2009-02-24 08:33:50 -07:00
Brian Paul
66ddf1a00f
cell: added null ptr check in xm_flush_frontbuffer()
2009-02-24 08:32:50 -07:00
Keith Whitwell
e6479c6250
demos: add some fflushes for windows
2009-02-24 12:14:50 +00:00
Keith Whitwell
b1ac00dc8d
st/wgl: silence some debug
2009-02-24 12:14:50 +00:00
Keith Whitwell
93d101f0c3
mesa/st: support l8 as well as i8 in bitmap code
...
Also don't send the partial program fragment down to hardware -- the
program will never be used in that form.
2009-02-24 12:14:50 +00:00
Brian Paul
776971218e
gallium: use the TGSI_TEXTURE_SHADOW1D/2D/RECT texture types for TEX instructions
...
These texture types were defined but never put to use.
For the time being though, the Mesa->TGSI translater isn't emitting these
targets. See the XXX comment in map_texture_target().
2009-02-20 14:06:25 -07:00
Brian Paul
e0d9073081
i965: use the new prog_instruction::TexShadow field
...
GLSL shadow() sampler calls are properly propogated down to the driver now.
The glean glsl1 shadow() tests work (except for the alpha channel).
2009-02-20 13:50:27 -07:00
Brian Paul
773e9d4765
i965: check depth_mode in translate_tex_format() for MESA_FORMAT_S8_Z24
...
Note that I24X8 vs. A24X8 vs. L24X8 doesn't seem to make any difference
for texture/shadow compare, however.
2009-02-20 13:48:44 -07:00
Brian Paul
0ea95ae742
glsl: use new IR opcodes for TEX instructions with shadow comparison
...
Such TEX instructions will have the TexShadow flag set.
The gl_program::ShadowSamplers field is now set in the linker. We missed
that before.
2009-02-20 13:44:43 -07:00
Brian Paul
44e018c09e
mesa: add TexShadow field to prog_instruction
...
If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if
the instruction is a texture fetch with shadow compare.
2009-02-20 13:42:08 -07:00
Brian Paul
a79186e29e
i965: separate emit_op() and emit_tex_op() functions
2009-02-20 12:23:25 -07:00
Brian Paul
e3cc8e8244
mesa: freshen-up comments, move some fields in prog_instruction
2009-02-20 11:44:38 -07:00
Brian Paul
55d33e1fa7
i965: update comment, use const qualifier
2009-02-20 11:44:38 -07:00
Brian Paul
f5674b566e
i965: var renaming, clean-up
2009-02-20 11:44:38 -07:00
Brian Paul
fc320d4641
i965: added comment
2009-02-20 11:44:38 -07:00
Brian Paul
da2b661ee4
intel: fix datatype typo, s/GLboolean/GLuint/
...
Fixes mysterious failures in glean glsl1 test.
2009-02-20 11:44:38 -07:00
Brian Paul
d8de0a2f3a
i965: additional debug output
2009-02-20 11:44:38 -07:00
Brian Paul
c0b59420ee
glsl: rename GLSL texture assembly instructions to be more legible
2009-02-20 11:44:17 -07:00
Brian Paul
ad2cfa4199
glsl: fix vec4_texp_rect IR code (need projective version)
2009-02-20 11:42:28 -07:00
José Fonseca
60e35ebf14
python: More efficient blits from surfaces.
...
C code instead of interpreted python code.
2009-02-20 16:50:02 +00:00
José Fonseca
7738855988
util: Use a checkboard pattern instead of asserting for unknown formats.
...
Useful to replay traces which use DXTC textures...
2009-02-20 16:48:45 +00:00
José Fonseca
059d7f3103
python/interpreter: Don't do unnecessary updates.
2009-02-20 15:23:33 +00:00
José Fonseca
e92f3310fa
python/retrace: Verbosity level.
2009-02-20 15:14:15 +00:00
José Fonseca
204526a6d2
python/retrace: Cope with python 2.4.x
2009-02-20 15:02:19 +00:00
Keith Whitwell
02ab1eaed7
util/debug: need to fflush(stderr) on windows
...
Hard to believe... but true.
2009-02-20 14:27:23 +00:00
José Fonseca
5b41e30f26
util: Also output messages to stderr on windows.
...
When there is a console attached, and no debugger attached.
2009-02-20 14:14:19 +00:00
José Fonseca
7887a3e42b
python: Pass a zero offset to util_draw_vertex_buffer.
2009-02-20 13:00:13 +00:00
José Fonseca
a5c2570dc5
wgl: Prevent null pointer reference.
2009-02-20 11:54:18 +00:00
José Fonseca
ee4e4a6b96
util: Stack backtracing facilities.
...
Not much useful until we have symbol lookup.
2009-02-20 11:54:18 +00:00
Jakob Bornecrantz
d67bd60ecf
gallium: s/GALLIUM_DRIVER_DIRS/GALLIUM_DRIVERS_DIRS/
2009-02-20 11:25:55 +00:00
Jakob Bornecrantz
fffadc219f
gallium: Improve recursive makefiles
2009-02-20 11:25:55 +00:00
Jakob Bornecrantz
3eebd24cb6
gallium: Improve winsys dri template Makefile
...
LIBNAME_EGL had to be removed since if you didn't
set it (nobody set it anyways) make would get it
confused it with the $(TOP)/lib/gallium target.
2009-02-20 11:23:32 +00:00
Jakob Bornecrantz
5089e5c052
intel: Use new makefile template for drm gem
2009-02-20 10:22:11 +00:00
Jakob Bornecrantz
2734b8079d
nouveau: Use new makefile template for drm common
2009-02-20 10:22:11 +00: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
Ben Skeggs
8cf997b7c8
nouveau: reenable all the non-nv50 pipe drivers
...
They still won't build yet, but anyway..
2009-02-20 09:47:56 +10:00
Ben Skeggs
b85c81760c
nv50: remove unused variable
2009-02-20 09:43:25 +10:00
Ben Skeggs
5ea8068f24
nv50: fix occlusion queries
...
Left behind from some gallium changes a while back..
2009-02-20 09:43:24 +10:00
Ben Skeggs
63a3a3762c
nv50: rework for texture_transfer changes
2009-02-20 09:43:24 +10:00
Jakob Bornecrantz
9c9fcc83c0
gallium: Renable pipe drivers disabled during vbuf changes
...
i965simple is not enabled because it is still broken.
2009-02-19 23:16:57 +01:00
Jakob Bornecrantz
4e37f10806
trival: Make the last of progs show the name
2009-02-19 22:50:18 +01:00
Brian Paul
2b32c7dff5
mesa: support GL_EXT_stencil_two_side in gallium/mesa state tracker
...
Since Ian's patch of a few weeks ago, we can enable all three variations
of two-sided stencil. Update the state tracker to handle the extra back-
face state and turn on the EXT.
Note: there's a new Glean test for two-sided stencil now...
2009-02-19 14:45:27 -07:00
Brian Paul
a304cc6cca
mesa: fix/update/restore comments related to two-sided stencil
2009-02-19 14:45:27 -07:00
Brian Paul
2a968113a9
mesa: initialize ctx->Stencil._BackFace = 1
...
Back-face stencil operations didn't work correctly because this value was
zero. It needs to be 1 or 2. The only place it's set otherwise is in
glEnable/Disable(GL_STENCIL_TEST_TWO_SIDE_EXT).
2009-02-19 14:45:26 -07:00
José Fonseca
43b31fc6fc
util: Support PIPE_FORMAT_Z32_FLOAT in pipe_tile_raw_to_rgba
2009-02-19 12:56:56 +00:00
José Fonseca
7c12e1aa53
pipebuffer: Dump debugging info for fenced buffer list.
2009-02-18 15:12:16 +00:00
José Fonseca
46728037a0
scons: Produce map files for debug builds too.
2009-02-18 15:05:23 +00:00
José Fonseca
c7431552c0
pipebuffer: Don't retry to alloc memory block on mm.
...
It will give the same result 2nd time too, as fencing is done at a
higher level.
2009-02-18 10:25:04 +00:00
Dave Airlie
da17b36412
r300: make DRI2 not crash on compiz start
2009-02-18 10:47:17 +10:00
Dave Airlie
e9d6beaab4
radeon: move device param id check ifndef
2009-02-18 10:47:17 +10:00
Keith Whitwell
8ef377d76b
draw: Reuse xmm registers.
2009-02-17 21:45:54 +00:00
Dave Airlie
745c787338
radeon: initialise swapped objects pointer
2009-02-17 16:01:16 +10:00
Dave Airlie
9c040745fe
radeon: legacy texMem interface fixups.
...
The texmem.c interface is wildly messed up it really wants to own the objects
so let it, pain in the ass but this code should work a lot better now
2009-02-17 14:48:49 +10:00
Dave Airlie
7ce6af25e5
Revert "dri/radeon: export a function to cleanup a texture object."
...
This reverts commit 5325f86240 .
2009-02-17 14:46:12 +10:00
Dave Airlie
2ba4fc3d60
radeon/r200: drop legacy texture heap code
2009-02-17 14:00:24 +10:00
Dave Airlie
48e7b940eb
radeon/r200: fixup texturing aging calls
2009-02-17 13:39:38 +10:00
Dave Airlie
7c7ff659ce
radeon: fixup destroy texture object exit path and update LRU
...
the destroy path was doing bad things with structure names, make it do less
bad things, use container_of instead
2009-02-17 11:17:22 +10:00
Dave Airlie
43c71a2d40
radeon: remove leftover debug
2009-02-17 10:42:51 +10:00
Dave Airlie
62d504d818
radeon/r200: drop dirty state from texture object + pp_txoffset
...
this is just more code cleanup for old dead code
2009-02-17 10:41:21 +10:00
Dave Airlie
a365f9b78b
r200: align with r100 code
2009-02-17 10:28:43 +10:00
Dave Airlie
646325a5ef
radeon: fix not emitting texture state correctly
...
this is whole texture dirty bit is probably not needed with the current
codebase, need to revisit
2009-02-17 10:27:45 +10:00
Dave Airlie
0a8cba9a65
radeon: steal miptree optimisation from intel codebase
...
This replaces a miptree if it won't distrub anything else.
2009-02-17 10:26:58 +10:00
Dave Airlie
7a1dbcabf3
radeon: move YUV on first texunit check after hw state is setup
2009-02-17 10:26:33 +10:00
Dave Airlie
5325f86240
dri/radeon: export a function to cleanup a texture object.
...
The radeon legacy code want to cleanup not free the texture obj,
so export a function to do that and wrap it.
2009-02-17 10:25:34 +10:00
Dave Airlie
ecf0a3eac1
radeon: fix texcompress2 test.
...
this makes compressed subimages work properly.
2009-02-16 09:51:08 +10:00
Dave Airlie
f069bc4a8e
radeon: fix compressed tex subimage unpack parameter
2009-02-16 17:16:28 +10:00
Dave Airlie
b0e8ac8fd2
radeon: add cflags to decide whether to link libdrm_radeon or not.
...
You don't need libdrm_radeon for the legacy driver to build,
only for the experimental mm/cs paths.
2009-02-15 17:03:47 +10:00
Nicolai Haehnle
7d19d27684
radeon-common: Fix crash in glGetTexImage
...
Since texture images are now stored in miptrees, we cannot usually
access them directly via the Data pointer.
So we wrap Mesa's implementation by map/unmap calls.
This crash was triggered by Sauerbraten, Piglit now contains a
regression test.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-02-14 21:46:44 +01:00
Nicolai Haehnle
2d9471b281
r300: Fix crash in cubemap tree creation
...
The mip tree creation would crash if the first baselevel image to be uploaded
was not the positive-x image.
Found with Sauerbraten, also added a regression test to Piglit.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-02-14 20:47:08 +01:00
Jakob Bornecrantz
480bb4c217
draw: Fix segfault if rast is null
2009-02-14 17:49:46 +01:00
Michel Dänzer
0794f1d6df
gallium/winsys/xlib: Fix build with USE_XSHM undefined.
2009-02-19 19:52:59 +01:00
José Fonseca
5246c389e5
wgl: debug_printf in the main entry/exit points
2009-02-19 13:29:05 +00:00
José Fonseca
85b0c171c0
mesa: Free the util shaders with the gallium's FREE.
2009-02-19 13:29:04 +00:00
José Fonseca
b9c5e41688
wgl: Call pipe_screen::destroy on exit.
2009-02-19 13:29:04 +00:00
Alan Hourihane
526e845145
egl: glx updates for FBconfigs
2009-02-19 13:09:02 +00:00
Alan Hourihane
b57c9fd83f
egl: if a surface type isn't defined let's default to EGL_WINDOW_BIT
2009-02-19 13:09:02 +00:00
Nicolai Haehnle
9a26164f35
r300: Redirect constant TEX coordinates
...
R3xx/R5xx fragment program texture constants must come from a hardware
register instead of the constant file, so we redirect if necessary during
the native rewrite phase.
The symptoms of this bug started appearing when the Mesa fixed function
texenvprogram code started using STATE_CURRENT_ATTRIB constants for
texture coordinates when the corresponding attributes were constant across
all vertices.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-02-14 17:09:54 +01:00
Michel Dänzer
5f3ab230ea
r300: Fix R300_CMD_SCRATCH on big endian.
2009-02-14 20:40:48 +10:00
Dave Airlie
b1b7bc66a4
radeon: remove unused radeon_compat.c
2009-02-14 20:34:20 +10:00
Dave Airlie
f8c2beccd4
r200: fixup cube emit debug
2009-02-14 20:13:55 +10:00
Dave Airlie
fd81835dc7
r200: fix another cmdbuf sizing issue
2009-02-14 20:13:55 +10:00
Jakob Bornecrantz
ec2e4e1fed
trivial: Add quadstrip-clip
2009-02-14 09:42:28 +01:00
Alan Hourihane
44054aca36
egl: error checking
2009-02-19 11:24:53 +00:00
José Fonseca
65fde5be8b
wgl: Use a separate .DEF for MinGW
...
gnu linker fails to resolve the @n symbols, unless:
- they are listed verbatim in the .def
- they are already linked.
And mingw's .def parser is slightly incompatible with MSVC in respect with
underscores. Will try to work with upstream to fix this, but for now there
is no option other to use seperate .def for mingw.
2009-02-19 10:59:13 +00:00
José Fonseca
d32ae764e9
wgl: Share more code between icd and standalone driver.
2009-02-19 10:59:13 +00:00
José Fonseca
d98bc1e324
gdi: Update for texture/surface interface changes.
2009-02-19 10:59:13 +00:00
José Fonseca
f9ccdbea67
util: Use right include.
2009-02-19 10:59:12 +00:00
Jakob Bornecrantz
96c773c77b
progs: Make fp-tri use glew and add scons target
2009-02-14 07:04:01 +01:00
Brian Paul
0a323fe09b
cell: patch up cell_texture.c so it compiles
...
Start adding some new pipe_transfer code.
Texturing is totally broken at this point but non-texture programs
seem to run OK.
2009-02-18 21:50:20 -07:00
Brian Paul
0d4d700fe1
cell: updates for new pipe_transfer changes
...
Update framebuffer color/z/stencil mapping/unmapping.
2009-02-18 21:46:12 -07:00
Brian Paul
7475d80bf6
cell: update vbuf code to catch up to recent changes
2009-02-18 21:38:53 -07:00
Brian Paul
829c67fe80
cell: remove unused var
2009-02-18 21:38:17 -07:00
Brian Paul
15a3e4ffe2
cell: start adding new cell_transfer types/code
2009-02-18 21:36:29 -07:00
Brian Paul
734dc502b8
cell: remove old surface_map code
2009-02-18 21:35:56 -07:00
Brian Paul
5761c64823
mesa: convert VERT_RESULT_* from #defines to enum, like the others
2009-02-18 17:50:24 -07:00
Brian Paul
c4ffbf009e
glsl: asst improvements, clean-ups in set_program_uniform()
...
Move the is_boolean/integer_type() calls out of the loops.
Move the is_sampler_type() function near the bool/int functions.
Add a bunch of comments.
2009-02-18 17:48:13 -07:00
Brian Paul
b9d8f717d2
glsl: fix inequality in set_program_uniform()
...
We were off by one when checking for too many uniform values.
2009-02-18 17:48:13 -07:00
Michel Dänzer
897331ed15
gallium/winsys/egl_xlib: Fix build after introduction of struct pipe_transfer.
2009-02-18 23:44:19 +01:00
Brian Paul
66204969a0
mesa: bump gl.h version comment to 7.7 (bug 20170)
2009-02-18 15:38:31 -07:00
Joakim Sindholt
310ea0354c
r300-gallium: implement simple pipe_transfer Basically make the driver compile and behave like it did before the gallium-texture-transfer merge
2009-02-18 23:23:30 +01:00
Brian Paul
dac19f17f3
glsl: fix link failure for variable-indexed varying output arrays
...
If the vertex shader writes to a varying array with a variable index,
mark all the elements of that array as being written.
For example, if the vertex shader does:
for (i = 0; i < 4; i++)
gl_TexCoord[i] = expr;
Mark all texcoord outputs as being written, not just the first.
Linking will fail if a fragment shader tries to read an input that's not
written by the vertex shader. Before this fix, this linker test could fail.
2009-02-18 14:28:44 -07:00
Nicolai Haehnle
be3813d58a
swrast: Set vp_override flag during DrawPixels
...
Obviously, the color of fragments produced by DrawPixels is not constant,
even if the current vertex array / vertex program state indicates that the
color for normal rendering will be constant. Therefore, we need to override
certain optimisations that have been added to texenvprogram.c
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-02-18 21:52:51 +01:00
Brian Paul
621c999d82
mesa: improved error msg
2009-02-18 13:28:12 -07:00
Brian Paul
5b2f8dc013
mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)
...
Old limit was 256. Note that no arrays are declared to this size.
The only place we have to be careful about raising this limit is the
prog_src/dst_register Index bitfields. These have been bumped up too.
Added assertions to check we don't exceed the bitfield in the future too.
2009-02-18 13:15:13 -07:00
Brian Paul
212f41b80f
glsl: fix a swizzle-related regression
...
This new issue was exposed by commit 6eabfc27f1
2009-02-18 13:15:13 -07:00
Keith Whitwell
defd52f6c7
progs/trivial: Label program windows with actual program name
...
Each of these programs previously called itself "First Tri" which was a
little confusing. Could have left one as "First Tri", but the trouble
then is that people would still clone that file & we'd end up with
another thousand first tri apps...
2009-02-18 18:22:23 +00:00
Jakob Bornecrantz
056f847e96
gallium: Also disable i965simple for scons
...
Please read previous commit for more info.
2009-02-18 17:15:31 +00:00
Jakob Bornecrantz
11eb127e47
gallium: Disable i965simple pipe driver after it was broken
...
It is only the i965simple pipe driver that was broken
in the gallium-texture-transfere merge that is being
disabled, mothing more nothing less.
FYI, there never where working i965 hardware support
in gallium anyways.
2009-02-18 17:15:31 +00:00
Michel Dänzer
c738edcc68
gallium: Fix up trace driver for introduction of struct pipe_transfer.
2009-02-18 18:13:44 +01:00
Michel Dänzer
aba88b7ed7
gallium: Add pipe_transfer_reference().
2009-02-18 18:12:31 +01:00
Michel Dänzer
3bd7c5ceff
Merge branch 'gallium-texture-transfer'
...
Conflicts:
src/gallium/drivers/softpipe/sp_tile_cache.c
2009-02-18 16:43:02 +01:00
Keith Whitwell
76d8951fd3
Merge commit 'origin/gallium-0.1'
...
Conflicts:
src/gallium/auxiliary/draw/draw_vs_aos.c
2009-02-18 15:14:39 +00:00
Corbin Simpson
922000d38a
r300-gallium: Factor out common functionality in vbuf emit.
2009-02-18 06:40:38 -08:00
Michel Dänzer
b89aa1d87a
i915simple: Minimal fixup for introduction of struct pipe_transfer.
2009-02-18 13:14:02 +01:00
Keith Whitwell
3da38db594
gallium: fix merge
...
It looks like I resolved the merge conflicts but did not save my emacs
buffers before committing...
2009-02-16 20:19:40 +00:00
Keith Whitwell
59d54334c9
Merge branch 'master' into gallium-texture-transfer
...
Conflicts:
src/mesa/state_tracker/st_cb_accum.c
src/mesa/state_tracker/st_cb_drawpixels.c
2009-02-16 19:50:48 +00:00
Brian Paul
c5c383596d
mesa: remove old comments
...
Note: the default value for EmitCondCodes is FALSE. This means the GLSL
compiler will emit code like this:
SEQ TEMP[0].x, A, B;
IF TEMP[0].x;
...
ENDIF
But if EmitCondCodes is TRUE, condition codes will be used instead:
SEQ.C TEMP[0].x, A, B;
IF (NE.xxxx);
...
ENDIF
2009-02-16 12:04:16 -07:00
Brian Paul
a9e753c84c
i965: tell GLSL compiler to emit code using condition codes
...
The default for EmitCondCodes got flipped when gallium-0.2 was merged.
This fixes GLSL if/else/endif regressions.
Drivers that use GLSL should always explicitly set the flag to be safe.
2009-02-16 12:04:16 -07:00
Patrice Mandin
0f4a91b509
nouveau: oops :-)
2009-02-16 18:44:17 +01:00
Dan Nicholson
252671f6eb
autoconf: Always enable glew
...
Maybe this should turn into an option (--disable-glew), but for now just
enable glew all the time.
2009-02-16 09:28:35 -08:00
Brian Paul
9d49802b7a
glsl: silence some uninit var warnings
2009-02-16 08:33:03 -07:00
Brian Paul
c51938afe1
cell: use some SPU intrinsics to get slightly better code in eval_inputs()
...
Suggested by Jonathan Adamczewski. There may be more places to do this...
2009-02-16 08:33:03 -07:00
Corbin Simpson
ffbe28d25d
r300-gallium: Add verbosity level to debugging.
...
Makes it a bit more manageable to read through the console logs.
2009-02-16 04:12:42 -08:00
Corbin Simpson
f211da4c67
r300-gallium: Fix BEGIN_CS and END_CS counting and mismatch.
2009-02-16 04:12:42 -08:00
Corbin Simpson
1bb2fb498e
r300-gallium: Set up draw rasterizer.
2009-02-16 04:12:41 -08:00
Alan Hourihane
cfae542d1f
demos: fix glxpixmap and call glXWaitGL before calling XCopyArea.
2009-02-16 11:56:21 +00:00
Alan Hourihane
63b51b5cf1
dri2: support glXWaitX & glXWaitGL by using fake front buffer.
2009-02-16 11:47:05 +00:00
Corbin Simpson
18f20b70b1
r300-gallium: Ooops, forgot to apply this stash.
...
"git stash": The cause of, and solution to, all my problems.
2009-02-16 03:16:59 -08:00
Corbin Simpson
b16d439989
r300-gallium: Include-guard r300_emit.h
2009-02-16 03:16:59 -08:00
Corbin Simpson
1b77138a1e
r300-gallium: Add draw_arrays and friends.
...
This is the last bit of Gallium-side plumbing for drawing things.
From this point on, the only missing parts should be in r3xx-specific
code areas...
2009-02-16 03:16:59 -08:00
Corbin Simpson
82722a75c5
r300-gallium: Add SC_CLIP_RULE to clear.
...
This is a register that is in r300_demo but not r300_surface, so adding it in
to see if it helps.
2009-02-16 03:16:59 -08:00
Brian Paul
9576ddd97d
cell: minor Makefile clean-up
2009-02-15 14:03:25 -07:00
Brian Paul
37c4f7eed2
cell: new/tighter code for computing fragment program inputs
2009-02-15 14:03:24 -07:00
Brian Paul
96b19195ec
cell: combine eval_z(), eval_w() functions
2009-02-15 14:03:24 -07:00
Corbin Simpson
484858ae48
r300-gallium: Fix scissors.
...
Don't use SCISSORS_OFFSET since we're DRI2,
and don't forget to set scissors in clear.
2009-02-15 05:05:59 -08:00
Corbin Simpson
4e309b5d64
r300-gallium: Grab bag of goodies.
...
Some fixes from glisse, moar swtcl emit setup, cleanup a bunch of regs,
properly do clear flush, and BEGIN_CS count fixes.
2009-02-15 05:05:59 -08:00
Corbin Simpson
39d0ac4826
r300-gallium: Clean up some clear registers.
2009-02-15 05:05:59 -08:00
Corbin Simpson
f176c94e49
r300-gallium: Use fui instead of a roll-my-own.
...
Man, util/u_math just gets better by the day.
2009-02-15 05:05:58 -08:00
Nicolai Haehnle
8520b15018
r300: Redirect constant TEX coordinates
...
R3xx/R5xx fragment program texture constants must come from a hardware
register instead of the constant file, so we redirect if necessary during
the native rewrite phase.
The symptoms of this bug started appearing when the Mesa fixed function
texenvprogram code started using STATE_CURRENT_ATTRIB constants for
texture coordinates when the corresponding attributes were constant across
all vertices.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com >
2009-02-14 17:36:04 +01:00
Corbin Simpson
76142d2b8b
radeon-gallium: Clean out extensions explicitly enabled by Mesa.
...
This cleans up some of the cruft from the old DRI setup, and
it turns out that only the GLSL extensions are still off if we
let st_extensions.c handle the setup instead.
2009-02-14 02:51:02 -08:00
Corbin Simpson
5352ec3b87
r300-gallium: Update r300_screen comments and add a few formats.
2009-02-14 02:24:30 -08:00
Corbin Simpson
9a20ef0a52
r300-gallium: Enable all four colorbuffer render targets.
...
As far as I can tell all the state emission necessary has been set up.
Well, except for the fragment shader, but c'mon, gimme a break. :3
2009-02-14 02:07:29 -08:00
Corbin Simpson
1c533bdeb6
r300-gallium: Add Z/stencil buffer format emit.
...
Also set BEGIN_CS correctly.
2009-02-14 02:06:17 -08:00
Corbin Simpson
b45e5e2a12
r300-gallium: Emit Z/stencil buffer offset.
2009-02-14 01:55:38 -08:00
Corbin Simpson
e511110b71
r300-gallium: Add derived state for vertex formats.
...
Next up: The evil RS block.
2009-02-13 23:22:39 -08:00
Dave Airlie
f3a1f321cf
radeon: check for valid bo in release arrays
2009-02-14 12:05:36 +10:00
Dave Airlie
fcc7a691dc
radeon: remove old cube code
2009-02-14 12:05:36 +10:00
Brian Paul
c51c822ee0
i965: rewrite the code for handling shader subroutine calls
...
Previously, the prog_instruction::Data field was used to map original Mesa
instructions to brw instructions in order to resolve subroutine calls. This
was a rather tangled mess. Plus it's an obstacle to implementing dynamic
allocation/growing of the instruction buffer (it's still a fixed size).
Mesa's GLSL compiler emits a label for each subroutine and CAL instruction.
Now we use those labels to patch the subroutine calls after code generation
has been done. We just keep a list of all CAL instructions that needs patching
and a list of all subroutine labels. It's a simple matter to resolve them.
This also consolidates some redundant post-emit code between brw_vs_emit.c and
brw_wm_glsl.c and removes some loops that cleared the prog_instruction::Data
fields at the end.
Plus, a bunch of new comments.
2009-02-13 17:18:36 -07:00
Brian Paul
74b6d55864
i965: add missing break for OPCODE_RET case
...
This doesn't effect correctness, but we were emitting an extraneous ADD.
2009-02-13 17:18:36 -07:00
Brian Paul
97937e0ac8
i965: the return value of translate_insn() is never used. Make it void.
2009-02-13 17:18:36 -07:00
Brian Paul
2f2082bf16
i965: minor clean-ups
2009-02-13 17:18:36 -07:00
Brian Paul
2f78d4a2cd
i965: code clean-ups, comments, and minor refactoring
2009-02-13 17:18:36 -07:00
Brian Paul
7cffcaaba1
i965: updated comments
2009-02-13 17:18:35 -07:00
Brian Paul
643d940138
intel: turn on GL_ARB_shading_language_120
...
It's done in the Mesa GLSL compiler. The only part of it that might
matter in drivers is the centroid sampling option for MSAA.
2009-02-13 17:18:35 -07:00
Brian Paul
11b75eafc7
i965: more reformatting/clean-up
2009-02-13 17:18:35 -07:00
Brian Paul
1a693e90b5
i965: s/__inline/INLINE/
2009-02-13 17:18:35 -07:00
Brian Paul
984c9636ed
i965: formatting and indentation fixes
2009-02-13 17:18:35 -07:00
Brian Paul
14dc493733
i965: fix inconsistant indentation in brw_wm.c
2009-02-13 17:18:35 -07:00
Robert Ellison
88b702e8c4
i965: Eric Anholt's patch for bumping up texture sizes
...
I'm committing this because it fixes a conform failure; the failure occurs
on the TextureProxy test, where the test attempts to create proxy textures
at every level, but fails at the last level (border == 1, width == 1,
height == 1) because it's beyond MAX_TEXTURE_LEVELS.
Eric's original comment was:
idr said that in his review swrast was ready for it, and the 965 driver is
advertising it already though it has been resulting in many crashes due to
arrays using these defines not being big enough.
2009-02-13 15:19:04 -07:00
Jakob Bornecrantz
b6779056a1
trivial: Make tri-fog a bit more interesting to look at
2009-02-13 23:03:57 +01:00
Keith Whitwell
89e2b9c6c2
Merge commit 'origin/draw-vbuf-interface'
2009-02-18 12:54:26 +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
José Fonseca
06cd416d7c
util: (Re)enable memory debugging for all windows platforms.
2009-02-18 11:17:06 +00:00
José Fonseca
673d01eda9
wgl: Report memory leaks.
2009-02-18 11:17:06 +00:00
Keith Whitwell
c706ea4f45
draw: Reuse xmm registers.
2009-02-18 10:08:19 +00:00
Corbin Simpson
c613e366a9
r300-gallium: Properly init shader state.
2009-02-17 21:34:12 -08:00
Corbin Simpson
d25304a2f7
r300-gallium: Consolidate state updates.
2009-02-17 21:33:59 -08:00
Brian Paul
9f731c8962
mesa: add some debug code to help diagnose incomplete FBO attachments (disabled)
2009-02-17 16:47:54 -07:00
Brian Paul
be8dd01678
glsl: fix mistake in a comment
2009-02-17 16:31:59 -07:00
Brian Paul
f59719c6c7
mesa: turn on reporting of GLSL version 1.20
...
The new array features, precision/invariant/centroid qualifiers, etc. were
done a while back. The glGetString(GL_SHADING_LANGUAGE_VERSION) query returns
"1.20" now (for drivers that support it anyway).
2009-02-17 16:17:13 -07:00
Brian Paul
6eabfc27f1
glsl: fix an array indexing bug
...
This fixes a bug found with swizzled array indexes such as in "array[index.z]"
where "index" is an ivec4.
2009-02-17 16:17:13 -07:00
Brian Paul
edd8cb8c87
glsl: added --params option to stand-alone GLSL compiler
...
Prints program parameter info
2009-02-17 16:17:13 -07:00
Brian Paul
f88a901598
mesa: when printing/dumping instruction, include relative addressing info
...
Not all cases were handled before.
2009-02-17 16:17:13 -07:00
Eric Anholt
fd51cf1531
intel: Fix tri clear to do FBO color attachments as well.
...
This is a 2% win in fbo_firecube, and would avoid a sw fallback for
masked clears.
2009-02-17 11:30:48 -08:00
Eric Anholt
c06f4e2a37
i965: Fix fallback on stencil drawing to fbo when the visual lacks stencil.
...
Noticed this with the fbotexture demo.
2009-02-17 11:30:09 -08:00
Eric Anholt
60953059ea
intel: Clean up several 965 memory leaks on context destroy.
2009-02-17 10:58:32 -08:00
Alan Hourihane
baef7c5474
mesa: remove old comment as it's fixed elsewhere now.
2009-02-17 09:56:33 +00:00
Brian Paul
07855a1d76
softpipe: some improvements to texture tile cache
...
Use a somewhat better function in tex_cache_pos() to get better caching.
Increase number of cache entries to 50.
Also fix a texture invalidation bug. If texture is marked as modified,
invalidate all texture tiles.
2009-02-16 18:53:45 -07:00
Alan Hourihane
b9de2089b1
gallium: fix glean's vertProg1
...
RSQ test 2 (reciprocal square toot of negative value)
2009-02-16 20:23:18 +00:00
Dave Airlie
c0ae4d3c55
radeon/r300: fix warnings
2009-02-14 07:49:15 +10:00
Jakob Bornecrantz
b57031624e
trivial: Add a tri-unfilled-fog test
2009-02-13 21:18:41 +01:00
Corbin Simpson
8e234d655d
r300-gallium: Add draw_arrays for swtcl_emit.
...
The more I look at this, the more bugs I see.
2009-02-17 21:32:40 -08:00
Corbin Simpson
8ec853d4df
r300-gallium: Properly init shader state.
2009-02-17 21:31:33 -08:00
Corbin Simpson
ecb177e198
r300-gallium: Consolidate state updates.
2009-02-17 21:30:55 -08:00
Corbin Simpson
46ef26eb90
r300-gallium: Hook up new swtcl vbuf stage.
...
Hold on to your hats.
2009-02-17 19:23:09 -08:00
Corbin Simpson
81daa5323e
r300-gallium: Turn swtcl_emit into a vbuf_render stage.
...
Movin' out of the Stone Ages.
2009-02-17 19:04:39 -08:00
Corbin Simpson
75f950c222
r300-gallium: Update r300_reg from classic Mesa.
...
Mostly needed a few defines for index buffers, but there's other goodies too.
2009-02-17 18:50:07 -08:00
Dave Airlie
cd4e37c8fb
radeon: add initial cubemap support appears to work
2009-02-14 05:57:52 +10:00
Jakob Bornecrantz
54e20828e6
demos: Add polygon mode point to isosurf
2009-02-13 17:53:49 +01:00
Jakob Bornecrantz
94189b3001
nv20: Use the new draw vbuf interface
2009-02-17 15:04:02 +00:00
Jakob Bornecrantz
7973d47cad
nv10: Use the new draw vbuf internface
2009-02-17 14:47:42 +00:00
Jakob Bornecrantz
1ba3849192
nv04: Use the new draw vbuf interface
2009-02-17 14:37:56 +00:00
Michel Dänzer
7c8836e9ef
gallium: Various coordinate fixups for texture transfers.
...
Fixes glReadPixels, gl(Copy)TexSubImage, glCopyPixels.
2009-02-13 17:34:29 +01:00
Corbin Simpson
073a73e4c7
r300-gallium: Various thingies.
...
Add formats to framebuffer emit, fix up shader function names,
make sure fragment format is emitted for r500.
2009-02-13 08:18:26 -08:00
Dan Nicholson
c273dfe6a2
Add dummy install target for glew to fix 'make install'
...
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-02-13 07:41:51 -08:00
Dan Nicholson
2977cee38e
autoconf: Add GLEW needed by progs when building GLUT
...
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-02-13 07:41:51 -08:00
Brian Paul
ac53b1b034
mesa: check if TNL state is null in _tnl_free_vertices() to avoid potential segfault
...
_tnl_free_vertices() is called from several places during context tear-down.
Depending on the order in which the swrast, swrast_setup and tnl context is
destroyed we could hit a null pointer here. This doesn't seem to be an
actual issue with any Mesa drivers, but let's be safe.
2009-02-13 08:11:01 -07:00
Brian Paul
6559107c7a
mesa: add additional texture size/limit assertions
2009-02-13 07:44:15 -07:00
Dave Airlie
2753dd42fd
radeon/r200: make setTexOffset work again
2009-02-13 23:34:53 +10:00
Dave Airlie
f363a97d25
radeon/r200: fix set tex offset functions
2009-02-13 23:29:27 +10:00
Dave Airlie
ed8340192e
radeon: revert unneeded change to texturing code
2009-02-13 23:02:12 +10:00
Dave Airlie
9fd8da299b
radeon: fix compressed texture upload on all radeons
...
tested on r200, texcmp works. May need more verification
2009-02-13 22:49:06 +10:00
Jakob Bornecrantz
16a440f326
i915: Use the new draw vbuf interface
2009-02-13 11:38:34 +01:00
Keith Whitwell
1c4f67b980
draw: second argument to unmap is max, not count
2009-02-17 12:39:05 +00:00
Keith Whitwell
7ca78a07b3
softpipe: update to new draw interfaces
2009-02-17 12:20:05 +00:00
Keith Whitwell
befa4ff50e
draw: add map/unmap directives for swtnl driver interface
...
Previously draw module asked for a pointer into (mapped) vertex data,
which it would incrementally fill and emit draw commands against. This
was hard for the drivers to deal with, especially in the case where a
draw command would force a flush and thus an unmap of the vertex data.
With this change, the draw module explicitly maps & then unmaps vertex
data prior to emitting draw commands.
2009-02-17 12:07:09 +00:00
Dave Airlie
8123897615
r200: update with changes from r100 driver for texture state
2009-02-13 19:39:21 +10:00
Dave Airlie
695ca1e2be
r200: port over state emit fix from r100
2009-02-13 18:50:57 +10:00
Michel Dänzer
5af34758e3
gallium: Fix a couple of potential NULL pointer dereferences.
...
A lot more test programs work.
2009-02-12 20:13:36 +01:00
Michel Dänzer
513fc60784
gallium: Fix GL_DEPTH CopyPixels tile coordinates.
2009-02-12 20:12:04 +01:00
Michel Dänzer
43ff11e70e
gallium: Fix accumulation buffer tile coordinates.
2009-02-12 19:55:42 +01:00
Michel Dänzer
aa66f57a59
gallium/winsys/xlib: Use XShmPutImage when possible.
2009-02-12 19:46:08 +01:00
Michel Dänzer
2142bf5e17
softpipe: Unbreak keeping track of cached surface.
...
glxgears works.
2009-02-12 19:43:43 +01:00
Michel Dänzer
9ab677a84b
gallium/winsys/xlib: Fix stride calculations.
2009-02-12 19:42:22 +01:00
Michel Dänzer
479d929530
Cosmetic: Rename struct pipe_transfer pointers from 'ps' to 'pt'.
...
Missed these for the initial gallium-texture-transfer commit.
2009-02-12 19:39:30 +01:00
Dave Airlie
ade3660942
r200: fixup some CS emission sizes
2009-02-13 01:27:21 +10:00
Dave Airlie
393c699e21
r200: use correct finish interface
2009-02-13 00:04:11 +10:00
Dave Airlie
5ee1dd2133
radeon: fixup include ordering
2009-02-13 01:21:37 +10:00
Dave Airlie
53116910b1
Merge remote branch 'origin/master' into radeon-rewrite
...
Conflicts:
configure.ac
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_render.c
2009-02-13 01:11:25 +10:00
Dave Airlie
7e104f9cde
r300: fix warning about mesa_lock_context_texture
2009-02-13 01:04:18 +10:00
Dave Airlie
dc531ba406
radeon: add stdint include
2009-02-12 14:44:20 +10:00
Dave Airlie
899b91b1fb
radeon: add mminfo struct to wrapper
2009-02-12 14:43:25 +10:00
Dave Airlie
ec0939b013
radeon: add defines for future bits
2009-02-12 14:41:16 +10:00
Dave Airlie
1e77f7b55c
r200: make build complete
2009-02-12 14:39:33 +10:00
Dave Airlie
56a13a7ca9
r300: make r300 work with latest changes
2009-02-12 14:36:12 +10:00
Dave Airlie
c83d0bfe06
radeon: make build without libdrm_radeon better
2009-02-12 14:16:24 +10:00
Dave Airlie
d513915d27
radeon/r200/r300: make build again with tracker changes
2009-02-13 00:05:39 +10:00
Dave Airlie
9314d936e8
radeon: remove depends on libdrm_radeon for now.
...
will fixup makefiles later to detect and use libdrm_Radeon in proper
places
2009-02-12 23:53:41 +10:00
Dave Airlie
dc8a707c67
radeon/r200/r300: make build with out libdrm_radeon installed for now
2009-02-12 23:52:51 +10:00
Dave Airlie
8cb16e6daf
r200/r300: get up to speed on renamed files
2009-02-12 22:48:18 +10:00
Dave Airlie
23d3559bd4
radeon: renaming and headers cleanup
2009-02-12 22:38:10 +10:00
Dave Airlie
df4a1348b1
r100/r200: fix front rendering issue.
2009-02-12 21:44:34 +10:00
Dave Airlie
1090d206de
radeon/r200/r300: another big merge upheavel.
...
This merges lots of the hw state atom emission and firevertices code.
it also removes a lot of the extra radeon crap from r300
and merge scissor
2009-02-12 21:16:39 +10:00
Jakob Bornecrantz
afe24b94b3
egl: Doesn't depend on xorg or pixman
2009-02-12 03:59:07 +01:00
Corbin Simpson
8a2d0005af
r300-gallium: Take care of various bad dereferences in shader setup.
...
Unbreaks glxinfo.
2009-02-12 23:36:21 -08:00
Corbin Simpson
fe7863f3f8
r300-gallium: Fix linker error a few linker warnings.
...
A few prototypes, a missing header, a misspelled macro.
2009-02-12 20:47:15 -08:00
Corbin Simpson
1d2c31df41
r300-gallium: Fix build errors.
2009-02-12 20:35:17 -08:00
Joakim Sindholt
92661bcbad
r300-gallium: fix OUT_CS_ONE_REG and use where applicable
...
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com >
2009-02-12 20:24:27 -08:00
Corbin Simpson
0d60a3f33c
r300-gallium: r300 passthrough shader, static shader objects, and clear code.
2009-02-12 20:20:41 -08:00
Corbin Simpson
637b24a590
r300-gallium: Add r300 passthrough shader.
2009-02-12 20:01:09 -08:00
Joakim Sindholt
f2a36d334c
r300: minor fixes and clear up some surface_fill
...
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com >
2009-02-12 18:14:48 -08:00
Corbin Simpson
affe0311fa
r300-gallium: Add r500 passthrough shader assembly.
...
This allows a simple passthrough fragment shader to be provided on r500.
2009-02-12 18:09:14 -08:00
Corbin Simpson
08e324fff3
r300-gallium: Fix typo in texture buffer size request.
2009-02-12 18:09:03 -08:00
Jakob Bornecrantz
e46dca58b2
intel: Only build winsys with built state trackers
2009-02-13 01:21:51 +01:00
Jakob Bornecrantz
3ede3776e2
gallium: Add a bunch of autoconf options
...
./configure --help for more info
2009-02-13 01:21:51 +01:00
Benjamin Close
25ac2801d7
galium: Makefile fixes: -Werror=implicit-function-declaration -> -Werror-implicit-function-declaration
...
Found-By: Tinderbox
2009-02-13 10:12:17 +10:30
Jakob Bornecrantz
67fc3ace65
intel: Make gem export the drm_api_hocks
2009-02-12 22:05:37 +01:00
Jakob Bornecrantz
5ac8b4e4d9
intel: Remove the old depricated dri1 winsys
2009-02-12 22:05:37 +01:00
Jakob Bornecrantz
56d88aece9
intel: Remove the ttm backend
...
RIP ttm, its been fun knowing you.
2009-02-12 22:05:37 +01:00
Robert Ellison
5de5ab428c
glDrawBuffers(n==0) is valid
...
According to the GL spec, calling glDrawBuffers() with n == 0 is a
valid operation (and essentially prevents drawing to any buffers).
But _msa_DrawBuffersARB() was producing a GL_INVALID_VALUE error in
this case.
This fix adjusts the error check, and makes a small change to the
ctx->Driver.DrawBuffer() call below to ensure that, if n == 0,
Driver.DrawBuffer() is called with GL_NONE and that buffers[0] is
*not* referenced in this case (since we don't know whether it is valid).
Internal identifier: 365833
2009-02-12 13:47:36 -07:00
Brian Paul
f1a59a6dd7
mesa: use new ST_CALLOC_STRUCT() macro in gallium state tracker
2009-02-12 10:14:36 -07:00
Brian Paul
1a2f4dd876
mesa: consistantly use mesa memory-functions in gallium state tracker
...
Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc.
Still using CALLOC_STRUCT() at this point.
2009-02-12 10:11:55 -07:00
Brian Paul
19dff5efc1
mesa: don't include m_xform.h where not needed
2009-02-12 09:23:46 -07:00
Brian Paul
987aedd7dc
mesa: move _mesa_transform_vector() from m_xform.c to m_matrix.c
...
m_xform.c is omitted from gallium builds but _mesa_transform_vector() is
still needed.
2009-02-12 09:23:46 -07:00
Brian Paul
f45fa84319
mesa: remove unused functions in m_xform.[ch]
...
The functions are:
_mesa_project_points()
_mesa_transform_bounds3()
_mesa_transform_bounds2()
_mesa_transform_point_sz()
2009-02-12 09:23:46 -07:00
Brian Paul
e8cd8be03b
mesa: restore FLUSH_VERTICES() in _mesa_notifySwapBuffers()
2009-02-12 09:23:46 -07:00
Brian Paul
9eff576c94
mesa: remove empty, unneeded mathmod.h header
2009-02-12 09:23:46 -07:00
José Fonseca
5ef5162103
glut: Fix broken font symbols when gcc visibility attributes used.
2009-02-12 15:50:33 +00:00
Robert Ellison
0ccbc3c905
Fix an i965 assertion failure on glClear()
...
While running conform with render-to-texture:
conform -d 33 -v 2 -t -direct
the i965 driver failed this assertion:
intel_clear.c:77: intel_clear_tris: Assertion `(mask & ~((1 << BUFFER_BACK_LEFT) | (1 << BUFFER_FRONT_LEFT) | (1 << BUFFER_DEPTH) | (1 << BUFFER_STENCIL))) == 0' failed.
The problem is that intel_clear_tris() is called by intelClear() to
clear any and all of the available color buffers, but intel_clear_tris()
actually only handles the back left and front left color buffers; so
the assertion fails as soon as you try to clear a non-standard color
buffer.
The fix is to have intelClear() only call intel_clear_tris() with
buffers that intel_clear_tris() can support. intelClear() already backs
down to _swrast_Clear() for all buffers that aren't handled explicitly.
2009-02-11 18:05:19 -07:00
Dan Nicholson
8217f24f21
autoconf: Fix lib globbing for static builds
...
Reported-by: Siddhartha Chaudhuri <expiring_frog@yahoo.co.uk >
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-02-11 15:16:00 -08:00
Brian Paul
6b06a6b929
gallium: const-correctness for u_linear.c functions
2009-02-11 14:11:48 -07:00
Brian Paul
81374d1ebe
gallium: silence warnings about void ptr arithmetic
2009-02-11 14:09:22 -07:00
Brian Paul
da4f933eb2
mesa: refactor MATH_SOURCES, remove Mesa x86 codegen from gallium build
...
Omit math/m_xform.c from gallium builds since it's not used and it's the
one place we were pulling in the Mesa x86 codegen which collides with
gallium's x86 codegen.
Can now omit ASM_C_SOURCES from gallium build too.
2009-02-11 14:01:29 -07:00
Brian Paul
2218592d47
mesa: get rid of _math_init()
...
Only VBO uses the evaluator code so call _math_init_eval() there.
Only TNL uses the transform/translate code so call _math_init_transformation()
and _math_init_translate9) there.
This is a step toward resolving some symbol collisions between Mesa's and
gallium's x86 codegen.
Have VBO and TNL modules call _math_init_transformation()
2009-02-11 13:52:17 -07:00
Dan Nicholson
c5bae14245
autoconf: Adjust to new asm SOURCES variables
...
Commit 90b2beb661 changed the assembly
variables. Without this change, the glapi assembly wasn't being built
when it was supposed to, resulting in missing symbols in libGL.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-02-11 11:58:39 -08:00
Dan Nicholson
61e925f354
autoconf: Restore commented ASM_FLAGS
...
This is not the proper approach to disabling assembly. If there are bugs,
they should be fixed or the assembly can default to off.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-02-11 11:56:17 -08:00
Dan Nicholson
277bf235f1
Add external pixman CFLAGS after all internal include paths
...
With the pixman CFLAGS at the beginning of the command line, my build
was picking up the glcore.h from glproto, which doesn't have any of the
TFP fields in __GLcontextmodes.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
2009-02-11 11:55:59 -08:00
Younes Manton
36b83f5198
nouveau: 1xN, Nx1 levels of a swizzled mip tree shouldn't be aligned.
2009-02-11 11:58:35 -05:00
José Fonseca
874f364e9e
draw: Cap max vertices instead of failing assert.
2009-02-11 16:48:34 +00:00
Michel Dänzer
9b912aab43
g3dvl: Fixups for introduction of pipe_transfer.
2009-02-11 17:39:21 +01:00
Brian Paul
b6ad7c8c4a
demos: minor updates for shader_api.c test
...
Mesa's glGetUniformLocation() does support array indexes.
Minor code reformatting.
It would be great if this program were converted into a glean test...
2009-02-11 09:17:22 -07:00
Brian Paul
2b4f0216bf
glsl: allow setting arrays of samplers in set_program_uniform()
...
Arrays of sampler vars haven't been tested much and might actually be broken.
Will need to be revisited someday.
Another fix for bug 20056.
2009-02-11 09:17:22 -07:00
Brian Paul
234f03e90a
glsl: raise GL_INVALID_OPERATION for glUniform(location < -1)
...
location = -1 is silently ignored, but other negative values should raise
an error.
Another fix for bug 20056.
2009-02-11 09:17:21 -07:00
Brian Paul
4ef7a93296
glsl: rework _mesa_get_uniform[fi]v() to avoid using a fixed size intermediate array
2009-02-11 09:17:21 -07:00
Brian Paul
2c1ea0720d
glsl: fix glUniform() array bounds error checking
...
If too many array elements are specified, they're to be silently ignored (don't
raise a GL error).
Fixes another issue in bug 20056.
2009-02-11 09:17:21 -07:00
Brian Paul
369d1859d7
glsl: fix incorrect size returned by glGetActiveUniform() for array elements.
...
Fixes one of the issues in bug 20056.
2009-02-11 09:17:21 -07:00
Jakob Bornecrantz
2c8c09edda
egl: Use only libdrm structs for kms
2009-02-11 16:56:30 +01:00
José Fonseca
7ef8e4e181
progs: Prevent clash with min macro.
2009-02-12 13:54:55 +00:00
José Fonseca
b5c901a730
glut: Don't try to guess system headers.
...
Just include them, especially such basic header as stdlib.h
2009-02-12 13:54:54 +00:00
Keith Whitwell
f5cca127b0
tgsi: keep immediate file info uptodate
...
Make sure the stats for TGSI_FILE_IMMEDIATE are uptodate. Previously
we just had immediate_count, but file_*[TGSI_FILE_IMMEDIATE] were
bogus.
2009-02-12 13:30:01 +00:00
José Fonseca
6fe421cf46
scons: Unbreak mingw builds.
2009-02-12 12:59:58 +00:00
José Fonseca
b93d305725
scons: Build xlib state tracker regardless of DRI settings.
2009-02-12 12:06:30 +00:00
José Fonseca
73ccabc124
scons: Build DLLs/EXEs with more memory debugger friendlier settings.
2009-02-12 12:06:30 +00:00
Brian Paul
492e61d94f
softpipe: asst clean-ups, const correctness, comments
2009-02-11 22:13:17 -07:00
Brian Paul
f164101b24
softpipe: remove unneeded #include
2009-02-11 22:03:34 -07:00
Brian Paul
0aaa3ef2fa
softpipe: asst comments, clean-ups
2009-02-11 22:01:43 -07:00
Brian Paul
f908421e64
softpipe: remove some old polygon stipple stuff and do some clean-ups
2009-02-11 21:51:00 -07:00
Brian
460b62336d
softpipe: updated comments
2009-02-11 21:44:38 -07:00
Brian
253d2d1676
softpipe: rename PRIM_x to QUAD_PRIM_x
2009-02-11 21:38:20 -07:00
Brian
7925274da3
softpipe: rename sp_headers.h to sp_quad.h
...
This header describes the quad-related datatypes afterall.
2009-02-11 21:33:59 -07:00
Brian
b865f84c8d
softpipe: rename single-include preprocessor symbol, add comments
2009-02-11 21:30:21 -07:00
Brian
ed6f41e2f4
softpipe: rename sp_quad.[ch] -> sp_quad_pipe.[ch]
...
Be more consistant with 'draw' module.
2009-02-11 21:25:10 -07:00
Dave Airlie
f3f1f7dc20
r300: disable assert that fires
2009-02-11 19:04:39 +10:00
Dave Airlie
3713a7accf
radeon: unmap in case of two dma regions being used for one cmdbuf
2009-02-11 19:03:56 +10:00
Dave Airlie
7e98907eb8
radeon: cleanup cmdbuffer
2009-02-11 16:52:56 +10:00
Dave Airlie
832446c892
r300: fix front buffer rendering properly fixes tests in glean
2009-02-11 16:50:19 +10:00
Dave Airlie
c5d9a7ab30
r200: fix build
2009-02-11 20:10:59 +10:00
Johannes Engel
1e81855566
Add install target for egl
...
Signed-off-by: Johannes Engel <jcnengel@googlemail.com >
Acked-by: Jakob Bornecrantz <jakob@vmware.com >
2009-02-11 07:01:40 +01:00
Brian Paul
5f75013822
demos: better error message for overlay.c, see bug 20055
2009-02-11 07:53:56 -07:00
José Fonseca
98a053cfd4
mesa: Use the stdio wrappers.
...
snprint symbol does not exist in Windows.
2009-02-11 13:52:11 +00:00
José Fonseca
7892bdfc8a
wgl: Add a few more stubs.
...
I wonder why we need this... It is only necessary for the MSVC build.
MinGW does not require them.
2009-02-11 13:51:34 +00:00
José Fonseca
8cadf6c0a1
mesa: Move statements after declarations.
2009-02-11 13:50:43 +00:00
Eric Anholt
5d5ae371ea
intel: Add x8r8g8b8 visuals to DRI1 fbconfigs alongside a8r8gb8.
...
This involved fixing driConcatConfigs to not return const (which had made a
mess of a previous patch too).
2009-02-10 18:45:18 -08:00
Eric Anholt
a49ff9f95e
sis: fix signedness warnings
2009-02-10 18:45:18 -08:00
Eric Anholt
e7ee7a549d
trident: Fix signedness warning.
2009-02-10 18:45:18 -08:00
Eric Anholt
0cb295584f
tdfx: Fix begin/endquery for current API.
2009-02-10 18:45:18 -08:00
Eric Anholt
01bc4d441f
intel: Don't do the extra MI_FLUSH in flushing except when doing glFlush().
...
Everything other than "make sure the last rendering ends up visible on the
screen" doesn't need that behavior.
2009-02-10 18:45:18 -08:00
Eric Anholt
0b63f6449e
intel: Speed up glDrawPixels(GL_ALPHA) by using an alpha texture format.
2009-02-10 18:45:18 -08:00
Eric Anholt
d11981e0d7
intel: Fix some state leakage of {Client,}ActiveTexture in metaops.
...
Found while debugging cairo-gl.
2009-02-10 18:45:17 -08:00
Eric Anholt
f82f1ffba9
intel: don't crash when dri2 tells us about buffers we don't care about.
2009-02-10 18:45:17 -08:00
Eric Anholt
f967e8b507
dri2: Don't crash if the server returns more buffers than expected.
2009-02-10 18:45:17 -08:00
Eric Anholt
680c708dee
dri2: Initialize variables for the getbuffers round-trip reduction.
...
Missed setting the initial values which usually didn't hurt at runtime.
2009-02-10 18:45:17 -08:00
Brian Paul
36c1e756da
docs: some Cell driver docs updates
2009-02-10 19:36:52 -07:00
Brian Paul
0996a23e3d
cell: asst build fixes in linux-cell config
...
Add -D_SVID_SOURCE to silence warnings when building glx files.
Don't build the non-gallium drivers.
2009-02-10 19:34:08 -07:00
Jakob Bornecrantz
7e54d7d3d6
gallium: Update autoconf to latest gallium build
2009-02-11 02:45:15 +01:00
Jakob Bornecrantz
e94b4dd4f0
gallium: Disable nouveau by default
...
Most piep drivers should be able to build by default, but since
the nouveau ones depend drm they can't be enabled by default.
2009-02-11 02:43:27 +01:00
Brian Paul
9c101c44c4
cell: update Cell driver info (code is on master now)
2009-02-10 16:56:58 -07:00
Brian Paul
5340b6dff7
Merge commit 'origin/gallium-master-merge'
...
This is the big merge of the gallium-0.2 branch into master.
gallium-master-merge was just the staging area for it.
Both gallium-0.2 and gallium-master-merge are considered closed now.
Conflicts:
progs/demos/Makefile
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
2009-02-10 16:44:02 -07:00
Brian Paul
ee4c921b65
Merge commit 'origin/gallium-0.2' into gallium-master-merge
2009-02-10 16:34:51 -07:00
Brian Paul
9fd26daec2
mesa: remove the unused _mesa_UpdateTexEnvProgram() function
2009-02-10 16:30:24 -07:00
Brian Paul
537d3ed6f3
mesa: another fix for program/texture state validation
...
This fixes a regression introduced in 46ae1abbac
Break program validation into two steps, do part before texture state
validation and do the rest after:
1. Determine Vertex/Fragment _Enabled state.
2. Update texture state.
3. Determine pointers to current Vertex/Fragment programs (which may involve
generating new "fixed-function" programs).
See comments in the code for more details of the dependencies.
2009-02-10 16:28:25 -07:00
Brian Paul
c936a6083e
intel: minor reformatting, comments
2009-02-10 15:54:23 -07:00
Brian Paul
1ed5fe5cbf
mesa: s/_IMAGE_NEW_TRANSFER_STATE/_MESA_NEW_TRANSFER_STATE/ to be more consistant with other flags
2009-02-10 15:53:35 -07:00
Brian Paul
46ae1abbac
mesa: fix/change state validation order for program/texture state
...
Program state needs to be updated before texture state since the later depends
on the former.
Fixes piglit texgen failure. The second time through the modes (press 't'
three times) we disable the fragment program and return to conventional texture
mode. State validation failed here because update_texture() saw stale fragment
program state.
2009-02-10 15:53:35 -07:00
Younes Manton
14d808f8fd
nouveau: nv40 swizzled mipmap fixes.
2009-02-10 16:36:33 -05:00
Patrice Mandin
c2be521d24
nouveau: nv30: fix miptree organization to have swizzled texture+mipmap at the right places
2009-02-10 22:22:55 +01:00
Patrice Mandin
24c379badb
nouveau: revert all my changes here, not the right way
2009-02-10 22:22:06 +01:00
Patrice Mandin
7b66b24c2e
nouveau: stop with 0 dimension
2009-02-10 22:04:56 +01:00
Dave Airlie
edbe1fac6a
radeon: fix span init needs more work
2009-02-11 07:02:18 +10:00
Patrice Mandin
53069cbf29
nouveau: we already have the right src offset
2009-02-10 21:58:49 +01:00
José Fonseca
52233f27bb
progs: Build samples dir with scons and glew.
2009-02-10 20:28:08 +00:00
Patrice Mandin
fa9fcf5e8f
nouveau: do not forget to half dimension.
2009-02-10 21:22:29 +01:00
Patrice Mandin
0cd28c4a1b
nouveau: revert most parts of recent mipmap+swizzle stuff. We only need to find right src and dst offset for given mipmap level.
2009-02-10 21:20:24 +01:00
José Fonseca
8b9aa730c6
progs: Build rebook with scons too.
2009-02-10 20:18:52 +00:00
Dave Airlie
45496122b7
radeon/r200/r300: merge span code into single shared file
2009-02-11 05:47:55 +10:00
Keith Whitwell
f54149a3a3
wgl: return before locking if stw_icd is NULL
2009-02-10 19:23:06 +00:00
Keith Whitwell
9c9ba66fba
Merge commit 'origin/gallium-0.2' into gallium-0.2
...
Conflicts:
src/gallium/state_trackers/wgl/icd/stw_icd.c
2009-02-10 19:22:57 +00:00
Dave Airlie
7394c429c0
radeon/r200: flush vertices when data in cmdbuf.
...
This fixes a whole bunch of regressions in piglit
2009-02-11 05:07:31 +10:00
José Fonseca
1e8177ee17
scons: Use parallel builds by default.
2009-02-10 18:13:05 +00:00
Keith Whitwell
ebb864da9e
wgl: mutex-protect the shared stw_icd struct
2009-02-10 18:11:44 +00:00
Patrice Mandin
02401cbaf0
nouveau: dst offset is correct
2009-02-10 18:44:27 +01:00
José Fonseca
00ee308ab3
pipebuffer: Drop reliance on pipe_winsys.
2009-02-10 17:37:53 +00:00
Patrice Mandin
b20a1b28b7
Missing: tgsi: Fix build -- rename Size to NrTokens.
2009-02-10 18:31:41 +01:00
Patrice Mandin
2f0811054f
nouveau: recalc sub width and height for each mipmap level
2009-02-10 18:09:32 +01:00
Jakob Bornecrantz
767b1acbb7
mesa: Build both software rasterizers for debug
...
But put the gallium one in lib/gallium
2009-02-10 17:43:25 +01:00
Dave Airlie
18aca218a2
radeon: r100 can't use some of the texture formats.
...
this fixes the texrect-many test
2009-02-11 02:41:39 +10:00
Dave Airlie
4c36282ef9
radeon/r200/r300: fix span code for depth reading.
...
makes the maskedClear test work
2009-02-11 02:41:11 +10:00
Jakob Bornecrantz
1789dc8015
gallium: Don't rebuild common drm code
2009-02-10 16:24:06 +01:00
Jakob Bornecrantz
94665aa648
gallium: Install DRI drivers into lib/gallium
2009-02-10 16:23:59 +01:00
Jakob Bornecrantz
43e6272ae5
gallium: Introduce new subdirs build variables
...
(based on gallium-xorg-driver/commit 270ce504052d415870a25ab59818b2309eb8ac13)
2009-02-10 16:23:02 +01:00
Jakob Bornecrantz
7fad277bbb
Revert "cell: update linux-cell config"
...
This reverts commit 22c6c1eaad .
Need to revert this since we reverted commited this depended on.
2009-02-10 16:22:32 +01:00
Jakob Bornecrantz
b96d50da8b
Revert "mesa: added new linux-gallium and linux-gallium-debug configs"
...
This reverts commit abbe96cb6e .
It only reverts parts of the commit the other parts where related to
libmesagallium changes.
2009-02-10 16:22:19 +01:00
Michal Krol
2644985367
nv40: Fix build -- rename Size to NrTokens.
2009-02-10 15:18:32 +01:00
Michal Krol
844034dee5
nv30: Fix build -- rename Size to NrTokens.
2009-02-10 15:18:19 +01:00
Michal Krol
adc6847260
nv20: Fix build -- rename Size to NrTokens.
2009-02-10 15:18:03 +01:00
Michal Krol
276de3ffcf
brw: Fix build -- rename Size to NrTokens.
2009-02-10 15:17:41 +01:00
Michal Krol
0020e1d108
i915: Fix build -- rename Size to NrTokens.
2009-02-10 15:17:17 +01:00
Michal Krol
a872b518c9
gallivm: Fix build -- rename Size to NrTokens.
2009-02-10 15:16:35 +01:00
Michal Krol
e3028baff2
draw: Fix build -- rename Size to NrTokens.
2009-02-10 15:16:00 +01:00
Michal Krol
5ecd0b0890
tgsi: Fix build -- rename Size to NrTokens.
2009-02-10 15:14:31 +01:00
Michal Krol
bf3930453c
gallium: Rename Size member of TGSI token to NrTokens.
...
Driver writers often got confused and assumed Size to be
the number of immediate values in Immediate declaration.
2009-02-10 15:12:34 +01:00
Keith Whitwell
a88e2544ee
vmw/icd: remove bogus current_context value
2009-02-10 14:03:43 +00:00
José Fonseca
dc6cc4f9da
mesa: Compare formats using nominal bytes per pixel.
...
This is a temporary fix which works for the formats we care so far. The
real fix would be abandon the concept "nominal bytes per pixel" entirely
in Mesa, and use macropixels instead, as done in gallium interfaces
already.
2009-02-10 13:40:00 +00:00
Dave Airlie
3e4d0c2a5d
r100: remove debug code
2009-02-10 23:39:13 +10:00
Dave Airlie
639b5fca0c
r100: fix 3D texture fallback
2009-02-10 23:38:51 +10:00
Dave Airlie
c3ca94bc91
radeon: fix fallback case where t->mt is valid NULL
2009-02-10 23:36:28 +10:00
Michel Dänzer
eaf15db895
gallium: Fixups for driCreateConfigs MSAA support.
...
Add the MSAA samples array or make sure its contents are initialized.
2009-02-10 13:47:49 +01:00
José Fonseca
67e988a06c
wgl: Fix null pointer reference.
2009-02-10 11:51:47 +00:00
José Fonseca
9fb9ee9d24
stw: Hack for applications which use wglSetPixelFormat instead of SetPixelFormat.
2009-02-10 11:51:47 +00:00
José Fonseca
5b0807b72f
glut: Use the official WGL functions.
...
Especially using wglGetPixelFormat instead of GetPixelFormat causes
problems with opengl32.dll and drivers that not hack around this issue.
2009-02-10 11:51:46 +00:00
José Fonseca
aeed92952e
glut: DESCRIPTION .def clause deprecated.
2009-02-10 11:51:46 +00:00
José Fonseca
42523a83b3
wgl: s/0x%p/%p/g
...
Rather not have 0x prefix, than 0x0x in certain platforms.
2009-02-10 11:51:46 +00:00
Brian
028780a809
demos: remove OSMESA stuff from Makefile
2009-02-09 19:40:10 -07:00
Benjamin Close
17fe478085
autogen: Make sure MAKEFLAGS is not set before running autoreconf
...
Without this the "w" flag may be set which causes the version
to be incorrectly to be obtains in configure.ac causing configure
to fail miserably
2009-02-10 11:58:11 +10:30
Brian Paul
7e0bc2eb8d
mesa: add x86/rtasm/x86sse.c to fix linux-x86 build
2009-02-09 15:41:06 -07:00
Roland Scheidegger
93da69def4
mesa: fixes for srgb formats
...
swizzling in fetch/store srgba/sargb functions fixed (consistent with
equivalent non-srgb formats now).
2009-02-09 23:18:07 +01:00
Roland Scheidegger
cb3c54ea86
fix _mesa_get_teximage for srgb textures
2009-02-09 23:17:43 +01:00
Brian Paul
aad3f546a0
mesa: avoid setting texObj->_Complete = GL_FALSE when there's no state change
...
Avoid a little bit of unneeded state validation and fixes a bug where the
texture complete flags was set to false, but we didn't signal _NEW_TEXTURE.
Fixes piglit tex1d-2dborder failure.
2009-02-09 14:00:47 -07:00
Brian Paul
37c768b36a
mesa: add no-change testing for a few more texture parameters
2009-02-09 14:00:47 -07:00
Brian Paul
88f3656ea7
swrast: use ASSIGN_4V() macro
2009-02-09 14:00:47 -07:00
Brian Paul
7eb5a2892d
mesa: replace _mesa_unreference_framebuffer() with _mesa_reference_framebuffer()
2009-02-09 14:00:47 -07:00
Brian Paul
d52294439c
mesa: replace _mesa_unreference_framebuffer() with _mesa_reference_framebuffer()
2009-02-09 14:00:47 -07:00
Brian Paul
60b3fe6c19
i965: need to disable current shader, if any, in intel_clear_tris()
...
Fixes bad background in all the progs/glsl/ tests.
2009-02-09 12:12:29 -07:00
Dave Airlie
b1df5ed6db
radeon: put back state emission lastcmd
2009-02-10 04:57:37 +10:00
Dave Airlie
d2fa89140e
r200: invalidate texture paths in some more places
2009-02-10 04:56:16 +10:00
Dave Airlie
ccf7814a31
radeon: major cleanups removing old dead codepaths.
...
This should be working gears on radeon state
2009-02-10 04:54:24 +10:00
Brian Paul
e13593678f
re-add MSAA support
...
(cherry picked from commit f7d80aa006 )
This also involved adding the new MSAA fields to driCreateConfigs().
Also, re-add prog_instructions->Sampler field for i965 driver. Will
have to revisit that.
2009-02-09 11:16:20 -07:00
José Fonseca
123299546f
indices: Fix typo.
2009-02-09 18:11:05 +00:00
Brian Paul
22c6c1eaad
cell: update linux-cell config
2009-02-09 10:42:34 -07:00
Brian Paul
2438161823
mesa: build/use libmesagallium.a for gallium builds
...
This contains the core mesa code but excludes things not needed for gallium
such as tnl/, swrast/, swrast_setup/, etc.
2009-02-09 10:37:38 -07:00
Brian Paul
abbe96cb6e
mesa: added new linux-gallium and linux-gallium-debug configs
...
Also, remove gallium-related things from configs/default. They're in
linux-gallium now.
So the default builds are the same as they have been for Mesa/master.
2009-02-09 10:17:58 -07:00
Brian Paul
3c15e02783
softpipe: add null ptr check in softpipe_map_constant_buffers()
...
Fixes segfault regression in progs/glsl/identity.c
2009-02-09 10:12:11 -07:00
Brian Paul
87e44d9003
mesa: prefix #includes with main/
2009-02-09 09:54:52 -07:00
Brian Paul
71e64fc30b
swrast: fix typo: s/drapix/drawpix/
2009-02-09 09:54:33 -07:00
Brian Paul
4fece21315
mesa: remove old 'sources' file in favor of 'sources.mak'
2009-02-09 09:53:58 -07:00
Brian Paul
e97681c7f5
mesa: merge gallium-0.2 into gallium-master-merge
...
Merge commit 'origin/gallium-0.2' into gallium-master-merge
Conflicts:
Makefile
docs/relnotes-7.4.html
docs/relnotes.html
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/main/imports.c
src/mesa/main/mtypes.h
src/mesa/main/texcompress.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_save_draw.c
2009-02-09 09:22:22 -07:00
Siddhartha Chaudhuri
1a46c8a062
mesa: autoconf fixes for OS X
...
See bug report 17566.
2009-02-09 07:59:32 -07:00
Brian Paul
4900269819
mesa: rework _mesa_reference_framebuffer() to look like _mesa_reference_renderbuffer()
...
_mesa_unreference_framebuffer() is deprecated since _mesa_reference_framebuffer(ptr, NULL)
can be used instead.
2009-02-09 07:55:08 -07:00
Dave Airlie
9df844b109
radeon: fix alignment issues in ELT code
2009-02-09 23:19:42 +10:00
Dave Airlie
3fafaf8959
radeon: make more r100 work
2009-02-09 03:50:38 +10:00
Dave Airlie
abdf1f65d2
r200: cleanup some bits that aren't used
2009-02-09 03:50:07 +10:00
Patrice Mandin
b907d4cd8f
nouveau: include and calc offset before changing dimensions for next level
2009-02-08 17:04:09 +01:00
Patrice Mandin
ea7ca7607a
nouveau: upload and swizzle each mipmap level in turn
2009-02-08 17:04:09 +01:00
Corbin Simpson
5425c4aa28
r300: Accidentally removed a pipe_buffer_reference that should be there.
2009-02-08 02:03:29 -08:00
Corbin Simpson
360e700a43
r300: Add SW TCL paths for clear.
...
This should make things work for people on RSxxx chipsets.
2009-02-08 01:07:03 -08:00
Corbin Simpson
ea3398cf33
r300: Update to match pipe_surface changes.
2009-02-08 01:01:26 -08:00
Brian Paul
19a1bc8270
cell: remove unused var
2009-02-07 13:05:38 -07:00
Brian Paul
91948cd1a2
cell: compile fix: many updates to cell texture code for new surface mapping
...
The Cell texture code really needs a thorough inspection and clean-up someday...
2009-02-07 13:04:53 -07:00
Brian Paul
2473ded886
softpipe: simplify an assertion
2009-02-07 13:03:24 -07:00
Brian Paul
b59117a697
cell: compile fix: no-op xlib_create_brw_screen() for Cell build
2009-02-07 13:02:27 -07:00
Brian Paul
96d230e107
cell: compile fix: alpha.ref is now alpha.ref_value
2009-02-07 13:01:53 -07:00
Brian Paul
830e320e2a
cell: compile fix: pipe_constant_buffer no longer has size field
2009-02-07 13:01:02 -07:00
Brian Paul
c2a8d73d5a
cell: compile fix: pipe_constant_buffer no longer has size field
2009-02-07 12:59:40 -07:00
Brian Paul
5199774dc6
mesa: minor fixes to incomplete texture debug code
2009-02-07 11:50:24 -07:00
Brian Paul
266fe93a87
mesa: debug code for printing info about textures, writing teximages to disk
2009-02-07 11:49:52 -07:00
Brian Paul
671fed4d01
mesa: code refactoring: move texcombine code into update_tex_combine()
2009-02-07 11:40:20 -07:00
Brian Paul
2a50dde0f5
mesa: minor clean-ups, remove unneeded conditional
2009-02-07 11:21:44 -07:00
Brian Paul
b46611633c
mesa: fix logic error in computing enableBits in update_texture_state()
...
If we had a vertex shader but no fragment shader (i.e. fixed function) we
didn't get the right enabled texture targets.
Fixes blank/white texture problem.
2009-02-07 11:20:08 -07:00
Younes Manton
32cd1a0345
nouveau: Need to surface_copy() without a pipe context.
2009-02-07 12:54:48 -05:00
Corbin Simpson
2d6355495c
Merge branch 'gallium-0.2' of git://anongit.freedesktop.org/mesa/mesa into gallium-0.2
2009-02-06 14:06:39 -08:00
Corbin Simpson
5538323005
Readd trace to list of default pipe drivers.
...
Looks like the gallium-0.2-radeon merge clobbered it.
2009-02-06 13:36:31 -08:00
Corbin Simpson
4683fc94f5
Merge branch 'gallium-0.2-radeon' into gallium-0.2
2009-02-06 13:34:04 -08:00
Corbin Simpson
80026428e3
Rename winsys amd to radeon.
2009-02-06 13:28:15 -08:00
Corbin Simpson
0bf152e0be
Remove r300 from default build.
2009-02-06 13:27:51 -08:00
Younes Manton
776d86606c
g3dvl: Catch up to gallium changes, fix build.
2009-02-06 14:37:35 -05:00
Younes Manton
bb34072b94
nouveau: Pass proper format to NV04_GDI_RECTANGLE_TEXT.
2009-02-06 14:36:56 -05:00
Younes Manton
5c8c728afe
nouveau: Frontbuffer pitch needs to be set.
2009-02-06 14:33:49 -05:00
Brian Paul
f6d23943cd
mesa: fix tnl->render_inputs_bitset setup for fragment program texcoords
...
Handle the case where there's no per-vertex texcoords but the fragment shader
needs texcoords.
Fixes piglit shaders/fp-generic/dph test.
2009-02-06 10:48:38 -07:00
Brian Paul
1df62651b2
swrast: return (0,0,0,1) when sampling incomplete textures, not (0,0,0,0)
...
Fixes piglit shaders/fp-incomplete-tex test.
2009-02-06 10:47:31 -07:00
Brian Paul
e01a03d222
glsl: new MESA_GLSL env var for GLSL debugging features
...
Replaces the VERBOSE_GLSL, VERBOSE_GLSL_DUMP flags which only worked in debug
builds. MESA_GLSL will work both in debug and non-debug builds.
Also add facility to dump glUniform() calls to stdout.
2009-02-06 10:21:36 -07:00
Brian Paul
6ce0c6e743
mesa: tweak output of _mesa_write_shader_to_file()
...
Enclose GPU code in comments to the file can be re-fed back into GLSL compiler.
2009-02-06 10:20:33 -07:00
Brian Paul
aafcc26642
Revert "mesa: meaningless whitespace change to see if git's working (ignore)"
...
This reverts commit b2e779988e .
I didn't mean to push this stuff yet. I'm having a bad git day...
2009-02-06 10:00:34 -07:00
Brian Paul
b2e779988e
mesa: meaningless whitespace change to see if git's working (ignore)
2009-02-06 09:57:28 -07:00
Dave Airlie
da795ff0a8
radeon: remove include that breaks build in !OLD_PACKET path
...
this path isn't enabled by default in any case.
2009-02-07 00:18:34 +10:00
Dave Airlie
e223b7c312
radeon: port over arrays code even though not in use yet
2009-02-06 20:30:03 +10:00
Dave Airlie
36d3f3e74a
r100: fixup radeon so gears seems to work
2009-02-06 20:04:42 +10:00
Corbin Simpson
2e70971e4f
r300: Clean up CS counting.
2009-02-06 01:59:26 -08:00
Dave Airlie
16f4b10170
radeon: remove unused texmem
2009-02-06 19:36:39 +10:00
Dave Airlie
0a43603c1c
r300: fix some autostate batch setups
2009-02-06 09:18:15 +10:00
Joakim Sindholt
402d45d99b
r300: working trivial/clear for r5xx
2009-02-05 13:37:29 -08:00
Corbin Simpson
be53dfa3b9
r300: Add framebuffer setup stub.
2009-02-05 13:27:07 -08:00
Michel Dänzer
4617981ec7
gallium: No longer allow CPU mapping surfaces directly.
...
Instead, a new pipe_transfer object has to be created and mapped for
transferring data between the CPU and a texture. This gives the driver more
flexibility for textures in address spaces that aren't CPU accessible.
This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows
a black window. Looks like something's off related to the Z buffer, so the
depth test always fails.
2009-02-05 19:41:18 +01:00
Pekka Paalanen
e6372853c2
nv20: copy miptree flags from nv40
...
nv20_miptree_create() should set various flags.
Copy stuff over from nv40.
trivial/tri does not abort on nv04 swizzled copy anymore.
I still miss my triangle.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-02-05 20:35:24 +02:00
Pekka Paalanen
a785a4ae21
nv04-nv40: fix nv##_surface_copy() for flipped
...
If do_flipp is true, it would first do the proper copy, height would
wrap around to unsigned maximum, and then it attempts to do another
copy.
Return after doing the proper copy.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-02-05 20:35:24 +02:00
Pekka Paalanen
8569860c3d
nv04: fix pasto in nv04_surface_2d_init()
...
Wrong hardware object being used, when compared with earlier code.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-02-05 20:35:24 +02:00
Keith Whitwell
96fb896c39
indices: quad fixes
2009-02-05 16:04:38 +00:00
Keith Whitwell
3120894c6d
gallium: add new aux lib for index list translations
...
Could this be the ultimate index list translating utility? Maybe, but it
doesn't yet include support for splitting primitives.
Unlike previous attempts, this captures all possible combinations of API
and hardware provoking vertex, supports generated list reuse and various
other tricks. Relies on python-generated code.
2009-02-05 16:04:38 +00:00
Brian Paul
6e5d311719
mesa: remove oddball linux-directfb-install makefile rule
...
It's probably not needed since the 'make install' rules were overhauled last year.
2009-02-05 08:41:27 -07:00
Brian Paul
681a13e7f9
mesa: minor Makefile improvement for versioning
2009-02-05 08:39:10 -07:00
Brian Paul
099e9d20f0
gallium: fixup #includes: p_screen.h does not need anything in p_state.h
2009-02-05 08:23:00 -07:00
Brian Paul
0703b2e9ad
gallium: move 'struct pipe_winsys'
...
Not used in p_state.h but used in p_context.h and p_screen.h
2009-02-05 08:16:56 -07:00
Ben Skeggs
75f0b38d9e
nv50: stop using nouveau_push.h, it's evil
2009-02-05 18:42:17 +10:00
Ben Skeggs
ff8dff017e
nv04-nv40: move 2d blit/fill code into pipe driver
2009-02-05 18:22:41 +10:00
Ben Skeggs
13393736db
nv50: move 2d blit/fill code into pipe driver
2009-02-05 14:04:45 +10:00
Ben Skeggs
ae8a7544d1
nouveau: support getting "native" bo from winsys
2009-02-05 13:18:44 +10:00
Brian Paul
285b500bb7
glsl: use _slang_var_swizzle() in a few places to simplify the code.
2009-02-04 17:40:51 -07:00
Brian Paul
d96d8b21bf
glsl: remove unused prototype
2009-02-04 17:37:20 -07:00
Brian Paul
0744805d58
glsl: replace assertion with conditional in _slang_pop_var_table()
...
We were hitting the assertion when we ran out of registers, which can happen.
Also, add some additional assertions and freshen up some comments.
2009-02-04 17:32:07 -07:00
Corbin Simpson
fb8b794c69
r300: Add shader state stubs.
2009-02-04 16:07:39 -08:00
Brian Paul
1ca05a066b
mesa: more info in error messages
2009-02-04 16:33:25 -07:00
Brian Paul
8962bac0a1
swrast: add minor comments
2009-02-04 16:33:25 -07:00
Brian Paul
79e3441f66
Revert "docs: document new MESA_GLX_FORCE_DIRECT env var for the Xlib driver"
...
This reverts commit 2f51be75c5 .
2009-02-04 16:33:25 -07:00
Brian Paul
c35a5aeb70
mesa: make Xlib glXIsDirect() always return True
2009-02-04 16:33:25 -07:00
Brian Paul
c06c74c0b8
demos: remove unused function
2009-02-04 16:33:25 -07:00
Brian Paul
906c60d0b7
demos: silence uninitialized var warning
2009-02-04 16:33:25 -07:00
Brian Paul
803504e69f
mesa: minor error msg improvement
2009-02-04 16:33:25 -07:00
Chris Wilson
e92d97d75b
intel: Decode MI operands using specific length masks
...
The MI opcodes have different variable length masks, so use an operand
specific mask to decode the length.
2009-02-04 17:04:31 -05:00
Chris Wilson
05d130a35a
intel: Correct decoding of 3DSTATE_PIXEL_SHADER_CONSTANTS
...
A couple of minor typos that proclaimed an error in the wrong command, and
failed to offset the mask.
2009-02-04 16:56:31 -05:00
Eric Anholt
b2e09910f6
intel: Fix fbo_firecube regression with FBconfigs change.
...
By selecting a 4444 texture format due to a bad test, we hit the
intel_update_wrapper error path, and despite the appearance of error handling
in it and its callers, the desired behavior (software fallback) doesn't occur.
2009-02-04 10:31:04 -08:00
Maciej Cencora
c20df0ab4e
r300: make the macros safe. add missing parenthesis.
2009-02-04 08:01:52 -07:00
Maciej Cencora
5ee71bad7b
r300: Fix EXP2 fog
2009-02-04 08:01:52 -07:00
Ben Skeggs
ee97bcc66c
nouveau: notifier timeout is a float now
2009-02-04 21:08:41 +10:00
Ben Skeggs
79bf0bdc7f
nouveau: get things building/running again after pipe_surface.buffer removal
...
Don't look at nouveau_winsys_pipe.h... I promise it's temporary!
2009-02-04 21:07:28 +10:00
Ben Skeggs
c10fb95790
nouveau: link against libdrm_nouveau (installed with libdrm)
2009-02-04 19:41:12 +10:00
Corbin Simpson
9f10b16790
r300: A bit more cleanup and state handling.
2009-02-04 00:50:38 -08:00
Corbin Simpson
f097465bb8
r300: Moar swtcl emit. Still sucks, but getting there.
2009-02-03 22:55:30 -08:00
Dave Airlie
8fe61fc5ba
radeon/r200 remove more unused code
2009-02-04 16:01:41 +10:00
Dave Airlie
b584b0728d
radeon: make compile again.
...
Not tested but ripped out lots of stuff unneeded anymore time to test later
2009-02-04 15:58:08 +10:00
Dave Airlie
88a409fa8e
r300: fix up CS for modesetting - gears under kms works
2009-02-04 15:12:16 +10:00
Eric Anholt
8910da5b7a
intel: Fix commented-out glViewport in intel_meta_set_passthrough_transform.
...
Too much commit -a while debugging.
2009-02-03 20:06:48 -08:00
Eric Anholt
529d1d720e
swrast: Add support for x8r8g8b8 fbconfig.
...
This lets swrast produce an fbconfig suitable for the root visual now that
the server's not allowing mismatched fbconfigs.
2009-02-03 20:06:48 -08:00
Dave Airlie
c370776b02
radeon: make generate_mipmap static
2009-02-04 13:41:05 +10:00
Dave Airlie
0bcac04100
r300: fix swtcl
2009-02-04 13:40:48 +10:00
Dave Airlie
c1a42f5cdc
r200: fixup DMA region stuff
2009-02-04 23:40:41 +10:00
Dave Airlie
e44effcfcb
radeon: call getpagesize once and store in a static
2009-02-04 13:16:41 +10:00
Dave Airlie
711cbf30a1
r300: make dma buffer reuse much more sensible
2009-02-04 13:16:03 +10:00
Dave Airlie
55c8a79a33
radeon: add support for stencil buffers + misc debug changes
...
this adds the stencil rb setup, along with misc changes to formatting
and debug
2009-02-04 11:19:26 +10:00
Dave Airlie
3f59bee438
r200: move to new mipmap interface
2009-02-04 11:17:37 +10:00
Dave Airlie
c85a3851b6
radeon: only do the fb read if we are mapping a VRAM object
...
this makes writing the DMA buffers got a lot better
2009-02-04 11:14:38 +10:00
Dave Airlie
e8f575d657
radeon_cs: move to inline cs_write_dword
...
this gets back some of the CPU this was wasting
2009-02-04 11:13:54 +10:00
Brian Paul
2f51be75c5
docs: document new MESA_GLX_FORCE_DIRECT env var for the Xlib driver
2009-02-03 15:36:38 -07:00
Brian Paul
49e80bf6b1
xlib: use MESA_GLX_FORCE_DIRECT to make glXIsDirect() always return True
...
Some apps won't run w/ indirect rendering contexts.
Also, consolidate some context-init code in new init_glx_context() function.
2009-02-03 15:36:38 -07:00
Brian Paul
b5d549e351
mesa: simplify delete_wrapper()
2009-02-03 15:36:38 -07:00
Brian Paul
dd22f6f795
demos: modify bufferobj.c to exercise interleaved vertex arrays
...
Also, put colors before vertex positions, and place the data at a 40-byte
offset from the start of the buffer.
2009-02-03 15:17:26 -07:00
Alan Hourihane
a47965588f
mesa: fix offset problem with interleaved arrays
2009-02-03 20:08:47 +00:00
Zack Rusin
e0c3b4970d
gallium: adjust gdi for the latest changes
2009-02-02 23:54:28 -05:00
Zack Rusin
5069bfed29
gallium: remove pipe_buffer from surfaces
...
this change disassociates, at least from the driver perspective,
the surface from buffer. surfaces are technically now views on the
textures so make it so by hiding the buffer in the internals of
textures.
2009-02-02 23:47:16 -05:00
Corbin Simpson
e5018a5675
r300: Add stubs for swtcl immediate emit.
2009-02-02 20:33:57 -08:00
Dave Airlie
4c078cfbad
radeon: add a reference to the static buffers so they don't get deleted
2009-02-03 12:38:31 +10:00
Joakim Sindholt
e1b04da9b3
r300: fix compiler/linker errors
2009-02-02 18:24:55 -08:00
Corbin Simpson
3aabfa4608
r300: Clear up XXX in r300_state.
2009-02-02 16:39:43 -08:00
Corbin Simpson
fa3c59136e
r300: Take care of some XXXes.
2009-02-02 16:13:41 -08:00
Brian Paul
8e8b25c26a
demos: update multitex.c GLSL demo to use vertex arrays or glVertex-mode
...
Press 'a' to toggle drawing mode.
2009-02-02 16:51:45 -07:00
Brian Paul
4c5f390328
util: added more functions to extfuncs.h
2009-02-02 16:51:45 -07:00
Brian Paul
dea0d4d563
mesa: fix GLSL issue preventing use of all 16 generic vertex attributes
...
Only 15 actually worked before since we always reserved generic[0] as an
alias for vertex position.
The case of vertex attribute 0 is tricky. The spec says that there is no
aliasing between generic vertex attributes 0..MAX_VERTEX_ATTRIBS-1 and the
conventional attributes. But it also says that calls to glVertexAttrib(0, v)
are equivalent to glVertex(v). The distinction seems to be in glVertex-mode
versus vertex array mode.
So update the VBO code so that if the shader uses generic[0] but not gl_Vertex,
route the attribute data set with glVertex() to go to shader input generic[0].
No change needed for the glDrawArrays/Elements() path.
This is a potentially risky change so regressions are possible. All the usual
tests seem OK though.
2009-02-02 16:51:45 -07:00
Brian Paul
1cb7cd1292
glsl: update program->InputsRead when referencing input attributes
...
This info will be used in the linker for allocating generic vertex attribs.
2009-02-02 16:51:45 -07:00
Brian Paul
e33edafb2c
mesa: fix stand-alone glslcompiler
2009-02-02 16:51:45 -07:00
Brian Paul
d2eff33ab7
mesa: make _mesa_fprint_program_opt() non-static
2009-02-02 16:51:45 -07:00
Dave Airlie
d9cf131925
r300: fixup mipmap + texsubimage issues
...
This fixes a few regression in piglit, and adds some debug to the mipmap code
2009-02-03 09:49:45 +10:00
Dave Airlie
dbf72bdd3d
radeon_bo: align size of bo to page size.
...
This is really required for the VRAM allocator upload function.
2009-02-03 09:48:27 +10:00
Corbin Simpson
33d798c4ea
r300: Move some registers around.
...
This fixes r500 hangs.
2009-02-02 15:39:30 -08:00
Eric Anholt
052c1d66a1
i965: Remove brw->attribs now that we can just always look in the GLcontext.
2009-02-02 15:34:10 -08:00
Eric Anholt
14321fcfde
i965: Delete old metaops code now that there are no remaining consumers.
2009-02-02 15:34:09 -08:00
Eric Anholt
c96bac0950
intel: replace custom metaops clear with generic.
...
No real-world impact on performance seen. Even glxgears seems to be, if
anything, happier.
2009-02-02 15:33:33 -08:00
Corbin Simpson
a2416e3d7e
r300, amd: Oops, a couple more API changes.
...
Somehow I forgot to commit these.
2009-02-02 14:42:04 -08:00
Eric Anholt
dd1c68f151
dri2: Avoid round-tripping on DRI2GetBuffers for the same set of buffers.
...
We only wanted to request when asked for the same set of buffers when a resize
has happened. We can just watch the protocol stream for a ConfigureNotify
and flag to do it then.
This is about a 5% win from doing two glViewport()s per frame in openarena.
2009-02-02 12:00:39 -08:00
José Fonseca
df73c964d8
xlib: Get conditional compilation of drivers working again.
2009-02-02 15:37:58 +00:00
José Fonseca
f0ad6b6144
gdi: Update for wgl st reorg.
2009-02-02 15:36:00 +00:00
Michel Dänzer
859db22527
scons: Fixups for the introduction of the xlib state_tracker.
...
Not quite working yet; glxinfo complains about glXChooseVisual being undefined.
2009-02-02 15:49:33 +01:00
Brian Paul
92ced46eaf
mesa: move code after decls. Fixes Window build failure.
2009-02-02 07:48:10 -07:00
Jakob Bornecrantz
be0a6c3598
gallium: Stop relinking drivers and aux libraries
2009-02-02 14:18:50 +01:00
Keith Whitwell
b608d64243
Merge commit 'origin/gallium-0.2' into gallium-0.2
2009-02-02 12:18:34 +00:00
Keith Whitwell
e4d1757f81
Merge branch 'gallium-wgl-rework' into gallium-0.2
...
Conflicts:
src/gallium/state_trackers/wgl/shared/stw_public.h
2009-02-02 12:17:01 +00:00
José Fonseca
558010527b
wgl: Only export the same symbols as Microsoft's opengl32.dll.
...
Plus the ICD entrypoints.
2009-02-02 11:08:41 +00:00
Corbin Simpson
ffc5e9a422
amd: Fix build errors from rebase.
2009-02-02 00:18:25 -08:00
Corbin Simpson
ce6710e369
r300: Clean up after rebase.
...
Fix a couple struct members, clear up a few texture lines.
2009-02-01 23:58:16 -08:00
Corbin Simpson
38f610e536
r300: Add u_simple_screen support.
2009-02-01 23:43:30 -08:00
Corbin Simpson
e6e6b493b6
r300: Add more rs_state, fix indents on dsa_state.
2009-02-01 23:30:32 -08:00
Corbin Simpson
70b508bffb
r300: Split rs_state emit into its own function.
2009-02-01 23:30:32 -08:00
Corbin Simpson
7ccc9a92ce
amd: Add AMD_SOFTPIPE environment option.
...
If set, AMD_SOFTPIPE will make amd switch to softpipe.
2009-02-01 23:30:32 -08:00
Corbin Simpson
8c8bdcde6d
r300: Add line stipple state to rs_state.
2009-02-01 23:30:32 -08:00
Corbin Simpson
e14a10691e
r300: Add cleaned-up clear fallback, sort more regs.
2009-02-01 23:30:32 -08:00
Corbin Simpson
09b107058d
r300: Try to fix up RS a bit more.
2009-02-01 23:30:32 -08:00
Joakim Sindholt
0c9d2bbb12
r300: set up r5xx fragment shader; clear still broken
2009-02-01 23:30:32 -08:00
Corbin Simpson
c199f33032
r300: Unbreak emit, fix up a bunch of little things.
2009-02-01 23:30:31 -08:00
Joakim Sindholt
f0fce46a48
r300: attempt at trivial/clear on r5xx
2009-02-01 23:30:31 -08:00
Joakim Sindholt
00f96d054d
r300: name registers for human readability
...
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com >
2009-02-01 23:30:31 -08:00
Corbin Simpson
588d8f3bef
r300: Fix a few more registers.
2009-02-01 23:30:31 -08:00
Corbin Simpson
84ec4d6bed
Ack, forgot to update the index again.
2009-02-01 23:30:31 -08:00
Corbin Simpson
80dc180140
r300: A handful of thingys.
2009-02-01 23:30:31 -08:00
Corbin Simpson
f6add70ef8
r300: Fix small r300_reg typo.
2009-02-01 23:30:30 -08:00
Corbin Simpson
3f1bc7ed32
r300: Moar RS cleanup.
...
How could I possibly miss these?
2009-02-01 23:30:30 -08:00
Corbin Simpson
9814fca718
r300: Cleanup first part of RS block.
...
Working towards r500-ability.
2009-02-01 23:30:30 -08:00
Corbin Simpson
962d2e678f
r300: Clean up PVS upload emits.
2009-02-01 23:30:30 -08:00
Corbin Simpson
2e635ef563
r300: Add dsa state emit.
...
Seeing a pattern yet?
2009-02-01 23:30:30 -08:00
Corbin Simpson
bea0c5812b
r300: Add blend color state emit.
...
Slow and steady wins the race. Or something like that.
2009-02-01 23:30:30 -08:00
Corbin Simpson
2cb90c8e80
r300: Count BEGIN_CS, END_CS, warn if count is off.
2009-02-01 23:30:29 -08:00
Corbin Simpson
f1ba451bcc
r300: Set up blend state emit, clean up blend registers.
...
Also add at least one missing register to r300_reg.
2009-02-01 23:30:29 -08:00
Corbin Simpson
2c2f819a1d
r300: Add r300_flush.
...
Haha, I always do this.
2009-02-01 23:30:29 -08:00
Corbin Simpson
3e3122467f
r300: Deobfuscate a few registers, fix inaccurate variable names.
...
It's not "pipes", it's floating-point vertex processors. Completely different.
2009-02-01 23:30:29 -08:00
Corbin Simpson
29a4f54935
r300: Working trivial/clear for RV410.
...
This might work for other people too.
2009-02-01 23:30:29 -08:00
Corbin Simpson
412cf4d38b
BROKEN
...
This commit is only to protect against data loss, so please skip it when
bisecting. Thanks.
2009-02-01 23:30:29 -08:00
Corbin Simpson
f40e6988bd
Rebased to gallium-0.2, Jan 24 2009.
2009-02-01 23:30:28 -08:00
Corbin Simpson
188f61d43a
r300: Hook up clear, set it to fallback.
2009-02-01 23:30:28 -08:00
Corbin Simpson
57b062f775
r300: Make format names legible.
2009-02-01 23:30:28 -08:00
Corbin Simpson
f045988ee1
r300: Add more capabilities.
2009-02-01 23:30:28 -08:00
Corbin Simpson
f2a7d4f2e8
r300: Newlines, dammit!
2009-02-01 23:30:28 -08:00
Corbin Simpson
161f4068aa
r300: More state setters.
2009-02-01 23:30:28 -08:00
Corbin Simpson
902b1be0ea
r300: Add some useful debugging information; remove a couple compile warnings.
...
Deck chairs on the Titanic.
2009-02-01 23:30:28 -08:00
Corbin Simpson
e54732eb3d
r300: Remove radeon_reg.
...
Wonder why this was ever committed...
2009-02-01 23:30:27 -08:00
Corbin Simpson
1aa2ecf353
r300: Put r300_blit to bed.
...
Not going to be using the blitter. Period.
2009-02-01 23:30:27 -08:00
Corbin Simpson
7d3d3c75cc
r300: Plan for the next state setters.
2009-02-01 23:30:27 -08:00
Corbin Simpson
1a503019d7
r300: Moar state handlers.
...
Ah, my code's so bad. It's amazing.
2009-02-01 23:30:27 -08:00
Corbin Simpson
1a5eea0c1e
r300: Finish basic state setup.
...
I have successfully fooled glxinfo into believing that I am a competent
writer of code. Next step is to trick trivial/clear.
2009-02-01 23:30:27 -08:00
Corbin Simpson
02c6e52330
amd: Fix uninitialized pipe_screen.
2009-02-01 23:30:27 -08:00
Corbin Simpson
5f95f0538e
amd: Fix missing break statement.
2009-02-01 23:30:26 -08:00
Corbin Simpson
45cb94217e
r300: Add fragment shader stubs.
...
Not looking forward to filling these out at all.
2009-02-01 23:30:26 -08:00
Corbin Simpson
471129c7a1
r300: Add more pipe_texture stuff.
...
This is enough to sate glxinfo, for now.
2009-02-01 23:30:26 -08:00
Corbin Simpson
8e11e01214
r300: Add initial pipe_texture handling.
...
Still primitive and needing to be fleshed out, but it's a start.
2009-02-01 23:30:26 -08:00
Corbin Simpson
2f37387786
r300: Add texture sampler state.
...
Easy compared to the actual texture handling code.
2009-02-01 23:30:26 -08:00
Corbin Simpson
0648bc9f65
r300: Add texture stubs.
2009-02-01 23:30:26 -08:00
Corbin Simpson
ecb7f29f74
amd/r300: Wire up GETPARAM ioctls.
...
Whoo, stuff is starting to look cleaner and cleaner.
2009-02-01 23:30:25 -08:00
Corbin Simpson
90a96cb2ad
r300: Add sampler state skeleton.
...
Heh, serendipitous sibilance. Anyway, need to flesh this out.
2009-02-01 23:30:25 -08:00
Corbin Simpson
0ff7cb7c89
r300: Add num_vert_pipes (and remove busted num_pipes.)
2009-02-01 23:30:25 -08:00
Corbin Simpson
7d63ff93cb
r300: Unbreak build, finish clear state.
...
Completely untested, of course.
2009-02-01 23:30:25 -08:00
Corbin Simpson
22877265f4
[BROKEN] r300: Add initial clear/fill code.
...
Copied from mesa and still broken. Gimme a few to clean it up.
2009-02-01 23:30:25 -08:00
Corbin Simpson
6885560de5
r300: Fix constness, compile warnings, indentation in r300_state.
2009-02-01 23:30:25 -08:00
Corbin Simpson
8d1f386dcb
r300: Set floating-point params.
...
Note: I took those numbers from classic Mesa. I know that points are routinely
used to clear buffers, but line width is probably wrong.
2009-02-01 23:30:24 -08:00
Corbin Simpson
54d137e079
r300: Fix indenting.
2009-02-01 23:30:24 -08:00
Corbin Simpson
2b9ecaa6dd
r300: Fix missing free().
2009-02-01 23:30:24 -08:00
Corbin Simpson
502ddfcd57
r300: Add path for pci_id in winsys.
...
Needs to be hooked up to the getparam from the kernel.
2009-02-01 23:30:24 -08:00
Corbin Simpson
43f20357c8
r300: Use chip caps for something.
...
Step two: Integration. Yay?
Time to stop messing around with this and actually go do things.
2009-02-01 23:30:24 -08:00
Corbin Simpson
538a8149af
r300: Add chipset sorting and capabilities.
...
Part one: Capabilities from classic Mesa.
Damn, if only we didn't have so many fucking Radeons!
2009-02-01 23:30:24 -08:00
Corbin Simpson
2e09845277
r300: Various flags, small state tracking things.
...
Getting these out of the way so more stuff can be put in.
2009-02-01 23:30:23 -08:00
Corbin Simpson
7961974fc2
r300: Add a basic dirty state emit.
...
I feel strangely unproductive. Must be the cold.
2009-02-01 23:30:23 -08:00
Corbin Simpson
4ea17301c6
r300: Remove r300_state.h
2009-02-01 23:30:23 -08:00
Corbin Simpson
f3b53a5cb6
r300: Add blend color.
2009-02-01 23:30:23 -08:00
Corbin Simpson
a08a830fd3
r300: Add more state.
...
pipe_rasterizer_state is big, and I'm still processing it.
Todo:
- LOL EVERYTHING
- Moar cough syrup.
- Even moar cough syrup.
2009-02-01 23:30:23 -08:00
Corbin Simpson
4ce8129494
r300: Fix errant inlines.
...
This should unbreak dynamic loading.
2009-02-01 23:30:23 -08:00
Corbin Simpson
21a5a133ff
r300: Hook up state functions.
...
Haha, should not have attempted the scissors.
2009-02-01 23:30:23 -08:00
Corbin Simpson
bbb1c6f629
r300: Add DSA state.
...
That's it for now. Just the "easy" stuff.
Todo:
- Rasterizer state, which is a lot more than just the RS.
- Miscellaneous state which doesn't currently belong to any state object.
- Shader assemblers?
- Fix dynamic loading bugs.
2009-02-01 23:30:22 -08:00
Corbin Simpson
28bb7f3206
r300: Add scissor state, fix build.
2009-02-01 23:30:22 -08:00
Corbin Simpson
74288078ea
r300: Add blend state.
...
Also switched to r300_reg instead of radeon_reg. Yay?
2009-02-01 23:30:22 -08:00
Corbin Simpson
432ab001d0
r300, amd: Add the ability to flush the CS.
...
This is probably important, yeah?
2009-02-01 23:30:22 -08:00
Corbin Simpson
fbeeb66757
r300, amd: Make everything build. (Not necessarily work, mind you.)
...
Lots of structural work, especially in getting the two parts to talk nicely.
Todo:
- Get damn blitter working.
- Add CS flush.
- Reverse order of above two items.
2009-02-01 23:30:22 -08:00
Corbin Simpson
0c59004fe3
And unbreak traditional build.
...
s/drm-radeon/drm_radeon/
2009-02-01 23:30:22 -08:00
Corbin Simpson
4aaaecbfa6
A bit of r300 cleanup.
2009-02-01 23:30:21 -08:00
Corbin Simpson
e9b08e7373
Make r300 and amd build in scons.
2009-02-01 23:30:21 -08:00
Corbin Simpson
adb74f5c52
r300: Hook up to winsys, add missing header.
...
In theory it works, which of course means that it doesn't.
2009-02-01 23:30:21 -08:00
Corbin Simpson
78b599fb4c
gallium-r300: Add primitive CS.
...
Enough to get us up and running, I suppose.
This needs to be pushed down into winsys!
2009-02-01 23:30:21 -08:00
Corbin Simpson
ad14271425
gallium-r300: Max LOD bias is 16.0.
2009-02-01 23:30:21 -08:00
Corbin Simpson
32273c01bd
gallium-r300: Set right ROP for solid fills.
...
Thanks to MrCooper for pointing me in the right direction.
2009-02-01 23:30:20 -08:00
Corbin Simpson
afe2de0a23
gallium-r300: Fit it all together now.
...
In theory, it could work, but there's still some very big gaps.
Anything marked with XXX should be taken care of first, probably.
2009-02-01 23:30:20 -08:00
Corbin Simpson
b1776eb144
gallium-r300: Add r300_surface.
...
Todo:
- Hook up surface functions.
- Take it for a spin and watch it crash 'n' burn.
2009-02-01 23:30:20 -08:00
Corbin Simpson
d6cdb9db25
gallium-r300: Add r300_blit.
...
Count the XXXs and weep?
2009-02-01 23:30:20 -08:00
Corbin Simpson
fb11fb897c
gallium-r300: Add copyrights, place (broken) CS.
...
Todo:
- Fill blits.
- Less suck.
- Ask glisse about how to get winsys+pipe talking right,
so stuff like the CS can be set up right.
2009-02-01 23:30:20 -08:00
Corbin Simpson
6236372300
gallium-r300: Add r300_clear.
...
Todo:
- Less suckage.
- Re-read bo-cs stuff, figure out how the hell to emit state.
- Blits.
2009-02-01 23:30:20 -08:00
Corbin Simpson
3b37cb49b8
gallium-r300: Make it build.
...
Still todo:
- Sort out winsys.
- Less suckage.
2009-02-01 23:30:20 -08:00
Corbin Simpson
3e09a07a26
gallium-r300: Look less like i915.
...
Todo:
- Figure out how much code goes in winsys.
- Make it build.
- Make it suck less.
2009-02-01 23:30:19 -08:00
Corbin Simpson
aa96874c7a
gallium-r300: Add some headers.
...
Oh yeah, we're cookin' now!
2009-02-01 23:30:19 -08:00
Corbin Simpson
da1928d4a6
gallium-r300: Initial commit.
...
Or should it be r300-gallium? Meh, whatever.
2009-02-01 23:30:19 -08:00
Jerome Glisse
b3cf2af13a
amd: initial winsys
2009-02-01 23:30:19 -08:00
Jerome Glisse
14f79d46a5
gallium autoconf/automake
2009-02-01 23:30:19 -08:00
Dave Airlie
75762a8219
radeon: this code forgot to add dPriv x/y back to spans
2009-02-02 12:26:22 +10:00
Dave Airlie
f4dfafd50a
r300: rename validate textures to validate buffers
2009-02-02 12:26:04 +10:00
Stephane Marchesin
59edbc70cd
Merge branch 'gallium-0.2' of git+ssh://marcheu@git.freedesktop.org/git/mesa/mesa into gallium-0.2
2009-02-02 02:13:07 +01:00
Stephane Marchesin
4035e0f898
nv04: some old changes I had lying around.
2009-02-02 02:12:46 +01:00
Zack Rusin
1c90cdd878
Merge branch 'gallium-winsys-private' into gallium-0.2
2009-02-01 18:48:16 -05:00
Ian Romanick
5b5ddfb89c
glxgears: No, really. Fix the dyslexia.
2009-02-01 11:56:07 -08:00
José Fonseca
9aa73cfae8
progs: Get more samples building on windows.
2009-02-01 12:00:17 +00:00
José Fonseca
64e525eab9
util: List new file in sconscript.
2009-02-01 10:31:25 +00:00
José Fonseca
4ad190c96f
pipebuffer: Drop (most of) pipe winsys stuff.
2009-02-01 10:28:16 +00:00
Pekka Paalanen
7062b7c7cb
nv20: send buffer handles on hw state emit
...
Color and Z buffer offsets were emitted here, now also the buffer
handles are emitted so they target the correct memory.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-31 23:41:23 +02:00
Pekka Paalanen
767f72c108
nv20: disable depth writes in hw init
...
Probably not necessary, but just in case. Depth registers point to the
color buffer, when there is no depth buffer.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-31 23:41:23 +02:00
Pekka Paalanen
9116f9408e
nv20: Z-mapping parameters
...
Based on my renouveau dump, adjust initial hw state related to Z-mapping,
and add one unknown depth reg into depth/stencil/alpha emission.
Now trivial/tri-z on nv20 looks identical to swrast rendered one.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-31 23:41:23 +02:00
Pekka Paalanen
b5e2ab63e8
nv20: draw_elements needs to flush
...
nv20_draw_elements() uses the draw module, and draw_flush() needs to be
called to actually emit the vertices immediately.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-31 23:41:22 +02:00
Pekka Paalanen
5e96feed37
nv20: set surface status in clear()
...
Other nvXX drivers seem to do this, so I do it too.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-31 23:41:22 +02:00
Zack Rusin
969c728095
gallium: initialize simple screen in drivers
2009-01-31 15:14:38 -05:00
Eric Anholt
24ff169486
intel: Correct FBconfig color masks with DRI2. Fail at copy and paste.
...
This still leaves us with a broken depth 32 visual, but now it's the server's
visual setup that's at fault.
2009-01-31 12:04:07 -08:00
Eric Anholt
1265e7267e
Build dri.pc during the build rather than the install process.
...
In a normal build system this is generated by configure.
2009-01-31 12:04:07 -08:00
Brian
0001deef11
mesa: more display list cleanups
...
Remove some unneeded fields. Rename some function parameters.
2009-01-31 12:11:40 -07:00
Brian
446abc2799
mesa: display list clean-ups
...
Rename some structs and fields to be more consistant with the rest of mesa.
2009-01-31 12:11:28 -07:00
Brian
7721bf267b
mesa: minor comments, clean-ups
2009-01-31 12:11:28 -07:00
Brian
c6423132ff
mesa: remove remnant of GL_SGIX_depth_texture
2009-01-31 12:11:28 -07:00
Keith Packard
954dfba129
i965: bump texture limit to 4kx4k
...
Rendering and textures are limited to 8kx8k, but mesa limits things to
4kx4k, and magic guard band stuff may break on 8kx8k drawing. This is safe
though, and makes compiz work on bigger screens.
Signed-off-by: Keith Packard <keithp@keithp.com >
2009-01-30 21:51:32 -08:00
Brian Paul
80684649a6
mesa: simplify the _mesa_get_proxy_tex_image() function
2009-01-30 16:03:32 -07:00
Brian Paul
ea4b183b8c
mesa: fix incorrect call to clear_teximage_fields() in _mesa_TexImage2D()
...
Fixes failed assertion / segfault for particular proxy texture tests.
2009-01-30 16:03:32 -07:00
Brian Paul
7f0b6a7796
intel: more debug info
2009-01-30 16:03:32 -07:00
Brian Paul
5a225dd812
i965: formatting, comments, whitespace clean-ups
2009-01-30 16:03:32 -07:00
Brian Paul
2d5b86be25
swrast: replace RENDER_START/FINISH macros with inline functions
2009-01-30 16:03:32 -07:00
Brian Paul
81ca8b93f2
swrast: replace macro with inline function
2009-01-30 16:03:32 -07:00
Brian Paul
bd944ef783
intel: remove unused RenderToTexture field
2009-01-30 16:03:32 -07:00
Brian Paul
4b37b1129e
i915: updated render to texture/fbo test
2009-01-30 16:03:32 -07:00
Zack Rusin
26c9b15343
gallium: add a convience wrapper for simple screens
...
forwards screen calls to the winsys
2009-01-30 17:59:55 -05:00
Ian Romanick
9d6880ec8d
Fix dyslexia.
2009-01-30 14:55:42 -08:00
Ian Romanick
58b9cd411f
glxgears: Log a message if synched to vblank
...
Tries to use either GLX_MESA_swap_control or GLX_SGI_video_sync to
detect whether the display is synchronized to the vertical blank. If
it detects this, a message will be printed. HOPEFULLY this will
prevent some of the bug reports such as "glxgears only gets 59.7fps.
What's wrong with my driver?"
2009-01-30 14:45:01 -08:00
Brian Paul
7c48719a5f
mesa: add missing _mesa_reference_texobj() calls for texture array targets
2009-01-30 15:35:43 -07:00
Brian Paul
88e0b92a74
mesa: remove incorrect refcounting adjustment in adjust_buffer_object_ref_counts()
...
Fixes bug 19835. However, a more elaborate fix should be implemented someday
which uses proper reference counting for gl_array_object.
2009-01-30 15:35:43 -07:00
José Fonseca
8d0b689a56
stw: Remove pipe_winsys references.
2009-01-30 22:04:35 +00:00
José Fonseca
ecc0e1ec2e
gallium: Don't ask winsys name -- let pipe screen do that if it wants.
...
Allows to leave screen->winsys NULL.
2009-01-30 22:04:15 +00:00
José Fonseca
b5d96a3e7f
stw: Don't use the winsys.
2009-01-30 21:51:59 +00:00
Eric Anholt
67ee22c89f
intel: If we're doing a depth clear with tris, do color with it.
...
This is a 10% win on the ever-important glxgears not-a-benchmark.
2009-01-30 13:46:37 -08:00
Eric Anholt
ac0dfbdf0f
i915: Only call CalcViewport from DrawBuffers instead of Viewport.
...
This saves an inadvertent round-trip to the X Server on DrawBuffers, which was
hurting some metaops.
2009-01-30 13:46:37 -08:00
Eric Anholt
3ee21f30cd
intel: Expose more FBconfigs in the 3D driver.
...
We can support any combination of (a8r8g8b8, x8r8g8b8, r5g6b5) x (z0,z24,z24s8)
on either class of chipsets. The only restriction is no mixing bpp when also
mixing tiling. This shouldn't be occurring currently.
2009-01-30 13:46:37 -08:00
Ian Romanick
bc968e515d
Remove stale symlinks to intel/intel_depthstencil.c
2009-01-30 13:26:37 -08:00
Zack Rusin
adfbba476d
gallium: make p_winsys internal
...
move it to pipe/internal/p_winsys_screen.h and start converting
the state trackers to the screen usage
2009-01-30 15:57:33 -05:00
Dan Nicholson
a3d223f0d2
autoconf: Use include-fixed directory with makedepend on newer GCC
...
On newer GCC releases, the compiler's headers have been split between
the include and include-fixed directories. Add both if the directories
exist.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com >
Signed-off-by: Julien Cristau <jcristau@debian.org >
2009-01-30 12:03:16 -08:00
José Fonseca
3cfaccf92a
Merge branch 'gallium-0.2' into gallium-winsys-private
2009-01-30 17:01:23 +00:00
Dave Airlie
f68a61d883
r200/r300: swtcl fixups to use old dma buffers on top of BOs
2009-01-31 02:00:12 +10:00
Dave Airlie
e45213d89b
r200/r300: add aperture space checks
2009-01-31 01:59:57 +10:00
José Fonseca
462f09487e
util: Define ffs for MinGW.
2009-01-30 14:59:32 +00:00
José Fonseca
0c75e59bfd
gdi: Update for winsys interface changes.
2009-01-30 14:32:11 +00:00
José Fonseca
46edad7d29
Merge branch 'gallium-0.2' into gallium-winsys-private
2009-01-30 14:07:12 +00:00
José Fonseca
7996b3e034
pipebuffer: Consider 0 as no alignment needed.
2009-01-30 14:06:25 +00:00
Dave Airlie
08bb7eedfb
r200: fix swtcl - slow but works
2009-01-30 20:03:17 +10:00
Zack Rusin
b3028acd98
gallium: give the screen priority when it comes to buffer allocations
...
allows the driver to overwrite buffer allocation, first step on the way
to making winsys interface internal to the drivers. state trackers and
the code above it will go through the screen
2009-01-29 21:43:15 -05:00
Jakob Bornecrantz
1f9fff28a4
gallium: Don't build egl state_tracker
2009-01-30 02:24:47 +01:00
Jakob Bornecrantz
0ac83a0ebb
egl: Don't fill shown screen
2009-01-30 01:57:07 +01:00
Jakob Bornecrantz
83a2a89663
intel: Remove debug print
2009-01-30 01:55:09 +01:00
Jakob Bornecrantz
48f7d86b7c
i915: Fix surface operations
2009-01-30 01:53:50 +01:00
Brian Paul
1d4f3ccb21
intel: remove unused intel_depthstencil.[ch]
2009-01-29 15:07:32 -07:00
Brian Paul
d332a74e77
intel: remove unused #includes
2009-01-29 15:06:55 -07:00
Brian Paul
5fec84ad04
mesa: allow glFramebufferTexture1/2/3D(target = GL_READ/DRAW_FRAMEBUFFER)
...
This is part of GL_EXT_framebuffer_blit and GL_ARB_framebuffer_obbject.
2009-01-29 15:01:09 -07:00
Brian Paul
5c38801f8e
intel: formatting clean-ups
2009-01-29 14:57:31 -07:00
Brian Paul
ba3aadf354
intel: fix check for Y orientation in span functions.
2009-01-29 14:57:16 -07:00
Brian Paul
d3aa16d92f
i965: use bitfields in brw_sf_unit_key struct
2009-01-29 11:10:56 -07:00
Brian Paul
818bda3d74
intel: remove unused intel_rendering_to_texture()
2009-01-29 11:07:55 -07:00
Brian Paul
ba367f68cc
i965: fix render to FBO/texture orientation bugs
...
Anytime we're not rendering to the default/window FBO, need to invert
rendering, not just when rendering to a texture. Otherwise, if a FBO
consists of a mix of textures and renderbuffers the up/down orientation
was inconsistant.
Fixes shadowtex.c bad rendering.
2009-01-29 11:07:14 -07:00
Brian Paul
2897cee99f
mesa: fix a render to texture FBO validation bug
...
When glTexImage() is called we need to re-validate any FBOs that point to
the texture (i.e. render-to-texture) since changing the texture's size/format
will effect FBO completeness.
We don't keep a list of all FBOs rendering into each texture (which would be
a bit messy) so we check all FBOs in existance. To optimize this, the
gl_texture_object->_RenderToTexture flag is used to avoid checking textures
that have never been used as renderbuffers. So, we only walk over all FBOs
(there's usually only a few) when glTexImage() modifies a RTT texture.
Fixes a bug seen in shadowtex.c when toggling packed depth/stencil mode.
2009-01-29 09:20:18 -07:00
José Fonseca
444e98de31
pipebuffer: Ondemand buffer manager.
...
A variation of malloc buffers which get transferred to real graphics memory
when there is an attempt to validate them.
2009-01-29 15:19:31 +00:00
José Fonseca
e06474dbae
pipebuffer: Implement proper buffer validation.
2009-01-29 15:19:31 +00:00
Dave Airlie
70661f678e
WIP comit
2009-01-29 20:46:31 +10:00
Dave Airlie
c9bb5cd20e
r200: bring back single dma flush
2009-01-29 20:33:07 +10:00
Dave Airlie
59b183ce0f
radeon: remove even more common code
2009-01-29 19:11:31 +10:00
Dave Airlie
5ba92a5b05
radeon/r200/r300: bring back old style DMA buffer on top of BOs.
...
this gets back a lot of the lots speed in gears on r500 at least
I also fixed the legacy bufmgr to deal when the dma space fills up
2009-01-29 16:47:37 +10:00
Dave Airlie
682ebc79d5
r200: start work on userspace clear for r200
2009-01-29 23:03:47 +10:00
Dave Airlie
5fbb00a11e
r200: unref swtcl buffer correctly
2009-01-29 23:03:34 +10:00
Dave Airlie
b13746b558
r300: fix some whitespace
2009-01-29 23:03:21 +10:00
Dave Airlie
474d282a1d
r200: re-write state handlers for new CS mechanism
2009-01-29 23:02:43 +10:00
Dave Airlie
31a112e6e8
r200: avoid setting variable on kernel mm setup
2009-01-29 23:01:41 +10:00
Dave Airlie
ab6edc9dce
radeon: add repeated register packet one
2009-01-29 23:01:21 +10:00
Jakob Bornecrantz
86e86e6cb6
egl: Blit to the bound frontbuffer with pipe
2009-01-29 03:00:15 +01:00
Jakob Bornecrantz
3b1b9f3cc7
intel: Set render domain on read and write
2009-01-29 03:00:15 +01:00
Jakob Bornecrantz
178f991208
intel: Try forcing flushes
2009-01-29 03:00:15 +01:00
Jakob Bornecrantz
e67c020ad4
intel: Dump batchbuffer before sending to hw
2009-01-29 03:00:15 +01:00
Jakob Bornecrantz
f1c0be75b7
intel: Change link order
2009-01-29 03:00:15 +01:00
Jakob Bornecrantz
8340a116ea
i915: Don't take a context as argument for debug
2009-01-29 03:00:14 +01:00
Jakob Bornecrantz
a3b89a39d9
i915: Don't dump batchbuffer on flush in context
2009-01-29 03:00:14 +01:00
Brian Paul
e351343fdf
docs: i965 fixes
2009-01-29 00:59:54 +00:00
Brian Paul
80b3767384
i965: fix bug in pass0_precalc_mov()
...
Previously, "in-place" swizzles such as:
MOV t, t.xxyx;
were handled incorrectly. Fixed by splitting the one loop into two loops so we
get all the refs before assigning them (to avoid potential clobbering).
(cherry picked from master/commit faa48915d2 )
2009-01-29 00:59:54 +00:00
Brian Paul
477c1820a0
i965: widen per-texture bitfields for 16 texture image units
...
(cherry picked from master/commit f78c388b6c )
2009-01-29 00:59:54 +00:00
Brian Paul
999fe905c9
intel: check if stencil test is enabled in intel_stencil_drawpixels()
...
(cherry picked from master/commit 72ee0e247d )
2009-01-29 00:59:54 +00:00
Brian Paul
2fd9c2ebd6
intel: save/restore GL matrix mode in intel_meta_set_passthrough_transform(), intel_meta_restore_transform()
...
(cherry picked from master, commit 723648f2ee )
2009-01-29 00:59:53 +00:00
Brian Paul
e6df67bf66
docs: fix typo
2009-01-29 00:59:53 +00:00
Brian Paul
e98ef30351
mesa: set version to 7.4 for mesa_7_4_branch
2009-01-29 00:59:53 +00:00
Brian Paul
b987fde60a
docs: skeleton 7.4 release notes file
2009-01-29 00:59:53 +00:00
Brian Paul
978a6c1cfa
docs: 7.3 md5 sums
2009-01-29 00:59:53 +00:00
Brian Paul
93cbb2c205
mesa: set version to 7.3
2009-01-29 00:59:53 +00:00
Brian Paul
4e8d99998f
docs: set 7.3 release date
2009-01-29 00:59:52 +00:00
Brian Paul
bbcbf4f680
docs: assorted updates, link fixes
2009-01-29 00:59:52 +00:00
Ian Romanick
425c803c03
intel: Fix up some extension string issues
...
Move the remaining extension string enables to intel_extensions.c.
Make sure that GL_NV_texture_env_combine4 is not enabled on i830.
2009-01-28 16:28:11 -08:00
Ian Romanick
d485ee54dd
Make GLX_SGIX_pbuffer mandatory
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2009-01-28 16:28:11 -08:00
Ian Romanick
8aa209c766
Make GL_ARB_draw_buffers mandatory
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2009-01-28 16:28:11 -08:00
Ian Romanick
474cda6fa9
Make GL_{EXT,SUN}_multi_draw_arrays and GL_IBM_multimode_draw_arrays mandatory
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2009-01-28 16:28:11 -08:00
Ian Romanick
82b9661894
Make GL_ARB_vertex_buffer_object mandatory
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2009-01-28 16:28:10 -08:00
Ian Romanick
2b77b1d62e
Make GL_ARB_multisample mandatory
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2009-01-28 16:28:10 -08:00
Ian Romanick
33fa5e4bfa
Make GL_ARB_texture_compression mandatory
...
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2009-01-28 16:28:10 -08:00
Brian Paul
26da28c995
mesa: remove GL_SGIX_shadow, GL_SGIX_shadow_ambient and GL_SGIX_depth_texture
...
Everyone should be using the newer/better ARB versions of these extensions.
2009-01-28 16:49:28 -07:00
Jakob Bornecrantz
e74be3f08e
intel: Fix type correctly this time
...
Facepalm.
2009-01-28 23:40:10 +01:00
Jakob Bornecrantz
b5fc2a68e8
intel: Fix typo
2009-01-28 23:37:23 +01:00
Jakob Bornecrantz
72b2733287
i915: Add verbose debuging
...
Only enabled while in development this commit
will be reverted in the future.
2009-01-28 23:28:10 +01:00
Jakob Bornecrantz
1642dd2f86
i915: Fix batchbuffer dumping
2009-01-28 23:28:10 +01:00
Jakob Bornecrantz
2012739043
i915: Flush on surface copy/clear
2009-01-28 23:28:09 +01:00
Jakob Bornecrantz
26fe7a5fc4
intel: Supply the correct buffers to gem
2009-01-28 23:28:09 +01:00
Brian Paul
f584752afe
docs: document GL_EXT_texture_swizzle
2009-01-28 15:06:54 -07:00
Jakob Bornecrantz
2cb6b17bc8
gallium: Build EGL st when build glx st
2009-01-28 23:06:42 +01:00
Jakob Bornecrantz
585c10b46d
egl: Adopt to st_framebuffer changes
2009-01-28 23:06:04 +01:00
Brian Paul
3dcc48e688
i965: minor tweak: replace OPCODE_MOV with OPCODE_SWZ
...
Just to reinforce the understanding that an extended swizzle with 0 and 1
terms is possible there.
2009-01-28 14:51:35 -07:00
Brian Paul
c0d3b7679a
i965: implement GL_EXT_texture_swizzle
...
If the texture swizzle is not XYZW (no-op) add an extra MOV instruction
after the TEX instruction to rearrange the components.
2009-01-28 14:50:03 -07:00
Brian Paul
9e7903e492
i965: minor clean-up, comments, etc.
2009-01-28 14:48:41 -07:00
Brian Paul
68acc61fc3
Merge commit 'origin/master' into texture_swizzle
2009-01-28 14:45:18 -07:00
Brian Paul
faa48915d2
i965: fix bug in pass0_precalc_mov()
...
Previously, "in-place" swizzles such as:
MOV t, t.xxyx;
were handled incorrectly. Fixed by splitting the one loop into two loops so we
get all the refs before assigning them (to avoid potential clobbering).
2009-01-28 14:35:58 -07:00
Brian Paul
2ace634024
i965: minor comment additions/edits
2009-01-28 14:33:07 -07:00
Keith Whitwell
a38b8213ff
wgl: add missing header
2009-01-28 20:41:00 +00:00
Keith Whitwell
cbd368e91b
stw: use proper stw_context pointers in shared interface
...
Move away from hglrc.
2009-01-28 20:39:06 +00:00
Keith Whitwell
866587942c
stw: clean up error paths
2009-01-28 20:19:17 +00:00
Keith Whitwell
9a58a9d6ca
stw: don't call out to wglGetPixelFormat()
2009-01-28 20:08:07 +00:00
Keith Whitwell
7dbd95618f
stw: remove duplicate function declarations
2009-01-28 20:07:07 +00:00
Keith Whitwell
ef3fe78478
stw: fix comment
2009-01-28 19:13:58 +00:00
Keith Whitwell
c7e38bc7fe
stw: remove header
2009-01-28 19:10:50 +00:00
Brian Paul
89fddf978c
i965: minor improvements in brw_wm_populate_key()
2009-01-28 11:42:42 -07:00
Brian Paul
177eda834e
i965: remove pad field
2009-01-28 11:38:42 -07:00
Brian Paul
f78c388b6c
i965: widen per-texture bitfields for 16 texture image units
2009-01-28 11:37:11 -07:00
Brian Paul
3147d7785d
i965: minor comments
2009-01-28 11:36:39 -07:00
Keith Whitwell
906230d16e
svga: remove pixelformat helpers from stw shared interface
...
Keep these internal structs private to wgl/shared. Pull in
some pixelformat choosing code from wgl/wgl to avoid exporting them
more generally.
2009-01-28 18:25:46 +00:00
Brian Paul
72f0b4a55b
mesa: additional GL_INVALID_OPERATION tests for texture swizzle
2009-01-28 10:44:04 -07:00
Brian Paul
54c62ba5c3
mesa: implement texture swizzling in swrast
...
And enable GL_EXT_texture_swizzle for software drivers.
2009-01-28 10:31:05 -07:00
Brian Paul
4a89e51c5f
mesa: set/get new state for GL_EXT_texture_swizzle
2009-01-28 10:27:33 -07:00
Keith Whitwell
66059cd3c9
stw: move get_proc_address and extension functions to shared
2009-01-28 17:07:49 +00:00
Keith Whitwell
54688ebdb2
stw: use shared version of make current in icd code
2009-01-28 16:47:31 +00:00
Keith Whitwell
cfb3fdfcb1
stw: more swapbuffers refactoring
2009-01-28 16:23:52 +00:00
Brian Paul
be1a76f88f
mesa: if texObj is NULL in fetch_texel_*(), return black.
2009-01-28 09:16:11 -07:00
Keith Whitwell
67b6e5b907
wgl: split device structs, move swapbuffers to shared
...
Each of icd, shared and wgl now have the opportunity to maintain their
own per-device structs, which should reduce the need for these
modules to be looking into each others structures.
2009-01-28 16:11:46 +00:00
José Fonseca
1be4d4d4c6
pipebuffer: More assertions.
2009-01-28 15:54:13 +00:00
José Fonseca
815de0a5df
pipebuffer: Fix alignment assertion.
2009-01-28 15:54:13 +00:00
José Fonseca
665d6d6c1e
pipebuffer: Export the pipe buffer winsys hooks.
2009-01-28 15:54:13 +00:00
Keith Whitwell
507498af10
stw: rename stw_wgl_ --> stw_
2009-01-28 13:45:01 +00:00
Keith Whitwell
c3d744f5bb
stw: move pixelformat_get/set to shared
2009-01-28 13:43:10 +00:00
Keith Whitwell
cb70d27dd1
stw: move pixelformat_describe to shared
2009-01-28 13:35:49 +00:00
Keith Whitwell
f17eb0b13c
wgl: move context functions to shared
2009-01-28 12:25:25 +00:00
Keith Whitwell
19d06f4e16
wgl: split into shared, (fake)wgl and icd directories
2009-01-28 11:40:54 +00:00
Eric Anholt
0f72de5538
dri2: add complaints for more initialization failures.
...
Somehow we're running into DRI2Authenticate failing, and silent demotion to
swrast is bad.
2009-01-27 14:34:29 -08:00
Eric Anholt
65d39a9eed
intel: clean up more pf mess.
2009-01-27 12:05:47 -08:00
Brian Paul
318e53a4bf
mesa: refactor glTexParameter code
2009-01-27 11:07:21 -07:00
Zack Rusin
4f5308bdcb
gallium: remove redundant size from the constant buffer
...
reuse the size of the actual buffer
2009-01-27 12:20:26 -05:00
Zack Rusin
d6888e811d
gallium: it's a reference value, not a reference number
2009-01-27 12:20:26 -05:00
Zack Rusin
2299f21f8d
gallium: standardize api on the prefix "nr"
2009-01-27 12:20:25 -05:00
Zack Rusin
a7e72231e3
gallium: standardize naming of masks
2009-01-27 12:20:25 -05:00
Zack Rusin
872b515e8f
gallium: standardize on stride instead of pitch in the interface
2009-01-27 12:20:25 -05:00
Brian Paul
38768dbc76
mesa: move call to _mesa_update_framebuffer_visual()
...
Update the visual info in the _mesa_test_framebuffer_completeness()
function when we've determined the FBO to be "complete".
Fixes regression seen in progs/demos/shadowtex.c
2009-01-27 09:49:27 -07:00
Keith Whitwell
0e471ac457
wgl: relocate wgl code to state_trackers/wgl
...
Similar to the GLX state trackers for DRI and xlib.
2009-01-27 11:28:29 +00:00
Keith Whitwell
4d710dd3cf
tgsi: silence some warnings
2009-01-27 11:16:32 +00:00
Keith Whitwell
27e5097e2a
draw: silence some warnings
2009-01-27 11:16:32 +00:00
Keith Whitwell
3b853e93b2
i915: queiten compiler warnings
2009-01-27 11:16:32 +00:00
Keith Whitwell
ef9194a4f4
failover: queiten compiler warnings
2009-01-27 11:16:32 +00:00
Keith Whitwell
f675972428
draw: queiten compiler warnings
2009-01-27 11:16:32 +00:00
Keith Whitwell
9a7aeac49c
scons: remove pedantic flag
2009-01-27 11:16:32 +00:00
Brian Paul
3cf7f9887a
i915: rename some functions
2009-01-26 17:23:59 -07:00
Brian Paul
d0c8ed73cc
intel: replace i915/intel_state.c and i965/intel_state.c with shared file
2009-01-26 16:40:08 -07:00
Brian Paul
69fd665b64
intel: whitespace changes
2009-01-26 16:38:01 -07:00
Brian Paul
84c8b5bbf9
intel: move some driver functions around
...
A step toward consolidating i915/intel_state.c and i965/intel_state.c
2009-01-26 16:33:45 -07:00
Zack Rusin
005a375068
egl: compilation fix
2009-01-26 16:53:33 -05:00
Brian Paul
72ee0e247d
intel: check if stencil test is enabled in intel_stencil_drawpixels()
2009-01-26 14:22:30 -07:00
Brian Paul
723648f2ee
intel: save/restore GL matrix mode in intel_meta_set_passthrough_transform(), intel_meta_restore_transform()
2009-01-26 14:01:32 -07:00
José Fonseca
3d607ef37f
scons: Request the stabs debug info format for Mingw.
...
Mingw gdb apparently chokes on dwarf debug info.
2009-01-26 20:28:04 +00:00
José Fonseca
f5fad95455
glut: Minor cleanups.
2009-01-26 20:28:04 +00:00
Brian Paul
36daee1c7b
intel: asst. casts to silence warnings
2009-01-26 12:44:05 -07:00
Brian Paul
6c244b0f32
intel: #include clean-ups
2009-01-26 12:39:29 -07:00
Brian Paul
d555cdbe3e
intel: remove old #includes
2009-01-26 12:39:28 -07:00
Brian Paul
aae2729aeb
intel: make intelUpdateScreenFromSAREA() static
2009-01-26 12:39:28 -07:00
Brian Paul
66c7f06413
intel: remove unused var
2009-01-26 12:39:28 -07:00
Brian Paul
4006c5e452
intel: move intelInitExtensions() and related code into new intel_extensions.c
2009-01-26 12:39:28 -07:00
Brian Paul
4451eb2e75
intel: move glClear-related code into new intel_clear.c file
2009-01-26 12:39:28 -07:00
Brian Paul
6fcebbe719
intel: Move swap-related functions from intel_buffers.c to new intel_swapbuffers.c
2009-01-26 12:39:28 -07:00
Brian Paul
3b23a8e07d
i965: scissor rect was inverted when rendering to texture
2009-01-26 12:39:28 -07:00
Pekka Paalanen
f25421a59b
nv20: rewrite vertex layout
...
NV20 seems to be very different to NV10. In vertex array, pos is first,
not last. There are maximum 16 attributes and only few are currently
known.
This makes trivial/tri work on NV20.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-26 21:34:39 +02:00
Pekka Paalanen
94ff37f0dc
nv20: adjust initial hw context
...
VIEWPORT_SCALE0 seems to do with translation and the sane
value for x and y is zero.
VIEWPORT_SCALE1 is still a mystery.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-26 21:34:39 +02:00
Brian Paul
6b1b8e4ca1
gallium: updated comments in st_extensions.c
2009-01-26 12:31:33 -07:00
Robert Ellison
523febe12e
mesa: add missing texture_put_row_rgb() function in texrender.c
...
The wrap_texture() function doesn't set the renderbuffer PutRowRGB() method,
which is used to implement DrawPixels(). This fix adds an implementation
of this method.
2009-01-26 10:23:38 -07:00
Younes Manton
0cd1ee764a
g3dvl: Remove dead links to files that are now in libnouveaudrm.
2009-01-24 16:18:20 -05:00
Pekka Paalanen
3af89cd3de
nouveau: fix st_get_framebuffer_surface() breakage
...
Someone changed the st_get_framebuffer_surface() signature, and did not
update the users in Nouveau winsys. Surface is returned via a pointer
now instead of returning it from the function. No semantic changes.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-24 19:56:13 +02:00
Pekka Paalanen
c50a9319b1
mesa: declare pipe_texture in st_public.h
...
Fixes:
In file included from nouveau_context_dri.c:6:
../../../../../../src/mesa/state_tracker/st_public.h:87: warning:
'struct pipe_texture' declared inside parameter list
../../../../../../src/mesa/state_tracker/st_public.h:87: warning: its
scope is only this definition or declaration, which is probably not what
you want
../../../../../../src/mesa/state_tracker/st_public.h:104: warning:
'struct pipe_texture' declared inside parameter list
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2009-01-24 19:33:21 +02:00
José Fonseca
fcf9353fea
glew: Build it as a static lib.
2009-01-24 16:54:59 +00:00
José Fonseca
efdb7799d3
progs: Fix isosurf.
2009-01-24 16:47:50 +00:00
José Fonseca
2e61d136c2
progs: Port most of the demos to glew.
...
A couple of test weren't ported due to glew breakage -- it undefines
GLAPIENTRY.
2009-01-24 16:39:49 +00:00
José Fonseca
9bf83fb016
scons: Build the progs into seperate dirs as well.
2009-01-24 15:56:28 +00:00
José Fonseca
4367778832
glut: Automatic library linkage only on MSVC.
2009-01-24 15:32:01 +00:00
José Fonseca
017892636a
scons: Use --enable-stdcall-fixup only when building DLLs.
2009-01-24 14:33:54 +00:00
José Fonseca
0e4e76572e
glut: Use a new define GLUT_STATIC to distinguish static builds.
...
_DLL is defined by MSVC when building against a DLL version of the CRT
library. It bears no relation to whether we are building a DLL or not. That
is, we can build a DLL against a static CRT, or a static lib against a
dynamicaly linked CRT. See more detail at
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
This gets DLL version of glut linking correctly both with MinGW and MSVC.
PS: GL/gl.h (and others) must be fixed too.
2009-01-24 13:52:02 +00:00
José Fonseca
492c7b360d
glut: Ensure windows.h is included on windows.
...
Trying to override windows headers is a recipe for disaster. Especially
when using with glew. Also the windows headers in recent MinGW are complete
enough that they don't need patching up.
2009-01-24 12:47:02 +00:00
José Fonseca
9bd39eb3af
scons: Don't build the DRI drivers in a seperate dir.
...
DRI drivers can be build side by side with other non-DRI drivers, therefore
there is no need to build gallium twice.
2009-01-24 10:28:39 +00:00
Brian Paul
ea8d0aa94b
docs: added GL_NV_texture_env_combine4
2009-01-23 17:40:24 -07:00
Brian Paul
cba5ce1665
Merge branch 'tex_combine4'
2009-01-23 17:39:44 -07:00
Brian Paul
628b52241b
i965: init array->Format fields (see bug 19708)
2009-01-23 17:37:21 -07:00
Brian Paul
96ee3db6f7
intel: enable GL_NV_texture_env_combine4 extension
2009-01-23 17:32:59 -07:00
Brian Paul
d4757cd02a
mesa: enable GL_NV_texture_env_combine4 for sw drivers
2009-01-23 17:32:32 -07:00
Brian Paul
6947f85cb5
mesa: updated fragment shader codegen for GL_NV_texture_env_combine4
...
Expand struct fields, increase loops and handle new 4-term ADD modes.
Plus, some new assertions to catch switch/default cases that may be incorrect.
2009-01-23 17:32:09 -07:00
Brian Paul
2d508c1d5c
swrast: updates for GL_NV_texture_env_combine4
2009-01-23 17:30:54 -07:00
Brian Paul
e082314cab
mesa: update state setup/validation for GL_NV_texture_env_combine4
2009-01-23 17:30:33 -07:00
Brian Paul
08fbbdd4dc
mesa: update glTexEnv(), glGetTexEnv() for GL_NV_texture_env_combine4
2009-01-23 17:30:03 -07:00
Brian Paul
f5d3027c0a
mesa: initial changes for GL_NV_texture_env_combine4
2009-01-23 17:29:26 -07:00
Brian Paul
ded949ed06
mesa: set the new array->Format field in VBO code
...
Should help to solve failed assertion in i965 driver (see bug 19708)
2009-01-23 16:41:15 -07:00
Jesse Barnes
e57e398960
intel: fix the mismerge of the vblank pipe enable sanity check
...
Fix the last merge fix, had the blocks ordered incorrectly.
2009-01-23 13:18:13 -08:00
Brian Paul
ad338c14c2
mesa: consolidate glGetTexEnvi/f() code with new get_texenvi() helper
2009-01-23 14:15:45 -07:00
Jesse Barnes
216bff5fd4
intel: move pipe enable sanity check to where it belongs
...
Bah, applied the patches in the wrong order, not Owain's fault...
2009-01-23 13:13:23 -08:00
José Fonseca
18170bb51b
scons: Use a cache for built files.
...
Like ccache, but works on all OSes.
2009-01-23 21:01:16 +00:00
José Fonseca
aa210b327e
wgl: Adapt for st_get_framebuffer_surface call change.
2009-01-23 21:00:53 +00:00
Owain Ainsworth
0b5266ff64
intel: fix vblank crtc selection with DRI1 when only one pipe is enabled.
...
On Mobile chipsets, we often enable PipeB instead of PipeA, but the test
in here was insufficient, falling back to pipe A if the area
intersection returned zero. Therefore, in the case where a window went
off to the top of the left of the screen, it would freeze, waiting on
the wrong vblank.
Fix this mess by checking the sarea for a crtc being zero sized, and in
that case always default to the other one.
2009-01-23 12:58:49 -08:00
Owain G. Ainsworth
39b4061bb9
intel: Prevent an "irq is not working" printf when only pipe B is enabled.
...
intelMakeCurrent is called before intelWindowMoved (in fact, it calls
it), so calculation of the correct vblank crtc has not happened yet.
Fix this by making a function that fixes up a set of vblank flags and
call if from both functions.
2009-01-23 12:51:19 -08:00
Brian Paul
0a40033047
mesa: refactor _mesa_TexEnvfv() code with helper functions
2009-01-23 13:44:12 -07:00
Brian Paul
6f8896c599
docs: document improved stencil support and GL_EXT_vertex_array_bgra
2009-01-23 11:36:57 -07:00
Brian Paul
b8fc605cdb
Merge branch 'vertex_array_bgra'
2009-01-23 11:29:05 -07:00
Brian Paul
dab586b075
i965: enable GL_EXT_vertex_array_bgra
...
Simply a matter of choosing the right surface/vertex format for GLubyte/GL_BGRA arrays.
2009-01-23 11:27:42 -07:00
Brian Paul
0bd6d48bce
mesa: enable GL_EXT_vertex_array_bgra for sw drivers
2009-01-23 11:26:51 -07:00
Brian Paul
0791fdff6f
mesa: update tnl module for GL_EXT_vertex_array_bgra
...
Add special case for GLubyte/GL_BGRA color arrays in _tnl_import_array()
2009-01-23 11:26:30 -07:00
Brian Paul
9cf594d698
mesa: improve array initialization code, and set the new array->Format field.
2009-01-23 11:25:13 -07:00
Brian Paul
76d27a6a1e
mesa: update glColorPointer, etc for GL_EXT_vertex_array_bgra
...
Add new error checking, set array state appropriately.
2009-01-23 11:24:31 -07:00
Brian Paul
f7c1a2dacd
mesa: initial bits for GL_EXT_vertex_array_bgra
2009-01-23 11:23:12 -07:00
Ian Romanick
42c07d1500
r300: Enable GL_ATI_separate_stencil in R300
...
At this point, GL_EXT_stencil_two_side should probably be disabled.
It may be worth leaving it enabled because it has GLX protocol while
GL_ATI_separate_stencil does not. I'll leave it to one of the r300
maintainers to make the call.
2009-01-23 09:49:29 -08:00
Ian Romanick
f7265e7a57
965: Enable GL_EXT_stencil_two_side
2009-01-23 09:49:29 -08:00
Ian Romanick
b5fbdef7ec
swrast: Enable GL_EXT_stencil_two_side
2009-01-23 09:49:29 -08:00
Ian Romanick
dde7cb9628
Track two sets of back-face stencil state
...
Track separate back-face stencil state for OpenGL 2.0 /
GL_ATI_separate_stencil and GL_EXT_stencil_two_side. This allows all
three to be enabled in a driver. One set of state is set via the 2.0
or ATI functions and is used when STENCIL_TEST_TWO_SIDE_EXT is
disabled. The other is set by StencilFunc and StencilOp when the
active stencil face is set to BACK. The GL_EXT_stencil_two_side spec has
more details.
http://opengl.org/registry/specs/EXT/stencil_two_side.txt
2009-01-23 09:49:29 -08:00
José Fonseca
de29f5781a
scons: Allow to specify the MSVS version on command line.
2009-01-23 17:09:51 +00:00
José Fonseca
528a0a885e
progs: Port vp-tris to glew.
...
There was some wglGetProcAddress calls to setup extensions already, but
including glext caused many compilation errors in MinGW.
2009-01-23 17:09:51 +00:00
Alan Hourihane
b0d0e53a54
gallium: change the st_get_framebuffer_surface/texture functions
...
to return TRUE/FALSE if the st_framebuffer is valid, and if it is
return the surface/texture in the passed pointer.
2009-01-23 16:06:26 +00:00
José Fonseca
483c730de8
progs: Ignore more output executables.
2009-01-23 14:37:35 +00:00
José Fonseca
479ea7d87b
progs/trivial: Use glew where needed.
...
Builds on windows now.
2009-01-23 14:35:36 +00:00
José Fonseca
57d00016ca
glew: Initial import.
...
From glew 1.5.1 release.
2009-01-23 12:32:35 +00:00
José Fonseca
d150e6a2e6
glut: Do not rely on GLAPIENTRY symbol.
...
GLEW does some defining/undefining of GLAPIENTRY making it unreliable. GLEW
should also be fixed, but removing the dependency on this symbol.
This also restores the ability for GLUT to be used with -fvisibility=hidden.
The downside of this is that ld warns of:
Warning: size of symbol `glutBitmapXXXXX' changed from 4 in glut_xxx.o to 16 in glut_xxxx.o
Due to the fonts being declared void * (*4 bytes), but defined as 16byte static
structure. I'll fix that in a later commit.
See also commits:
- f321f16e83
- d084982240
2009-01-23 12:27:10 +00:00
Brian Paul
af0e6336e9
i965: whitespace changes and reformatting
2009-01-22 16:34:27 -07:00
Brian Paul
fb88b6df82
docs: first 7.5 feature: GL_ARB_framebuffer_object
2009-01-22 15:51:12 -07:00
Brian Paul
a7f98f4c7e
i965: enable GL_ARB_framebuffer_object
2009-01-22 15:43:50 -07:00
Brian Paul
6d2e1f6a2c
intel: add GL_EXT_framebuffer blit extension
...
This functionality is required by GL_ARB_framebuffer_object.
For now, implement it in terms of glCopyPixels(). This will need to be
revisted though.
2009-01-22 15:43:40 -07:00
Brian Paul
f8a7e497ac
intel: remove/disable the "paired depth/stencil" code
...
We only allow combined depth+stencil renderbuffers so the complicated code
for splitting and combining separate depth and stencil buffers is no longer
needed.
2009-01-22 15:34:16 -07:00
Brian Paul
b27057b381
intel: asst clean-ups, simplifications in intel_draw_buffer()
2009-01-22 15:33:12 -07:00
Brian Paul
3abf67c6b1
intel: remove unneeded call to ctx->Driver.DepthRange()
...
The preceeding call to intel_draw_buffer() does that.
2009-01-22 15:32:52 -07:00
Brian Paul
71b78149bd
i965: disallow separate depth/stencil renderbuffers
...
Take advantage of the GL_FRAMEBUFFER_UNSUPPORTED feature to disallow separate
depth and stencil renderbuffers; only allow combined depth/stencil buffers.
Next up: remove/simplify a bunch of the depth/stencil renderbuffer code.
Also: restore the previously disabled GL_DEPTH_COMPONENT16 case
2009-01-22 15:32:38 -07:00
Brian Paul
d1eca7f558
i965: minor reformatting
2009-01-22 15:31:50 -07:00
Brian Paul
3c98d3cf32
intel: plug in stub intel_validate_framebuffer() function
2009-01-22 15:31:20 -07:00
Brian Paul
f8b00806d8
intel: inline some renderbuffer functions
2009-01-22 15:30:57 -07:00
Brian Paul
0906f47c1f
demos: revamp the fbotexture.c demo
...
Try making depth/stencil attachments in two different ways.
Check for GL errors and GL_FRAMEBUFFER_UNSUPPORTED status to be more robust.
Reorganize the code a bit to make it clearer.
Added -arb option to test GL_ARB_fbo's mixed renderbuffer sizes
Added -ds2 option to test GL_DEPTH_STENCIL_ATTACHMENT
2009-01-22 15:25:10 -07:00
Brian Paul
aed7403f32
demos: updated FBO tests to for ARB_fbo
...
Some things that were not errors in EXT_fbo are errors in ARB_fbo.
2009-01-22 15:22:54 -07:00
Brian Paul
1b199101ff
mesa: enable ARB_fbo for s/w drivers
2009-01-22 15:22:08 -07:00
Brian Paul
7296636ad0
mesa: avoid calling _mesa_test_framebuffer_completeness() more than needed
...
When we change a FBO's attachments, set _Status=0.
Before using an FBO, check if status != GL_FRAMEBUFFER_COMPLETE.
Also, fix missing GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE status.
2009-01-22 15:21:17 -07:00
Brian Paul
d0f13fa7d7
mesa: fix some renderbuffer/framebuffer delete semantics
...
Need to unbind buffers if referenced by the current read/draw pointers when
being deleted.
2009-01-22 15:20:45 -07:00
Brian Paul
3059007f0c
mesa: add support for GL_DEPTH_STENCIL_ATTACHMENT point.
...
Used to set both the depth and stencil attachment points to one renderbuffer
of texture.
2009-01-22 15:20:36 -07:00
Brian Paul
722d976283
mesa: additional FBO error checking for multisample-related things
...
Plus some new comments.
2009-01-22 15:20:22 -07:00
Brian Paul
23524e8733
mesa: update Visual.samples field in _mesa_update_framebuffer_visual()
2009-01-22 15:20:09 -07:00
Brian Paul
4f3514e410
mesa: refactor glRenderbufferStorage(), glRenderbufferStorageMultisample() code
...
Use a common helper routine for both functions.
2009-01-22 15:19:56 -07:00
Brian Paul
8fb8855b4d
mesa: init MaxSamples = 0 (no multisampling)
2009-01-22 15:19:22 -07:00
Brian Paul
5ca24eaf56
mesa: add ARB_framebuffer_object.xml to API_XML
2009-01-22 15:18:56 -07:00
Brian Paul
515c118a7e
mesa: added GL_MAX_SAMPLES query for GL_ARB_fbo
2009-01-22 15:18:24 -07:00
Brian Paul
4fc16fb7e9
mesa: added NumSamples, MaxSamples for ARB_fbo
2009-01-22 15:18:06 -07:00
Brian Paul
777a2efc77
mesa: stub for _mesa_RenderbufferStorageMultisample()
2009-01-22 15:17:42 -07:00
Brian Paul
1f32c410dd
mesa: call fbo_incomplete() if driver marks FBO as incomplete (debug only)
2009-01-22 15:16:17 -07:00
Brian Paul
283edbe311
mesa: update update_framebuffer_size() for ARB_fbo and mixed renderbuffer sizes
2009-01-22 15:14:45 -07:00
Brian Paul
3528f69ce4
mesa: added ctx->Driver.ValidateFramebuffer() callback
...
Called from the _mesa_test_framebuffer_completeness() function to give the
driver the chance to make a framebuffer as incomplete if it doesn't meet
some specific hardware restriction.
2009-01-22 15:13:18 -07:00
Brian Paul
1bc59bf4f8
mesa: add new ARB_fbo queries, fix some error tests
2009-01-22 15:07:34 -07:00
Brian Paul
d9a2cf9246
mesa: add new ColorEncoding and ComponentType to gl_renderbuffer
2009-01-22 15:07:10 -07:00
Brian Paul
06f3b2e679
mesa: additional FBO/RB id error checking for ARB_fbo
...
It's illegal to bind a FBO/RB id that didn't come from glGenRender/Framebuffer().
2009-01-22 15:06:17 -07:00
Brian Paul
989edea409
mesa: for ARB_fbo, lift restriction that all FBO attachments are same size and color format
2009-01-22 15:05:13 -07:00
Brian Paul
7d98f5ab6e
mesa: initial extension bits for GL_ARB_framebuffer_object
2009-01-22 15:04:11 -07:00
Brian Paul
27d08f0ed2
mesa: regenerated GL API files
2009-01-22 15:02:00 -07:00
Brian Paul
4397974662
glapi: include ARB_framebuffer_object.xml
2009-01-22 14:56:14 -07:00
Brian Paul
d61b8896bc
glapi: XML spec for GL_ARB_framebuffer_object
2009-01-22 14:55:20 -07:00
Brian Paul
f9152f316a
glsl: call _mesa_write_shader_to_file(). Debug-only, disabled
2009-01-22 10:35:51 -07:00
Brian Paul
d003893031
glsl: new _mesa_write_shader_to_file() function
...
Used to log a shader to a file. Includes shader source code, the info log
and generated GPU instructions.
2009-01-22 10:34:43 -07:00
Brian Paul
cb136e0476
glsl: set shader->CompileStatus in _slang_compile()
2009-01-22 10:34:15 -07:00
Brian Paul
596b8fbbbf
mesa: added _mesa_fprintf() wrapper
2009-01-22 10:32:08 -07:00
Brian Paul
d2ab930046
docs: placeholder 7.5 release notes
2009-01-22 10:29:24 -07:00
Brian Paul
0e48056850
mesa: master is open for new development, eventually will be Mesa 7.5
2009-01-22 10:22:55 -07:00
Brian Paul
609cc9c139
docs: skeleton 7.4 release notes file
2009-01-22 10:18:04 -07:00
Brian Paul
e5aa89386d
docs: 7.3 md5 sums
2009-01-22 10:14:39 -07:00
Brian Paul
5a45897711
mesa: set version to 7.3
2009-01-22 10:14:24 -07:00
Brian Paul
faa6d8af59
docs: set 7.3 release date
2009-01-22 10:01:17 -07:00
Brian Paul
b6c41fd933
docs: assorted updates, link fixes
2009-01-22 10:01:17 -07:00
José Fonseca
4558f6a7e4
glut: Don't include mesa_wgl.h on MinGW builds.
...
windows.h header recent MinGW versions already declare the WGL API, and
including mesa_wgl.h actually cause build failures.
2009-01-22 14:29:01 +00:00
José Fonseca
42be0104a2
scons: Don't define UNICODE on windows builds.
...
It creates problems in many libraries (glut, glew) which are not unicode
aware.
2009-01-22 14:26:30 +00:00
Dave Airlie
f69e2f42d5
r200: fix up swtcl/tcl flushes
2009-01-22 22:50:36 +10:00
Dave Airlie
d93dc43382
radeon: plug memory leak running gears
2009-01-23 08:08:34 +10:00
Dave Airlie
9780127449
radeon: remove some debugging
2009-01-23 08:03:03 +10:00
Dave Airlie
8b56a86385
radeon: better free of array
2009-01-22 21:49:58 +10:00
Dave Airlie
860d0cc656
radeon: free all relocs in array
2009-01-22 21:47:38 +10:00
Dave Airlie
02952a41eb
radeon: check relocs before deref
2009-01-22 21:38:35 +10:00
Dave Airlie
2c8b55b351
radeon: fix relocs even more
2009-01-22 21:35:58 +10:00
Dave Airlie
c66e38d24f
radeon: fix reloc free harder
2009-01-22 21:31:06 +10:00
Dave Airlie
bb7756eaed
radeon: free indices caught with valgrind
2009-01-22 21:29:22 +10:00
Dave Airlie
a5b54eb3c9
radeon: cleanup bo unref codepath in pending code
...
assert for bad case hopefully
2009-01-22 21:19:56 +10:00
Dave Airlie
11995807f1
radeon: fix counting for cfree handles in an inline
2009-01-22 21:12:54 +10:00
Dave Airlie
014c52eb6b
radeon: add r100/r200 workarounds for legacy aging
2009-01-23 02:47:15 +10:00
Dave Airlie
4ca76586c2
r200: disable some debug
2009-01-23 00:23:10 +10:00
Dave Airlie
7d01cb37d9
r200: emit elts into a separate ELT bo
2009-01-23 00:17:38 +10:00
Alan Hourihane
4df482086e
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
windows/VC8/mesa/osmesa/osmesa.vcproj
windows/VC8/progs/demos/gears.vcproj
windows/VC8/progs/progs.sln
2009-01-22 09:43:42 +00:00
Eric Anholt
b8bd0b0ddc
i915: Add decode for PS in batchbuffers.
2009-01-21 14:03:56 -08:00
Eric Anholt
fc3971d800
i965: Remove gratuitous whitespace in INTEL_DEBUG=wm output.
2009-01-21 14:03:56 -08:00
Eric Anholt
046e88fc0b
i965: Use _mesa_num_inst_src_regs() instead of keeping a copy of its contents.
2009-01-21 14:03:56 -08:00
Younes Manton
01cbd76496
nouveau: Map correct mip level when using the shadow (nv30, nv40).
2009-01-21 16:55:35 -05:00
Patrice Mandin
bcb5ea097c
nouveau: nv30 does not support separate blend functions for alpha and rgb
2009-01-21 22:08:21 +01:00
Dave Airlie
eda2284961
r200r300: start merging span code
2009-01-22 04:14:40 +10:00
Kristian Høgsberg
194d039f1e
[intel] Remove remaining references to intel_wait_flips().
...
Oops.
2009-01-21 11:47:01 -05:00
Dave Airlie
0788e42471
r200: remove indexed verts
2009-01-22 02:38:00 +10:00
Thomas Henn
470e10dfaa
windows: fix output dir for glut project file
2009-01-21 09:32:40 -07:00
Brian Paul
8c7135ee14
swrast: fix redundant texture application in affine_textured_triangle().
...
This function does simple texture mapping so disable normal texture mapping
before we call _swrast_write_rgba_span() so that we don't do it twice.
2009-01-21 09:05:02 -07:00
Dave Airlie
909aeb005f
radeon: fix 1D textures
2009-01-22 01:24:50 +10:00
Brian Paul
4683cab29a
mesa: add some debug assertions to detect null current texture object pointers
...
See bug #17895 . These assertions could be removed when this is resolved.
2009-01-21 08:18:07 -07:00
Dave Airlie
674b204ba7
r200: fix cubemaps
2009-01-22 01:17:31 +10:00
Dave Airlie
61bb82636f
r200/r300: port r200 texture handling to common code
...
we now get texrect + trivial textures working
2009-01-22 01:05:43 +10:00
Karl Schultz
787a001a67
windows: another round of VC8 project file updates
...
New static configs generate DLLs that do not have a dependency on the MSCVR*
DLL's.
2009-01-21 07:59:11 -07:00
Brian Paul
dd92f483b0
Revert "windows: new VC8 projects statically linked against libcmt"
...
This reverts commit bbda892c55 .
Static configs rolled into regular project files (in next commit).
Provided by Karl Schultz.
2009-01-21 07:57:45 -07:00
Jakob Bornecrantz
c14aac5530
progs: Ignores
2009-01-21 15:01:13 +01:00
Dave Airlie
2bf31b7ffd
r300/radeon: move face_for_target
2009-01-21 18:41:11 +10:00
Brian Paul
65118a51b6
docs: document glXMakeContextCurrent() and Windows fixes
2009-01-20 15:36:01 -07:00
Ian Romanick
ab9b4e1f59
Fix issues with glXMakeContextCurrent and glXMakeCurrentReadSGI
...
There were several bugs in the infrastructure for these two routines.
1. GLX_ALIAS was incorrectly used. The function and its alias must be
identical! glXMakeContextCurrent / glXMakeCurrentReadSGI and
MakeContextCurrent had different parameters. This caused the last
parameter of MakeContextCurrent to get random values.
2. We based the implementation of glXMakeContextCurrent on the manual
page instead of the GLX spec. The GLX spec says that
glXMakeContextCurrent can be passed a Window as a drawable. When this
happens, it will behave just like glXMakeCurrentReadSGI or
glXMakeCurrent.
3. If there was a problem finding or creating the DRI drawable,
MakeContextCurrent would crash instead of returning an error.
This commit fixes all three issues, and fixes bug #18367 and bug #19625 .
2009-01-20 13:55:18 -08:00
Jakob Bornecrantz
73a4c945d3
i915: Fix gem backend after surface changes
2009-01-20 19:08:52 +01:00
Timo Aaltonen
39e6d0d810
[intel] Go back to using the typedef for the sarea struct
...
The upstream linux kernel headers and libdrm kernel headers disagree on the
tag name for the sarea struct: _drm_i915_sarea vs drm_i915_sarea. They
both typedef it to drm_i915_sarea_t though, so just use that.
2009-01-20 11:52:32 -05:00
Owain G. Ainsworth
b5da7feee0
Remove intel pageflipping support in its entirety.
...
It's been broken and deprecated for a while, so it's time to die. This has the
wonderful benefit of cleaning up the code a fair amount; making it marginally
less twisty.
I'm unsure if the for loops in IntelWindowMoved are still needed.
2009-01-20 11:52:32 -05:00
Dave Airlie
e0ec3243e8
r300: start migrating common functions into common code
2009-01-21 02:21:45 +10:00
Brian Paul
0f548dbc98
glsl: silence unused var warnings
2009-01-20 09:21:32 -07:00
Brian Paul
9d216be8cf
mesa: silence uninitialized var warnings
2009-01-20 09:20:41 -07:00
Brian Paul
eb26cc6cf5
mesa: silence compiler warning at -O2
2009-01-20 09:17:12 -07:00
Dave Airlie
ddbd6ed326
r300: move to common texture_image object
2009-01-21 02:15:28 +10:00
Brian Paul
bb63a663b1
mesa: bump version to 7.3-rc3
2009-01-20 09:13:41 -07:00
Brian Paul
dace4e3e2a
mesa: inlclude whole windows/VC8/ directory in tarballs
2009-01-20 09:13:06 -07:00
Dave Airlie
33dc14c707
radeon/r200/r300: start to move to common miptree/texobj
2009-01-21 02:10:56 +10:00
Thomas Henn
bbda892c55
windows: new VC8 projects statically linked against libcmt
2009-01-20 09:07:01 -07:00
Karl Schultz
61a387dca1
windows: more VC8 project file updates
...
Make some compiler flags per-file.
Remove driverfuncs.c from osmesa project.
2009-01-20 09:07:01 -07:00
Dave Airlie
d9c4a01bad
r200: make tri render on my r200.
2009-01-21 01:40:33 +10:00
Dave Airlie
04029e5ddb
r200: tri runs without crashing - doesn't draw anything
2009-01-20 22:59:34 +10:00
Dave Airlie
ed3a1cce73
r200: clear is working at least - not much else
2009-01-20 22:51:04 +10:00
José Fonseca
5897383344
gallium: Remove the standalone surfaces.
...
This commit is mostly just a cosmetic change that cleans-up the interfaces,
replacing pipe_winsys::surface_* calls by
/**
* Allocate storage for a display target surface.
*
* Often surfaces which are meant to be blitted to the front screen (i.e.,
* display targets) must be allocated with special characteristics, memory
* pools, or obtained directly from the windowing system.
*
* This callback is invoked by the pipe_screenwhen creating a texture marked
* with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag to get the underlying
* buffer storage.
*/
struct pipe_buffer *(*surface_buffer_create)(struct pipe_winsys *ws,
unsigned width, unsigned height,
enum pipe_format format,
unsigned usage,
unsigned *stride);
Most drivers were updated but not all were tested. Use the softpipe pipe
driver and the xlib winsys changes as a reference when fixing other drivers.
2009-01-20 12:22:49 +00:00
Thomas Hellstrom
437fa85ba3
Add a comment about _tnl_emit_indexed_vertices_to_buffer.
2009-01-20 11:40:51 +01:00
Thomas Hellstrom
b00477acf3
tnl: Add a utility to emit indexed vertices to a DMA buffer.
...
This utility is useful for hardware that doesn't support HW index buffers.
It's a bit inefficient but appears to give a substantial performance gain,
as we can emit tri strips that would otherwise be split into triangles.
2009-01-20 11:15:57 +01:00
Thomas Hellstrom
7374285f07
Fix store texel for argb4444.
2009-01-20 11:13:38 +01:00
Thomas Hellstrom
5c84a1032c
Fix store texel for argb8888_rev.
2009-01-20 11:13:05 +01:00
Thomas Hellstrom
dbda49a9e6
Add RGBA4444 and RGBA5551 texture formats.
2009-01-20 11:12:17 +01:00
Thomas Hellstrom
11351f0c8a
dri1: Add a macro to validate two dri drawables in one go.
...
Dri drivers often may validate first a write drawable and then a read
drawable ("readable"). However, the hardware lock may be unlocked when
validating the readable, causing the write drawable status to be stale.
Drivers should use this macro instead when validating two drawables.
2009-01-20 11:07:10 +01:00
Brian Paul
a5b5bc9f95
mesa: fix build of stand-alone glslcompiler driver
2009-01-19 17:50:44 -07:00
Keith Whitwell
ecc563b17f
xlib: fix dependencies
2009-01-19 20:03:42 +00:00
Brian Paul
2fa407be8b
statetracker: copy back color buffer to front buffer when needed
...
Fixes front-buffer rendering when following a SwapBuffers.
See progs/tests/rubberband.c
2009-01-19 12:55:35 -07:00
Brian Paul
b9a3952f8f
gallium: minor reformatting
2009-01-19 12:55:35 -07:00
Keith Whitwell
bc0e00ad42
util: add reduced prim helper
2009-01-19 19:44:12 +00:00
Brian Paul
f97792421b
tests: test pseudo-XOR blend mode.
...
GL_XOR logicop mode can be approximated with blending by computing 1 - dst.
Here's a couple test programs for that.
2009-01-19 12:09:40 -07:00
Brian Paul
ba3a879b1c
gallium: use align() intead of round_up()
2009-01-19 11:51:23 -07:00
Brian Paul
1907135235
tgsi: change an if to an else-if, added const qual, added comments
2009-01-19 08:51:58 -07:00
Alan Hourihane
396711b840
dri: add fake front definitions
2009-01-19 15:41:19 +00:00
Alan Hourihane
d3866f026a
dri: add fake front definitions
2009-01-19 15:40:30 +00:00
Thomas Henn
dbd8e4066b
windows: updated VC8 project files
2009-01-19 08:23:22 -07:00
Keith Whitwell
41b99b0070
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
...
Conflicts:
src/gallium/state_trackers/glx/xlib/fakeglx.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/winsys/xlib/xmesaP.h
2009-01-19 10:32:35 +00:00
Keith Whitwell
ea55b62f37
xlib: fix compilation after xmesa header moves
2009-01-19 10:29:27 +00:00
Keith Whitwell
b5db6b039c
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
2009-01-19 10:15:04 +00:00
Younes Manton
76753e3078
g3dvl: Some cleanups.
2009-01-18 21:40:11 -05:00
Younes Manton
9ddca0b41d
g3dvl: Ref count everywhere.
2009-01-18 21:40:11 -05:00
Younes Manton
3933d338f7
g3dvl: Mark all buffers for incoming frame data as discardable.
2009-01-18 21:40:11 -05:00
Younes Manton
7309e80578
nouveau: Rename buffer on map if discardable, busy, and write-only.
2009-01-18 21:40:10 -05:00
Younes Manton
0521c2682a
gallium: Add PIPE_BUFFER_USAGE_DISCARD.
...
When passed to map() signals that the buffer's previous contents are
not required, allowing the driver to allocate a new buffer if the
current buffer can not be mapped immediately.
2009-01-18 21:40:10 -05:00
Younes Manton
11f91936f2
g3dvl: Return BadAlloc if we can't create an XvMC surface.
2009-01-18 21:40:10 -05:00
Younes Manton
c35dc4a741
g3dvl: Follow mesa naming conventions for src dirs.
2009-01-18 21:40:10 -05:00
Jakob Bornecrantz
1fd411539b
egl: eglinfo load i915 driver
2009-01-19 02:29:54 +01:00
Jakob Bornecrantz
a835eb930d
i915: Build gem and egl winsys by default
2009-01-19 02:24:29 +01:00
Jakob Bornecrantz
353f824379
i915: Make gem submit commands
2009-01-19 02:22:34 +01:00
Jakob Bornecrantz
e082923af6
egl: Fix swap and creation of front buffer
2009-01-19 02:00:35 +01:00
Brian Paul
b7f802eca2
glx: gcc 2.95 build fix (move declaration before code)
...
Adapted from patch by Matthieu Herbb <matthieu.herrb@laas.fr >
2009-01-18 10:00:34 -07:00
Jakob Bornecrantz
df3ef7a8d6
i915: Use new egl state_tracker
2009-01-18 15:50:15 +01:00
Jakob Bornecrantz
7047f1755f
egl: Add a egl state_tracker that use Gallium
...
This works on top Gallium and KMS. The only thing that
does not work currently is swap buffers for shown mesa
screens. So the only fun thing this will produce is a
white screen.
The driver wishing to us the state_tracker needs to
implement the intrace as define in drm_api.h located
in gallium/include/state_tracker. And also have a
working KMS implementation.
2009-01-18 15:40:12 +01:00
Jakob Bornecrantz
a874cf37ee
i915: Update gem backend a bit
2009-01-18 15:35:50 +01:00
Jakob Bornecrantz
94ddd621d1
egl: Make eglscreen sleep for five seconds
2009-01-18 13:40:24 +01:00
Jakob Bornecrantz
b6b619c6ff
egl: Add eglscreen to help debug egl mesa screen
2009-01-18 05:14:01 +01:00
Jakob Bornecrantz
a5df724c52
egl: Make eglinfo print screen info
2009-01-17 20:50:00 +01:00
Keith Whitwell
8f3fac6107
debug: add noprefix version of debug_dump_enum
2009-01-17 18:45:20 +00:00
Keith Whitwell
bcc45a2024
xlib: don't explicitly create the pipe_winsys struct
2009-01-17 17:12:30 +00:00
Keith Whitwell
4f134f91a4
xlib: don't explicitly create the pipe_winsys struct
2009-01-17 17:06:14 +00:00
Brian Paul
a61a1a8181
i965: fix polygon culling bug when rendering to a texture/FBO
...
Since we use an inverted viewport transformation for render to texture, that
inverts front/back polygon orientation.
Now glCullFace(GL_FRONT / GL_BACK) works correctly.
2009-01-16 13:33:19 -07:00
Brian Paul
345a08a77f
intel: added intel_rendering_to_texture() helper function.
...
When we're rendering to textures we have to invert the viewport transformation.
This helper cleans up that test and can be used elsewhere...
2009-01-16 13:31:04 -07:00
Brian Paul
12c6d28cc7
mesa: remove GL_DEPTH_TEST + no depth buffer test
...
One could enable depth testing before binding an FBO that has a depth buffer
so this test is no longer useful or correct.
2009-01-16 13:25:41 -07:00
Alan Hourihane
2e28c1fda2
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/shader/slang/slang_compile.c
2009-01-16 16:44:53 +00:00
Brian Paul
e442fe5ba5
glsl: fix broken sampler assignments
2009-01-16 09:30:58 -07:00
José Fonseca
47ca0234dc
scons: Use -std=gnu99
...
It a scary world out there: people use all sort of non standard C stuff,
and we must enable support for that in here in order to build.
-pedantic still warn us when we use that nonstandard though.
2009-01-16 15:16:55 +00:00
José Fonseca
eac69bf99e
stw: Dispatch to our stw_winsys::flush_front_buffer
...
pipe_winsys::flush_front_buffer should die someday, but this is good enough
for now.
2009-01-16 15:16:55 +00:00
Xiang, Haihao
66a4f5cf9a
i915: fallback on transfer mode
2009-01-16 16:06:33 +08:00
Karl Schultz
a740858fc0
windows: updated VC8 project file
2009-01-15 11:32:47 -07:00
Karl Schultz
e7c988d065
windows: updated mesa.def file
2009-01-15 07:05:31 -07:00
Brian Paul
4a8356209d
glsl: use _mesa_sprintf()
2009-01-15 07:05:30 -07:00
Brian Paul
e1ba29ea19
glsl: move declaration before code
2009-01-15 07:05:30 -07:00
Alan Hourihane
abd280ab0b
mesa: tweak to formatting
2009-01-15 14:02:09 +00:00
Alan Hourihane
fbf13bcb8a
mesa: check frambuffer complete status before rendering
2009-01-15 11:56:00 +00:00
Alan Hourihane
bfbb57790a
mesa: small cleanup
2009-01-15 11:54:41 +00:00
Alan Hourihane
8708fa1174
mesa: revert partial commit for 0x0 render targets
2009-01-15 11:53:59 +00:00
Alan Hourihane
263b96e160
mesa: check frambuffer complete status before rendering
2009-01-15 11:51:39 +00:00
Jakob Bornecrantz
938f1e9804
mesa: Fix merge conflicts
2009-01-15 12:33:05 +01:00
Dave Airlie
08d90fe8a5
r300: move some more function to generic
2009-01-15 16:56:50 +10:00
Dave Airlie
1a51b76343
radeon/r200/r300: start to make cmd buf useful
2009-01-15 16:45:39 +10:00
Dave Airlie
0c0a55a211
r100/r200: move to new atom style emission
2009-01-15 16:38:59 +10:00
Brian Paul
8f8435637d
mesa: bump version to 7.3-rc2
2009-01-14 17:05:26 -07:00
Brian Paul
7d08091767
glsl: fix comment
2009-01-14 17:05:26 -07:00
Brian Paul
b5f32e1d5a
glsl: minor clean-up for rect sampler test
2009-01-14 17:05:26 -07:00
Brian Paul
0dffd22349
r300: work-around FRAG_BIT_FOGC warning/error
...
See bug 17929.
Fog doesn't actually work, but the often complained about warning is
silenced.
2009-01-14 16:49:24 -07:00
Brian Paul
947d1c5b2a
i965: asst. fixes, work-arounds for FBOs and render to texture
...
OpenGL allows mixing and matching depth and stencil renderbuffers in
framebuffer objects while the hardware really only supports interleaved
depth/stencil buffers. This makes for some tricky buffer management.
An extra wrinkle is the situation where the user allocates a 16bpp depth
texture or renderbuffer then tries to render to it along with a stencil
buffer. We'd have to promote the 16bpp Z values to 24-bit Z values and
mix in the stencil values to setup the depth/stencil renderbuffer.
There's no support for that now, so always allocate 32bpp depth textures/
renderbuffers for now.
2009-01-14 16:49:24 -07:00
Brian Paul
c7f43543af
i965: fix incorrect renderbuffer DataType assignment
2009-01-14 16:49:24 -07:00
Brian Paul
5912cdff3e
i965: fix some FBO depth/stencil assertions
2009-01-14 16:49:24 -07:00
Alan Hourihane
658b1bdb1c
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
docs/install.html
docs/relnotes-7.3.html
src/mesa/shader/slang/slang_codegen.c
src/mesa/shader/slang/slang_compile.c
src/mesa/shader/slang/slang_emit.c
src/mesa/shader/slang/slang_preprocess.c
src/mesa/shader/slang/slang_preprocess.h
2009-01-14 23:33:41 +00:00
Ian Romanick
03188b09e0
intel: SW fallback maps texture images, not texture coordinates
2009-01-14 12:48:22 -08:00
Keith Whitwell
2d155f91d2
trivial: clear with random color
2009-01-14 20:33:06 +00:00
Brian Paul
fae9604727
glsl: propagate pragma info down into compiler from preprocessor
2009-01-14 12:16:00 -07:00
Brian Paul
aac4a0509e
windows: remove reference to swizzle.c file
2009-01-14 12:07:25 -07:00
Brian Paul
b5f89e5f17
glsl: simplify IR storage for samplers
...
Don't overload the Size field with the texture target, to avoid confusion.
2009-01-14 11:58:45 -07:00
Brian Paul
c12d24b513
mesa: fix incorrect transformation of GL_SPOT_DIRECTION
...
This was changed between GL 1.0 and 1.1. Mesa still had the 1.0 behaviour.
2009-01-14 11:51:30 -07:00
Ian Romanick
2549c26a8b
Treat image units and coordinate units differently.
...
Previously MaxTextureUnits was used to validate both texture image
units and texture coordinate units in fragment programs. Instead, use
MaxTextureCoordUnits for texture coordinate units and
MaxTextureImageUnits for texture image units.
Fixes bugzilla #19468 .
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Brian Paul <brianp@vmware.com >
2009-01-14 10:09:01 -08:00
Alan Hourihane
e82784559e
mesa: add new samplers_array test
2009-01-14 17:01:16 +00:00
Alan Hourihane
85dfed93fe
mesa: handle some cases of 0x0 render targets
2009-01-14 16:53:22 +00:00
Alan Hourihane
a98dccca36
glsl: fix regression from sampler arrays commit
2009-01-14 16:34:19 +00:00
Alan Hourihane
1d376ae7c9
glsl: fix regression from sampler arrays commit
2009-01-14 16:32:44 +00:00
Brian Paul
1b3e3e6b84
i965: indentation fixes
2009-01-14 08:34:07 -07:00
Brian Paul
49b53407c7
i965: allow larger AA points on fallback path
2009-01-14 08:34:06 -07:00
Brian Paul
d911e3e24f
i965: fix indentation
2009-01-14 08:34:06 -07:00
Brian Paul
658ab3c3ae
i965: comment for emit_kil()
2009-01-14 08:34:06 -07:00
Brian Paul
8f7349dbb4
mesa: put _NV suffix on a few opcodes
2009-01-14 08:34:06 -07:00
Brian Paul
d687476edd
i965: fix indentation
2009-01-14 08:34:06 -07:00
Alan Hourihane
3ef419f4a5
egl: fix makecurrent with null drawable/context
2009-01-14 11:58:06 +00:00
José Fonseca
d96c89e579
gallium: Disable memory debugging for Windows OGL.
...
Unfortunately both Mesa and Gallium use the same defines for memory
allocation (MALLOC, FREE, etc), and worse, some times memory is allocated
with one set and freed with the other set, causing the homegrown memory
debugger to trip on itself.
In the future mesa and gallium should use different names, but for now,
memory debugging on Windows will have to be carried with different tools..
2009-01-14 11:40:32 +00:00
José Fonseca
eb1f01a9d9
progs: List tri-clear.
2009-01-14 11:40:31 +00:00
José Fonseca
83155aa11f
scons: Use .a suffix for MinGW.
...
This allows to build MinGW and MSVC within the same dir.
2009-01-14 11:40:31 +00:00
Jakob Bornecrantz
529f86fb11
intel: Add a none working GEM backend for intel
2009-01-14 12:28:31 +01:00
Dave Airlie
47e3a7d794
radeon: get ctx right in copybuffer
2009-01-14 15:54:28 +10:00
Dave Airlie
4aa874c636
r200: add missing symbols
2009-01-14 15:48:02 +10:00
Dave Airlie
8c6a7d0174
radeon/r200/r300: make legacy emit non-r300 specific
2009-01-14 15:45:29 +10:00
Dave Airlie
e7d06a55c5
radeon: move debug symbol add DRI2
2009-01-14 15:21:45 +10:00
Dave Airlie
61da612a4f
r300: start moving new r300 cmdbuf into common code
2009-01-14 15:14:09 +10:00
Dave Airlie
23295cf8e8
radeon/r200/r300: consolidate swap buffers
2009-01-14 13:38:12 +10:00
Dave Airlie
44b916b2c0
radeon: remove old lock code
2009-01-14 13:38:03 +10:00
Dave Airlie
7e5e327cea
radeon/r200/r300: consolidate the buffer copy/flip code into one place
2009-01-14 13:23:24 +10:00
Dave Airlie
d29e96bf33
radeon/r200/r300: attempt to move lock to common code
2009-01-14 12:04:00 +10:00
Jonathan Adamczewski
f6d09531ff
cell: Specify constant as float for CEILF().
...
Without the f, the constant is treated as a double, resulting in
slower arithmetic and libgcc conversion calls each time CEILF()
is used.
2009-01-14 12:49:28 +11:00
Xiang, Haihao
c157a5bb91
intel: bump driver date
2009-01-14 09:32:55 +08:00
Dave Airlie
4637235183
radeon/r200/r300: initial attempt to convert to common context code
2009-01-14 10:54:52 +10:00
Alan Hourihane
14eca6b573
glsl: fix a comment typo
2009-01-14 00:12:59 +00:00
Alan Hourihane
ef0e0f2550
glsl: support sampler arrays.
2009-01-14 00:12:33 +00:00
Alan Hourihane
67c7f94a21
glsl: fix a comment typo
2009-01-13 23:59:18 +00:00
Alan Hourihane
8373347c05
glsl: support sampler arrays.
2009-01-13 23:54:46 +00:00
Dave Airlie
0217ed2cf9
radeon/r200: move more stuff closer together in context
2009-01-14 08:40:15 +10:00
Brian Paul
34d17d2bdc
docs: #pragma now handled
2009-01-13 15:09:40 -07:00
Brian Paul
01a0938776
glsl: add preprocessor support for #pragma
...
Two forms are supported:
Pragmas are silently ignored at this time.
2009-01-13 15:09:40 -07:00
Ian Romanick
1f47388dfe
Add language about implicit flush and command completion
...
Copied language from the glXSwapBuffers manual page about the implicit
glFlush and expected command completion. This just codifies what
people already expect from glXCopySubBufferMESA. The intention of
this command is to work like glXSwapBuffers but on a sub-rectangle of
the drawable.
Acked-by: Brian Paul <brianp@vmware.com >
2009-01-13 12:36:03 -08:00
Dave Airlie
b6e4869069
radeon/r200: move state atom to common header
2009-01-14 06:28:43 +10:00
Keith Whitwell
a8e0df08ef
xlib: split off cell to its own backend
...
Also remove compile-time USE_XSHM flag. Still check for XSHM at runtime
though.
2009-01-13 19:54:32 +00:00
Keith Whitwell
2f19fecd58
xlib: allow winsys's to register themselves with glx/xlib state tracker
2009-01-13 19:46:18 +00:00
Brian Paul
34500a6da5
docs: fixes since 7.3-rc1
2009-01-13 09:03:43 -07:00
Karl Schultz
00c02626d8
windows: try to create a context in wglCreateLayerContext()
2009-01-13 09:02:04 -07:00
Dave Airlie
692ca82116
radeon/r200: start splitting out commonalities into separate headers
2009-01-13 22:55:27 +10:00
Dave Airlie
4b9a09e9f6
radeon: use bo_wait to wait for all buffers to be rendered to
...
Not 100% sure this is correct, but its what Intel does and its better than
CP_IDLE.
2009-01-13 16:50:15 +10:00
Ben Skeggs
f883c14560
nv50: fix progs/tests/manytex
...
Previously all squares were textured with the same texture.. not quite what
the demo was supposed to look like!
2009-01-13 13:57:22 +10:00
Ben Skeggs
adee4b9021
nv50: get glxgears showing all 3 gears instead of 1!!
...
This fixes a lot of other things where not all the geometry got drawn
also.
2009-01-13 13:57:22 +10:00
Ben Skeggs
8337c78d91
nv50: change some magic reg, makes more things work
...
No real idea what this does.. but a lot of things that misrendered and
made the GPU throw a DATA_ERROR now work.. I'm wondering what side-effects
we'll see from this :)
2009-01-13 13:57:22 +10:00
Ben Skeggs
e8b0088692
nv50: add DXTn formats
2009-01-13 13:57:22 +10:00
Ben Skeggs
68bb26b62d
nv50: shadow mapping
2009-01-13 13:57:22 +10:00
Ben Skeggs
f7c2010525
nv50: aniso
2009-01-13 13:57:22 +10:00
Ben Skeggs
918fc55e5f
nv50: occlusion queries
...
Not quite working, but the general idea is right I think.
2009-01-13 13:57:22 +10:00
Ben Skeggs
d2442016af
nv50: implement KIL enough for progs/fp/kil to work
2009-01-13 13:57:22 +10:00
Jonathan Adamczewski
068107b5ad
cell: Add missing suffix to SHUFFLE macro
2009-01-13 14:02:18 +11:00
Jonathan Adamczewski
402e6752b5
cell: allocate batch buffers w/ 16-byte alignment
...
Replace cell_batch{align,alloc)*() with cell_batch_alloc16(), allocating
multiples of 16 bytes that are 16 byte aligned.
Opcodes are stored in preferred slot of SPU machine word.
Various structures are explicitly padded to 16 byte multiples.
Added STATIC_ASSERT().
2009-01-12 16:25:28 -07:00
Brian Paul
eeeed45c2c
i965: fix glDrawPixels Z coordinate in intel_texture_drawpixels().
...
As for glBitmap, it needs to be an NDC coord in [-1,1].
2009-01-12 15:47:57 -07:00
Brian Paul
3a5463d158
i965: fix broken glBitmap + depth test
...
When we use the do_blit_bitmap() function, it seems the fragment Z is always
1.0. If depth testing is on, that means that bitmap fragments are often
occluded by other rendering. So, the bitmap doesn't appear even if
rasterpos.Z==0.
The fix is to use the intel_texture_bitmap() path when depth testing is on.
Also, fix the incorrect Z coordinate. It needs to be an NDC value in [-1,1].
2009-01-12 15:43:54 -07:00
Brian Paul
de35989cde
i965: fix broken ARB fp fog options
...
Just call _mesa_append_fog_code() if the fragment program's FogOption is
not GL_NONE.
This allows us to remove some unnecessary i965 fog code.
Note, the arbfplight.c demo can be used to test this (see DO_FRAGMENT_FOG).
2009-01-12 14:24:45 -07:00
Keith Whitwell
a2d5031b1e
dri: make dri_display_surface static
2009-01-12 19:38:39 +00:00
Keith Whitwell
3e492acc57
dri: pull dri_swapbuffers.c into dri_drawable.c
2009-01-12 19:33:44 +00:00
Dan Nicholson
29f603a270
autoconf: Only _GNU_SOURCE feature test macro needed on gnu systems
...
According to feature_test_macros(7), _GNU_SOURCE encompasses all the
other feature macros we were setting, so we can just dispose of them.
2009-01-12 11:10:31 -08:00
Julien Cristau
7f7fc3e3af
mesa: match against *-gnu* instead of *-gnu in configure.ac
...
Fixes build on arm-linux-gnueabi
2009-01-12 11:08:02 -08:00
Thomas Henn
a0318d7f8e
windows: updated VC8 project files
2009-01-12 10:56:42 -07:00
Brian Paul
06fdb6a74c
glsl: better fix for for-loop scope issue (commit 6333005f7a)
2009-01-12 08:52:54 -07:00
Brian Paul
88fdddcbbe
windows: added new sources for 7.3 (may be more, needs testing)
2009-01-12 08:36:21 -07:00
Brian Paul
1598be5083
mesa: add osmesa.pc.in to tarball list
2009-01-12 08:36:21 -07:00
Michel Dänzer
45604ffac7
gallivm: Make sure the bitcode buffer is followed by a 0 byte.
...
May fail to parse otherwise.
2009-01-12 15:05:05 +01:00
Keith Whitwell
3425257e14
dri: rename dri1 directory
2009-01-12 11:52:13 +00:00
Keith Whitwell
782eae916d
dri: sketch of new device-independent glx/dri state tracker
2009-01-12 11:51:57 +00:00
Michel Dänzer
f43e621e22
gallivm: Print error message from ParseBitcodeFile() in case it fails.
2009-01-12 12:39:31 +01:00
Michel Dänzer
359bbe7432
gallivm: Explicitly specify the LLVM components we need.
2009-01-12 12:37:13 +01:00
Michel Dänzer
f586c31fa6
gallivm: Adapt to header file move in LLVM 2.4.
2009-01-12 12:34:27 +01:00
Ben Skeggs
7a90ace9c8
nv50: make rtt work again
2009-01-12 16:59:35 +10:00
Ben Skeggs
ac6516101b
nv50: fix handling of depth textures
2009-01-12 16:59:35 +10:00
Ben Skeggs
39bcc39717
nv50: another typo..
2009-01-12 16:59:35 +10:00
Ben Skeggs
ecb2eb4c99
nouveau: fix warning
2009-01-12 16:59:34 +10:00
Ben Skeggs
73f1857aee
nv50: fix assertion failure
2009-01-12 16:59:34 +10:00
Ben Skeggs
f935f35287
nv50: remove previous hack to manage tiled surfaces
2009-01-12 16:59:34 +10:00
Ben Skeggs
515c3d9bc1
nv50: fix a typo and a thinko
2009-01-12 16:59:34 +10:00
Ben Skeggs
ed8f0b753b
nv50: enable npot textures
2009-01-12 16:59:34 +10:00
Ben Skeggs
b01d0077af
nv50: disable shader debug
2009-01-12 16:59:34 +10:00
Ben Skeggs
08b6534bc8
nv50: any cpu access to a texture is done on its backing images
...
Still a little dodgy:
- RTT will hit an assertion (hopefully!) and fail
- 3D textures with depth >= 32 will cause bad things to happen
2009-01-12 16:59:33 +10:00
Ben Skeggs
103020f264
nv50: create buffers for each image that makes up a texture
2009-01-12 16:59:33 +10:00
Ben Skeggs
df266471b1
nouveau: return buffer map to something sane.
...
Sorry, but no, we're not doing this.. Correctness always takes precedence
over speed. Implement this higher up where you know it's safe to do so,
and doesn't break other things in the process.
2009-01-12 16:59:33 +10:00
Ben Skeggs
7b6fb34e9d
nouveau: use usage, not uninitialised flags value...
2009-01-12 16:59:33 +10:00
Matthieu Herrb
436024561a
Build fixes for gcc 2.95
2009-01-11 16:56:34 -07:00
Matthieu Herrb
0f0922f93c
Big endian fixes.
2009-01-11 16:44:54 -07:00
Matthieu Herrb
33f6dc3c33
build fix on big endian OpenBSD architectures.
2009-01-11 16:44:52 -07:00
Matthieu Herrb
356428d4e4
replace nearbyint() by rint() for now.
2009-01-11 16:44:50 -07:00
Owain G. Ainsworth
b4866f8a52
Fix build with GCC 2.95.
2009-01-11 16:44:40 -07:00
Matthieu Herrb
297a9606ea
__builtin_expect is a gcc 3.x feature. define it out for gcc 2.95.
...
Patch suggested by miod@. Thanks.
2009-01-11 16:44:36 -07:00
Brian Paul
516dd9b361
cell: optimize unpack_colors() function, saving 12 cycles
2009-01-11 15:28:38 -07:00
Brian Paul
6324c77e01
cell: move color unpacking code into separate function
2009-01-11 15:18:28 -07:00
Brian Paul
b27eb7cb4f
cell: re-order the z/stencil fetch/extract/convert instructions for better perf
...
The new instruction order is 10 cycles faster.
2009-01-11 15:11:00 -07:00
Brian Paul
c4a782041b
cell: datatype clean-ups in SPE rtasm
2009-01-11 14:22:00 -07:00
Brian Paul
c73b8c4131
cell: simplify the 'optional register' code
2009-01-11 14:06:39 -07:00
Brian Paul
91fac69537
cell: asst datatype clean-ups
2009-01-11 13:52:58 -07:00
Brian Paul
097da27f55
cell: move depth/stencil code into separate function
2009-01-11 13:40:28 -07:00
Brian Paul
33ba88a0df
cell: clean-up, re-indent, comments
2009-01-11 13:23:44 -07:00
Keith Whitwell
e37a3aed95
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
2009-01-11 16:19:21 +00:00
Kristian Høgsberg
d67987b0d1
Bump dri2proto requirement to 1.99.3, drop CopyRegion bitmask from protocol.
...
(cherry picked from commit 154a9e5317 )
2009-01-11 09:45:04 +10:00
Dave Airlie
efe68930dc
radeon/r300: add code to setup r300 vs r500 using pci device from kernel
2009-01-11 09:47:38 +10:00
Brian
44557bf065
mesa: require libdrm 2.4.3 in configure.ac
2009-01-10 16:32:32 -07:00
Brian Paul
83a525af95
cell: use tgsi_dump_instruction() instead of spe_comment()
2009-01-10 14:58:45 -07:00
Brian Paul
2acf07983f
gallium: use tgsi_dump_instruction() instead of ppc_comment()
2009-01-10 14:58:45 -07:00
Brian Paul
d4394bb768
gallium: remove unused struct type
2009-01-10 14:58:45 -07:00
Brian Paul
0c71313970
gallium: fix register clobber bug in TGSI->PPC codegen
...
When negating a src vector that's stored in a altivec register, need to put
negated value into a new register so we don't upset the original value.
This solves the dark colors in the mandelbrot GLSL demo.
Also, use new predicate functions to check if a TGSI temp is stored in
an altivec register.
2009-01-10 14:58:44 -07:00
Brian Paul
1922ea965a
gallium: emit comments in TGSI->PPC codegen
2009-01-10 14:58:44 -07:00
Brian Paul
2ebd969f0f
gallium: code to dump/debug PPC code (disabled)
2009-01-10 14:58:44 -07:00
Brian Paul
7acaeb8775
gallium: added comment/annotation support to PPC rtasm
2009-01-10 14:58:44 -07:00
Brian Paul
fba6dac380
cell: added rule to produce .s assembly files
2009-01-10 14:58:44 -07:00
Brian Paul
2b26a92cd3
gallium: s/false/FALSE/
2009-01-10 14:58:44 -07:00
Brian Paul
f1455ca5f4
mesa: omit old headers from tarball
2009-01-10 12:21:37 -07:00
Younes Manton
6cee4b8d7e
mesa: Update .gitignore
2009-01-10 14:11:30 -05:00
Younes Manton
0b03cd4ea7
nouveau: Update nv30 swizzling.
2009-01-10 14:09:59 -05:00
Brian Paul
834db82153
docs: document deprecated/removed headers/interfaces
2009-01-10 12:09:08 -07:00
Brian Paul
ef193c10e7
mesa: remove old GLView.h header for BeOS
2009-01-10 12:07:58 -07:00
Brian Paul
c3a00a728b
mesa: remove deprecated headers from Makefile.am
2009-01-10 12:06:29 -07:00
Brian Paul
287102ddcc
mesa: deprecate GL/amesa.h header (allegro driver)
2009-01-10 12:04:39 -07:00
Brian Paul
f5979b0c15
mesa: deprecate the GL/fxmesa.h header
2009-01-10 12:01:40 -07:00
Brian Paul
d25cc16efa
mesa: remove the ancient include/GL/ugl*.h headers
2009-01-10 12:00:27 -07:00
Brian Paul
1636328b0a
xmesa: deprecate the "XMesa" interface
...
Move the include/GL/xmesa*.h files to src/mesa/drivers/x11/ so they're no
longer considered public.
2009-01-10 11:57:13 -07:00
Brian Paul
2c56dd7757
docs: prerequisite updates
2009-01-10 11:52:55 -07:00
Younes Manton
8ee238be75
nouveau: Factor out common winsys bits into libnouveaudrm.a
2009-01-10 13:52:07 -05:00
Younes Manton
734b3cb182
g3dvl: Use Gallium thread wrappers.
2009-01-10 13:52:07 -05:00
Younes Manton
1e9c3efcc7
g3dvl: Use Gallium MALLOC wrappers.
2009-01-10 13:52:07 -05:00
Younes Manton
db1021a37c
g3dvl: Get rid of old unbuffered motion compensation code.
2009-01-10 13:52:06 -05:00
Younes Manton
3c1b790c31
g3dvl: Map vertex bufs once per frame/flush.
2009-01-10 13:52:06 -05:00
Younes Manton
9beb004885
nouveau: Catch some more leaks.
2009-01-10 13:52:06 -05:00
Younes Manton
c10db52fcd
g3dvl: Fix some memory leaks.
2009-01-10 13:52:06 -05:00
Younes Manton
87e39466dc
g3dvl: Allocate one set of bufs, let winsys rename them as necessary.
2009-01-10 13:52:06 -05:00
Younes Manton
af2a856caa
nouveau: Add busy() query, determines if BOs can be mapped immediately.
2009-01-10 13:52:05 -05:00
Younes Manton
7289c388f4
nouveau: Use PIPE_BUFFER_USAGE_CPU_* instead of custom.
2009-01-10 13:52:05 -05:00
Younes Manton
0e1301ec8f
g3dvl: Expand YCbCr to full RGB range by default.
2009-01-10 13:52:05 -05:00
Younes Manton
9cbcdd86d0
g3dvl: Work around mplayer weirdness in XvMCPutSurface().
2009-01-10 13:52:05 -05:00
Younes Manton
ebd38dd0d6
g3dvl: Flag textures holding incoming data as dynamic.
2009-01-10 13:52:05 -05:00
Younes Manton
34c0281879
nouveau: Put dynamic textures in GART for CPU access and don't swizzle.
...
Also flag shadows as dynamic since they're for CPU access as well.
2009-01-10 13:52:05 -05:00
Younes Manton
fbf418d9dc
gallium: Define PIPE_TEXTURE_USAGE_DYNAMIC.
...
Knowing how the client intends to use the texture will give the
driver the opportunity to optimize for such cases.
2009-01-10 13:52:04 -05:00
Younes Manton
72aa42e594
nouveau: Swizzle textures larger than nv04 SIFM limit in parts.
...
Limit of SIFM on nv40 is 1024x1024, not sure about others.
2009-01-10 13:52:04 -05:00
Brian Paul
6333005f7a
glsl: force creation of new scope for for-loop body
...
Fixes regression in progs/demos/convolution.c due to loop unrolling.
This also allows the following to be compiled correctly:
for (int i = 0; i < n; i++) {
int i;
...
}
This fix is a bit of a hack, however. The better fix would be to change
the slang_shader.syn grammar. Will revisit that...
2009-01-10 11:40:20 -07:00
Brian Paul
1d352b42a1
glsl: replace 0/1 with GL_FALSE/GL_TRUE
2009-01-10 11:39:05 -07:00
Ian Romanick
9939a306f7
swrast: Fix GL_ATI_separate_stencil
...
GL_ATI_separate_stencil is enabled by default for software
rasterizers, but the extension functions weren't hooked up to the
dispatch table.
2009-01-09 16:44:08 -08:00
José Fonseca
7844b4e730
draw: Add missing include.
2009-01-09 21:35:09 +00:00
Keith Whitwell
61e843ff4b
xlib: move state tracker to glx/xlib
...
Also, remove makefile hacks.
2009-01-09 17:52:06 +00:00
Brian Paul
a719d70474
glsl: make minimum struct size = 2, not 1
...
1-component structs such as "struct foo { float x; }" could get placed at
any position within a register. This caused some trouble computing the
field offset which assumed all struct objects were placed at R.x.
It would be unusual to hit this case in normal shaders.
(cherry picked from master, commit ca03e881a8 )
2009-01-09 10:11:09 -07:00
Brian Paul
ca03e881a8
glsl: make minimum struct size = 2, not 1
...
1-component structs such as "struct foo { float x; }" could get placed at
any position within a register. This caused some trouble computing the
field offset which assumed all struct objects were placed at R.x.
It would be unusual to hit this case in normal shaders.
2009-01-09 09:59:49 -07:00
Keith Whitwell
75aac1b496
xlib: disable more cell calls when GALLIUM_CELL not defined
2009-01-09 14:38:23 +00:00
Keith Whitwell
93bad7ffa1
xlib: strip out some CI and overlay support
2009-01-09 14:36:39 +00:00
Keith Whitwell
b7ab4a6e99
xlib: strip out some overlay support
2009-01-09 14:36:39 +00:00
Keith Whitwell
6322d638ce
xlib: strip out glXAllocateMemoryNV & friends
2009-01-09 14:36:39 +00:00
Keith Whitwell
05f8e41b95
xlib: combine and eliminate some header files
2009-01-09 14:31:45 +00:00
Alan Hourihane
834c93687f
st: build fix
2009-01-09 11:23:47 +00:00
Brian Paul
ffe7bda603
mesa: 7.3-rc-1 Makefile changes
2009-01-09 11:16:44 +00:00
Brian Paul
4441e0a7b2
mesa: latest glxext.h header, no version change
2009-01-09 11:16:44 +00:00
Brian Paul
258c55db11
mesa: import glext.h version 44
2009-01-09 11:16:43 +00:00
Brian Paul
bd03d9bdbb
docs: dri2proto, libdrm tweaks
2009-01-09 11:16:42 +00:00
Brian Paul
233a58ff56
glsl: fix typo in the vec2 += operator function
2009-01-09 11:16:42 +00:00
Brian Paul
f75910e9b7
mesa: set version string to 7.3-rc1
2009-01-09 11:16:42 +00:00
Brian Paul
da37940973
docs: more 7.3 doc updates
2009-01-09 11:16:41 +00:00
Brian Paul
178f1ff486
docs: import 7.2 relnotes, start on 7.3 relnotes
2009-01-09 11:16:41 +00:00
Brian Paul
ebccb250f7
glsl: fix broken +=, -=, *=, /= operators
...
These functions need to return the final computed value.
Now expressions such as a = (b += c) work properly.
Also, no need to use __asm intrinsics in these functions. The resulting
code is the same when using ordinary arithmetic operators and is more legible.
2009-01-09 11:16:40 +00:00
Brian Paul
5273a5f0d7
mesa: fix off-by-one bug in _mesa_delete_instructions()
2009-01-09 11:16:40 +00:00
Eric Anholt
28c503d4bb
i965: Fix GLSL FS DPH to return the right value instead of src0.w * src1.w.
2009-01-09 11:16:40 +00:00
Eric Anholt
739d38c8e9
i965: Remove worrisome comment about _NEW_PROGRAM signaling fp change.
...
Everything now depends on either BRW_NEW_FRAGMENT_PROGRAM or
BRW_NEW_VERTEX_PROGRAM.
2009-01-09 11:16:39 +00:00
Eric Anholt
510916f509
mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs.
...
There was a note in state.c about _Active deserving to die, and there were
potential issues with it due to i965 forgetting to set _UseTexEnvProgram.
Removing both simplifies things.
Reviewed-by: Brian Paul <brianp@vmware.com >
2009-01-09 11:16:39 +00:00
Eric Anholt
5e116e52a2
i965: Remove dead brw_vs_tnl.c
2009-01-09 11:16:39 +00:00
Brian Paul
ac984c95ed
i965: allow gl_FragData[0] usage when there's only one color buffer
...
If gl_FragData[0] is written but not gl_FragCOlor, use the former.
2009-01-09 11:16:38 +00:00
Brian Paul
efd1208424
mesa: additional case in file_string()
2009-01-09 11:16:38 +00:00
Brian Paul
d33b0f1a8d
glsl: pass GLcontext::Extension info down into GLSL preprocessor
...
Now the #extension directives can be handled properly.
2009-01-09 11:16:38 +00:00
Brian Paul
1169457eca
glsl: bump up MAX_FOR_LOOP_UNROLL_COMPLEXITY
2009-01-09 11:16:37 +00:00
Brian Paul
f8a4ad1aee
glsl: check that the fragment shader does not write both gl_FragColor and gl_FragData[]
2009-01-09 11:16:37 +00:00
Brian Paul
5727ed130e
i965: init dst reg RelAddr field to zero
2009-01-09 11:16:37 +00:00
Eric Anholt
735bdcfad8
i965: Note when we drop saturate mode on the floor in a VP.
2009-01-09 11:16:37 +00:00
Eric Anholt
8ea48b94f9
i965: Add support for LRP in VPs.
...
Bug #19226 .
2009-01-09 11:16:37 +00:00
Brian Paul
bc5450f41c
glsl: disable some unused functions (but don't remove just yet)
2009-01-09 11:16:36 +00:00
Brian Paul
3ebc79ce89
glsl: also unroll loops with variable declarations such as "for (int i = 0; ..."
2009-01-09 11:16:36 +00:00
Brian Paul
5dfd429c7e
glsl: remove dead code
2009-01-09 11:16:36 +00:00
Brian Paul
89c078a58e
mesa: OSMesa Makefile fixes (use LIB_DIR)
2009-01-09 11:16:36 +00:00
Brian Paul
ac8a33671a
glsl: loop unroll adjustments
...
Add a "max complexity" heuristic to allow unrolling long loops with small
bodies and short loops with large bodies.
The loop unroll limits may need further tweaking...
2009-01-09 11:16:36 +00:00
Brian Paul
12fe642f96
glsl: implement loop unrolling for simple 'for' loops
...
Loops such as this will be unrolled:
for (i = 0; i < 4; ++i) {
body;
}
where 'body' isn't too large.
This also helps to fix the issue reported in bug #19190 . The problem there
is indexing vector types with a variable index. For example:
vec4 v;
v[2] = 1.0; // equivalent to v.z = 1.0
v[i] = 2.0; // variable index into vector!!
Since the for-i loop can be unrolled, we can avoid the problems associated
with variable indexing into a vector (at least in this case).
2009-01-09 11:16:35 +00:00
Brian Paul
aed1bb6bc3
mesa: Move var declaration to top of scope.
...
(cherry picked from commit 3740a06e28 )
2009-01-09 11:16:35 +00:00
Keith Whitwell
e3734593ae
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
...
Conflicts:
progs/glsl/Makefile
2009-01-09 10:08:06 +00:00
Brian Paul
630b6e896b
glsl: fix typo in the vec2 += operator function
2009-01-08 17:24:42 -07:00
Brian Paul
4497a5a57d
mesa: 7.3-rc-1 Makefile changes
2009-01-08 17:21:20 -07:00
Brian Paul
f7b4c2cca9
mesa: latest glxext.h header, no version change
2009-01-08 17:20:41 -07:00
Brian Paul
08fdc741bc
mesa: import glext.h version 44
2009-01-08 17:20:18 -07:00
Brian Paul
d0c2cbd257
docs: dri2proto, libdrm tweaks
2009-01-08 17:19:51 -07:00
Brian Paul
acd99f67cc
glsl: fix typo in the vec2 += operator function
2009-01-08 17:07:28 -07:00
Brian Paul
0713e9da73
mesa: set version string to 7.3-rc1
2009-01-08 16:16:36 -07:00
Brian Paul
2c0ce92e8a
docs: updated Cell docs, from gallium-0.2 branch
2009-01-08 16:15:31 -07:00
Brian Paul
1ed9b1ec90
docs: more 7.3 doc updates
2009-01-08 16:14:19 -07:00
Brian Paul
11ade9a3d1
docs: import 7.2 relnotes, start on 7.3 relnotes
2009-01-08 16:12:23 -07:00
Brian Paul
1efbad7499
glsl: fix broken +=, -=, *=, /= operators
...
These functions need to return the final computed value.
Now expressions such as a = (b += c) work properly.
Also, no need to use __asm intrinsics in these functions. The resulting
code is the same when using ordinary arithmetic operators and is more legible.
2009-01-08 15:52:06 -07:00
Brian Paul
730a407ca2
glsl: fix broken +=, -=, *=, /= operators
...
These functions need to return the final computed value.
Now expressions such as a = (b += c) work properly.
Also, no need to use __asm intrinsics in these functions. The resulting
code is the same when using ordinary arithmetic operators and is more legible.
2009-01-08 15:35:23 -07:00
Brian Paul
19c877c327
mesa: fix off-by-one bug in _mesa_delete_instructions()
2009-01-08 15:35:23 -07:00
Keith Whitwell
221352bbd7
xlib: strip out glXAllocateMemoryMESA & friends
2009-01-08 16:35:05 +00:00
Keith Whitwell
44a9f505d7
xlib: remove VMS tweaks, these should be moved to p_compiler.h if needed
2009-01-08 16:14:45 +00:00
Keith Whitwell
3afe1e42d7
xlib: remove unsued _glxapi_get_extensions func
2009-01-08 16:14:01 +00:00
Keith Whitwell
ee2876316a
xlib: strip out some unused XMesa api functions
2009-01-08 16:05:45 +00:00
Keith Whitwell
92e23ef81f
xlib: rename xfonts.c to fakeglx_fonts.c
2009-01-08 15:47:32 +00:00
Keith Whitwell
25deb852f8
xlib: rename old_xmesa.h to xm_api.h
2009-01-08 15:42:56 +00:00
Keith Whitwell
e83e2c4792
xlib: remove XMesaMakeCurrent, use XMesaMakeCurrent2 always
2009-01-08 15:40:58 +00:00
Keith Whitwell
2b960128e8
xlib: remove old xmesa_x.h file and all its defines
2009-01-08 15:35:35 +00:00
Keith Whitwell
e73dc63448
glsl: remove duplicate makefile targets
2009-01-08 15:35:35 +00:00
Keith Whitwell
153b4d5cdd
xlib: remove some XMesa types, just use the native Xlib ones
2009-01-08 15:35:35 +00:00
Brian Paul
a129c7268a
cell: fix breakage from xlib re-org
...
Some of these fixes are quick band-aids for now.
2009-01-08 08:30:11 -07:00
Keith Whitwell
94222d58e7
xlib: strip out more 3dfx stuff
2009-01-08 15:10:41 +00:00
Keith Whitwell
9ed74c61d4
xlib: pull in private copies of the GL/xmesa*.h headers
2009-01-08 15:10:05 +00:00
Keith Whitwell
cae13a8e4f
xlib: strip out FX stuff
2009-01-08 15:05:08 +00:00
Keith Whitwell
18ad0e3a28
xlib: remove XFree86Server stuff
2009-01-08 15:00:27 +00:00
Keith Whitwell
2c8ffd70b7
xlib: remove realglx.[ch]
2009-01-08 14:55:52 +00:00
Keith Whitwell
002dfb12fc
gallium: split driver-independent code out of xlib winsys
...
Place in new xlib state-tracker. This is a statetracker for the GLX API.
2009-01-08 14:10:56 +00:00
José Fonseca
5cad143e54
glut: Unlist file.
...
Again..
2009-01-08 12:42:25 +00:00
José Fonseca
500e05d437
gdi: Add newline at end of file.
2009-01-08 12:42:00 +00:00
José Fonseca
ab3a9f1eed
gallium: Replace uint64 by standard uint64_t.
...
uint64 is not (so?) standard, and often redefined by third parties,
causing name clashes.
2009-01-08 12:41:45 +00:00
José Fonseca
395edbc515
draw: Predeclare struct.
2009-01-08 12:31:36 +00:00
José Fonseca
a3ee0aa1bb
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/drivers/cell/spu/spu_command.h
src/gallium/include/pipe/p_shader_tokens.h
src/mesa/main/config.h
src/mesa/main/mtypes.h
src/mesa/shader/prog_execute.c
src/mesa/shader/slang/slang_emit.c
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/wgl/stw_wgl.h
src/mesa/state_tracker/wgl/stw_wgl_pixelformat.h
2009-01-08 12:31:14 +00:00
José Fonseca
2d3953fd5f
mesa: Add _mesa_snprintf.
...
On Windows snprintf is renamed as _snprintf.
2009-01-08 12:06:07 +00:00
Brian Paul
b57797f3a8
mesa: fix GL_DEPTH_CLEAR_VALUE casting
2009-01-08 12:06:01 +00:00
Brian Paul
0f5c71afd9
mesa: fix float->int mapping for glGetIntegerv(GL_DEPTH_CLEAR_VALUE)
...
(cherry picked from commit 8124faf89d )
Conflicts:
src/mesa/main/get.c
2009-01-08 12:05:33 +00:00
José Fonseca
a86776dba4
mesa: Move var declaration to top of scope.
2009-01-08 12:05:22 +00:00
José Fonseca
73d02d70b8
wgl: Do not provide DllMain inside the state tracker.
...
MS CRT libraries already provide a default DllMain entrypoint, and
MS Linker will complain if it finds the same symbol in two different
libraries. Therefore the DllMain has to be in (each) winsys.
2009-01-08 12:05:20 +00:00
José Fonseca
e59eb5fc96
gdi: Fix warning.
2009-01-08 12:05:17 +00:00
José Fonseca
19641a9295
wgl: Ensure public symbols get the proper DLL linkage attributes.
2009-01-08 12:05:14 +00:00
José Fonseca
8c0d8d89fa
glut: Fix build.
2009-01-08 12:05:10 +00:00
José Fonseca
2105b61846
mesa: Ensure gl* symbols are marked as dllexport on windows.
2009-01-08 12:05:05 +00:00
José Fonseca
1781d7fa38
scons: Choose the appropriate MSVC CRT.
2009-01-08 12:05:03 +00:00
José Fonseca
0db6804699
mesa: Use explicit casts when precision is lost.
...
Silences MSVC.
2009-01-08 12:04:59 +00:00
José Fonseca
ca337076b3
mesa: Fix windows build when UNICODE is defined.
2009-01-08 12:04:03 +00:00
Eric Anholt
83a74521cf
i965: Fix GLSL FS DPH to return the right value instead of src0.w * src1.w.
2009-01-07 20:35:25 -08:00
Eric Anholt
6d2cf395f4
i965: Remove worrisome comment about _NEW_PROGRAM signaling fp change.
...
Everything now depends on either BRW_NEW_FRAGMENT_PROGRAM or
BRW_NEW_VERTEX_PROGRAM.
2009-01-07 20:35:24 -08:00
Eric Anholt
8fb727548a
mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs.
...
There was a note in state.c about _Active deserving to die, and there were
potential issues with it due to i965 forgetting to set _UseTexEnvProgram.
Removing both simplifies things.
Reviewed-by: Brian Paul <brianp@vmware.com >
2009-01-07 20:34:46 -08:00
Eric Anholt
b9b482bd8d
i965: Remove dead brw_vs_tnl.c
2009-01-07 20:34:43 -08:00
Brian Paul
f68f94c2bc
i965: allow gl_FragData[0] usage when there's only one color buffer
...
If gl_FragData[0] is written but not gl_FragCOlor, use the former.
2009-01-07 18:45:49 -07:00
Brian Paul
bc7d2c4f51
mesa: additional case in file_string()
2009-01-07 18:44:41 -07:00
Brian Paul
9629be5e07
glsl: pass GLcontext::Extension info down into GLSL preprocessor
...
Now the #extension directives can be handled properly.
2009-01-07 18:44:00 -07:00
Brian Paul
176464b14b
glsl: bump up MAX_FOR_LOOP_UNROLL_COMPLEXITY
2009-01-07 18:41:54 -07:00
Brian Paul
d1860bcd0a
glsl: check that the fragment shader does not write both gl_FragColor and gl_FragData[]
2009-01-07 18:22:56 -07:00
Brian Paul
95fa98d61a
i965: init dst reg RelAddr field to zero
2009-01-07 15:06:06 -07:00
Eric Anholt
8112c9e2cc
i965: Note when we drop saturate mode on the floor in a VP.
2009-01-07 12:41:55 -08:00
Eric Anholt
f53d9913ac
i965: Add support for LRP in VPs.
...
Bug #19226 .
2009-01-07 12:40:16 -08:00
José Fonseca
b3c7f7466c
mesa: Add _mesa_snprintf.
...
On Windows snprintf is renamed as _snprintf.
(cherry picked from commit f8f9a1b620 )
2009-01-07 09:00:05 -07:00
Brian Paul
510ed7f51e
glsl: disable some unused functions (but don't remove just yet)
2009-01-07 08:56:10 -07:00
Brian Paul
a8542200b3
glsl: also unroll loops with variable declarations such as "for (int i = 0; ..."
2009-01-07 08:54:09 -07:00
Brian Paul
cea7f7b763
glsl: remove dead code
2009-01-07 08:32:21 -07:00
Brian Paul
1a414a4dbe
mesa: OSMesa Makefile fixes (use LIB_DIR)
2009-01-07 08:25:59 -07:00
José Fonseca
f8f9a1b620
mesa: Add _mesa_snprintf.
...
On Windows snprintf is renamed as _snprintf.
2009-01-07 12:02:06 +00:00
Brian Paul
0b0d0dcdef
glsl: loop unroll adjustments
...
Add a "max complexity" heuristic to allow unrolling long loops with small
bodies and short loops with large bodies.
The loop unroll limits may need further tweaking...
2009-01-06 17:36:20 -07:00
Brian Paul
1fa978c891
glsl: implement loop unrolling for simple 'for' loops
...
Loops such as this will be unrolled:
for (i = 0; i < 4; ++i) {
body;
}
where 'body' isn't too large.
This also helps to fix the issue reported in bug #19190 . The problem there
is indexing vector types with a variable index. For example:
vec4 v;
v[2] = 1.0; // equivalent to v.z = 1.0
v[i] = 2.0; // variable index into vector!!
Since the for-i loop can be unrolled, we can avoid the problems associated
with variable indexing into a vector (at least in this case).
2009-01-06 17:24:23 -07:00
Brian Paul
338ae34d22
mesa: Move var declaration to top of scope.
...
(cherry picked from commit 3740a06e28 )
2009-01-06 14:29:08 -07:00
Brian Paul
814bc5ccda
mesa: fix GL_DEPTH_CLEAR_VALUE casting
...
(cherry picked from commit d14d494dcd )
2009-01-06 14:24:16 -07:00
Brian Paul
a055520bfb
add GL_READ_FRAMEBUFFER_BINDING_EXT case, regenerate get.c file
...
(cherry picked from commit 816fbeaa81 )
Conflicts:
src/mesa/main/get.c
2009-01-06 14:23:07 -07:00
Brian Paul
d14d494dcd
mesa: fix GL_DEPTH_CLEAR_VALUE casting
2009-01-06 14:21:27 -07:00
Brian
c3be5e4a05
mesa: fix cast/conversion for optional code
...
(cherry picked from commit 1e3a44fab0 )
2009-01-06 14:18:57 -07:00
Brian Paul
bec14ebf5e
mesa: fix float->int mapping for glGetIntegerv(GL_DEPTH_CLEAR_VALUE)
...
(cherry picked from commit 8124faf89d )
Conflicts:
src/mesa/main/get.c
2009-01-06 14:18:45 -07:00
Brian Paul
22ff5a7a0b
mesa: pass ctx to link_uniform_vars() to fix build error
2009-01-06 14:04:17 -07:00
José Fonseca
3740a06e28
mesa: Move var declaration to top of scope.
2009-01-06 19:18:13 +00:00
José Fonseca
5da0401398
wgl: Do not provide DllMain inside the state tracker.
...
MS CRT libraries already provide a default DllMain entrypoint, and
MS Linker will complain if it finds the same symbol in two different
libraries. Therefore the DllMain has to be in (each) winsys.
2009-01-06 18:23:17 +00:00
José Fonseca
a40ad7ded4
gdi: Fix warning.
2009-01-06 18:23:16 +00:00
José Fonseca
c3ead57feb
wgl: Ensure public symbols get the proper DLL linkage attributes.
2009-01-06 18:23:16 +00:00
José Fonseca
f98f553c4c
glut: Fix build.
2009-01-06 18:23:16 +00:00
José Fonseca
3f46389a28
mesa: Ensure gl* symbols are marked as dllexport on windows.
2009-01-06 18:23:16 +00:00
José Fonseca
26ba5ce0e8
scons: Choose the appropriate MSVC CRT.
2009-01-06 18:23:16 +00:00
José Fonseca
4ebb8f78e7
mesa: Use explicit casts when precision is lost.
...
Silences MSVC.
2009-01-06 18:23:16 +00:00
Brian Paul
fb45adeb9e
mesa: fix a GLSL swizzled writemask bug
...
This fixes cases such as:
vec4 v4;
vec2 v2;
v4.xz.yx = v2;
The last line now correctly compiles into MOV TEMP[1].xz, TEMP[0].yyxw;
Helps to fix the Humus Domino demo. See bug 19189.
(cherry picked from commit 9736d8f033 )
2009-01-06 09:22:32 -07:00
Brian Paul
0e25c363be
mesa: fix warning about possibly undefined var in GLSL compiler
...
(cherry picked from commit 724ed5b84b )
2009-01-06 09:21:24 -07:00
Brian Paul
8e0b601e31
mesa: fix another "out of samplers" problem
...
Now only the samplers that are actually used by texture() functions are
saved in the uniform variable list. Before, we could run out of samplers
if too many were declared while only some of them were actually used.
(cherry picked from commit 1fad6ccb75 )
Conflicts:
src/mesa/shader/slang/slang_link.c
2009-01-06 09:20:55 -07:00
Brian Paul
7bfe6a9375
mesa: updated comments about GLSL constants
...
(cherry picked from commit dfada459aa )
2009-01-06 09:18:55 -07:00
Brian Paul
158d3febd8
mesa: fix bug in evaluation of structure fields
...
Fixes incorrect size information. See bug 19273.
(cherry picked from commit e8d7db31e2 )
2009-01-06 09:18:25 -07:00
Brian Paul
b66fe32c52
mesa: allow variable indexing into the predefined uniform variable arrays
...
This allows code such as "vec4 a = gl_LightSource[i].ambient;" to work.
When a built-in uniform array is indexed with a variable index we need to
"unroll" the whole array into the parameter list (aka constant buffer) because
we don't know which elements may be accessed at compile-time. In the case of
the gl_LightSource array of size [8], we emit 64 state references into the
parameter array (8 elements times 8 vec4s per gl_LightSourceParameters
struct).
Previously, we only allowed constant-indexed references to uniform arrays
(such as gl_LightSource[2].position) which resulted in a single state reference
being added to the parameter array, not 64. We still optimize this case.
Users should be aware that using "gl_LightSource[i].ambient" in their shaders
is a bit expensive since state validation will involve updating all 64
light source entries in the parameter list.
(cherry picked from commit c6537ac8b8 )
2009-01-06 09:18:08 -07:00
Brian Paul
efe91b0000
mesa: better error message when running out of GLSL samplers
...
(cherry picked from commit ca0540e25c )
2009-01-06 09:17:53 -07:00
Brian Paul
681ff412f9
mesa: disable debug output
...
(cherry picked from commit 3be8d6db9e )
2009-01-06 09:15:16 -07:00
Brian Paul
c2009111cc
mesa: fix some GLSL array regressions
...
array.length() wasn't working.
Swizzle mask for accessing elements of float arrays was incorrect.
(cherry picked from commit 368df1615e )
2009-01-06 09:14:56 -07:00
Brian Paul
2ced2647fb
mesa: updated GLSL docs
...
(cherry picked from commit c4341fe80a )
2009-01-06 09:14:39 -07:00
Brian Paul
c18860ad1c
mesa: bump glsl grammar revision
...
And update some copyrights.
(cherry picked from commit 4561307a27 )
2009-01-06 09:14:21 -07:00
Brian Paul
6045a6a908
mesa: more re-org of variable declarations in glsl compiler
...
(cherry picked from commit 49543d7177 )
2009-01-06 09:13:54 -07:00
Brian Paul
ceb800a107
mesa: more comments, clean up
...
(cherry picked from commit a1229cc9e7 )
2009-01-06 09:13:30 -07:00
Brian Paul
5b5b05c894
mesa: added comments, remove unused code
...
(cherry picked from commit a66ff046cc )
2009-01-06 09:13:10 -07:00
Brian Paul
be620a66eb
mesa: checkpoint: handle uniform vars in _slang_gen_var_decl()
...
This allows uniform declarations with scalar/array initializers.
The code is rough though, and will be cleaned up.
(cherry picked from commit aa1b904636 )
2009-01-06 09:12:52 -07:00
Brian Paul
d0a39f3d65
mesa: place glsl constant arrays in constant memory
...
For example, a declaration like
const float[3] xxx = float[3](1.1, 2.2, 3.3);
will place the array in the constant buffer whereas a regular, non-const array
would be placed in the temporary register file.
Next up: do the same thing for uniform arrays.
2009-01-06 09:12:19 -07:00
Brian Paul
7f0462abe7
mesa: remove old size=4 limit
...
(cherry picked from commit 0da44c62cc )
2009-01-06 09:12:00 -07:00
Brian Paul
e153275ae8
mesa: code clean-up in glsl compiler
...
(cherry picked from commit d4be09fb2b )
2009-01-06 09:11:52 -07:00
Brian Paul
70050191ed
mesa: remove unneeded swizzle init code in glsl compiler
...
(cherry picked from commit 240e211c71 )
2009-01-06 09:11:40 -07:00
Brian Paul
9d6804bd28
mesa: disable glsl debug output
...
(cherry picked from commit 4d49fc83f1 )
2009-01-06 09:11:20 -07:00
Brian Paul
ceaf57524b
mesa: remove unused varpool code in glsl compiler
...
(cherry picked from commit 81253be334 )
2009-01-06 09:11:08 -07:00
Brian Paul
71ef9e3775
mesa: basic array constructors work now
...
For example: float[3] xxx = float[3](1.1, 2.2, 3.3);
Optimizations for const-qualified arrays next.
(cherry picked from commit 5c0c5e5af9 )
2009-01-06 09:10:59 -07:00
Brian Paul
ae701a1201
mesa: copy array_len in slang_fully_specified_type_copy()
...
(cherry picked from commit c20d00f04b )
2009-01-06 09:10:44 -07:00
Brian Paul
91535b8a61
mesa: remove incorrect array_len assignment
...
(cherry picked from commit 9016331d0f )
2009-01-06 09:10:35 -07:00
Brian Paul
a2ca0c0430
mesa: array size fix in _slang_typeof_operation()
...
(cherry picked from commit 87a00959ba )
2009-01-06 09:10:21 -07:00
Brian Paul
47331842d4
mesa: fix some more GLSL 1.20 array things.
...
Function that return arrays should work now.
(cherry picked from commit 8571401d7d )
2009-01-06 09:10:09 -07:00
Brian Paul
3d7d6cfbc2
mesa: more glsl function renaming
...
(cherry picked from commit d5367622a3 )
2009-01-06 09:09:56 -07:00
Brian Paul
18dd05fbc5
mesa: use _slang_alloc()
...
(cherry picked from commit b4019483de )
2009-01-06 09:09:47 -07:00
Brian Paul
c22801841c
mesa: glsl compiler function renaming
...
(cherry picked from commit 456a4e274f )
2009-01-06 09:09:38 -07:00
Brian Paul
9fc529bcff
mesa: more glsl type/function movement
...
(cherry picked from commit 9a174ef409 )
2009-01-06 09:09:20 -07:00
Brian Paul
a5cd8fef91
mesa: move some glsl compiler functions to different files to be more consistant
...
(cherry picked from commit aeeb9bca27 )
2009-01-06 09:09:11 -07:00
Brian Paul
fbc55bfbb8
mesa: move _slang_locate_function() to different file
...
(cherry picked from commit ea9dc3879f )
2009-01-06 09:09:03 -07:00
Brian Paul
a7e3f85fd6
mesa: remove unused fixup table code in glsl compiler
...
(cherry picked from commit 19ca2908be )
2009-01-06 09:08:54 -07:00
Brian Paul
593073a3b3
mesa: checkpoint: GLSL 1.20 array constructors
...
(cherry picked from commit ade777ea1b )
2009-01-06 09:08:35 -07:00
Brian Paul
0d293f6687
mesa: consolidate variable declaration initializer code for globals too
...
(cherry picked from commit 1737f2dbdd )
2009-01-06 09:08:16 -07:00
Brian Paul
6bc2fa0f82
mesa: move variable initializer IR generation into _slang_gen_var_decl()
...
More code consolidation coming...
(cherry picked from commit 2760bca1e1 )
2009-01-06 09:08:07 -07:00
Brian Paul
de4f208866
mesa: simplify some glsl variable declaration code
...
(cherry picked from commit 05ed9f7fe9 )
2009-01-06 09:07:58 -07:00
Brian Paul
6095b7e224
mesa: glsl clean-ups
...
(cherry picked from commit 929eb00b32 )
2009-01-06 09:07:42 -07:00
Brian Paul
9b28d5ecd6
mesa: checkpoint commit of GLSL 1.20 array syntax.
...
This allows things like float[3] x = float[3](1., 2., 3.);
Parsing and AST construction now. Codegen not working yet.
(cherry picked from commit 2dc3de016c )
2009-01-06 09:07:29 -07:00
Brian Paul
1f8109dd06
mesa: in slang linker, replace assertion with link error when max samplers exceeded
...
(cherry picked from commit e8f5c1a5e8 )
2009-01-06 09:05:53 -07:00
Brian
525145a9f6
mesa: fix conditional in save_Lightfv(), bug 18838
...
(cherry picked from commit 1e2f574251 )
2009-01-06 09:04:31 -07:00
Brian Paul
aeb3caeba5
mesa: add missing type check for function calls
...
(cherry picked from commit 001b1cbb0d )
2009-01-06 09:03:23 -07:00
Brian Paul
e42ed1ed0b
mesa: add missing size check for assignment optimization
...
(cherry picked from commit aa40de5c6f )
2009-01-06 09:03:06 -07:00
Brian Paul
96cab36e2e
mesa: remove debug code
...
(cherry picked from commit fea3a32e17 )
2009-01-06 09:02:47 -07:00
Brian Paul
b8cf2f0076
gallium: added centroid/invarient fields to declarations
...
(cherry picked from commit 4de360e67d )
2009-01-06 09:01:18 -07:00
Brian Paul
06f2139b82
mesa: added support for GLSL 1.20 array.length() method
...
This is the only method supported in GLSL 1.20 so we take a few short-cuts.
(cherry picked from commit 8d95e66cf7 )
2009-01-06 09:00:35 -07:00
Brian Paul
d450ede4c4
mesa: support for GLSL 1.20 array types
...
This allows syntax like "float[8] foo, bar;"
(cherry picked from commit 0fab514ff5 )
2009-01-06 09:00:24 -07:00
Brian Paul
89acfecd0b
mesa: pass shader centroid/invariant info through to the TGSI shader
...
(cherry picked from commit c5b52b5e0e )
2009-01-06 08:57:58 -07:00
Brian Paul
dc48ae97dc
tgsi: add tgsi_declaration fields for centroid sampling, invariant optimization
...
(cherry picked from commit 434e255eae )
2009-01-06 08:57:28 -07:00
Brian Paul
a48b004c44
mesa: add gl_program::Input/OutputFlags[] array
...
These arrays will indicate per-input or per-output options for vertex/fragment
programs such as centroid-sampling and invariance.
(cherry picked from commit b730d0d3e9 )
2009-01-06 08:54:23 -07:00
Brian Paul
71c900abc7
mesa: copy centroid/invariance/precision info in parse_init_declarator()
...
(cherry picked from commit a203713738 )
2009-01-06 08:53:46 -07:00
Brian Paul
674d7181f8
mesa: check that varying variable qualifiers agree
...
(cherry picked from commit dc1107c08d )
2009-01-06 08:53:35 -07:00
Brian Paul
19111c5efc
mesa: copy precision/variant/centroid info in slang_fully_specified_type_copy()
...
(cherry picked from commit 0e2f757413 )
2009-01-06 08:53:28 -07:00
Brian Paul
c249ac6d14
mesa: set flags for varying vars
...
(cherry picked from commit 3197954554 )
2009-01-06 08:53:01 -07:00
Brian Paul
af988262e3
mesa: rename program parameter flags to match other Mesa conventions
...
(cherry picked from commit f490ec9797 )
2009-01-06 08:52:49 -07:00
Brian Paul
64de78723c
mesa: copy Flags in _mesa_clone_parameter_list()
...
(cherry picked from commit 08b825a771 )
2009-01-06 08:52:39 -07:00
Brian Paul
a92af00e2a
mesa: dump/debug varying vars list
...
(cherry picked from commit 3f6668a4bf )
2009-01-06 08:52:19 -07:00
Brian Paul
36f9d3fa9a
mesa: added PROG_PARAM_ bits for invariant, flat/linear interpolation
...
Plus, update the print/debug code.
(cherry picked from commit 777a5c4f2e )
2009-01-06 08:52:08 -07:00
Brian Paul
ee3da89b19
mesa: add Flags field to gl_program_parameter
...
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
(cherry picked from commit 0f228d7ab3 )
2009-01-06 08:51:45 -07:00
Brian Paul
716ccb11a2
mesa: issue error, don't crash, when calling a prototyped, but undefined function
...
Bug #18659 .
(cherry picked from commit 4f05893415 )
2009-01-06 08:51:24 -07:00
Brian Paul
db2cde413c
mesa: better variable name: s/aux/store/
...
(cherry picked from commit b63a31b36f )
2009-01-06 08:51:00 -07:00
Brian Paul
515a43da16
mesa: minor comment reformattting
...
(cherry picked from commit bab4e78734 )
2009-01-06 08:50:33 -07:00
Brian Paul
620a2bad22
mesa: glsl compiler debug code
...
RETURN0 macro reports file/line before returning zero.
(cherry picked from commit bf7f9d2143 )
2009-01-06 08:50:14 -07:00
Brian Paul
e779e33261
mesa: rework GLSL array code generation
...
We now express arrays in terms of indirect addressing. For example:
dst = a[i];
becomes:
MOV dst, TEMP[1 + TEMP[2].y];
At instruction-emit time indirect addressing is converted into ARL/
ADDR-relative form:
ARL ADDR.x, TEMP[2].y;
MOV dst, TEMP[1 + ADDR.x];
This fixes a number of array-related issues. Arrays of arrays and complex
array/struct nesting works now.
There may be some regressions, but more work is coming.
(cherry picked from commit ae0ff8097b )
2009-01-06 08:49:40 -07:00
Brian Paul
ef4bd18a50
mesa: don't realloc instruction buffer so often
...
(cherry picked from commit e709d68d92 )
2009-01-06 08:49:27 -07:00
Brian Paul
2a6c12cf53
mesa: updated comment
...
(cherry picked from commit d9fa9e3290 )
2009-01-06 08:49:08 -07:00
Brian Paul
def84fac39
mesa: fix merge conflict left-overs
2009-01-06 08:48:27 -07:00
Brian Paul
ebcf06702c
mesa: no longer need Writemask field in GLSL IR nodes
...
The Swizzle and Size fields carry all the info we need now.
(cherry picked from commit 80d6379722 )
2009-01-06 08:47:40 -07:00
Brian Paul
9681119bbb
mesa: revamp GLSL instruction emit code
...
This is a step toward better array handling code. In particular, when more
than one operand of an instruction uses indirect addressing, we'll need some
temporary instructions and registers. By converting IR storage to instruction
operands all in one place (emit_instruction()) we can be smarter about this.
Also, somewhat better handling of dst register swizzle/writemask handling.
This results in tighter writemasks on some instructions which is good for
SOA execution.
And, cleaner instruction commenting with inst_comment().
Next: remove some more dead code and additional clean-ups...
(cherry picked from commit 3a7ed9779b )
2009-01-06 08:47:21 -07:00
Brian Paul
e8fa7e500c
mesa: make writemask_string() non-static
...
(cherry picked from commit 610c2461ce )
Conflicts:
src/mesa/shader/prog_print.c
2009-01-06 08:47:05 -07:00
Brian Paul
2bdf076554
mesa: remove some do-nothing GLSL code
...
(cherry picked from commit 4c167f8fc1 )
2009-01-06 08:46:12 -07:00
Brian Paul
ed8f857792
mesa: fix accidental regression in GLSL built-in texture matrix lookup
...
Was broken by commit 9aca9a4b72b2a7b378e50bd88f9c3324d07375ec.
(cherry picked from commit fe984aed5a )
Conflicts:
src/mesa/shader/slang/slang_builtin.c
2009-01-06 08:45:53 -07:00
Brian Paul
5b66bc1a83
mesa: remove unused/obsolete __NormalMatrixTranspose matrix
...
(cherry picked from commit e556cc82f8 )
2009-01-06 08:43:55 -07:00
Brian Paul
1ad6daf3a9
mesa: tweak program register printing for RelAddr case
...
(cherry picked from commit 557fde9531 )
2009-01-06 08:43:14 -07:00
Brian Paul
20156ce5da
mesa: allow relative indexing into all register files and indirect dst register indexing
...
(cherry picked from commit f4361540f8 )
Conflicts:
src/mesa/shader/prog_execute.c
2009-01-06 08:42:40 -07:00
Brian Paul
6b05708ce2
mesa: track initialization status of uniform variables. Plus, asst clean-ups.
...
(cherry picked from commit 2d76a0d77a )
2009-01-06 08:39:06 -07:00
Brian Paul
de44547891
mesa: initial support for uniform variable initializers.
...
This lets one specify initial values for uniforms in the code, avoiding
the need to call glUniform() in some cases.
(cherry picked from commit 379ff8c956 )
2009-01-06 08:38:29 -07:00
Brian Paul
c478a1baca
mesa: allows 'f' suffix on GLSL float literals
...
(cherry picked from commit 80c8017a64 )
2009-01-06 08:37:13 -07:00
Brian Paul
45c8d996f6
mesa: add support for 'centroid' qualifier in GLSL 1.20
...
(cherry picked from commit 87d1a26ba3 )
Conflicts:
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
2009-01-06 08:36:30 -07:00
Brian Paul
2e77a39d2f
mesa: add support for 'invariant' keyword for GLSL 1.20
...
(cherry picked from commit 448156f769 )
Conflicts:
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
2009-01-06 08:35:16 -07:00
Brian Paul
4adeac5af1
mesa: reformat comments, rewrap lines, etc for a little better readability
...
(cherry picked from commit b632e5aa7f )
2009-01-06 08:32:44 -07:00
Brian Paul
374cf77b2f
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/drivers/dri/common/dri_util.c
2009-01-06 08:15:54 -07:00
Brian Paul
62bf6cf6c7
gallium: Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REV
...
This is copied from Ian's commit a330933bb7
2009-01-06 08:08:26 -07:00
Jonathan Adamczewski
52d5d25537
cell: replace 0 with -1 in SPE_COUNT_USABLE_SPES query
2009-01-06 08:02:55 -07:00
Brian Paul
a8ee35c1c5
mesa: remove dri_sarea.h, add glcore.h in Makefile
2009-01-06 07:36:11 -07:00
Xiang, Haihao
f1f022dbb1
mesa: Fix the size per pixel for packed pixel format data type.
2009-01-06 15:37:45 +08:00
Xiang, Haihao
241c0bfc98
mesa: Fix the number of components for GL_UNSIGNED_SHORT_1_5_5_5_REV. (bug #19390 )
2009-01-06 15:34:51 +08:00
Xiang, Haihao
7627c7f5df
dri: correct the damage.
...
Fixes bug #17234
2009-01-06 11:22:19 +08:00
Brian Paul
b7257890dc
cell: fix code emit for RSQ/RCP when src arg == dst arg
...
Fixes moire-like artifacts seen in fslight demo.
2009-01-05 19:51:17 -07:00
Brian Paul
c5c9241cca
mesa: add GLushort cases for render to texture (Z-buffers)
2009-01-05 18:12:23 -07:00
Ben Skeggs
cd5d3fde13
nv50: fill image unit index in TEX varients
2009-01-06 08:05:57 +11:00
Ben Skeggs
00b15c9f40
nv50: fix crash in nv50_program_destroy
2009-01-06 08:05:57 +11:00
Ben Skeggs
17cbe451d2
nv50: working towards 3D textures
2009-01-06 08:05:57 +11:00
Ben Skeggs
108942f22a
nv50: slightly better miptree allocation
...
I swear this didn't work last time I tried it.. Anyhow, still only
suitable for 2D miptrees - more coming once I know the layout.
2009-01-06 08:05:57 +11:00
Ben Skeggs
5696267efd
nv50: add TXP to TEX case.. not correct, but anyway..
2009-01-06 08:05:57 +11:00
Ben Skeggs
0d54770cab
nv50: indentation for TEX is a little overenthusiastic
2009-01-06 08:05:57 +11:00
Ben Skeggs
3f66b72fdb
nv50: ensure we actually get contiguous regs for TEX insn.
...
Still many more horrible things to fix here...
2009-01-06 08:05:57 +11:00
Brian Paul
9736d8f033
mesa: fix a GLSL swizzled writemask bug
...
This fixes cases such as:
vec4 v4;
vec2 v2;
v4.xz.yx = v2;
The last line now correctly compiles into MOV TEMP[1].xz, TEMP[0].yyxw;
Helps to fix the Humus Domino demo. See bug 19189.
2009-01-05 13:16:09 -07:00
Brian Paul
0d797365de
i965: implement OPCODE_TRUNC (round toward zero) on vertex path.
...
Also, fix some RNDD vs. RNDZ confusion elsewhere.
2009-01-05 10:09:28 -07:00
José Fonseca
8ee1df0652
scons: Specify C99 throughout all the tree.
...
MSVC may not support full C99, but supports more than plain C90. And
-pedantic without -std=c99 generates too many spurious warnings
(specially C++ style comments) to be of any use.
Note that using certain C99 features in the cross-platform parts of Gallium
is still not possible; namely mid-of-scope variable declarations and named
structure initializers will break MSVC builds.
2009-01-05 15:24:56 +00:00
Tom Fogal
4469355df2
glu: Add mangled symbols to export list
...
This adds all of the `mglu' symbols to the list of symbol exports
for GLU. Without this patch, mangled GLU symbols are considered
`internal' symbols, and calling any results in undefined references.
2009-01-05 08:00:16 -07:00
Jonathan Adamczewski
785e90a7dc
cell: SIMDize sorting in setup_sort_vertices()
...
Put setup.v{min,mid,max,provoke} into a union with qword vertex_headers.
Rewrite vertex sorting to more efficiently handle the packed data items.
Reduces spu_tri.o by ~128 bytes.
2009-01-05 07:52:59 -07:00
Jonathan Adamczewski
90167d0ee9
cell: SIMDize some subtractions
...
Put edge.{dx,dy} into a union with a vector and perform subtractions in
setup_sort_vertices() on vectors.
Reduces spu_tri.o by ~300 bytes.
2009-01-05 07:52:59 -07:00
Jakob Bornecrantz
5256f94b1a
progs/glsl: Add ignores
2009-01-05 11:52:30 +01:00
Jakob Bornecrantz
b2e9d415ed
progs/glsl: Remove double target def for vert-or-frag-only
2009-01-05 11:52:30 +01:00
Jonathan Adamczewski
bd2e8888ed
cell: improvements to spu_tri.c
...
Replace int setup.span{left,right}[2] with vec_uint4 setup.span.quad
SIMDize calculate_mask() and inline into into flush_spans()
Set setup.span.quad members using spu_shuffle() or spu_sel().
Reduces spu_tri.o by ~116 bytes.
2009-01-04 18:48:46 -07:00
Jonathan Adamczewski
921ec940f0
cell: new spu_shuffle.h header
...
Facilitates creation of shuffle patterns for use with spu_shuffle()
and si_shufb() intrinsics.
To be used by subsequent patches.
2009-01-04 18:46:44 -07:00
Brian Paul
8f6e2f8620
cell: initial codegen support for fragment shader loops
...
Basic for/while loops work now.
Only one level of loop nesting is supported at this time (same for if/else).
The progs/glsl/mandelbrot demo works, but the colors are too dim.
2009-01-04 18:40:48 -07:00
Brian Paul
38b526999c
cell: add support for PIPE_CAP_TEXTURE_MIRROR_REPEAT query
...
We don't really support this texwrap mode yet, but this enables GL 2.1
2009-01-04 18:38:42 -07:00
Brian Paul
7ba6869308
cell: clean-up, improve SPU code generation
...
Start on ARL and address-relative indexing too.
2009-01-04 10:14:19 -07:00
Brian Paul
6cbaa2226f
gallium: fix MaxTextureCoordUnits init
...
Fixes Cell regression.
2009-01-04 10:04:44 -07:00
Brian
9832f92850
cell: fix typo (s/10/0)
2009-01-03 14:44:34 -07:00
Brian
fa4fec2d1b
demos: remove redundant Makefile lines from prev merge
2009-01-03 14:39:49 -07:00
Brian Paul
724ed5b84b
mesa: fix warning about possibly undefined var in GLSL compiler
2009-01-02 17:30:08 -07:00
Brian Paul
19aed38919
softpipe: increase number of texture samplers/units to PIPE_MAX_SAMPLERS (16)
2009-01-02 16:55:33 -07:00
Brian Paul
d917ad5dbd
gallium: assorted state tracker fixes for > 8 texture samplers
2009-01-02 16:54:11 -07:00
Brian Paul
84cffc2e7f
mesa: replace CC with APP_CC in progs/glsl/Makefile
2009-01-02 16:52:00 -07:00
Brian Paul
0815ebccfc
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/main/ffvertex_prog.c
src/mesa/main/texenvprogram.c
2009-01-02 16:32:26 -07:00
Brian Paul
eb9bbc5265
gallium: fix texcoord loop for rasterpos attributes
2009-01-02 16:16:36 -07:00
Brian Paul
15a3fdb63e
gallium: clamp MaxVertexTextureImageUnits against Mesa limit
2009-01-02 16:16:36 -07:00
Brian Paul
a57417eff6
mesa: remove redudant lines for libglapi.a
2009-01-02 16:16:36 -07:00
Brian Paul
1fad6ccb75
mesa: fix another "out of samplers" problem
...
Now only the samplers that are actually used by texture() functions are
saved in the uniform variable list. Before, we could run out of samplers
if too many were declared while only some of them were actually used.
2009-01-02 12:28:37 -07:00
Brian Paul
4a6ad999ea
i965: increase number of texture samplers to 16
...
This lets GLSL shaders use up to 16 samplers.
Fixed function is still limited to 8 textures.
Tested with progs/glsl/samplers.c
2009-01-01 14:05:30 -07:00
Brian Paul
3b891a502b
i965: comments, clean-ups, re-order some functions
2009-01-01 14:05:30 -07:00
Brian Paul
32e03c4a2f
i965: added OPCODE_NRM3/4
2009-01-01 14:05:30 -07:00
Brian Paul
e262da8040
i965: fix comment
2009-01-01 14:05:30 -07:00
Brian Paul
914fcbafdb
i965: indentation and formatting fixes
2009-01-01 14:05:30 -07:00
Brian Paul
131ac5b465
i965: implement OPCODE_NRM3/NRM4
2009-01-01 14:05:30 -07:00
Brian Paul
23b0ad4d7e
i965: whitespace, comment changes
2009-01-01 14:05:30 -07:00
Brian Paul
1d03f2834f
mesa: comments, whitespace changes
2009-01-01 14:05:30 -07:00
Brian Paul
46b8fe00c9
demos: added progs/glsl/samplers.c to test all available texture samplers
2009-01-01 14:02:17 -07:00
Brian Paul
dfada459aa
mesa: updated comments about GLSL constants
2009-01-01 08:07:54 -07:00
Brian Paul
e9b34885b8
mesa: increase max texture image units and GLSL samplers to 16
...
The max texture coord units is still 8. All the fixed-function paths are
still limited to 8 too. But GLSL shaders can use more samplers now.
Note that some texcoord-related data structures are declared to be 16
elements in size rather than 8. This just simplifies the code in a few
places; the extra elements aren't accessible to the user.
These changes haven't been extensively tested yet, but sanity checking has
been done.
It should be possible to increase the max image units/samplers to 32 without
doing anything special. Beyond that we'll need longer bitfields in a few
places.
2008-12-31 12:00:17 -07:00
José Fonseca
1d77835668
python: Pass a zero offset to util_draw_vertex_buffer.
2008-12-31 15:03:35 +00:00
José Fonseca
e96985b026
util: List new file in SConscript.
2008-12-31 13:29:09 +00:00
José Fonseca
e228433823
Merge commit 'origin/gallium-0.1' into gallium-0.2
2008-12-31 13:06:22 +00:00
José Fonseca
43d70a12d4
i915: Avoid ptr->int conversion.
2008-12-31 13:02:06 +00:00
José Fonseca
2f24bc6984
draw: Avoid integer overflow converting pointers on 64bit archs.
...
Not really an error, as we only care for the lower 4 bits.
2008-12-31 13:02:06 +00:00
Eric Anholt
bfebeffc00
intel: Share passthrough transform setup between glBitmap and glDrawPixels.
...
The DrawPixels path was missing glViewport care, so blender's toolbar icons
would go to the wrong places.
Bug #19118 .
2008-12-31 00:35:17 -08:00
Eric Anholt
e1a9217554
intel: Add support for glBitmap as metaops using GL calls.
...
This lets us avoid software fallbacks when clients forget to turn some state
off (engine demo) or just do crazy things to test conformance (OGLC).
This should probably be brought into mesa generic code so other drivers can
make use of it.
Bug #19016 .
2008-12-31 00:10:29 -08:00
Brian Paul
c789bd376f
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/main/config.h
2008-12-30 18:01:15 -07:00
Brian Paul
e8d7db31e2
mesa: fix bug in evaluation of structure fields
...
Fixes incorrect size information. See bug 19273.
2008-12-30 17:50:39 -07:00
Brian Paul
c6537ac8b8
mesa: allow variable indexing into the predefined uniform variable arrays
...
This allows code such as "vec4 a = gl_LightSource[i].ambient;" to work.
When a built-in uniform array is indexed with a variable index we need to
"unroll" the whole array into the parameter list (aka constant buffer) because
we don't know which elements may be accessed at compile-time. In the case of
the gl_LightSource array of size [8], we emit 64 state references into the
parameter array (8 elements times 8 vec4s per gl_LightSourceParameters
struct).
Previously, we only allowed constant-indexed references to uniform arrays
(such as gl_LightSource[2].position) which resulted in a single state reference
being added to the parameter array, not 64. We still optimize this case.
Users should be aware that using "gl_LightSource[i].ambient" in their shaders
is a bit expensive since state validation will involve updating all 64
light source entries in the parameter list.
2008-12-30 17:11:32 -07:00
Brian Paul
ca0540e25c
mesa: better error message when running out of GLSL samplers
2008-12-30 17:03:09 -07:00
Brian Paul
6f346ec0b8
mesa: comments for some state vars
2008-12-30 17:00:36 -07:00
Brian Paul
432e9fa852
mesa: increase max constants/uniforms to 256 (vec4 vectors)
2008-12-30 17:00:06 -07:00
José Fonseca
369115e4c7
gallium: Initialize var before use.
2008-12-30 19:21:30 +00:00
José Fonseca
70894676c2
glut: List new source file in sconscript.
2008-12-30 17:22:24 +00:00
José Fonseca
9972d7147b
mesa: Do not specify types in bitfields.
...
As advised by gcc -pedantic.
2008-12-30 17:21:25 +00:00
José Fonseca
72f993b5b1
draw: Do not specify types in bitfields.
...
As advised by gcc -pedantic.
2008-12-30 17:21:15 +00:00
José Fonseca
0e0fb49c45
gallium: Remove unused variables.
2008-12-30 17:15:34 +00:00
José Fonseca
b3b7c757a9
gallium: Don't redefine INLINE.
...
INLINE is commonly used in third-party headers.
2008-12-30 17:14:48 +00:00
José Fonseca
975e58499a
scons: Specify C99 throughout all the tree.
...
MSVC may not support full C99, but supports more than plain C90. And
-pedantic without -std=c99 generates too many spurious warnings
(specially C++ style comments) to be of any use.
Note that using certain C99 features in the cross-platform parts of Gallium
is still not possible; namely mid-of-scope variable declarations and named
structure initializers will break MSVC builds.
2008-12-30 17:13:38 +00:00
José Fonseca
42d0079002
rtasm: Remove spurious semi-colons after function bodies.
2008-12-30 17:06:51 +00:00
José Fonseca
8e63beff56
gdi: Remove accidental keypresses.
2008-12-30 16:35:46 +00:00
Brian Paul
49a3fabed8
mesa: updated compilation documentation
2008-12-30 07:57:16 -07:00
Brian Paul
c9122072fc
demos: minor fixes to twoside.c glsl demo
2008-12-30 07:24:19 -07:00
Xiang, Haihao
0c4346e632
intel: disable ATI_texture_env_combine3 for i830( and related device).
...
Thanks to Eric for pointing it out.
2008-12-30 11:25:45 +08:00
Eric Anholt
6c01500228
dri: Fix driWaitForMSC32 when divisor >= 2 and msc < 0.
...
We'd come up with a negative remainder, while we were looking for the positive
version of it in the loop conditional. And, since the "did we hit our target"
break was disabled for the target_msc == 0 ("Just make the divisor/remainder
work") path, we'd never exit.
Simplify the code by just using int64_t all over instead of trying to do it
in a u32 space.
2008-12-29 12:09:24 -08:00
Alex Deucher
c40cd2ccdd
R300: missing semicolon
2008-12-29 12:28:12 -05:00
Xiang, Haihao
0674a23854
intel: enable ATI_texture_env_combine3. Fixes #17707
2008-12-29 09:32:51 +08:00
Dave Airlie
0d1f90c75e
r300: remove the unknowns from the indx_buffer code
2008-12-28 16:48:36 +10:00
Brian Paul
49c40b10c7
gallium: implement TGSI_OPCODE_DP2A, add sqrt to NRM3/NRM4
2008-12-24 14:14:07 +01:00
Xiang, Haihao
129b6bc4e3
i915: separate the fog term from the specular color term.
...
Previously fog parameter and specular color are packed into the
same dword. Note specular color should be packed in BGRA for device,
so if fog parameter and specular color all are present, fog parameter
will dirty the alpha term of specular color. This fixes rendering
issue when playing 'Yo Frankie' on 915/945.
2008-12-24 09:26:46 +08:00
Eric Anholt
15b2e0d138
intel: Fix glBitmap clipping for DRI1.
2008-12-23 15:01:53 -08:00
Dave Airlie
b359350017
Remove third buffer support from Mesa.
...
This is part of the deprecated pageflipping infrastructure.
2008-12-23 15:01:53 -08:00
Keith Whitwell
fc4cea08fe
tgsi: fix incomplete rename of loop counter variable
2008-12-23 18:16:49 +00:00
Alan Hourihane
53ce80e7cc
egl: fix egl closure
2008-12-23 15:33:46 +00:00
Keith Whitwell
f5d4274b4a
draw: allow driver-override of draw_need_pipeline()
2008-12-23 15:11:41 +00:00
Alan Hourihane
04ef91af8b
egl: fix startup query version
2008-12-23 14:18:36 +00:00
Michal Krol
ed7ba03256
tgsi: Dump indirect register swizzle.
2008-12-23 15:13:59 +01:00
Alan Hourihane
9003922593
egl: support GLXFBConfigs, pbuffers and pixmaps.
2008-12-23 13:20:18 +00:00
Michal Krol
4b3c74b4d6
tgsi: Return 0.0 for negative constant register indices.
2008-12-22 21:43:07 +01:00
Michal Krol
b8e68f2e55
tgsi: Keep address register as a floating point.
2008-12-22 21:43:05 +01:00
José Fonseca
417a78bdad
softpipe: Don't fill surfaces's winsys fields.
...
This is sometimes checked to distinguish between texture views and
(deprecated) standalone surfaces.
2008-12-22 20:23:59 +00:00
José Fonseca
fc16ba8553
softpipe: Call surface_alloc_storage to get the pipebuffer for display targets.
...
Otherwise blitting from display target surfaces to front screen fails in
several platforms.
2008-12-22 20:20:58 +00:00
José Fonseca
9136c9b29e
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/gallium/auxiliary/util/Makefile
2008-12-22 19:31:52 +00:00
José Fonseca
ce8469abeb
gdi: Cleanup sconsfile.
2008-12-22 19:27:36 +00:00
Jerome Glisse
5f36c5b2c5
softpipe: initialize refcount and winsys
2008-12-22 18:56:20 +00:00
Jerome Glisse
85bc49a6f1
softpipe: convert to use texture instead of surface
2008-12-22 18:56:09 +00:00
José Fonseca
ae7e75d610
gallium: const correctness.
2008-12-22 16:55:27 +00:00
Dave Airlie
2a287ddd32
r300: disable settexoffset extension on r300
2008-12-22 17:04:39 +10:00
Dave Airlie
d9b325f77e
radeon: fix library name for consistency
2008-12-22 12:28:16 +10:00
Dave Airlie
e14ffb1fa1
radeon: remove start/end offset + cleanup some whitespace
2008-12-22 12:11:21 +10:00
Dave Airlie
a42000bd6b
radeon: fixup r500 FP emission for new CS
2008-12-22 11:41:23 +10:00
José Fonseca
229424b2d7
Ignore new tests executables.
2008-12-21 13:48:43 +00:00
Dave Airlie
9f2732d312
radeno: hopefully make r200/radeon build
2008-12-21 09:54:35 +10:00
José Fonseca
9127a03bcb
gallium: Fix typo in define name.
2008-12-20 12:59:51 +00:00
Brian Paul
58a82ee57f
Merge commit 'origin/master' into gallium-0.2
2008-12-19 16:56:56 -07:00
Brian Paul
9c8db86854
gallium: begin adapting Ian's 3D mipmap gen code to gallium utility lib
...
Unfinished, a big no-op for now.
2008-12-19 16:56:35 -07:00
Brian Paul
e8d8060988
gallium: Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REV
...
This is copied from Ian's commit a330933bb7
2008-12-19 16:56:34 -07:00
Ian Romanick
f83f5ec8f5
Add do_row_3d for mipmapping 3D textures
...
Previously 3D textures were mipmapped using multiple passed through
the 2D mipmap generation code. This had 3 disadvantages. First, the
extra passes were slow. Second, this required the allocation of a
temporary buffer to hold intermediate data. Third, and most
important, the extra passes caused loss of additional bits due to
integer division / bit-shifting.
With this change, our mipmapgen conformance test passes for
non-compressed texture formats.
2008-12-19 13:06:53 -08:00
Ian Romanick
a330933bb7
Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REV
2008-12-19 13:06:53 -08:00
Ian Romanick
7e04272690
965 / GLSL: Use full precision for EXP instruction
...
The partial precision mode doesn't have quite enough bits of precision
to pass conformance tests.
2008-12-19 13:06:53 -08:00
Ian Romanick
962fa6bbc1
GLSL: The LOG2 macro doesn't have enough precision
...
It looks like the LOG2 macro only has 8 or 9 bits of precission, but
the ARB_vertex_program spec says "accurate to at least 10 bits".
2008-12-19 13:06:53 -08:00
Eric Anholt
1db6371304
intel: Fix glBitmap top/bottom clipping.
...
Bug #19139 .
2008-12-19 13:05:50 -08:00
Eric Anholt
e67350da34
intel: Don't forget the source bitmap size when clipping the size we draw.
2008-12-19 13:04:29 -08:00
Eric Anholt
b9752a2bd6
intel: Update mesa state in blit operations that want post-scissor draw bounds.
2008-12-19 13:04:29 -08:00
Eric Anholt
d091ebd4e4
intel: don't clip to scissor-clipped read framebuffer bounds in copypixels.
2008-12-19 13:04:23 -08:00
José Fonseca
b901e1f212
gallium: Simple and efficient cache.
...
Fixed size hash table. Collisions are handled by simply destroying the
previous entry.
It hasn't received much testing yet.
2008-12-19 20:06:11 +00:00
Brian Paul
93afa77945
cell: fix build breakage
2008-12-19 08:01:53 -07:00
Alan Hourihane
663d6a0fe3
gallium: set ST_NEW_FRAMEBUFFER when setting new surfaces
2008-12-19 15:01:08 +00:00
Brian Paul
aae74c3698
mesa: s/CC/APP_CC/ in progs/glsl/Makefile
2008-12-19 07:57:09 -07:00
Brian Paul
030a7a320c
gallium: replace #elif with #else
2008-12-19 07:33:17 -07:00
Brian Paul
42f7fd7d81
gallium: replace #elif with #else
2008-12-19 07:32:52 -07:00
Eric Anholt
1e7785fe07
intel: Move copyteximage source clipping out of copytexsubimage.
...
glCopyTexSubImage already gets the (correct) clipping for us, so it doesn't
need the path. While moving the clipping out, replace the code with the mesa
path to do the same job.
2008-12-18 18:50:16 -08:00
Eric Anholt
d01c44aaca
mesa: Clip copytexsubimage to read framebuffer bounds, not scissor region.
2008-12-18 18:32:07 -08:00
Eric Anholt
aa09e0a1d5
mesa: Correct _mesa_clip_to_region() off-by-one.
...
Note how if:
x + width == xmax + 0: width -= 0
x + width == xmax + 1: width -= 0
x + width == xmax + 2: width -= 1
So, the function was clipping to [xmin, xmax+1), not [xmin, xmax) like it was
supposed to. Same for ymax.
2008-12-18 18:32:07 -08:00
Brian Paul
59a168d5c9
tgsi: scan for additional info: uses_fogcoord, uses_frontfacing
2008-12-18 18:08:32 -07:00
Brian Paul
db99ca3bc9
tgsi: scan for additional info: uses_fogcoord, uses_frontfacing
2008-12-18 18:06:38 -07:00
Brian Paul
78a204f507
gallium: fix two-sided lighting test in state tracker
...
This fixes two-sided lighting for vertex shaders.
2008-12-18 16:12:08 -07:00
Brian Paul
52406c80d6
gallium: fix two-sided lighting test in state tracker
...
This fixes two-sided lighting for vertex shaders.
2008-12-18 16:00:20 -07:00
Michal Krol
a795e79f87
glsl: Fix handling of nested parens in macro actual arguments.
2008-12-18 14:17:06 -07:00
Brian Paul
6c14bdc72f
demos: all glutDestroyWindow() upon exit to test query object clean-up
2008-12-18 14:17:06 -07:00
Xiang, Haihao
8b0b881438
i915: check WRAP_T instead of WRAP_R for cube map texture.
2008-12-18 14:17:06 -07:00
Xiang, Haihao
36920a24d6
i915: fix abort issue. (bug #19147 )
2008-12-18 14:17:06 -07:00
Brian Paul
60410fc858
mesa: remove unneeded _mesa_reference_fragprog() call
...
The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
2008-12-18 14:17:06 -07:00
Jon Turney
867705b8c5
dri: fix for Cygwin compilation, bug 19144
2008-12-18 14:17:06 -07:00
Brian Paul
9585f8daef
mesa: updated comments
2008-12-18 14:17:06 -07:00
Brian Paul
bde3b3a164
demos: add test of vertex-only and fragment-only shader programs
2008-12-18 14:17:06 -07:00
Brian Paul
7d41f10605
util: check for frag/vertShader=0 before attaching
2008-12-18 14:17:06 -07:00
Jerome Glisse
26b5e92c30
softpipe: initialize refcount and winsys
2008-12-18 19:56:45 +01:00
Robert Ellison
36c7bb697d
Gallium: fix for conform test
...
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda , incorrectly inverts
the Y coordinate in the last parameter to pipe_copy_rect().
/* If do_flip, invert src_y position and pass negative src stride
*/
pipe_copy_rect(dst_map,
&dst->block,
dst->stride,
dst_x, dst_y,
w, h,
src_map,
do_flip ? -(int) src->stride : src->stride,
src_x,
do_flip ? w - src_y : src_y);
The intention is to start at the last Y coordinate line and move
backwards, in the case of a flip; in that case, the correct
calculation is "src_y + h - 1", not "w - src_y".
This fixes a Gallium assertion failure in the conformance tests:
u_rect.c:65:pipe_copy_rect: Assertion `src_y >= 0' failed.
debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE
Trace/breakpoint trap
2008-12-18 11:25:27 -07:00
Michal Krol
97d08366aa
glsl: Fix handling of nested parens in macro actual arguments.
2008-12-18 11:14:11 -07:00
Michal Krol
d9b92b112f
glsl: Fix handling of nested parens in macro actual arguments.
2008-12-18 11:11:59 -07:00
Brian Paul
f43019b226
demos: all glutDestroyWindow() upon exit to test query object clean-up
2008-12-18 11:11:59 -07:00
Jerome Glisse
b7c05044ed
softpipe: convert to use texture instead of surface
2008-12-18 18:30:53 +01:00
Robert Ellison
5ccef84c01
Gallium: fix for conform test
...
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda , incorrectly inverts
the Y coordinate in the last parameter to pipe_copy_rect().
/* If do_flip, invert src_y position and pass negative src stride
*/
pipe_copy_rect(dst_map,
&dst->block,
dst->stride,
dst_x, dst_y,
w, h,
src_map,
do_flip ? -(int) src->stride : src->stride,
src_x,
do_flip ? w - src_y : src_y);
The intention is to start at the last Y coordinate line and move
backwards, in the case of a flip; in that case, the correct
calculation is "src_y + h - 1", not "w - src_y".
This fixes a Gallium assertion failure in the conformance tests:
u_rect.c:65:pipe_copy_rect: Assertion `src_y >= 0' failed.
debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE
Trace/breakpoint trap
2008-12-18 10:22:33 -07:00
Eric Anholt
a402d48f84
mesa: Pass the context to query object delete cb to avoid null dereference.
2008-12-18 09:47:49 -07:00
José Fonseca
92dc8ffa71
gallium: Enable memory debugging on all windows platforms.
2008-12-18 14:59:42 +00:00
Xiang, Haihao
cb453244ca
i915: check WRAP_T instead of WRAP_R for cube map texture.
2008-12-18 12:59:43 +08:00
Xiang, Haihao
df73363ed1
i915: fix abort issue. (bug #19147 )
2008-12-18 10:07:45 +08:00
Brian Paul
f9c76750a7
mesa: choose GLSL vertex shader over ARB/internal vertex program in get_fp_input_mask()
...
This is a work-around the for the fact that we do fragment shader state
validation before vertex shader validation (see comments in state.c) so in
get_fp_input_mask() we can't rely on ctx->VertexProgram._Current being up to
date yet.
This fixes a glean glsl1 test failure.
2008-12-17 19:05:26 -07:00
Brian Paul
b890fffbf4
gallium: fix memory corruption in u_gen_mipmap.c
...
Remove the old/initial vbuf allocation in util_create_gen_mipmap().
We were allocating a small vbuf at this point so get_next_slot() didn't have
as large of buffer as it expected. So all but the first set_vertex_data()
was writing out of bounds.
Also added some comments.
2008-12-17 19:05:14 -07:00
Brian Paul
2389c055ed
mesa: choose GLSL vertex shader over ARB/internal vertex program in get_fp_input_mask()
...
This is a work-around the for the fact that we do fragment shader state
validation before vertex shader validation (see comments in state.c) so in
get_fp_input_mask() we can't rely on ctx->VertexProgram._Current being up to
date yet.
This fixes a glean glsl1 test failure.
2008-12-17 19:01:34 -07:00
Brian Paul
3ffd529ff1
softpipe: fix vertex shader texture sampling
...
Need to disable/bypass lambda calculation since derivatives of texcoords
are meaningless for adjacent vertices.
2008-12-17 18:59:58 -07:00
Brian Paul
d1c8af7c0a
gallium: fix memory corruption in u_gen_mipmap.c
...
Remove the old/initial vbuf allocation in util_create_gen_mipmap().
We were allocating a small vbuf at this point so get_next_slot() didn't have
as large of buffer as it expected. So all but the first set_vertex_data()
was writing out of bounds.
Also added some comments.
2008-12-17 18:52:10 -07:00
Brian Paul
35aebf4667
mesa: remove unneeded _mesa_reference_fragprog() call
...
The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
2008-12-17 18:05:03 -07:00
Jon Turney
8e7599892f
dri: fix for Cygwin compilation, bug 19144
2008-12-17 18:01:16 -07:00
Brian Paul
20555835b6
mesa: updated comments
2008-12-17 14:54:46 -07:00
Brian Paul
947d04d08b
mesa: fix fixed-function test in get_fp_input_mask() - again.
...
The problem we're solving only occured when there was a user-defined
vertex shader but no fragment shader. Check for that case now.
Fixes glean api2 vertex array failure.
2008-12-17 14:06:56 -07:00
Brian Paul
35bb2aa96a
mesa: add missing cases for texture array targets
2008-12-17 14:06:34 -07:00
Brian Paul
f0b0794b38
mesa: fix fixed-function test in get_fp_input_mask() - again.
...
The problem we're solving only occured when there was a user-defined
vertex shader but no fragment shader. Check for that case now.
Fixes glean api2 vertex array failure.
2008-12-17 14:04:03 -07:00
Brian Paul
1cb680d06b
demos: add test of vertex-only and fragment-only shader programs
2008-12-17 13:58:31 -07:00
Brian Paul
637f06dcdc
util: check for frag/vertShader=0 before attaching
2008-12-17 13:58:05 -07:00
Brian Paul
1519b93b7b
mesa: add missing cases for texture array targets
2008-12-17 13:17:15 -07:00
Brian Paul
a8751f4916
Revert "mesa: fix vertex program test in get_fp_input_mask()"
...
This reverts commit cdaaf8e107 .
2008-12-17 11:29:42 -07:00
Brian Paul
d7296a1a8e
Revert "mesa: fix vertex program test in get_fp_input_mask()"
...
This reverts commit 8dc88cb643 .
This change broke other things...
2008-12-17 11:29:06 -07:00
Brian Paul
8dc88cb643
mesa: fix vertex program test in get_fp_input_mask()
...
We were accidentally using the fixed-function logic when a vertex shader was
being used.
2008-12-17 10:58:33 -07:00
Brian Paul
6b88d9606f
winsys: fix depth buffer size when using stencil
2008-12-17 10:58:23 -07:00
Brian Paul
cdaaf8e107
mesa: fix vertex program test in get_fp_input_mask()
...
We were accidentally using the fixed-function logic when a vertex shader was
being used.
2008-12-17 10:55:40 -07:00
Brian Paul
2a299851b9
winsys: fix depth buffer size when using stencil
2008-12-17 10:55:29 -07:00
Brian Paul
ca284fde53
mesa: remove redundant Makefile lines
2008-12-16 16:38:11 -07:00
Brian Paul
ca8e42652c
mesa: updated list of src files
2008-12-16 16:01:30 -07:00
Brian Paul
89565b22f5
mesa: update SConscript with new source files
2008-12-16 15:53:35 -07:00
Brian Paul
b0caa10a85
Merge commit 'origin/master' into gallium-0.2
2008-12-16 15:50:14 -07:00
Brian Paul
3616fb08da
tgsi: use flr(), not trunc() for ARL
2008-12-16 15:40:04 -07:00
Brian Paul
3be8d6db9e
mesa: disable debug output
2008-12-16 15:25:58 -07:00
Brian Paul
368df1615e
mesa: fix some GLSL array regressions
...
array.length() wasn't working.
Swizzle mask for accessing elements of float arrays was incorrect.
2008-12-16 14:29:52 -07:00
Alan Hourihane
d7e9b0e33a
gallium: fix some asserts
2008-12-16 09:43:31 +00:00
Ben Skeggs
10e0129dbc
nv40: apply ABS modifier to RSQ source in vp
...
Gallium used to do this for us :)
2008-12-16 17:34:47 +11:00
Ben Skeggs
300e42d6f0
nouveau: return a value for PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS
2008-12-16 17:30:04 +11:00
Brian Paul
702b5b076b
mesa: rename slang_library_noise.[ch] to prog_noise.[ch] and rename functions
...
The noise functions were not glsl-specific.
Also, ran indent on the code to clean it up.
2008-12-15 18:37:39 -07:00
Brian Paul
c4341fe80a
mesa: updated GLSL docs
2008-12-15 18:30:40 -07:00
Brian Paul
ec8cdc7113
Merge branch 'glsl-1.20-v2'
2008-12-15 18:25:43 -07:00
Brian Paul
4561307a27
mesa: bump glsl grammar revision
...
And update some copyrights.
2008-12-15 18:24:16 -07:00
Brian Paul
63fc119d6c
mesa: in slang linker, replace assertion with link error when max samplers exceeded
2008-12-15 18:19:05 -07:00
Brian Paul
b8bfddf976
demos: updated tests/floattex.c (doesn't work just yet).
2008-12-15 18:19:05 -07:00
Brian Paul
c573b9f94a
mesa: move _mesa_dlopen(), etc into separate dlopen.c file
2008-12-15 18:19:05 -07:00
Brian Paul
12219210af
glut: added GLUT_PPM_FILE env var to dump first frame to a PPM file
...
Set GLUT_PPM_FILE to the desired filename. The first frame rendered will
be written to that file.
2008-12-15 18:19:05 -07:00
Brian Paul
49543d7177
mesa: more re-org of variable declarations in glsl compiler
2008-12-15 18:18:08 -07:00
Brian Paul
a1229cc9e7
mesa: more comments, clean up
2008-12-15 16:57:37 -07:00
Brian Paul
a66ff046cc
mesa: added comments, remove unused code
2008-12-15 16:49:32 -07:00
Brian Paul
aa1b904636
mesa: checkpoint: handle uniform vars in _slang_gen_var_decl()
...
This allows uniform declarations with scalar/array initializers.
The code is rough though, and will be cleaned up.
2008-12-15 16:44:55 -07:00
Eric Anholt
dc58da3e06
intel: stub out CompressedTexSubImage2D instead of segfaulting.
2008-12-15 15:10:18 -08:00
Eric Anholt
095c3a5cb1
i965: Update state before checking for fallbacks in brw_try_draw_prims.
...
This got flipped around in 7855b2aef6 .
Bug #18907 . Thanks to idr for pointing me at a nicer testcase than blender.
2008-12-15 13:34:07 -08:00
Michal Krol
208f50ec37
gallium: Fix PIPE_FORMAT_X8B8G8R8_SNORM definition.
2008-12-15 11:33:18 +00:00
Michal Krol
95ce6474f4
gallium: Fix PIPE_FORMAT_X8B8G8R8_SNORM definition.
2008-12-15 12:29:34 +01:00
Alan Hourihane
8abc860bd4
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/gallium/winsys/gdi/SConscript
2008-12-15 11:22:19 +00:00
Alan Hourihane
a22d865f93
Merge commit 'origin/master' into gallium-0.2
2008-12-15 11:16:03 +00:00
Pierre Willenbrock
e72a442153
intel: Don't steal renderbuffer from caller in intel_miptree_create_for_region
...
Fixes double-frees of some regions, once from the renderbuffer code and
once from the miptree itself.
Bug #19062
2008-12-14 19:27:56 -08:00
Eric Anholt
0dfec4ab61
i965: Add decode of index/vertex buffer and primitive emit.
2008-12-14 19:27:56 -08:00
Eric Anholt
bc3b8a39a7
intel: Add batchbuffer assertions to hopefully catch future mistakes.
2008-12-14 19:27:55 -08:00
Ian Romanick
1126aa86bf
Perform range checking on app supplied texture base level
...
It is possible for applications to specify any texture base level,
including trivially invalid values (i.e., 47000000). When an app
specifies an invalide base level, we should gracefully disable the
texture instead of accessing memory outside the gl_texture_object.
This fixes an occasional segfault in one of our conformance tests.
2008-12-14 18:46:18 -08:00
Ian Romanick
63cca2ba10
GLX: Include glapi.h before glapitable.h
...
A previous commit (2dbc515a66 ) change
some of the interdependencies between these two header files. Now
glapi.h must be included before glapitable.h.
2008-12-14 18:46:17 -08:00
Ian Romanick
2dd0c16f21
GLX: Change resulting from previous commit
...
Commit db61cbfa2aa241da49589331d8b6875d9a77d826 made modifications to
the protocol generator data and scripts. This commit represents the
changes to the generated files resulting from the previous changes.
This is the client-side part of the fix for bugzilla #11003 .
2008-12-14 18:46:17 -08:00
Neil Roberts
1709ab01ef
Return 0 as the request size when the pixels parameter is NULL
...
img_null_flag was being ignored when calculating the size of a request
so a BadLength error gets thrown for glTexImage3D when the pixels
parameter is NULL.
See bug #11003
2008-12-14 18:46:17 -08:00
Ian Romanick
0f73302d24
GLX: Fix protocol for glTexSubImage#D
...
The TexSubImage commands do not have the "NULL image" flag that was
introduced with glTexImage3D. However, there is a CARD32 pad element
where that flag would be. Removing the img_null_flag causes the flag
to be removed from the protocol. This changes the protocol and breaks
everything.
In order to prevent needing to hand-code all of the TexSubImage
functions, a new attribute was added to the param element. This new
attribute, called "padding," is a boolean flag that selects whether or
not the parameter is a real parameter (default / false) or is protocol
padding (true) that does not appear in the function's parameter list.
This change resulted in a number of changes to other Python scripts.
In almost all cases parameters with the is_padding flag set should not
be emitted.
This patch only changes the the XML, the DTD, and the generator
scripts. It does NOT include the resulting changes to the generated
code. Generated code in the X server is also changed by the script /
XML changes in this patch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com >
2008-12-14 18:46:17 -08:00
Dan Nicholson
8be02fc8c6
Add OSMesa pkg-config file
...
This makes the GLU .pc file a little simpler, too.
2008-12-14 09:35:29 -08:00
Dan Nicholson
71e208bafe
Add more package metadata to the pkg-config files
...
The pkg-config files have been filled in more thoroughly to allow users
to use mesa more effectively. By adding metadata to Requires.private,
Libs.private and Cflags, we can ensure that all the libraries and
headers will be found in all situations. However, the full substitutions
are only done when using the configure script.
This also fixes the glu pkg-config file to account for using GL or
OSMesa.
Fixes bug 18161.
2008-12-14 08:47:03 -08:00
Gary Wong
a42342cd90
Fix silly type mismatch error in multinoise demo.
2008-12-13 20:06:21 -07:00
Gary Wong
d28e852895
i965: Finish OPCODE_NOISEn instructions.
...
Added missing OPCODE_NOISE4, and use BRW_REGISTER_TYPE_D (instead of _UD)
in the initial RNDD instructions (which avoids saturating negative inputs
to 0).
2008-12-13 14:28:28 -07:00
Gary Wong
d427a2910f
Add "multinoise" demo, to test 1/2/3/4 dimensional noise.
2008-12-13 14:28:04 -07:00
Gary Wong
0df3dfab82
Ensure p.w is initialised in noise demo.
2008-12-13 14:25:52 -07:00
Pekka Paalanen
f72848a09a
Nouveau: move the definition of log2i() to header
...
Also make the type unsigned instead of signed, since negative
values do not make sense.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-12-13 23:24:39 +02:00
Brian Paul
a9475cc240
mesa: use IFLOOR(x) instead of (int) FLOORF(x)
2008-12-12 18:03:48 -07:00
Brian Paul
3b61e9c6e6
mesa: place glsl constant arrays in constant memory
...
For example, a declaration like
const float[3] xxx = float[3](1.1, 2.2, 3.3);
will place the array in the constant buffer whereas a regular, non-const array
would be placed in the temporary register file.
Next up: do the same thing for uniform arrays.
2008-12-12 18:00:47 -07:00
Brian Paul
0da44c62cc
mesa: remove old size=4 limit
2008-12-12 18:00:19 -07:00
Brian Paul
d4be09fb2b
mesa: code clean-up in glsl compiler
2008-12-12 16:20:31 -07:00
Brian Paul
240e211c71
mesa: remove unneeded swizzle init code in glsl compiler
2008-12-12 16:02:31 -07:00
Alan Hourihane
079116e6a4
Merge commit 'origin/master' into gallium-0.2
2008-12-12 23:02:13 +00:00
Brian Paul
4d49fc83f1
mesa: disable glsl debug output
2008-12-12 15:34:58 -07:00
Brian Paul
81253be334
mesa: remove unused varpool code in glsl compiler
2008-12-12 15:11:08 -07:00
Brian Paul
5c0c5e5af9
mesa: basic array constructors work now
...
For example: float[3] xxx = float[3](1.1, 2.2, 3.3);
Optimizations for const-qualified arrays next.
2008-12-12 15:07:21 -07:00
Brian Paul
c20d00f04b
mesa: copy array_len in slang_fully_specified_type_copy()
2008-12-12 15:01:00 -07:00
Brian Paul
9016331d0f
mesa: remove incorrect array_len assignment
2008-12-12 15:00:06 -07:00
Alan Hourihane
a725a8e27a
mesa: move declaration
2008-12-12 20:37:21 +00:00
Alan Hourihane
c828adc3f6
mesa: when we have interleaved arrays, check bounds for both
...
VBO's and user space objects
2008-12-12 20:35:59 +00:00
Brian Paul
87a00959ba
mesa: array size fix in _slang_typeof_operation()
2008-12-12 13:18:30 -07:00
Brian Paul
8571401d7d
mesa: fix some more GLSL 1.20 array things.
...
Function that return arrays should work now.
2008-12-12 13:05:29 -07:00
Keith Whitwell
3a5d260cb1
gallium: fix refcount bug introduced in eb20e2984
2008-12-12 18:34:49 +00:00
Keith Whitwell
56f36ed166
Merge branch 'no-validate' into gallium-0.1
2008-12-12 17:41:49 +00:00
Brian Paul
d5367622a3
mesa: more glsl function renaming
2008-12-12 10:32:56 -07:00
Brian Paul
b4019483de
mesa: use _slang_alloc()
2008-12-12 10:29:15 -07:00
Brian Paul
456a4e274f
mesa: glsl compiler function renaming
2008-12-12 10:22:47 -07:00
Brian Paul
9a174ef409
mesa: more glsl type/function movement
2008-12-12 10:17:58 -07:00
Brian Paul
aeeb9bca27
mesa: move some glsl compiler functions to different files to be more consistant
2008-12-12 10:11:41 -07:00
Brian Paul
ea9dc3879f
mesa: move _slang_locate_function() to different file
2008-12-12 10:03:31 -07:00
Brian Paul
19ca2908be
mesa: remove unused fixup table code in glsl compiler
2008-12-12 09:58:18 -07:00
Keith Whitwell
d2c2e9316d
gallium: avoid mapping same vertex buffer in subsequent frames
...
Quite a few util modules were maintaining a single vertex buffer over multiple
frames, and potentially reusing it in subsequent frames. Unfortunately that
would force us into syncrhonous rendering as the buffer manager would be
forced to wait for the previous rendering to complete prior to allowing the
map.
This resolves that issue, but requires the state tracker to issue a few new
flush() calls at the end of each frame.
2008-12-12 16:57:39 +00:00
Keith Whitwell
eb20e2984e
st: reduce unnecessary calls to pipe->set_vertex_buffers()
2008-12-12 16:57:38 +00:00
Keith Whitwell
8627a14ec8
st: move feedback draw function to new file
2008-12-12 16:57:38 +00:00
Keith Whitwell
ec007dbe0f
st: don't unilaterally ABS the argument to RSQ
2008-12-12 16:57:38 +00:00
Brian Paul
ade777ea1b
mesa: checkpoint: GLSL 1.20 array constructors
2008-12-12 09:56:13 -07:00
Patrice Mandin
6432d03c3d
nouveau: remove useless NOUVEAU_BO_SWIZZLED flag, copy/paste nv40 work to swizzle textures
2008-12-12 17:22:41 +01:00
Keith Whitwell
aef455c4a7
Revert "pipebuffer: Implement proper buffer validation."
...
This reverts commit a6d866f72c .
2008-12-12 12:05:39 +00:00
Keith Whitwell
9b3bce6bed
Revert "pipebuffer: Ondemand buffer manager."
...
This reverts commit 17849eafaa .
2008-12-12 12:05:30 +00:00
Keith Whitwell
71051f1f40
Revert "pipebuffer: Fix buffer overflow."
...
This reverts commit 55839ae064 .
2008-12-12 12:05:21 +00:00
José Fonseca
d725537dba
glut: MinGW portability fixes.
...
Still, it doesn't run as well as the glut binaries...
2008-12-12 16:06:42 +09:00
José Fonseca
e9e43321ee
gdi: Reimplement using the WGL statetracker.
2008-12-12 16:06:34 +09:00
José Fonseca
638e942959
mesa: Bring in new mesa sub-statetracker.
...
Some code cleanup is still in order.
2008-12-12 16:06:28 +09:00
Roland Scheidegger
fd2492d244
gallium: fixes for srgb, new srgb formats
...
add some more srgb texture formats, including compressed ones
various fixes relating to srgb formats
issues: the util code for generating mipmaps will not handle srgb formats
correctly (would need to use a linear->srgb conversion shader)
2008-12-12 05:12:55 +01:00
Roland Scheidegger
5bd093bd7b
mesa: fixes for srgb, new srgb formats
...
add some more srgb texture formats, including compressed ones
various fixes relating to srgb formats
issues: _mesa_get_teximage is completely broken for srgb textures,
both for non-compressed ones (swizzling) and compressed ones
(shouldn't do standard-to-linear conversion)
texelFetch function may be broken for little or big endian
(or both...)
2008-12-12 05:12:48 +01:00
José Fonseca
500b304463
scons: Build progs.
...
Just demos and trivial dirs for starters.
Conflicts:
.gitignore
2008-12-12 12:37:21 +09:00
Brian Paul
1737f2dbdd
mesa: consolidate variable declaration initializer code for globals too
2008-12-11 19:34:43 -07:00
Brian Paul
2760bca1e1
mesa: move variable initializer IR generation into _slang_gen_var_decl()
...
More code consolidation coming...
2008-12-11 19:28:22 -07:00
Brian Paul
05ed9f7fe9
mesa: simplify some glsl variable declaration code
2008-12-11 19:10:58 -07:00
Xiang, Haihao
8b69c42b35
intel: check for null texture. ( fix #13902 )
2008-12-12 10:02:05 +08:00
Brian Paul
929eb00b32
mesa: glsl clean-ups
2008-12-11 18:49:28 -07:00
Brian Paul
2dc3de016c
mesa: checkpoint commit of GLSL 1.20 array syntax.
...
This allows things like float[3] x = float[3](1., 2., 3.);
Parsing and AST construction now. Codegen not working yet.
2008-12-11 18:02:19 -07:00
José Fonseca
fa6ee2c2bb
scons: Allow to request the winddk toolchain.
2008-12-12 09:47:20 +09:00
Alan Hourihane
9106a18f46
gallium: catch vertex overflow higher up
2008-12-11 15:10:55 +00:00
Keith Whitwell
72d456494a
st: reduce unnecessary calls to pipe->set_vertex_buffers()
2008-12-11 14:02:10 +00:00
Keith Whitwell
e8347a6000
st: move feedback draw function to new file
2008-12-11 14:02:10 +00:00
Keith Whitwell
8355568abd
st: don't unilaterally ABS the argument to RSQ
2008-12-11 14:02:10 +00:00
Michal Krol
5c845b9115
softpipe: Add missing header include.
2008-12-11 13:55:55 +01:00
Michal Krol
401a18a0c6
draw: Silencium compiler warnings on Windows.
2008-12-11 13:54:05 +01:00
Xiang, Haihao
c8b505d826
i915: fallback for cube map texture.
...
The i915 (and related graphics cores) only support TEXCOORDMODE_CLAMP and
TEXCOORDMODE_CUBE when using cube map texture coordinates, so fall back to
software rendering for other modes to avoid potential gpu hang issue. This
fixes scorched3d issue on 945GM(see bug 14539).
2008-12-11 14:03:00 +08:00
Brian Paul
ce3436795c
gallium: added missing brace to fix broken build
2008-12-10 18:21:40 -07:00
Brian Paul
0c31661e73
Merge commit 'origin/gallium-0.1' into gallium-0.2
2008-12-10 18:11:31 -07:00
Brian Paul
d0bc5293d6
gallium: added draw_set_mrd() function to fix polygon offset
...
The Minimum Resolvable Depth factor depends on the driver and can't just
be computed from the number of Z buffer bits.
Glean's polygon offset test now passes with softpipe.
Still need to determine the MRD factor for other gallium drivers, if they use
the draw module's polygon offset stage...
2008-12-10 18:06:44 -07:00
Brian Paul
8137da952b
gallium: only mark back color buffer surfaces as undefined after swapbuffers
...
Marking all surfaces as undefined was wrong and cause some glean failures
because glReadPixels was used after SwapBuffers.
2008-12-10 18:06:38 -07:00
Brian Paul
99b862cd77
gallium: restore default_depth_bits() call in xlib winsys
...
This was accidentally disabled in a long-ago commit.
2008-12-10 18:06:30 -07:00
Alan Hourihane
b716de4779
gallium: change 65535 to UNDEFINED_VERTEX_ID
2008-12-10 20:21:19 +00:00
Keith Whitwell
e1645313be
mesa: more trivial tests
2008-12-10 12:53:17 +00:00
Keith Whitwell
50beb86ce3
util: new funcs for triming/validating primitives
2008-12-10 12:52:07 +00:00
Keith Whitwell
7519107a97
draw: add const qualifiers
2008-12-10 12:52:06 +00:00
Alan Hourihane
a8e7852b05
gallium: more vertex count checks
2008-12-10 12:02:24 +00:00
Alan Hourihane
e3f5370d63
gallium: temporary check for > 65535 vertices
2008-12-10 11:30:46 +00:00
Brian Paul
e8f5c1a5e8
mesa: in slang linker, replace assertion with link error when max samplers exceeded
2008-12-09 14:30:42 -07:00
Brian Paul
3c7419d57b
demos: updated tests/floattex.c (doesn't work just yet).
2008-12-09 14:29:14 -07:00
Brian Paul
c89690f765
mesa: move _mesa_dlopen(), etc into separate dlopen.c file
2008-12-09 14:26:02 -07:00
Guillaume Melquiond
3b9bc821e1
tnl: Fix zeroing of the 3ub part of a 3ub+1ub attrib pair in SSE.
...
Bug #16520 .
2008-12-09 13:18:02 -08:00
Guillaume Melquiond
b66495a0d9
tnl: Optimize SSE load[23]f_1 since they don't need the identity swizzle.
...
SSE movss from memory zeroes out everything above the destination dword, so
we get the (a, 0) or (a, 0, 0) result that these functions needed.
Bug #16520 .
2008-12-09 13:17:48 -08:00
Guillaume Melquiond
6e29a3c8e2
tnl: Fix typo that resulted in fallback from SSE for EMIT_3UB_3F_RGB/BGR.
...
Bug #16520
2008-12-09 11:42:24 -08:00
Guillaume Melquiond
d507cd749b
tnl: Avoid undefined input value use in insert_3f_viewport_2().
...
Bug #16520 .
2008-12-09 09:29:08 -08:00
Brian Paul
5295f9a033
glut: added GLUT_PPM_FILE env var to dump first frame to a PPM file
...
Set GLUT_PPM_FILE to the desired filename. The first frame rendered will
be written to that file.
2008-12-09 10:23:14 -07:00
Alan Hourihane
608e14c5b2
Merge commit 'origin/master' into gallium-0.2
2008-12-09 16:17:57 +00:00
Alan Hourihane
ee0735fa2d
Merge commit 'origin/gallium-0.1' into gallium-0.2
2008-12-09 16:17:45 +00:00
José Fonseca
51d9642f74
python/retrace: Dump indices too.
2008-12-09 19:37:25 +09:00
José Fonseca
2ce2a40a73
gallium: Abort by default on windows user space.
2008-12-09 19:35:52 +09:00
Pierre Willenbrock
a0d5c3cfe6
intel: Require the right amount of space in glBitmap blit acceleration.
...
This leads to problems when the batchbuffer is flushed, but the bitmap
data could not fit into it.
2008-12-08 14:06:51 -08:00
Alan Hourihane
e8a1b31ddf
fix conflict breakage
2008-12-08 15:03:29 +00:00
Alan Hourihane
33a1f495d4
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
progs/glsl/Makefile
2008-12-08 14:29:50 +00:00
José Fonseca
d26a43f6c6
python/retrace: Dump vertex buffer contents.
2008-12-08 17:26:02 +09:00
Pekka Paalanen
bcd5dda435
nouveau: make nv20 use NV{20,25}TCL objects
...
Up till now, nv20 driver has been using NV10TCL, and being
really an nv10 driver. That has changed.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-12-07 22:33:02 +02:00
Eric Anholt
f849d364c2
mesa: Fix GenerateMipmapEXT(GL_TEXTURE_CUBE_MAP_ARB).
...
The ctx->Driver.GenerateMipmap() hook only expects cubemap face enums, not
CUBE_MAP_ARB, so walk all faces when we encounter that. Fixes oglconform
fbo.c segfault with both swrast and i965 drivers.
2008-12-06 22:41:52 -08:00
Eric Anholt
8b661a5d33
intel: Fall back on rendering to a texture attachment with a border.
...
Fixes a segfault in oglconform fbo.c test.
2008-12-06 22:41:52 -08:00
Eric Anholt
75b26e18a6
intel: Fix crash in automatic mipmap generation for glCopyTex{Sub,}Image.
...
The images aren't mapped at this point, so we want the generic Mesa path for
GenerateMipmapEXT that does the mapping/unmapping for us. Ideally Mesa would
just call it for us.
2008-12-06 22:41:52 -08:00
Eric Anholt
bdc8ac4426
intel: Put CopyTexImage fallback under DEBUG_FALLBACKS not DEBUG_TEXTURE.
2008-12-06 22:41:51 -08:00
Eric Anholt
a0625fa281
intel: Fix glCopyPixels blit acceleration for FBO destinations.
...
This was another opportunity to either get clipped to screen size or not get
clipped enough and draw outside of object boundaries.
2008-12-06 22:41:51 -08:00
Eric Anholt
cb433d91c6
intel: Fix glBitmap blit acceleration for FBO destinations.
...
Bug #18914 . Fixes fbo_firecube hang due to drawing outside the FBO bounds.
Thanks to Pierre Willenbrock for debugging the issue.
2008-12-06 22:41:51 -08:00
Jakob Bornecrantz
54a6dcb70f
i915: Silence warnings
2008-12-05 17:24:34 +01:00
Brian
6e0f8b174d
mesa: assorted clean-ups, updated comments, etc.
2008-12-05 09:20:06 -07:00
Brian
249e1e4d30
mesa: replace large macros with inline functions
2008-12-05 09:20:06 -07:00
Brian
b9604fe769
softpipe: plug in softpipe's texture samplers into draw module.
2008-12-04 09:58:54 -07:00
Brian
f2bccfd3c8
gallium: added draw_texture_samplers() to support texture fetches from vertex shaders
...
This may only be practical for the softpipe driver at this time.
2008-12-04 09:58:54 -07:00
Brian
1d9360b678
gallium: query PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS to set ctx->Constants.MaxVertexTextureImageUnits
2008-12-04 09:58:54 -07:00
Brian
7eb8b37735
gallium: added PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS query
2008-12-04 09:58:54 -07:00
Brian
9271662ae9
gallium: check vertex shaders for samplers/texture usage as we do for fragment shaders
2008-12-04 09:58:54 -07:00
Brian
39091cc638
demos: added simple vertex shader texture test.
...
Draw a quadmesh where Z coord is taken from a texture map.
2008-12-03 18:55:25 -07:00
Jeremy Huddleston
f18880038b
darwin: Use -Os instead of -O2
...
(cherry picked from commit 456dbb143a0d11b69d8af0d493cd84efb0596273)
2008-12-03 17:03:35 -08:00
Eric Anholt
264cba6f70
i965: Fix failure to upload new constant data when changing programs.
...
This is fallout from the ffvertex_prog.c work. It doesn't call
ProgramStringNotify, so we don't set param_state, so we wouldn't track when
VP parameters changed, and constants wouldn't get uploaded. Instead, remove
param_state entirely and just use the real value that we want to be tracking.
Fixes rendering in openarena since BRW_NEW_BATCH got disentangled from
BRW_NEW_INDICES.
Bug #18822 .
2008-12-03 11:45:16 -08:00
Eric Anholt
8a1e7086c7
i965: Fix stray character that the compile whined about.
2008-12-03 11:30:58 -08:00
Younes Manton
4371a24c32
nouveau: Calc pitch for swizzled textures appropriately.
2008-12-02 16:15:13 -05:00
Younes Manton
25eee19cd6
mesa: Update some .gitignore files.
2008-12-02 16:15:13 -05:00
Younes Manton
6b4776df35
nouveau: Use swizzled textures & render targets on nv40 when possible.
2008-12-02 16:15:12 -05:00
Younes Manton
a6b7c0bcbe
nouveau: nv04-nv40 linear <-> swizzled conversion.
2008-12-02 16:15:12 -05:00
Younes Manton
1c22c04525
gallium: Make room for custom PIPE_TEXTURE_USAGE_* flags.
2008-12-02 16:15:12 -05:00
Younes Manton
d585fdf318
g3dvl: Map/unmap incoming block texture once per frame.
...
(Technically once per flush, but we flush once per frame.)
2008-12-02 16:15:12 -05:00
Younes Manton
c064d5a1ba
g3dvl: Use texture instead of surface for backbuffer.
2008-12-02 16:15:12 -05:00
Younes Manton
bacacd5ada
g3dvl: Move MC shaders to a seperate file, #included in the original.
2008-12-02 16:15:12 -05:00
Kristian Høgsberg
154a9e5317
Bump dri2proto requirement to 1.99.3, drop CopyRegion bitmask from protocol.
2008-12-01 21:44:03 -05:00
Dave Airlie
cd031749a7
intel: restore old vertex submit paths for i8xx hardware.
...
Intel docs state that only 830/845 have VBOs, 855/865 don't. So
lets just not use them on i8xx at all.
This restores the old pre-vbo code and uses it on all 8xx hw.
2008-12-02 20:31:14 +10:00
Brian
36b941cdbf
softpipe: minor tweaks, clean-ups
2008-12-01 18:36:56 -07:00
Brian
38bee46e83
softpipe: compute nearest/linear texcoords four at a time.
...
A small step toward SIMD-izing the code.
2008-12-01 18:36:56 -07:00
Brian
dd55083ac1
gallium: minor texture-related clean-ups, comments, etc
2008-12-01 18:36:56 -07:00
Brian
1e2f574251
mesa: fix conditional in save_Lightfv(), bug 18838
2008-12-01 18:32:47 -07:00
José Fonseca
129c6ed678
scons: Target Windows XP on userspace.
2008-12-01 11:53:26 -08:00
Dave Airlie
72cd2c8c0c
radeon: make DRI1 one work with new CS mechanism
2008-12-01 16:39:58 +10:00
Pekka Paalanen
dbcfc0dcde
Nouveau: minor winsys API fix
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-30 20:54:02 +02:00
Pekka Paalanen
bb29d066dc
Nouveau: nv{10,20} set_primitive API fix
...
Also changes nvgl_primitive() to return zero, i.e. error, on unknown
primitive.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-30 20:40:55 +02:00
Pekka Paalanen
830e4a6ec3
Nouveau: nv20 build fix: forgotten include
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-30 20:35:29 +02:00
Pekka Paalanen
fd645c7f8a
Nouveau: fix minor API change in surface_copy
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-30 20:32:14 +02:00
Pekka Paalanen
578af7d6f6
Nouveau: update nouveau_class.h
...
Fresh from renouveau.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-30 20:04:28 +02:00
Pekka Paalanen
988ece3b42
Nouveau: nv20 (nv10) immediate vertex submission
...
This is nv10 commands, but is in nv20 source files.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-30 12:16:45 +02:00
Pekka Paalanen
3cb0858510
Nouveau: properly redo nv20_vertex_layout.
...
This is still for NV10 hardware.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-30 12:07:49 +02:00
Eric Anholt
e476acb105
i965: Add a new state flag BRW_NEW_NR_SURFACES instead of CACHE_NEW_SURFACE
...
The CACHE_NEW_SURFACE bit always gets spammed since we get many different
surface BOs per state emit, but the only consumer of it wanted to just know
how many surfaces were enabled.
2008-11-28 17:09:46 -08:00
Eric Anholt
8e5639577c
i965: Fix clashing enums for BRW_NEW_INDICES/VERTICES versus BATCH/DEPTH_BUFFER.
...
Fixes upload of large amounts of state for every new primitive emit.
2008-11-28 17:09:46 -08:00
Eric Anholt
287d719a93
i965: Remove BRW_WM_LOCK dirty bit, introduced to work around lack of relocs.
...
This was causing a prepare of wm state at every primitive emit.
2008-11-28 17:09:46 -08:00
Eric Anholt
3f973de07c
i965: Add debug code for dumping how frequently different dirty bits are set.
2008-11-28 17:09:46 -08:00
Eric Anholt
8e76ac070d
i915: Remove dead early z enable bit which was always on.
2008-11-28 17:09:46 -08:00
Eric Anholt
7855b2aef6
i965: Reduce fast-pathiness of brw_try_draw_prims, bringing in important checks.
...
Later primitives, even if they caused a full state validate, wouldn't check
that there was enough space in the batchbuffer, occasionally triggering the
sanity check. We also skipped the aperture space check, even if it would
mean bringing in new programs and associated state.
2008-11-28 17:09:45 -08:00
Brian Paul
baaf9779f1
mesa: add missing break statements
2008-11-28 16:17:57 -07:00
Brian Paul
166d5ac170
mesa: enable texture compression extensions for software drivers when possible
2008-11-28 14:08:04 -07:00
Phillip Klaus Krause
3b5cd7d74a
mesa: remove unneeded compressed texure size checks
2008-11-28 13:54:08 -07:00
Brian Paul
ec17001cd4
mesa: fix default switch case in append_token(), see bug 18734
2008-11-28 13:50:41 -07:00
Alan Hourihane
c4c86bbd16
Merge commit 'origin/master' into gallium-0.2
2008-11-28 16:19:10 +00:00
Alan Hourihane
5b71472389
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/gallium/auxiliary/tgsi/tgsi_sse2.c
2008-11-28 16:18:36 +00:00
Brian Paul
c303e7299b
mesa: remove an assertion (see bug 18734)
2008-11-27 11:01:30 -07:00
RALOVICH, Kristóf
8c2b4b33c5
Revert "glx: xcbified visual and FBConfig choosing"
...
This reverts commit 62688f1135 .
2008-11-27 07:20:38 -07:00
RALOVICH, Kristóf
80d1531ebe
Revert "glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIX"
...
This reverts commit 5369876501 .
2008-11-27 07:20:35 -07:00
Michal Krol
158a5f75d8
tgsi: Reenable OPCODE_ARR.
2008-11-26 22:29:49 +01:00
RALOVICH, Kristóf
5369876501
glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIX
...
This uses a GLX VendorPrivate request. VendorPrivates are real GLX API
calls but use the same protocol request. XCB does not currently
support specific VendorPrivetes directly. See eg.:
http://lists.freedesktop.org/archives/xcb/2008-November/004036.html
for more information.
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
1e167f6b5c
glx: remove XCB debug leftover
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
ff3fa92eaa
glx: xcbified glXSwapBuffers
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
62688f1135
glx: xcbified visual and FBConfig choosing
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
66db1b64e8
glx: xcbified __glXClientInfo
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
5f19f5c586
configure.ac: advertise XCB
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
6d1d157606
glx: no graphics context during initialization
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
9c7aaa7afb
glx: xcbified __glXIsDirect
2008-11-26 10:02:10 -07:00
RALOVICH, Kristóf
00f22f972f
glx: missing static on local function
2008-11-26 10:02:10 -07:00
RALOVICH, Kristóf
f0d015cccb
glx: use __glXGetString
2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
9c98e35ff6
glx: use __glXQueryServerString
2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
24b8a8cfe8
glx: implement __glXGetString, hide __glXGetStringFromServer
2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
fd52001c5c
glx: implement QueryVersion using XCB
2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
5444424562
glx: implement __glXQueryServerString using XCB
2008-11-26 10:00:58 -07:00
Thomas Henn
55aeeef547
windows: fix visual object memleak
2008-11-26 09:51:29 -07:00
Thomas Henn
279343059f
windows: fix _mesa_unreference_framebuffer() to pass ** type.
2008-11-26 09:49:32 -07:00
Brian Paul
001b1cbb0d
mesa: add missing type check for function calls
2008-11-26 09:35:26 -07:00
Brian Paul
aa40de5c6f
mesa: add missing size check for assignment optimization
2008-11-26 09:35:08 -07:00
Michal Krol
527e76a7ec
tgsi: Fix build.
2008-11-26 17:20:07 +01:00
Michal Krol
972922b1bf
tgsi: Implement OPCODE_ROUND for SSE2 backend.
2008-11-26 17:15:36 +01:00
Michal Krol
1347439a87
tgsi: Implement OPCODE_SSG/SGN.
2008-11-26 17:11:03 +01:00
Brian Paul
fea3a32e17
mesa: remove debug code
2008-11-26 09:02:37 -07:00
Brian Paul
e23122d309
demos: press SPACE to toggle fbo_firecube animation
2008-11-26 09:00:44 -07:00
Brian Paul
1250526e30
gallium: disable TGSI_OPCODE_ARR case until emit_rnd() is redone.
2008-11-26 07:41:19 -07:00
Brian Paul
6e96bd70e5
Revert "tgsi: Implement OPCODE_ROUND for SSE2 backend."
...
This reverts commit 685fd2c035 .
Does not compile since emit_rnd() is trying to pass 4 params to
emit_func_call_dst() which takes 3 params.
2008-11-26 07:38:31 -07:00
Brian Paul
11701b4c15
mesa: add some missing switch cases for generating state var strings
2008-11-26 07:21:12 -07:00
Daniel Zimmermann
c03af8e780
fix possible memory leak in bezierPatchMeshMake
2008-11-26 07:20:02 -07:00
Brian Paul
277089b81a
gallium: fix glBitmap color bug
...
By time we get around to rendering the cached bitmap, the current color may
have changed. Need to make sure we load the constant slot with the cached
color.
2008-11-26 07:08:19 -07:00
Brian Paul
281055987a
gallium: replace 2 with PIPE_SHADER_TYPES
2008-11-26 07:08:19 -07:00
Michal Krol
823aac36d5
tgsi: Implement OPCODE_SSG/SGN.
2008-11-26 13:54:28 +01:00
Michal Krol
eee3d21604
tgsi: Implement OPCODE_ARR.
2008-11-26 21:47:09 +09:00
Michal Krol
685fd2c035
tgsi: Implement OPCODE_ROUND for SSE2 backend.
2008-11-26 21:47:00 +09:00
Michal Krol
adf14090fb
tgsi: Implement OPCODE_ARR.
2008-11-26 13:24:33 +01:00
Michal Krol
18a1389077
tgsi: Implement OPCODE_ROUND for SSE2 backend.
2008-11-26 13:24:32 +01:00
Brian Paul
4de360e67d
gallium: added centroid/invarient fields to declarations
2008-11-25 09:03:47 -07:00
Michal Krol
152db5b884
softpipe: Fix function prototype.
2008-11-25 13:01:06 +01:00
Alan Hourihane
4b7a84a361
Merge commit 'origin/master' into gallium-0.2
2008-11-25 09:28:36 +00:00
Alan Hourihane
4af0d940a3
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
scons/gallium.py
src/gallium/auxiliary/pipebuffer/pb_buffer.h
2008-11-25 09:28:30 +00:00
José Fonseca
55839ae064
pipebuffer: Fix buffer overflow.
2008-11-25 15:49:23 +09:00
Brian Paul
f8870af44b
gallium: fix inverted raster pos when drawing into FBO
2008-11-24 18:37:36 -07:00
Brian Paul
8d95e66cf7
mesa: added support for GLSL 1.20 array.length() method
...
This is the only method supported in GLSL 1.20 so we take a few short-cuts.
2008-11-24 17:18:56 -07:00
Brian Paul
0fab514ff5
mesa: support for GLSL 1.20 array types
...
This allows syntax like "float[8] foo, bar;"
2008-11-24 15:28:21 -07:00
Brian Paul
c5b52b5e0e
mesa: pass shader centroid/invariant info through to the TGSI shader
2008-11-24 14:36:00 -07:00
Brian Paul
77762801bc
remove some redundant rules from prev merge
2008-11-24 14:31:41 -07:00
Brian Paul
df6155fcff
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
progs/glsl/Makefile
2008-11-24 14:08:58 -07:00
Brian Paul
868c607c17
tgsi: doxygen comments
2008-11-24 13:11:05 -07:00
Brian Paul
434e255eae
tgsi: add tgsi_declaration fields for centroid sampling, invariant optimization
2008-11-24 13:11:05 -07:00
Brian Paul
1240280e6a
mesa: copy centroid/invariance/precision info in parse_init_declarator()
2008-11-24 13:11:05 -07:00
Brian Paul
c67c3714e8
mesa: check that varying variable qualifiers agree
2008-11-24 13:11:05 -07:00
Brian Paul
ed22544658
mesa: copy precision/variant/centroid info in slang_fully_specified_type_copy()
2008-11-24 13:11:05 -07:00
Brian Paul
891cf754b3
mesa: set flags for varying vars
2008-11-24 13:11:05 -07:00
Brian Paul
cddcd72dae
mesa: rename program parameter flags to match other Mesa conventions
2008-11-24 13:11:05 -07:00
Brian Paul
a7264720b4
mesa: copy Flags in _mesa_clone_parameter_list()
2008-11-24 13:11:05 -07:00
Brian Paul
68020ca2af
mesa: dump/debug varying vars list
2008-11-24 13:11:05 -07:00
Brian Paul
3068574929
mesa: added PROG_PARAM_ bits for invariant, flat/linear interpolation
...
Plus, update the print/debug code.
2008-11-24 13:11:05 -07:00
Brian Paul
84c1850e82
mesa: add Flags field to gl_program_parameter
...
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
2008-11-24 13:11:05 -07:00
Brian Paul
b268c2899b
docs: update webmaster email addr
2008-11-24 13:11:05 -07:00
Brian Paul
d7b5243c64
gallium: massage sp_vbuf_draw() and sp_vbuf_draw_arrays() to look more alike
...
Also, update some comments.
2008-11-24 13:11:05 -07:00
Brian Paul
e545ce2af4
mesa: issue error, don't crash, when calling a prototyped, but undefined function
...
Bug #18659 .
2008-11-24 13:11:05 -07:00
Brian Paul
ca142c2c08
mesa: better variable name: s/aux/store/
2008-11-24 13:11:05 -07:00
Brian Paul
80301866f6
added progs/demos/fragcoord.c - tests gl_FragCoord attribute in fragment shader
...
Fragment's red/greenb/blue is a function gl_FragCoord.xyz
2008-11-24 13:11:05 -07:00
Eric Anholt
7e97362884
i965: Add support for accelerated CopyTexSubImage.
...
There were hacks in EmitCopyBlit before to adjust offsets so that y=0 after
the offsets had been adjusted for a negative pitch. It appears that those
hacks were due to an unclear and surprising aspect of the hardware: inverting
the pitch results in the blit into the specified rectangle being inverted,
without the user needing to adjust y and base offset.
Tested with piglit copytexsubimage test on 915GM and GM965. Should fix
serious performance issues with ETQW and other applications.
2008-11-24 13:09:50 -07:00
Eric Anholt
a4d43c2012
intel: Don't glBitmap fallback with scissoring enabled.
...
The blit bitmap code already handles scissoring. This is a 15-100% speedup on
blender benchmark.blend thanks to avoiding fallbacks. Bug #17951 .
2008-11-24 13:09:50 -07:00
Eric Anholt
490ab64879
i915: Don't overwrite i915's Viewport function from generic code.
...
Instead, have i965 and i915 both call the generic function from their Viewport.
2008-11-24 13:09:50 -07:00
Brian Paul
b730d0d3e9
mesa: add gl_program::Input/OutputFlags[] array
...
These arrays will indicate per-input or per-output options for vertex/fragment
programs such as centroid-sampling and invariance.
2008-11-24 13:05:54 -07:00
Bernd Buschinski
d52e8543b6
glx: Add missing include for XCB, fixing crash on 64-bit.
...
Bug #18689
2008-11-24 11:40:38 -08:00
Jakob Bornecrantz
51af35b7cc
progs: Add ignores
2008-11-24 20:05:47 +01:00
Jakob Bornecrantz
f0e3366b08
util: Add generic tile and detile functions
2008-11-24 20:01:48 +01:00
Brian Paul
153cc70ddb
windows: replace free() with _mesa_unreference_framebuffer()
...
Fixes invalid memory reference bug when exiting.
2008-11-24 11:10:58 -07:00
Brian Paul
a203713738
mesa: copy centroid/invariance/precision info in parse_init_declarator()
2008-11-24 09:28:25 -07:00
Brian Paul
dc1107c08d
mesa: check that varying variable qualifiers agree
2008-11-24 09:25:05 -07:00
Brian Paul
0e2f757413
mesa: copy precision/variant/centroid info in slang_fully_specified_type_copy()
2008-11-24 09:13:14 -07:00
Brian Paul
3197954554
mesa: set flags for varying vars
2008-11-24 09:05:49 -07:00
Brian Paul
f490ec9797
mesa: rename program parameter flags to match other Mesa conventions
2008-11-24 09:04:52 -07:00
Brian Paul
08b825a771
mesa: copy Flags in _mesa_clone_parameter_list()
2008-11-24 09:04:11 -07:00
Brian Paul
3f6668a4bf
mesa: dump/debug varying vars list
2008-11-24 09:03:47 -07:00
Brian Paul
777a5c4f2e
mesa: added PROG_PARAM_ bits for invariant, flat/linear interpolation
...
Plus, update the print/debug code.
2008-11-24 08:43:38 -07:00
Brian Paul
0f228d7ab3
mesa: add Flags field to gl_program_parameter
...
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
2008-11-24 08:33:49 -07:00
Brian Paul
5464667874
docs: update webmaster email addr
2008-11-24 08:14:28 -07:00
José Fonseca
17849eafaa
pipebuffer: Ondemand buffer manager.
...
A variation of malloc buffers which get transferred to real graphics memory
when there is an attempt to validate them.
2008-11-24 23:17:49 +09:00
José Fonseca
a6d866f72c
pipebuffer: Implement proper buffer validation.
2008-11-24 13:59:06 +09:00
José Fonseca
d600c805c0
gallium: Define convenience shortcuts for CPU/GPU READ/WRITE flag combinations.
2008-11-24 13:45:19 +09:00
José Fonseca
52e9c9770a
mesa: Don't call fence_finish with a null fence.
2008-11-24 13:44:30 +09:00
Brian
0b9e96fae9
softpipe: remove old/unneeded dependencies between TGSI exec and softpipe
...
Use tgsi_sampler struct as a base class. Softpipe subclasses it and adds
the fields it needs.
2008-11-23 19:15:15 -07:00
Brian Paul
4f05893415
mesa: issue error, don't crash, when calling a prototyped, but undefined function
...
Bug #18659 .
2008-11-21 17:22:16 -07:00
Brian Paul
b63a31b36f
mesa: better variable name: s/aux/store/
2008-11-21 14:24:28 -07:00
Brian Paul
4356d349ad
cell: only build Cell and softpipe drivers
2008-11-21 13:57:57 -07: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
Brian Paul
c45c5c4ca4
added progs/demos/fragcoord.c - tests gl_FragCoord attribute in fragment shader
...
Fragment's red/greenb/blue is a function gl_FragCoord.xyz
2008-11-21 10:04:37 -07:00
Eric Anholt
3e0164aabb
i965: Add support for accelerated CopyTexSubImage.
...
There were hacks in EmitCopyBlit before to adjust offsets so that y=0 after
the offsets had been adjusted for a negative pitch. It appears that those
hacks were due to an unclear and surprising aspect of the hardware: inverting
the pitch results in the blit into the specified rectangle being inverted,
without the user needing to adjust y and base offset.
Tested with piglit copytexsubimage test on 915GM and GM965. Should fix
serious performance issues with ETQW and other applications.
2008-11-21 17:35:33 +08:00
Eric Anholt
a6aa926e3f
intel: Don't glBitmap fallback with scissoring enabled.
...
The blit bitmap code already handles scissoring. This is a 15-100% speedup on
blender benchmark.blend thanks to avoiding fallbacks. Bug #17951 .
2008-11-21 13:25:10 +08:00
Eric Anholt
2adef553f2
i915: Don't overwrite i915's Viewport function from generic code.
...
Instead, have i965 and i915 both call the generic function from their Viewport.
2008-11-21 13:23:46 +08:00
José Fonseca
81aa678ce8
glut: MinGW portability fixes.
...
Still, it doesn't run as well as the glut binaries...
2008-11-21 10:44:31 +09:00
José Fonseca
7662409661
gdi: Reimplement using the WGL statetracker.
2008-11-21 10:44:31 +09:00
José Fonseca
db19578b52
mesa: Bring in new mesa sub-statetracker.
...
Some code cleanup is still in order.
2008-11-21 10:44:30 +09:00
José Fonseca
72ebf4fd03
scons: Build progs.
...
Just demos and trivial dirs for starters.
2008-11-21 10:44:30 +09:00
Robert Ellison
85063fe943
CELL: improve twiddling/untwiddling error text
...
As suggested by Brian Paul: in the case of a twiddling error, instead
of reporting the bad format number (which is all but unusable), report
the more useful enum name.
2008-11-20 10:01:21 -07:00
Michal Krol
79bfe372f2
scons: Fix toolchain selection.
2008-11-20 23:01:53 +09:00
José Fonseca
15b92b09e0
scons: Support MinGW32 cross compiler.
...
To build an alternative opengl32.dll with Gallium's software-rasterizer from a
debian-based distribution run:
sudo apt-get install mingw32
scons platform=windows toolchain=crossmingw machine=x86 winsys=gdi dri=no
2008-11-20 23:01:43 +09:00
Alan Hourihane
ef2bf418b4
Merge commit 'origin/master' into gallium-0.2
2008-11-20 13:44:13 +00:00
Xiang, Haihao
b6bb5e09e0
mesa: fix shadow sampling unit issue.
...
texture comparison logic is bypassed if the currently bound texture is not
a depth/depth_stencil texture.
2008-11-20 16:54:16 +08:00
airlied
1412ca0be2
intel: fix i830 comment + backwards VB offsets.
...
According to Keith the docs have these offsets the other way around
2008-11-20 21:27:45 +10:00
airlied
1ea414fdeb
intel: fix i8xx vbo enable bit
2008-11-20 21:14:45 +10:00
airlied
b17e343bdd
intel: add lots of i830 engine to intel_decode debug
2008-11-20 18:18:20 +10:00
Brian Paul
bab4e78734
mesa: minor comment reformattting
2008-11-19 16:04:37 -07:00
Brian Paul
bf7f9d2143
mesa: glsl compiler debug code
...
RETURN0 macro reports file/line before returning zero.
2008-11-19 15:08:46 -07:00
Brian Paul
ae0ff8097b
mesa: rework GLSL array code generation
...
We now express arrays in terms of indirect addressing. For example:
dst = a[i];
becomes:
MOV dst, TEMP[1 + TEMP[2].y];
At instruction-emit time indirect addressing is converted into ARL/
ADDR-relative form:
ARL ADDR.x, TEMP[2].y;
MOV dst, TEMP[1 + ADDR.x];
This fixes a number of array-related issues. Arrays of arrays and complex
array/struct nesting works now.
There may be some regressions, but more work is coming.
2008-11-19 14:12:25 -07:00
Michal Krol
4f3dcf3864
scons: Fix toolchain selection.
2008-11-19 20:31:38 +01:00
Brian Paul
e709d68d92
mesa: don't realloc instruction buffer so often
2008-11-19 09:12:47 -07:00
Brian Paul
d9fa9e3290
mesa: updated comment
2008-11-19 09:12:47 -07:00
Keith Whitwell
205e0e3e38
Merge commit 'origin/gallium-0.1' into gallium-0.2
2008-11-19 16:04:18 +00:00
José Fonseca
59ae12b5b1
python/retrace: Dump constants.
2008-11-20 01:02:03 +09:00
José Fonseca
2f153b5487
python: Allow to read from buffers.
2008-11-20 01:01:48 +09:00
José Fonseca
8a9e06257f
python/retrace: Fix formatting of shaders.
2008-11-19 20:06:52 +09:00
José Fonseca
03f19bc33d
python/retrace: Ignore irrelevant calls.
2008-11-19 20:06:04 +09:00
Alan Hourihane
227a8a2e77
add SRGB formats
2008-11-19 09:36:04 +00:00
José Fonseca
56ce90c8be
python/retrace: Highlight the trace dump to help to visualize.
2008-11-19 17:17:06 +09:00
José Fonseca
9efa6cafea
python/retrace: Use the usual BSD-style license.
2008-11-19 16:23:01 +09:00
Xiang, Haihao
2f9ceb158a
mesa: clamp luminance if needed.
...
This fixes glReadPixels(GL_LUMINANCE, GL_FLOAT)/glGetTexImage(GL_LUMINANCE, GL_FLOAT) issue
on fixed-point color buffers.
2008-11-19 11:30:30 +08:00
Michal Krol
d86ffcffb3
tgsi: Return 0.0 for negative constant register indices.
2008-11-18 16:07:18 +01:00
Michal Krol
957f7d7d94
tgsi: Keep address register as a floating point.
2008-11-18 16:07:16 +01:00
José Fonseca
6cf59e1293
scons: Support MinGW32 cross compiler.
...
To build an alternative opengl32.dll with Gallium's software-rasterizer from a
debian-based distribution run:
sudo apt-get install mingw32
scons platform=windows toolchain=crossmingw machine=x86 winsys=gdi dri=no
2008-11-18 19:13:32 +09:00
José Fonseca
228afbc8e0
gallium: Use costum log2 for all windows builds.
2008-11-17 22:29:24 +09:00
José Fonseca
e45773b3de
gallium: State when there are no memory leaks detected.
2008-11-17 12:36:07 +09:00
José Fonseca
ee172bf067
gallium: Make handle_table reentrant.
...
Ensure that the object has consistent state also when calling the destroy
callback. Namely, ensure the object passed to the callback is removed from
the table prior to calling the destroy callback to avoid a infinite loop or
double free.
2008-11-17 12:36:02 +09:00
José Fonseca
40b3bb0407
gallium: Yet another WinCE portability fix.
2008-11-17 12:35:54 +09:00
José Fonseca
1e35d92953
gallium: State when there are no memory leaks detected.
2008-11-17 12:29:13 +09:00
José Fonseca
c13cf0d690
gallium: Make handle_table reentrant.
...
Ensure that the object has consistent state also when calling the destroy
callback. Namely, ensure the object passed to the callback is removed from
the table prior to calling the destroy callback to avoid a infinite loop or
double free.
2008-11-17 12:28:49 +09:00
Stephane Marchesin
7b0e0e1a0d
gallivm: fix some small stuff.
2008-11-16 20:32:05 +01:00
Jerome Glisse
9770bb32f5
radeon: cs add print cs callback
2008-11-16 17:59:46 +01:00
Jerome Glisse
f1d98e5127
radeon: fix pointer dangling
2008-11-16 17:58:43 +01:00
Jakob Bornecrantz
96ad8a3600
i915: Silence warnings
2008-11-16 13:15:14 +01:00
Keith Whitwell
7468765b18
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/shader/prog_print.c
2008-11-15 16:53:24 +00:00
Keith Whitwell
5e1454a036
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/mesa/drivers/dri/common/dri_util.c
2008-11-15 16:23:31 +00:00
Jakob Bornecrantz
56ef0aeda5
i915: Silence warning
2008-11-15 12:10:32 +01:00
Jerome Glisse
56c458e0f2
radeon: update to libdrm-radeon API changes
2008-11-15 10:40:32 +01:00
Brian Paul
7e584a70c4
gallium: increase table size for fast log/pow functions
...
The various conformance tests pass now.
2008-11-14 12:58:12 -07:00
Brian Paul
6afab9001e
util: Use OpenGL rasterization rules in blits and mipmap generation.
2008-11-14 12:58:12 -07:00
Keith Whitwell
0557fa72c0
translate: pull in prefetch and other optimizations from draw_vs_aos.c
2008-11-14 18:00:43 +00:00
Keith Whitwell
d04caf2ce4
trivial: more tests
2008-11-14 18:00:43 +00:00
Alan Hourihane
db20a65a39
mesa: fix build
2008-11-14 14:30:49 +00:00
Jerome Glisse
5b79c18c83
radeon: dri2 don't forget to free buffer
2008-11-14 11:26:17 +01:00
Jerome Glisse
93a9d2f18d
r300: release bo from pixmap
2008-11-14 11:26:17 +01:00
Jerome Glisse
c26ec97b13
r300: convert to new relocations format (see libdrm-radeon)
2008-11-14 11:26:17 +01:00
Jerome Glisse
d07d137931
r300: SetTex extension support
2008-11-14 11:26:17 +01:00
Jerome Glisse
3b43c28195
r300: cs + DRI2 support
...
If DRI2 is enabled then switch cmd assembly to directly build
hw packet.
2008-11-14 11:26:17 +01:00
Jerome Glisse
e5d5dab8c0
r300: bo and cs abstraction.
...
This abstract memory management and command stream building so we
can use different backend either legacy one which use old pathway
or a new one like with a new memory manager. This works was done by :
Nicolai Haehnle
Dave Airlie
Jerome Glisse
2008-11-14 11:26:17 +01:00
Brian Paul
80d6379722
mesa: no longer need Writemask field in GLSL IR nodes
...
The Swizzle and Size fields carry all the info we need now.
2008-11-13 18:19:12 -07:00
Brian Paul
3a7ed9779b
mesa: revamp GLSL instruction emit code
...
This is a step toward better array handling code. In particular, when more
than one operand of an instruction uses indirect addressing, we'll need some
temporary instructions and registers. By converting IR storage to instruction
operands all in one place (emit_instruction()) we can be smarter about this.
Also, somewhat better handling of dst register swizzle/writemask handling.
This results in tighter writemasks on some instructions which is good for
SOA execution.
And, cleaner instruction commenting with inst_comment().
Next: remove some more dead code and additional clean-ups...
2008-11-13 18:19:12 -07:00
Brian Paul
610c2461ce
mesa: make writemask_string() non-static
2008-11-13 18:19:12 -07:00
Brian Paul
4c167f8fc1
mesa: remove some do-nothing GLSL code
2008-11-13 18:19:12 -07:00
Brian Paul
fe984aed5a
mesa: fix accidental regression in GLSL built-in texture matrix lookup
...
Was broken by commit 9aca9a4b72b2a7b378e50bd88f9c3324d07375ec.
2008-11-13 18:19:12 -07:00
Brian Paul
d835f415c6
mesa: use the tighter definition of GLSL ftransform() from the gallium branches
2008-11-13 18:19:12 -07:00
Brian Paul
e556cc82f8
mesa: remove unused/obsolete __NormalMatrixTranspose matrix
2008-11-13 18:19:12 -07:00
Brian Paul
47b883e42b
mesa: fix bug in GLSL built-in matrix state lookup
2008-11-13 18:19:12 -07:00
Brian Paul
557fde9531
mesa: tweak program register printing for RelAddr case
2008-11-13 18:19:12 -07:00
Alan Hourihane
af1ce2375e
build default set of progs + egl
2008-11-13 19:38:18 +00:00
Pekka Paalanen
20ff08cd86
Fix configs/linux-dri to build winsys again.
...
SRC_DIRS was being reset, which left winsys unbuilt.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-13 20:44:55 +02: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
Stephane Marchesin
42330d929c
Merge branch 'gallium-0.2' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/mesa into gallium-0.2
2008-11-13 18:06:06 +01:00
Ben Skeggs
2acdb116ce
gallium: add st_set_teximage_surface for EXT_texture_from_pixmap
...
support.
2008-11-13 16:47:47 +00:00
Alan Hourihane
e4c9aeed8b
mesa: fix generation of fixed function state when no vp exists
2008-11-13 13:31:10 +00:00
Alan Hourihane
16340f8d4d
mesa: fix generation of fixed function state when no vp exists
2008-11-13 13:16:03 +00:00
Michal Krol
26c8593093
tgsi: More comments on source register indirect and 2D indexing.
2008-11-12 23:25:43 +01:00
Eric Anholt
c30eb2c104
i965: Upload state on primitive switch, don't just prepare it.
...
This was a regression in 59b2c2adbb that broke
blender, among other apps.
2008-11-12 13:37:16 -08:00
Eric Anholt
2fc9d671e0
i965: Fix VB refcount leak on aperture overflow.
2008-11-12 13:34:20 -08:00
Pekka Paalanen
3086b1ecbe
nv04..nv30: fix pipe_surface init
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-12 23:13:42 +02:00
Pekka Paalanen
5aaeb13a76
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
* commit 'origin/gallium-0.1':
Mesa: fix number of buffers in st_draw_vbo().
Nouveau: fix nv20_vertex_layout()
Nouveau: update nv20 miptree according to nv40.
Nouveau: build, link and use nv20.
Nouveau: name replace for nv20.
Nouveau: Rename nv20/ files as nv20.
Nouveau: copy nv30_vertprog.c to nv20.
Nouveau: start nv20 by copying the nv10 tree.
2008-11-12 23:13:22 +02:00
Eric Anholt
72bbc89534
Add glsync demo program from jbarnes for testing vblank synchronization.
2008-11-12 13:07:23 -08:00
Eric Anholt
62ff7ab720
i965: Fix up VS max_threads for G4X and removing a magic number.
...
As far as I can read in the docs, VS threads can be 1:1 with the pairs of
VUE handles allocated for them. Also, G4X can run twice as many threads as
before (though we won't unless the we bump the preferred URB entries for VS).
2008-11-12 13:07:23 -08:00
Eric Anholt
9dadfc09a9
i965: Fix up SF max_threads.
...
We were dividing the number of URB entries by two to get number of threads,
which looks suspiciously like a copy'n'paste-o from brw_vs_state.c. Also, the
maximum number of threads is 24, not 12.
2008-11-12 13:07:23 -08:00
Eric Anholt
82eb7c235d
i965: Fix up clip min_nr_entries, preferred_nr_entries, and max_threads.
...
The clip thread could potentially deadlock when processing tristrips since
being moved back to dual-thread mode, as the two threads could each have 4 VUEs
referenced and not be able to allocate another one since SF processing
wasn't able to continue (needing 5 entries before it freed 2).
In constrained URB mode, similar deadlock could even have occurred with
polygons (so we cut back max_threads if we can't handle it any primitive type).
2008-11-12 13:07:22 -08:00
Eric Anholt
5cb7ba10cc
i965: Update WM maximum threads for G4X.
2008-11-12 13:07:22 -08:00
Eric Anholt
d70d62c561
i965: Add a big comment explaining my understanding of URB management.
...
It shouldn't offer anything new over what's in the docs (except for G4X notes),
but here it's all in one place.
2008-11-12 13:07:22 -08:00
Kristian Høgsberg
e1fbb30211
glFlush before CopySubBuffer, fix coordinates and extension name typo.
2008-11-12 15:26:25 -05:00
Robert Ellison
44257a8e75
CELL: fix stencil test bugs
...
Fixed a boneheaded error in the generation of SPU code that calculates
the results of the stencil test. Basically, all the greater than/less than
calculations were exactly inverted: they were coded as though the
given comparison took the stencil value as a left-hand operand and the
reference value as a right-hand operand, but the actual semantics always
put the reference as the left-hand operand and the stencil as the right-hand
operand.
With this fix, tests/dinoshade runs, as do all the other Mesa tests
and samples that use stencil (and that don't use texture formats
unsupported by Cell).
2008-11-12 12:24:22 -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
058ccf0cb5
cell: include cell_surface.h
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
Brian Paul
a35210b516
cell: added -Wmissing-prototypes
2008-11-12 11:06:48 -07:00
Brian Paul
2d8d82000e
cell: include cell_pipe_state.h
2008-11-12 11:06:47 -07:00
Michal Krol
0d8637451b
util: Optimise log2().
2008-11-12 19:02:41 +01:00
Michal Krol
c5ba8ba918
util: Optimise log2().
2008-11-12 19:01:46 +01: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
50357ad351
util: Add log2() definition for MSC.
2008-11-12 18:20:19 +01:00
Michal Krol
1bfe7c36ba
tgsi: Fix a bug with saving/restoring xmm registers upon func call.
2008-11-12 18:19:20 +01:00
Michal Krol
8fee30064e
rtasm: Compile only for GALLIUM_CELL.
2008-11-12 18:13:58 +01:00
Michal Krol
0ee92d6ed9
draw: Add missing include.
2008-11-12 18:12:28 +01:00
Michal Krol
f447eea4de
util: Add log2() definition for MSC.
2008-11-12 17:14:07 +01:00
Michal Krol
a983f2a6ac
draw: Add missing include.
2008-11-12 17:03:58 +01:00
Hanno Böck
becf3d9272
glx: fix xcb build
2008-11-12 06:56:42 -07:00
Brian Paul
19e4222f93
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/shader/prog_execute.c
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
2008-11-11 14:42:41 -07:00
Brian Paul
90246d3ea5
mesa: fix version check in dinoshade.c
2008-11-11 14:35:39 -07:00
Brian Paul
f4361540f8
mesa: allow relative indexing into all register files and indirect dst register indexing
2008-11-11 14:35:39 -07:00
Brian Paul
7f3d45758c
cell: implement NRM3 opcode
2008-11-11 14:27:52 -07: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
Kristian Høgsberg
57d78067bd
Don't mess with emacs tab width.
2008-11-11 13:41:43 -05:00
Xiang, Haihao
5cfb0a4087
mesa: restore the negate flag of dots in build_lighting.
...
Dots is re-used if more than one light is enabled. Previously
the negate flag of dots may affect next light.
2008-11-11 08:11:23 -07:00
Xiang, Haihao
09623fe551
intel: reset cliprect_mode to IGNORE_CLIPRECTS.
...
This ensures all batchbuffers have a same cliprect mode after calling
_intel_batchbuffer_flush even if there aren't invalid commands in the
current batch buffer. (fix bug#18362).
2008-11-11 13:58:15 +08:00
Xiang, Haihao
8412b06b67
mesa: restore the negate flag of dots in build_lighting.
...
Dots is re-used if more than one light is enabled. Previously
the negate flag of dots may affect next light.
2008-11-11 13:36:32 +08:00
Xiang, Haihao
064b04d464
mesa: update new state for RasterPos like other operations.
...
This fixes a lighting issue when drawing a bitmap.
2008-11-11 13:35:51 +08:00
Brian
ff42991c72
gallium: fix comment again. A half-closed interval was intended.
...
Never saw the [a,b[ notation before.
2008-11-10 20:22:36 -07:00
Brian
be1b8e5d6c
mesa: new _mesa_is_pow_two() function
2008-11-10 20:16:00 -07:00
Brian Paul
8df4f6667f
mesa: restore glapi/ prefix on #include
2008-11-10 16:38:47 -07:00
Brian Paul
1dae2be1f6
dri: alloc __DRIscreen object with calloc()
...
Conflicts:
src/mesa/drivers/dri/common/dri_util.c
2008-11-10 15:06:13 -07:00
Brian Paul
df84f788d2
mesa: fix logic error in GLSL linker when looking for main() shaders
2008-11-10 14:59:34 -07:00
Brian Paul
59cc973940
mesa: fix some misc breakage caused by editing auto-generated files rather than the python generators
...
Specifically:
#include "glapitable.h" in src/mesa/main/glapi/dispatch.h
Call _mesa_bsearch() in src/mesa/main/enums.c.
2008-11-10 14:42:02 -07:00
Brian Paul
13f96c5401
GLX: fix out-of-bounds memory issue in indirect glAreTexturesResident()
...
See bug 18445.
When getting array results, __glXReadReply() always reads a multiple of
four bytes. This can cause writing to invalid memory when 'n' is not a
multiple of four.
Special-case the glAreTexturesResident() functions now.
To fix the bug, we use a temporary buffer that's a multiple of four bytes
in length.
NOTE: this commit also reverts part of commit 919ec22ecf
(glx/x11: Added some #ifdef GLX_DIRECT_RENDERING protection) which
directly edited the indirect.c file rather than the python generator!
I'm not repairing that issue at this time.
2008-11-10 14:27:42 -07:00
Brian Paul
6186e7a206
dri: alloc __DRIscreen object with calloc()
2008-11-10 12:39:36 -07:00
Brian Paul
2d76a0d77a
mesa: track initialization status of uniform variables. Plus, asst clean-ups.
2008-11-10 12:39:36 -07:00
Brian Paul
379ff8c956
mesa: initial support for uniform variable initializers.
...
This lets one specify initial values for uniforms in the code, avoiding
the need to call glUniform() in some cases.
2008-11-10 12:39:36 -07:00
Brian Paul
242c0cb543
mesa: fix logic error in GLSL linker when looking for main() shaders
2008-11-10 12:39:36 -07:00
Brian Paul
80c8017a64
mesa: allows 'f' suffix on GLSL float literals
2008-11-10 12:39:36 -07:00
Brian Paul
e5359401d6
undo accidental changes to multitex.frag shader
2008-11-10 12:39:36 -07:00
Brian Paul
2b66417402
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/gallium/auxiliary/util/u_math.c
2008-11-10 11:19:30 -07:00
Pekka Paalanen
eb4dded5be
Mesa: fix number of buffers in st_draw_vbo().
...
The clean-up call to pipe->set_vertex_buffers() should use the same
number of buffers as the first call.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-10 11:16:15 -07:00
Brian Paul
2276dcf05f
gallium: fix typos in comments
2008-11-10 08:24:45 -07:00
Zack Rusin
5668e7fa80
gallium: actually flip the coordinates
2008-11-10 08:05:20 -07:00
Ben Skeggs
1d6cba6572
nouveau: remove previous hack around x86_64 breakage
...
This hack now causes breakage *doh*. :)
2008-11-10 16:33:31 +11:00
Ben Skeggs
e658950d4e
nv40: init pipe_surface correctly
2008-11-10 16:12:28 +11:00
Ben Skeggs
66eacb3fed
nouveau: pass object handle not pointer to GPU...
2008-11-10 15:58:03 +11:00
Ben Skeggs
32e6be6362
Merge remote branch 'origin/gallium-0.2' into gallium-0.2
2008-11-10 15:53:51 +11:00
Brian
325cbeb29a
util: Fix util_fast_pow/exp2/log2.
...
- Use a lookup table for log2.
- Compute (float) (1 << ipart) by tweaking with the exponent directly to
avoid integer overflow and float conversion.
- Also table negative exponents to avoid float division and branching.
- Implement util_fast_exp as function of util_fast_exp2.
--------
Cherry-picked from gallium-0.2: 8415d06d90
This fixes some pow() glitches seen in fslight.c, spectex.c, etc.
Conflicts:
src/gallium/auxiliary/util/u_math.h
2008-11-09 10:17:43 -07:00
Brian
7e83157019
gallium: _debug_vprintf() should be silent if DEBUG is not defined
2008-11-09 09:45:12 -07:00
Brian
399da3a337
gallium: use PIPE_ARCH_SSE to protect use of SSE instrinsics only
...
This allows us to use SSE codegen with debug builds again.
When PIPE_ARCH_SSE is set (w/ gcc -msse -msse2) we will also use the
gcc SSE intrinsic functions.
2008-11-09 09:36:22 -07:00
Pekka Paalanen
94631e63a8
Mesa: fix number of buffers in st_draw_vbo().
...
The clean-up call to pipe->set_vertex_buffers() should use the same
number of buffers as the first call.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-09 01:02:10 +02:00
Pekka Paalanen
72ae2bd856
Nouveau: fix nv20_vertex_layout()
...
The function should update nv20->vertex_info, and not just a
local struct that's thrown away immediately.
Fixes a SIGFPE due to vbuf->vertex_size = 0 in vbuf_alloc_vertices().
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-09 00:58:19 +02:00
Brian
f1c9016af1
mesa: remove OPCODE_INT #define
2008-11-08 10:33:30 -07:00
Brian
a58dbf34ca
gallium: implement SSE codegen for TGSI_OPCODE_NRM/NRM4
2008-11-08 10:29:23 -07:00
Brian
e24afc808f
mesa: use NRM3 in emit_normalize_vec3() when drivers are ready
2008-11-08 10:29:03 -07:00
Pekka Paalanen
903ae9d04e
Nouveau: update nv20 miptree according to nv40.
...
glxinfo doesn't degfault anymore.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-08 19:07:04 +02:00
Pekka Paalanen
0da43322bb
Nouveau: build, link and use nv20.
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-08 18:32:33 +02:00
Pekka Paalanen
b5a3c4272b
Nouveau: name replace for nv20.
...
No functional changes, only changed function, struct, macro etc. names.
nv10 -> nv20
nv30 -> nv20
celsius -> kelvin
Did not touch fifo command macros.
Don't try to build nv20_vertprog.c for now.
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-08 18:04:33 +02:00
Pekka Paalanen
83bb818560
Nouveau: Rename nv20/ files as nv20.
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-08 17:20:19 +02:00
Pekka Paalanen
f910371b37
Nouveau: copy nv30_vertprog.c to nv20.
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-08 17:09:16 +02:00
Pekka Paalanen
0344b0e32e
Nouveau: start nv20 by copying the nv10 tree.
...
Signed-off-by: Pekka Paalanen <pq@iki.fi >
2008-11-08 17:04:45 +02:00
Brian Paul
87d1a26ba3
mesa: add support for 'centroid' qualifier in GLSL 1.20
2008-11-07 16:08:21 -07:00
Brian Paul
448156f769
mesa: add support for 'invariant' keyword for GLSL 1.20
2008-11-07 15:51:10 -07:00
Brian Paul
b632e5aa7f
mesa: reformat comments, rewrap lines, etc for a little better readability
2008-11-07 14:28:00 -07:00
Brian Paul
a52a6d7bcd
gallium: added SSE for DP2, DP2A
2008-11-07 13:03:07 -07:00
Brian Paul
cf9836cf09
gallium: implement TGSI_OPCODE_DP2A, add sqrt to NRM3/NRM4
2008-11-07 13:02:43 -07:00
Brian Paul
49680dae5d
Merge commit 'origin/master' into gallium-0.2
2008-11-07 13:02:07 -07:00
Brian Paul
22459e7a9c
mesa: forgot sqrt in NRM3/4 instructions
2008-11-07 12:59:36 -07:00
Brian Paul
6dc91b8371
mesa: fix opcode table order bug
2008-11-07 12:59:08 -07:00
Robert Ellison
b493fdd7e3
CELL: fix several stencil problems
...
This small set of changes repairs several different stenciling problems;
now redbook/stencil also runs correctly (and maybe others - I haven't
checked everything yet).
- The number of instructions that had been allocated for fragment ops
used to be 64 (in cell/common.h). With complicated stencil use, we
managed to get up to 93, which caused a segfault before we noticed
we'd overran our memory buffer. It's now been bumped to 128,
which should be enough for even complicated stencil and fragment op
usage.
- The status of cell surfaces never changed beyond the initial
PIPE_SURFACE_STATUS_UNDEFINED. When a user called glClear()
to clear just the Z buffer (but not the stencil buffer), this caused
the check_clear_depth_with_quad() function to return false (because
the surface status was believed to be undefined), and so the device
was instructed to clear the whole buffer (including the stencil buffer),
instead of correctly using a quad to clear just the depth, leaving the
stencil alone.
This has been fixed similarly to the way the i915 driver handles
the surface status: during cell_clear_surface(), the status is
set to PIPE_SURFACE_STATUS_DEFINED. Then a partial buffer clear is
handled with a quad, as expected. Note that we are *not* using
PIPE_SURFACE_STATUS_CLEAR (also similar to the i915); technically,
we should be setting the surface status to CLEAR on a clear, and
to DEFINED when we actually draw something (say on cell_vbuf_draw()),
but it's difficult to figure out exactly which surfaces are affected
by a cell_vbuf_draw(), so for now we're doing the easy thing.
- The fragment ops handling was very clever about only pulling out the
parts of the Z/stencil buffer that it needed for calculations;
but this failed when only part of the buffer was written, because
the part that was never pulled out was inadvertently cleared.
Now all the data from the combined Z/stencil buffer is pulled out,
just so the proper values can be recombined later and written back
to the buffer correctly. As a bonus, the fragment op code generation
is simplified.
2008-11-07 11:29:35 -07:00
Brian Paul
18a4cdcfc0
Merge commit 'origin/gallium-0.1' into gallium-0.2
2008-11-07 10:24:22 -07:00
Brian Paul
eb459814b7
mesa: use _bfc0 instead of _col0 when building back face lighting.
...
cherry-picked from master: 4550b0562d
2008-11-07 10:23:22 -07:00
Brian Paul
8343d0f6e4
gallium: translate DP2, DP2A, NRM3, NRM4, SSG opcodes
2008-11-07 10:20:05 -07:00
Brian Paul
3059ceb7f8
Merge commit 'origin/master' into gallium-0.2
2008-11-07 10:17:31 -07:00
Brian Paul
a98a25c25f
mesa: add GLSL support for DP2, NRM3, NRM4 instructions (not actually emitted yet though)
2008-11-07 09:51:25 -07:00
Brian Paul
65cb74ecc0
mesa: added DP2, DP2A instructions
2008-11-07 09:51:25 -07:00
Brian Paul
37eef7b474
mesa: added AND/OR/NOT/XOR instructions
2008-11-07 09:51:25 -07:00
Brian Paul
d93072782a
mesa: include shader/prog_instruction.h
...
Seems to fix a mysteriously missing build dependency.
2008-11-07 09:51:25 -07:00
Brian Paul
f6ead50827
mesa: added OPCODE_NRM3/NRM4 instructions for vector normalization.
...
We may emit these instructions from GLSL instead of DP3/RCP/MUL.
Also, implement SSG (set sign) instruction in the interpreter.
2008-11-07 09:51:25 -07:00
Xiang, Haihao
4550b0562d
mesa: use _bfc0 instead of _col0 when building back face lighting.
2008-11-07 14:58:04 +08:00
Brian
bb8a9ce705
gallium: implement TGSI_OPCODE_NRM/NRM4 in tgsi_exec.c
2008-11-06 19:25:21 -07:00
Brian Paul
3225bc8493
gallium: s/OPCODE_INT/OPCODE_TRUNC/
2008-11-06 17:19:54 -07:00
Brian Paul
c417a2c3f3
Merge commit 'origin/master' into gallium-0.2
2008-11-06 17:17:13 -07:00
Brian Paul
035c0cf71a
mesa: rename OPCODE_INT -> OPCODE_TRUNC
...
Trunc is a more accurate description; there's no type conversion involved.
2008-11-06 17:14:33 -07:00
Brian Paul
517401af07
mesa: update the shader programs->TexturesUsed array at link time
...
If an application never calls glUniform() to set sampler variable values
they'll remain 0 (the default value/unit).
Now call _mesa_update_shader_textures_used() at link time in case glUniform()
is never called. program->TextureUsed[] will then be correct for state
validation.
2008-11-06 15:24:18 -07:00
Brian Paul
a7d9fde24c
Merge commit 'origin/gallium-0.1' into gallium-0.2
2008-11-06 15:07:11 -07:00
Brian Paul
2f1a29654a
mesa: update the shader programs->TexturesUsed array at link time
...
If an application never calls glUniform() to set sampler variable values
they'll remain 0 (the default value/unit).
Now call _mesa_update_shader_textures_used() at link time in case glUniform()
is never called. program->TextureUsed[] will then be correct for state
validation.
2008-11-06 15:04:11 -07:00
Brian Paul
678f80b347
gallium: added st_print_shaders() function to help w/ debugging
2008-11-06 15:00:01 -07:00
Brian Paul
6c3e7365d5
gallium: debug code to print vertex array data (disabled)
2008-11-06 14:57:20 -07:00
Brian Paul
93fd5e150b
softpipe: debug code (disabled)
2008-11-06 14:56:59 -07:00
Zack Rusin
d177c9ddda
gallium: actually flip the coordinates
2008-11-06 16:07:28 -05:00
Xiang, Haihao
df94fd1764
i965: Always check vertex program.
...
Now i965 also uses the vertex program created by Mesa Core, but this vertex program
is not only depend on mesa state _NEW_PROGRAM, so always check the current vertex
program is updated or not. This fixes broken demo cubemap.
2008-11-06 15:25:55 +08:00
Brian
5b2b064a5c
gallium: check execution mask in indirect register loads
...
Zero-out the index for disabled execution channels to avoid using potential
garbage values (thus avoiding bad array indexing).
2008-11-05 20:04:49 -07:00
Brian
639a2b0ec8
gallium: don't range check tgsi register index for indirect accesses
...
Fixes progs/vp/arl.txt test.
2008-11-05 19:27:27 -07:00
Gary Wong
0060d41549
i965: Implement missing OPCODE_NOISE3 instruction in fragment shaders.
...
OPCODE_NOISE4 coming later.
2008-11-05 20:38:05 -05:00
Brian Paul
88360913a7
cell: minor reformatting, var renaming
2008-11-05 17:20:35 -07:00
Brian Paul
2c204bbf77
use APP_CC, not CC for skinning demo
2008-11-05 17:14:23 -07:00
Brian Paul
cbce12b540
gallium: s/mmDestroy/u_mmDestroy/
2008-11-05 17:14:00 -07:00
Brian Paul
1bfdab781b
mesa: Fix compiler warnings on Windows.
...
cherry-picked subset of a77976d2ee
2008-11-05 16:04:40 -07:00
Brian Paul
50beb4e6fd
mesa: fix a GLSL array indexing codegen bug
...
Expressions like array[i] + array[j] didn't work properly before.
2008-11-05 16:02:16 -07:00
Brian Paul
80a718a63b
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/gallium/auxiliary/rtasm/rtasm_execmem.c
src/mesa/shader/slang/slang_emit.c
src/mesa/shader/slang/slang_log.c
src/mesa/state_tracker/st_atom_framebuffer.c
2008-11-05 15:58:09 -07:00
Brian Paul
de14fdd63f
gallium: added check for degenerate drawing calls
2008-11-05 14:05:42 -07:00
Brian Paul
6282c38283
gallium: if VERBOSE_GLSL flag is set, check for non-initialized uniforms at draw time
...
This will warn the user that the shader being run may be using uninitialized
uniform variables.
2008-11-05 14:05:04 -07:00
Brian Paul
0331c1c169
mesa: fix a GLSL array indexing codegen bug
...
Expressions like array[i] + array[j] didn't work properly before.
2008-11-05 14:03:15 -07:00
Brian Paul
f0debbb0bb
gallium: call tgsi_set_exec_mask() and use exec mask in SSE ARL code
...
This prevents vertex shaders from referencing invalid memory locations when
the shader is operating on less than four vertices or fragments.
2008-11-05 14:02:07 -07:00
Brian Paul
03c0ce4c61
gallium: added tgsi_set_exec_mask()
2008-11-05 13:56:20 -07:00
Brian Paul
a137f03c56
gallium: added some sanity check assertions for constant buffer indexing
2008-11-05 13:55:56 -07:00
Brian Paul
dea4826b84
mesa: remove extra \n from printf string
2008-11-05 09:34:15 -07:00
Brian Paul
528c860a58
mesa: remove extra \n from printf string
2008-11-05 09:33:48 -07:00
Brian Paul
949e7383b5
mesa: add Initialized field to gl_uniform struct, for debugging purposes only
2008-11-05 09:17:55 -07:00
Brian Paul
2ff4636603
mesa: add Initialized field to gl_uniform struct, for debugging purposes only
2008-11-05 09:14:19 -07:00
Brian Paul
05a17f83b0
gallium: added some debug code (disabled)
2008-11-05 09:08:56 -07:00
Brian Paul
fc3b361191
gallium: disable some debug output
2008-11-05 09:08:56 -07:00
Jakob Bornecrantz
64a9908816
i915: Remove faulty assert
2008-11-05 16:49:48 +01:00
michal
7115b79b77
draw: Implement TGSI_OPCODE_TRUNC.
2008-11-05 11:59:45 +00:00
michal
de2ace201f
tgsi: Implement OPCODE_TRUNC.
2008-11-05 11:59:36 +00:00
Alan Hourihane
2382dc8aff
Merge commit 'origin/master' into gallium-0.2
2008-11-05 11:59:12 +00:00
michal
5a0299875c
draw: Implement TGSI_OPCODE_TRUNC.
2008-11-05 11:59:33 +01:00
michal
502974b345
tgsi: Implement OPCODE_TRUNC.
2008-11-05 11:59:33 +01:00
Brian Paul
aab429c8df
added glsl/skinning.c test to test matrix blending/weighting
2008-11-04 16:56:59 -07:00
Brian Paul
6c8274078d
mesa: fix float-valued GLSL vertex attribute variables
...
The swizzle mask for such variables wasn't set up properly.
2008-11-04 16:55:18 -07:00
Brian Paul
35a9f1bccf
print err msg if unable to open shader file
2008-11-04 16:55:18 -07:00
Brian Paul
d3222cb1d4
remove old debug glFlush/Finish calls from demos
2008-11-04 16:55:18 -07:00
Brian Paul
f16f53ae3d
mesa: fix float-valued GLSL vertex attribute variables
...
The swizzle mask for such variables wasn't set up properly.
2008-11-04 16:54:57 -07:00
Alan Hourihane
9e1f0e173e
gallium: no renderbuffer, so just exit.
2008-11-03 20:06:44 +00:00
Michal Krol
95438727dd
gallium: Silence compiler warnings on Windows.
2008-11-03 23:55:38 +09:00
José Fonseca
7b42a5d634
gallium: Read from PIPE_FORMAT_Z32_FLOAT.
...
Mainly for debugging purposes for now.
2008-11-03 23:55:38 +09:00
Eric Anholt
6225e467c6
i965: Clean up stale NDC comment.
2008-11-03 14:27:08 +00:00
Eric Anholt
df07db8104
i965: Avoid vs header computation for negative rhw on G4X.
...
This cuts one MOV out when setting a zero header.
2008-11-03 14:27:08 +00:00
Eric Anholt
ba644d2711
i965: Merge GM45 into the G4X chipset define.
...
The mobile and desktop chipsets are the same, and having them separate is
more typing and more chances to screw up.
2008-11-03 14:27:08 +00:00
Eric Anholt
521aa4c107
i965: Fix copy'n'paste issue that made brw->urb.constrained useless.
...
Also, add a comment explaining what brw->urb.constrained tries to do.
2008-11-03 14:27:08 +00:00
José Fonseca
bdf24007ca
gallium: WinCE portability fixes.
2008-11-03 22:36:52 +09:00
José Fonseca
95d108416c
gallium: Fix typo.
2008-11-03 22:35:32 +09:00
José Fonseca
1c6fe6564b
softpipe: Don't call pipe_buffer_destroy directly.
...
Use pipe_buffer_reference instead.
2008-11-03 22:35:24 +09:00
José Fonseca
28a2edb738
pipebuffer: Ensure refcounts of live buffer objects are never zero.
2008-11-03 22:35:18 +09:00
José Fonseca
467c4760b3
gallium: Ensure refcounts of live objects are never zero.
2008-11-03 22:35:13 +09:00
José Fonseca
82e1026c30
gallium: Fix msvc warning.
2008-11-03 22:34:52 +09:00
Eric Anholt
4be624d693
i965: Clean up stale NDC comment.
2008-11-02 12:30:01 -08:00
Eric Anholt
9fd4c27ae3
i965: Avoid vs header computation for negative rhw on G4X.
...
This cuts one MOV out when setting a zero header.
2008-11-02 12:30:01 -08:00
Eric Anholt
34b1776e8d
i965: Merge GM45 into the G4X chipset define.
...
The mobile and desktop chipsets are the same, and having them separate is
more typing and more chances to screw up.
2008-11-02 12:30:00 -08:00
Eric Anholt
d758c48761
i965: Fix copy'n'paste issue that made brw->urb.constrained useless.
...
Also, add a comment explaining what brw->urb.constrained tries to do.
2008-11-02 12:30:00 -08:00
Alan Hourihane
81c862205e
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
2008-11-01 22:57:26 +00:00
Brian Paul
bbffed0857
mesa: silence warnings
2008-11-01 16:05:40 -06:00
Brian Paul
b625a0a475
mesa: do scope replacement for while/for loops too
...
This fixes a function inlining bug involving vars declared inside loop bodies.
2008-11-01 16:05:40 -06:00
Brian Paul
3d0d803313
mesa: glsl tree print improvements
2008-11-01 16:05:40 -06:00
Brian Paul
1e1ba54a94
mesa: fix assignment / parameter passing of sampler types
2008-11-01 16:05:40 -06:00
Brian Paul
131d42573c
mesa: additional debug flags for glsl debug/disassembly
2008-11-01 16:05:40 -06:00
Brian Paul
c7e98469fa
mesa: silence warnings
2008-11-01 16:04:58 -06:00
Brian Paul
e9bc632d82
mesa: do scope replacement for while/for loops too
...
This fixes a function inlining bug involving vars declared inside loop bodies.
2008-11-01 16:03:03 -06:00
Brian Paul
58936b51af
mesa: glsl tree print improvements
2008-11-01 16:02:56 -06:00
Brian Paul
90cdb8a4de
mesa: fix assignment / parameter passing of sampler types
2008-11-01 16:02:32 -06:00
Brian Paul
b3cfcd326b
mesa: additional debug flags for glsl debug/disassembly
2008-11-01 15:58:00 -06:00
Keith Packard
72c914805b
Fix for 58dc8b7: dest regions must not use HorzStride 0 in ExecSize 1
...
Quoting section 11.3.10, paragraph 10.2 of the 965PRM:
10.2. If ExecSize is 1, dst.HorzStride must not be 0. Note that this is
relaxed from rule 10.1.2. Also note that this rule for destination
horizontal stride is different from that for source as stated in
rule #7 .
GM45 gets very angry when rule 10.2 is violated.
Patch 58dc8b7 (i965: support destination horiz strides in align1 access mode)
added support for additional horizontal strides in the ExecSize 1 case, but
failed to notice that mesa occasionally re-purposes a register as a
temporary destination, even though it was constructed as a repeating source
with HorzStride = 0.
While, ideally, we should probably fix the code using these register
specifications, this patch simply rewrites them to use HorzStride 1 as the
pre-58dc8b7 code did.
Signed-off-by: Keith Packard <keithp@keithp.com >
2008-11-01 14:38:19 -07:00
Brian Paul
fa139f8826
mesa: fix some bugs with precision qualifier parsing
2008-10-31 17:54:18 -06:00
Brian Paul
40217db75a
mesa: do scope replacement for variable initializers too
2008-10-31 17:51:25 -06:00
Brian Paul
851dbaa5b5
mesa: fix copy/paste error in GLSL error msg
2008-10-31 17:51:16 -06:00
Brian Paul
06fe728e5b
mesa: fix some bugs with precision qualifier parsing
2008-10-31 17:42:26 -06:00
Brian Paul
90711775d7
mesa: do scope replacement for variable initializers too
2008-10-31 17:42:26 -06:00
Brian Paul
89bca902b3
mesa: fix copy/paste error in GLSL error msg
2008-10-31 17:42:25 -06:00
Eric Anholt
69e10084cd
intel: pixelzoom doesn't apply to glBitmap, so disable the fallback.
2008-10-31 16:04:50 -07:00
Eric Anholt
018088996a
intel: Remove fallback for glDrawPixels(GL_COLOR_INDEX)
...
GL_COLOR_INDEX mode is just like other normal formats (that is, not
depth/stencil) and is uploaded fine by TexImage.
2008-10-31 16:04:50 -07:00
Eric Anholt
ed478a5fde
intel: Add more fallback debugging for glDrawPixels.
2008-10-31 16:04:50 -07:00
Gary Wong
ab3e9c481f
i965: implement the missing OPCODE_NOISE1 and OPCODE_NOISE2 instructions.
...
(Only in fragment shaders, so far. Support for NOISE3 and NOISE4 to come.)
2008-10-31 17:37:26 -04:00
Gary Wong
58dc8b7db5
i965: support destination horiz strides in align1 access mode.
...
This is required for scatter writes in destination regions to work.
2008-10-31 17:34:32 -04:00
Robert Ellison
14e1505cce
CELL: fix use of stencil value mask
...
The Cell stencil tests were completely ignoring the stencil value mask.
Now the original code paths are still used if the stencil value mask
is all 1s; but code to use the mask for the stencil value and reference
value comparisons is now emitted if the mask is not all 1s.
2008-10-30 21:31:36 -06:00
Xiang, Haihao
963071ffea
mesa: fix a typo in the previous commit
2008-10-31 09:24:27 +08:00
Stephane Marchesin
b81a7dc2d8
gallivm: replace the temp parameters of the JIT function with alloca'ed temps. This avoids useless writes of temporary results.
2008-10-30 23:52:59 +01:00
Jonathan White
443e102fdc
cell: Protected use of non-initialized untile buffers
2008-10-30 15:53:39 -06:00
Robert Ellison
711f8a1dd9
CELL: stencil bug fixes
...
Two definitive bugs in stenciling were fixed.
The first, reversed registers in the generated Select Bytes (selb)
instruction, caused the stenciling INCR and DECR operations to
fail dramatically, putting new values in where old values were
supposed to be and vice versa.
The second caused stencil tiles to not be read and written from
main memory by the SPUs. A per-spu flag, spu.read_depth, was used
to indicate whether the SPU should be reading depth tiles, and was set
only when depth was enabled. A second flag, spu.read_stencil, was
set when stenciling was enabled, but never referenced.
As stenciling and depth are in the same tiles on the Cell, and there
is no corresponding TAG_WRITE_TILE_STENCIL to complement
TAG_WRITE_TILE_COLOR and TAG_WRITE_TILE_Z, I fixed this by
eliminating the unused "spu.read_stencil", renaming "spu.read_depth"
to "spu.read_depth_stencil", and setting it if either stenciling or
depth is enabled.
I also added an optimization to the fragment ops generation code,
that avoids calculating stencil values and/or stencil writemask
when the stencil operations are all KEEP.
2008-10-30 15:24:52 -06:00
Jonathan White
157ddc1418
cell: Added check for PIPE_FLUSH_RENDER_CACHE to cell_flush to fix black blocks during st_readpixels due to a flush wait not happening in order to allow any previous rendering to complete.
2008-10-30 11:22:38 -06:00
Xiang, Haihao
bccc09e6bf
mesa: fix an issue in _mesa_PointParameterfv().
2008-10-30 10:40:51 +08:00
Brian Paul
766cb95a45
gallium: new sanity assertions in mmAllocMem()
2008-10-29 17:02:56 -06:00
Brian Paul
7d7f0f1706
gallium: fix copy&paste bug
2008-10-29 17:02:30 -06: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
239ce2240a
glx: added PFNGL*PROC typedefs for GLX 1.3 functions
...
Since we define GLX_VERSION_1_3 in glx.h, the typedefs in the glxext.h header
were getting skipped.
2008-10-29 15:49:19 -06:00
Brian Paul
8160cb4935
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:55:57 -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
1f7a323a13
cell: add scalar param to emit_function_call() to indicate scalar function calls
...
Scalar calls only use the X component of the src regs and smear the
result across the dest register's X/Y/Z/W.
2008-10-29 12:14:11 -06:00
Brian Paul
8b3af5c5d6
cell: use simd utilities for pow, exp2, log2
2008-10-29 12:12:30 -06:00
Brian Paul
4e1c33700d
gallium: added PPC support for SWZ, XPD, POW
...
That's the last of the ARB_v_p opcodes, except for ARL.
2008-10-29 11:05:34 -06:00
Brian Paul
75b92764a7
gallium: clean-ups
2008-10-29 11:04:05 -06:00
Brian Paul
7640264064
gallium: added ppc_vnmsubfp()
2008-10-29 11:03:51 -06:00
Nigel Stewart
cd1283f515
glu: fix compilation problem when using Windows gl.h (sf bug 2204589)
2008-10-29 09:23:48 -06:00
Ben Skeggs
92674bc888
nv40: rename some vars in texture layout code
2008-10-29 18:12:48 +11:00
Eric Anholt
26c1c04fd0
intel: Fix glDrawPixels with 4d RasterPos.
2008-10-28 22:52:38 -07:00
Eric Anholt
59b2c2adbb
i965: Fix check_aperture calls to cover everything needed for the prim at once.
...
Previously, since my check_aperture API change, we would check each piece of
state against the batchbuffer individually, but not all the state against the
batchbuffer at once. In addition to not being terribly useful in assuring
success, it probably also increased CPU load by calling check_aperture many
times per primitive.
2008-10-28 22:52:38 -07:00
Brian Paul
54d684f23d
move glut.h include
2008-10-28 19:01:38 -06:00
Brian Paul
91473dac5a
mesa: use APP_CC compiler in progs/vp/
2008-10-28 19:00:56 -06:00
Brian Paul
c25adeae18
mesa: convert log/exp tests to ARB_v_p
2008-10-28 19:00:25 -06:00
Brian Paul
5db0372b3c
gallium: ppc: implement TGSI_OPCODE_LOG/EXP
2008-10-28 18:57:54 -06:00
Brian Paul
835a9fef05
mesa: include glslcompiler driver in tarball
2008-10-28 18:27:21 -06:00
Brian Paul
a045b92511
gallium: remove old code
2008-10-28 18:22:14 -06:00
Brian Paul
f4e9526add
gallium: ppc: don't replicate/smear immediate values, use vspltw instruction as with constants
2008-10-28 18:21:03 -06:00
Brian Paul
0a8590e3cf
mesa: don't continually redraw
2008-10-28 18:18:31 -06:00
Brian Paul
1100866aa1
mesa: fix stand-alone glslcompiler build
2008-10-28 17:03:49 -06:00
Eric Anholt
0cade4de4f
intel: Don't keep intel->pClipRects, and instead just calculate it when needed.
...
This avoids issues with dereferencing stale cliprects around intel_draw_buffer
time. Additionally, take advantage of cliprects staying constant for FBOs and
DRI2, and emit cliprects in the batchbuffer instead of having to flush batch
each time they change.
2008-10-28 13:23:33 -07:00
Brian Paul
db680ac0e3
cell: fix a number of fence issues
...
Plus add assertions to check status, alignment, etc.
2008-10-28 14:03:51 -06:00
Brian Paul
c46583416a
gallium: use some PPC vec registers to store TGSI temps
...
This could be a lot better, but already makes for better code.
2008-10-28 13:17:48 -06:00
Gary Wong
e92a457ac0
i965: Allocate temporaries contiguously with other regs in fragment shaders.
...
This is required for threads to be spawned with correctly sized GRF
register blocks.
2008-10-28 15:03:14 -04:00
Julien Cristau
98fcdf3f49
configure.ac: Add support for gnu/kfreebsd
...
Check for *-gnu instead of linux* to set DEFINES.
Change some freebsd* checks to *freebsd*.
2008-10-28 11:45:05 -07:00
Brian Paul
5748759087
cell: don't include libmisc.h
...
Doesn't seem to be needed and fixes compilation with SDK 3.1 beta.
2008-10-28 12:41:47 -06:00
Keith Whitwell
52e6fbb655
gallium: recognize DEBUG as well as DBG for debugging
2008-10-28 16:28:56 +00:00
Brian Paul
d01324eb78
cell: fix some problems when displaying to a PIPE_FORMAT_B8G8R8A8_UNORM screen
2008-10-27 18:25:33 -06:00
Brian Paul
2b9b42befa
cell: added -D_BSD_SOURCE flag
...
Needed to get MAP_ANONYMOUS in execmem.c and to define timezone type in glxgears.c
Adding -std=c99 earlier caused this regression.
2008-10-27 18:16:34 -06:00
Brian Paul
a1754424b6
gallium: ppc: emit fewer 'li' instructions prior to vector loads/stores
2008-10-27 17:56:22 -06:00
Brian Paul
604be5561f
gallium: ppc: use a src register cache to avoid redundant loads
2008-10-27 17:56:22 -06:00
Jonathan White
582ca6e418
cell: Added support for untwiddling textures during glReadPixels. This allows glReadPixels to work correctly on cell now and makes conformance tests that use pixel compares useable.
2008-10-27 16:31:22 -06:00
Eric Anholt
bcfba0d91e
i965: Fix compiler warning from unused var.
2008-10-27 11:53:06 -07:00
Eric Anholt
a74b1e149d
i965: Remove dead brw->wrap flag.
2008-10-27 11:53:06 -07:00
Eric Anholt
dd17cd600a
intel: Use dri_bo_get_tiling to get tiling mode of buffers we get from names.
...
Previously, we were trying to pass a name to the GEM GET_TILING_IOCTL,
which needs a handle, and failing. None of our buffers were tiled yet, but
they will be at some point with DRI2 and UXA.
2008-10-27 11:53:06 -07:00
Alan Hourihane
7eacd11bf1
disable OPENGL_BIT
2008-10-27 15:37:54 +00:00
Alan Hourihane
61d3a66456
Merge commit 'origin/master' into gallium-0.2
2008-10-27 15:37:22 +00:00
Ben Skeggs
ee35de2dfb
Merge remote branch 'nouveau/gallium-0.1' into gallium-0.2
2008-10-27 15:40:40 +11:00
Ben Skeggs
70a06e03d4
Merge remote branch 'origin/gallium-0.2' into gallium-0.2
2008-10-27 15:40:33 +11:00
Xiang, Haihao
2a877411db
intel: GL_FALSE on a BO if it won't be modified when mapping this BO. (thanks Eric).
2008-10-26 06:38:27 +08:00
Xiang, Haihao
ec8076264e
i965: don't emit state when dri_bufmgr_check_aperture_space fails.
...
This ensures there is an unfilled batchbuffer used for emitting states again. Partial fix for #17964 .
2008-10-24 16:05:48 +08:00
Xiang, Haihao
f657c81911
intel: fallback for intelEmitCopyBlit.
...
Use _mesa_copy_rect instead of BLT operation if dri_bufmgr_check_aperture_space
still fails after flushing batchbuffer. Partial fix for #17964 .
2008-10-24 15:55:32 +08:00
Brian Paul
8c20c913f8
mesa: version 43 of glext.h
2008-10-23 11:23:36 -06:00
Brian Paul
3efd3b1512
mesa: version 21 of glxext.h
2008-10-23 11:21:32 -06:00
Brian Paul
ea6ddcbe0e
mesa: remove calls to _mesa_adjust_image_for_convolution(), use texImage fields
...
The texImage->Width/Height fields will have the post-convolution width/height.
2008-10-23 10:49:51 -06:00
Brian Paul
02c9009bb8
mesa: updated status in cell.html
2008-10-23 10:47:17 -06:00
Michel Dänzer
6b69e3c717
scons: ppc support.
2008-10-23 10:28:48 +02:00
Michel Dänzer
06c43beee0
scons: Don't hardcode any drivers for the xlib winsys, just pick suitable ones.
2008-10-23 10:27:39 +02:00
Michel Dänzer
86099bcd9c
gallium: Fix typo, PPC_FEATURE_HAS_ALTIVEC not PPC_FEATURES_...
2008-10-23 10:26:19 +02:00
Brian Paul
0ac9945781
gallium: PPC: clamp y to [-128,128] for LIT
2008-10-22 17:29:37 -06:00
Brian Paul
f8ab4feb75
gallium: remove ppc_vload_float(), rename ppc_vecmove() -> ppc_vmove().
2008-10-22 17:21:43 -06:00
Brian Paul
abbbe876ac
gallium: new PPC built-in constants array
...
It's hard to form PPC vector immediates so load them from an array.
2008-10-22 17:19:12 -06:00
Brian Paul
3026616c48
gallium: added ppc_vzero()
2008-10-22 17:17:11 -06:00
Brian Paul
ae81aeb128
gallium: GALLIUM_NOPPC debug var to disable PPC codegen
2008-10-22 16:58:05 -06:00
Brian Paul
9e3ee82305
gallium: PPC LIT instruction (not quite complete yet)
2008-10-22 16:57:22 -06:00
Brian Paul
77160cd97b
gallium: var renaming in tgsi_ppc.c
2008-10-22 15:34:16 -06:00
Brian Paul
519c2dbed5
gallium: remove SSE remnants from tgsi_ppc.c
2008-10-22 15:30:00 -06:00
Brian Paul
7b1d08738f
cell: turn on PPC assembly vertex transform
...
gears runs with it now (3x faster FPS than before).
2008-10-22 15:25:04 -06:00
Brian Paul
c6ff870836
cell: TGSI->PPC for RSQ, RCP and src register sign modes
2008-10-22 15:21:22 -06:00
Brian Paul
5184006560
gallium: TGSI->PPC inequality operators
2008-10-22 14:48:58 -06:00
Brian Paul
b06d072019
gallium: added ppc_vload_float(), for limited cases
2008-10-22 14:48:33 -06:00
Brian Paul
da63edd720
gallium: fix broken TGSI_FILE_CONSTANT case, use ppc_reserver_register()
2008-10-22 13:59:11 -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
82477e485d
cell: add -std=c99 flag to solve some warning/prototype issues
2008-10-22 11:13:55 -06:00
Brian Paul
ba4faef7c0
gallium: temporarily disable PPC vertex shader until more things run
2008-10-22 11:13:31 -06:00
Brian Paul
b7da4c3dc1
gallium: PPC vertex shader support
...
Works, but dead code lingering, debug code present, etc.
2008-10-22 11:08:45 -06:00
Brian Paul
70f4ad4498
gallium: TGSI to PPC code generation
...
Based on the TGSIto SSE2 code generator.
Incomplete and lots of SSE stuff still hanging around but the basic dozen
or so TGSI opcodes are functioning.
2008-10-22 11:07:35 -06:00
Brian Paul
049f57f86a
gallium: added ppc_lvewx()
2008-10-22 11:06:39 -06:00
Brian Paul
3aea9c463b
cell: include pthread.h
2008-10-22 11:04:29 -06:00
Brian Paul
e0c6653a5f
cell: implement many more PPC instructions for code gen
2008-10-22 10:35:38 -06:00
Brian Paul
70dd4379d2
cell: implement fencing for texture buffers
...
If we delete a texture, we need to keep the underlying tiled data buffer
around until any rendering that references it has completed.
Keep a list of buffers referenced by a rendering batch. Unref/free them when
the associated batch's fence is executed/signalled.
2008-10-22 10:34:13 -06:00
Brian Paul
0ae4728eb4
cell: set cell->num_textures
2008-10-22 10:30:12 -06:00
Brian Paul
0c1e98d959
cell: note that dst reg writing needs clamping
2008-10-22 08:12:42 -06:00
Brian Paul
95c04cccfe
mesa: move convolution image adjustment code for glCopyTexSubImage1/2/3D()
...
Do it after initial error checking, after we know the texture's internal format.
2008-10-22 07:53:26 -06:00
Brian Paul
9dfd54fa83
mesa: some re-org of glCopyTexSubImage1/2/3D() error checking
2008-10-22 07:48:37 -06:00
Brian Paul
22e442544b
mesa: in textore.c, only adjust image for convolution if image is a color format
...
Makes things consistant with the code in teximage.c.
We only want to apply convolution to color formats (not depth/index formats)
2008-10-22 07:36:33 -06:00
Brian Paul
7004582c18
gallium: implement tests for PPC/PPC64
2008-10-21 14:12:17 -06:00
Brian Paul
3a2a2d5332
gallium: remove unused var
2008-10-21 14:10:09 -06:00
Kristof Ralovich
0970de3171
glx: updated comment
2008-10-21 08:20:43 -06:00
Xiang, Haihao
b4bf9acc32
i915: fix carsh in i830_emit_state. (bug #17766 )
2008-10-21 10:30:39 +08:00
Brian Paul
2278107b24
mesa: more test options in progs/demos/textures.c
2008-10-20 17:43:05 -06:00
Brian Paul
abfc32a68c
cell: minor improvements to batch buffer functions
2008-10-20 15:44:22 -06:00
Brian Paul
6cec79dc4f
cell: temporarily disable freeing of tiled texture memory
...
Allows glDrawPixels to work for now...
2008-10-20 09:35:18 -06:00
Keith Whitwell
97e63437dc
mesa: note that texcoords are generated by setup routines when pointsprite enabled
2008-10-20 13:04:20 +01:00
Brian Paul
6c6c2f1d23
gallium: add some checks for null surface pointers in state tracker
...
Fixes some segfaults in low memory situations.
2008-10-18 09:55:54 -06:00
Younes Manton
3354e668f0
g3dvl: Get rid of state tracker unit tests, stale and not useful atm.
2008-10-17 17:31:26 -04:00
Younes Manton
e52630e296
g3dvl: Bad test, use proper picture height.
2008-10-17 17:31:26 -04:00
Brian Paul
81724da4f6
cell: use an approximation in compute_lambda_2d() to avoid sqrt
...
Though, the logf() call still needs attention.
2008-10-17 14:14:23 -06:00
Brian Paul
9fa8671c73
cell: add new debug flag (cache) to report texture cache stats on exit
2008-10-17 14:14:23 -06:00
Brian Paul
cb8ebc9124
cell: more efficient state emit for textures/samplers
2008-10-17 14:14:23 -06:00
Brian Paul
fa7b838806
cell: use 7-bit weights in sample_texture_2d_bilinear_int()
...
This allows us to use 16-bit signed mul/add instructions. Had to
used unsigned mul before and there's no unsigned mul/add instruction.
2008-10-17 14:14:23 -06:00
Brian Paul
87a6fe57e8
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
progs/trivial/tri.c
2008-10-17 14:13:00 -06:00
Brian Paul
d422c1eb5c
mesa: redraw upon keypress in trivial/tri.c
2008-10-17 13:37:50 -06:00
Brian Paul
8d6ef125ac
gallium: fix mis-matched malloc/free vs. aligned malloc/free
...
Use aligned malloc/free for teximage data everywhere to be consistant.
The mismatch didn't make any difference when HAVE_POSIX_MEMALIGN was defined.
2008-10-17 13:37:50 -06:00
Alan Hourihane
b50a0b89d9
build "GLX" egl driver by default and egl demos
2008-10-16 23:42:12 +01:00
Brian Paul
893ea47e44
glxswapcontrol: added -fullscreen option
2008-10-16 14:33:27 -06:00
Brian Paul
9a84d78c18
glxgears: for fullscreen, disable window borders the right way
2008-10-16 14:33:27 -06:00
Brian Paul
51ffab362b
cell: pass spu_texture_level ptr to get_four_texels()
2008-10-16 13:54:17 -06:00
Brian Paul
033c90f4c1
cell: implement KIL instruction
2008-10-16 13:49:42 -06:00
Brian Paul
8bff2fccc9
cell: CELL_NUM_SPUS env var
2008-10-16 11:48:05 -06:00
Brian Paul
5191429b15
cell: trilinear mipmap interpolation
2008-10-16 11:19:22 -06:00
Brian Paul
f0c70f9aab
cell: update comments
2008-10-16 09:52:02 -06:00
Brian Paul
1da8f9b005
cell: call proper sampler function in sample_texture_cube()
2008-10-16 09:33:45 -06:00
Brian Paul
926b8dbb3e
cell: clean up various texture-related things
...
Distinguish among texture targets in codegen.
progs/demos/cubemap.c runs correctly now too.
2008-10-16 09:00:05 -06:00
Roland Scheidegger
73e1193632
fix span issue with really old ddx and non-tcl r100 chips
2008-10-16 16:25:52 +02:00
Brian Paul
a7b24ac02f
mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861
2008-10-16 08:23:53 -06:00
Brian Paul
0116ee1d1c
cell: start some performance measurements
...
Use the spu_write_decrementer() and spu_read_decrementer() functions to
measure time. Convert to milliseconds according to the system timebase value.
2008-10-15 20:56:55 -06:00
Brian Paul
1c915b14a5
cell: updated debug code
2008-10-15 20:56:55 -06:00
Brian Paul
5ecb4f9694
cell: updated status in docs/cell.html
2008-10-15 15:46:53 -06:00
Brian Paul
224c19a758
cell: get rid of last usage of float4 union/typedef
...
Results in slightly tighter code.
2008-10-15 15:34:02 -06:00
Brian Paul
30d3b58112
cell: simplify triangle front/back face determination
2008-10-15 15:20:09 -06:00
Brian Paul
ec7d6c6561
cell: send rasterizer state to SPUs in proper way, remove front_winding hack
2008-10-15 14:39:16 -06:00
Brian Paul
8bf1059977
cell: query # cells too
2008-10-15 14:26:08 -06:00
Brian Paul
8bcbefb370
cell: query number SPUs with spe_cpu_info_get()
2008-10-15 14:20:10 -06:00
Brian Paul
67f615681c
cell: use CELL_MAX_SPUS consistently.
2008-10-15 14:18:51 -06:00
Brian Paul
0eb0b0a816
cell: remove some old, pre-batchbuffer stuff
2008-10-15 14:12:55 -06:00
Brian Paul
79e96b3a77
cell: move some CELL_MAX constants
2008-10-15 13:58:58 -06:00
Brian Paul
708f046c21
cell: remove obsolete spu_debug.h file
2008-10-15 13:56:00 -06:00
Brian Paul
ddeec1ed10
cell: simplify spu debug code
2008-10-15 13:55:18 -06:00
Brian Paul
53951531ae
cell: propogate blend color to SPUs for the fallback fragment ops code
2008-10-15 12:35:51 -06:00
Brian Paul
5f76a77b31
gallium: fix the shader-rebind test in softpipe, as was done for the draw module.
2008-10-15 12:00:48 -06:00
Brian Paul
05a8f203cd
gallium: fix the test in vs_exec_prepare() to avoid redundant bindings
...
Fixes regressions seen in progs/samples/prim.c, progs/demos/ray.c
2008-10-15 12:00:48 -06:00
Brian Paul
a7f06dae20
gallium: temporariliy revert softpipe shader optimization
2008-10-15 12:00:48 -06:00
Brian Paul
9382a7100f
cell: updated vertex dump/debug code
2008-10-15 10:54:57 -06:00
Brian Paul
f60c756ed1
cell: additional debug
2008-10-15 10:54:57 -06:00
Brian Paul
4e506f422a
cell: fix/add some fallback blend cases
2008-10-15 10:54:57 -06:00
Brian Paul
abcd28b0b3
cell: need to flush draw module when constants change
2008-10-15 10:54:57 -06:00
Brian Paul
b261ed1f61
mesa: revert accidental change to fslight.c demo
2008-10-15 10:54:57 -06:00
Keith Whitwell
13f46fa1b9
draw: don't assume output buffer pointer is aligned
...
(cherry picked from commit 23cc303994 )
2008-10-15 17:24:42 +01:00
Keith Whitwell
cf85e413ad
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/mesa/main/context.c
2008-10-15 17:20:30 +01:00
Kristian Høgsberg
d533a5d00a
Update DRI2 implementation according to new specification.
2008-10-15 11:18:05 +01:00
Kristian Høgsberg
e5ef0beb05
Revert pointless reindents to avoid merge conflicts.
...
Why are we reindenting code that's work in progress...
2008-10-15 11:18:05 +01:00
RALOVICH, Kristóf
5f6472fc69
glx: indent -br -i3 -npcs --no-tabs glxclient.h
2008-10-15 11:18:05 +01:00
RALOVICH, Kristóf
5e3edb6f98
glx: indent -br -i3 -npcs --no-tabs glcontextmodes.h
2008-10-15 11:18:04 +01:00
RALOVICH, Kristóf
00be6dfe2b
glx: indent -br -i3 -npcs --no-tabs glxextensions.c
2008-10-15 11:18:04 +01:00
RALOVICH, Kristóf
c6d037678d
glx: indent -br -i3 -npcs --no-tabs glxextensions.h
2008-10-15 11:18:00 +01:00
RALOVICH, Kristóf
1bb4658fab
glx: indent -br -i3 -npcs --no-tabs xfont.c
2008-10-15 11:17:59 +01:00
RALOVICH, Kristóf
b57e9f2a74
glx: indent -br -i3 -npcs --no-tabs xf86dristr.h
2008-10-15 11:17:59 +01:00
RALOVICH, Kristóf
400c2d0cea
glx: indent -br -i3 -npcs --no-tabs XF86dri.c
2008-10-15 11:17:58 +01:00
RALOVICH, Kristóf
b69ef3eb51
glx: indent -br -i3 -npcs --no-tabs xf86dri.h
2008-10-15 11:17:58 +01:00
RALOVICH, Kristóf
f7ff9f1913
glx: kill old K&R syntax in XF86dri.c
2008-10-15 11:17:58 +01:00
RALOVICH, Kristóf
dd8b90a81b
glx: indent -br -i3 -npcs --no-tabs vertarr.c
2008-10-15 11:17:58 +01:00
RALOVICH, Kristóf
801933c3e4
glx: indent -br -i3 -npcs --no-tabs singlepix.c
2008-10-15 11:17:57 +01:00
RALOVICH, Kristóf
ee88fff432
glx: indent -br -i3 -npcs --no-tabs single2.c
2008-10-15 11:17:57 +01:00
RALOVICH, Kristóf
750f497713
glx: indent -br -i3 -npcs --no-tabs renderpix.c
2008-10-15 11:17:57 +01:00
RALOVICH, Kristóf
5b48c862c6
glx: indent -br -i3 -npcs --no-tabs render2.c
2008-10-15 11:17:56 +01:00
RALOVICH, Kristóf
3c900bd546
glx: indent -br -i3 -npcs --no-tabs pixelstore.c
2008-10-15 11:17:56 +01:00
RALOVICH, Kristóf
32d7d5fbae
glx: indent -br -i3 -npcs --no-tabs pixel.c
2008-10-15 11:17:56 +01:00
RALOVICH, Kristóf
1b2f122739
glx: indent -br -i3 -npcs --no-tabs packsingle.h
2008-10-15 11:17:55 +01:00
RALOVICH, Kristóf
3a2568b375
glx: indent -br -i3 -npcs --no-tabs packrender.h
2008-10-15 11:17:55 +01:00
RALOVICH, Kristóf
b5f7c84cdf
glx: indent -br -i3 -npcs --no-tabs indirect_window_pos.c
2008-10-15 11:17:55 +01:00
RALOVICH, Kristóf
f9fa7400d7
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_program.c
2008-10-15 11:17:55 +01:00
RALOVICH, Kristóf
76ddfa3a4c
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array_priv.h
2008-10-15 11:17:54 +01:00
RALOVICH, Kristóf
c09881c79f
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array.h
2008-10-15 11:17:54 +01:00
RALOVICH, Kristóf
f2d45617dd
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array.c
2008-10-15 11:17:54 +01:00
RALOVICH, Kristóf
5ae395a883
glx: indent -br -i3 -npcs --no-tabs indirect_transpose_matrix.c
2008-10-15 11:17:53 +01:00
RALOVICH, Kristóf
4cc369e820
glx: indent -br -i3 -npcs --no-tabs indirect_texture_compression.c
2008-10-15 11:17:53 +01:00
RALOVICH, Kristóf
5a3db8004e
glx: indent -br -i3 -npcs --no-tabs glx_query.c
2008-10-15 11:17:51 +01:00
RALOVICH, Kristóf
35dc7eadfa
glx: indent -br -i3 -npcs --no-tabs glx_pbuffer.c
2008-10-15 11:17:51 +01:00
RALOVICH, Kristóf
3dd46f15c3
glx: indent -br -i3 -npcs --no-tabs glxhash.c
2008-10-15 11:17:51 +01:00
RALOVICH, Kristóf
b87e8ae0f5
glx: indent -br -i3 -npcs --no-tabs glxhash.h
2008-10-15 11:17:50 +01:00
RALOVICH, Kristóf
b7f76587b8
glx: indent -br -i3 -npcs --no-tabs glxext.c
2008-10-15 11:17:49 +01:00
RALOVICH, Kristóf
3959d457d6
glx: indent -br -i3 -npcs --no-tabs glxcurrent.c
2008-10-15 11:17:49 +01:00
RALOVICH, Kristóf
c6ea997137
glx: indent -br -i3 -npcs --no-tabs glxcmds.c
2008-10-15 11:17:48 +01:00
RALOVICH, Kristóf
b928a12ee3
glx: indent -br -i3 -npcs --no-tabs glcontextmodes.c
2008-10-15 11:17:48 +01:00
RALOVICH, Kristóf
7f04f8ddee
glx: indent -br -i3 -npcs --no-tabs eval.c
2008-10-15 11:17:48 +01:00
RALOVICH, Kristóf
a1a2078f71
glx: indent -br -i3 -npcs --no-tabs drisw_glx.c
2008-10-15 11:17:48 +01:00
RALOVICH, Kristóf
79d830ce5d
glx: indent -br -i3 -npcs --no-tabs dri_glx.c
2008-10-15 11:17:47 +01:00
RALOVICH, Kristóf
e7970d6b17
glx: indent -br -i3 -npcs --no-tabs dri_common.h
2008-10-15 11:17:47 +01:00
RALOVICH, Kristóf
321a73d9d5
glx: indent -br -i3 -npcs --no-tabs dri_common.c
2008-10-15 11:17:47 +01:00
RALOVICH, Kristóf
9ca7330be3
glx: indent -br -i3 -npcs --no-tabs dri2.h
2008-10-15 11:17:47 +01:00
RALOVICH, Kristóf
ae5b588dc9
glx: indent -br -i3 -npcs --no-tabs dri2_glx.c
2008-10-15 11:17:47 +01:00
RALOVICH, Kristóf
0965740c49
glx: indent -br -i3 -npcs --no-tabs dri2.c
2008-10-15 11:17:46 +01:00
RALOVICH, Kristóf
7d16aaadf1
glx: indent -br -i3 -npcs --no-tabs compsize.c
2008-10-15 11:17:46 +01:00
RALOVICH, Kristóf
109f3f709f
glx: indent -br -i3 -npcs --no-tabs clientattrib.c
2008-10-15 11:17:46 +01:00
RALOVICH, Kristóf
696bf66fa9
glx: add a line of Emacs helping variables
2008-10-15 11:17:46 +01:00
RALOVICH, Kristóf
4f31200a33
glx: No need to zero a local variable.
...
My previous commit e206034863 introduced this.
2008-10-15 11:17:45 +01:00
RALOVICH, Kristóf
b4bb29cecd
glx: make INIT_MESA_SPARC more robust
...
Embed the macro body into do { ... } while(0) .
2008-10-15 11:17:45 +01:00
Xiang, Haihao
b3cb405252
i915: Texture instructions use r/t/oC/oD register as texture coordinate.
...
Fix http://bugs.freedesktop.org/show_bug.cgi?id=16287 .
2008-10-15 11:17:45 +01:00
Eric Anholt
90e4e4117e
intel: Add acceleration for glDrawPixels(GL_STENCIL_INDEX).
...
This is nasty because there's no way in GL to output data to the stencil
buffer directly, so we have to do a dance to wrap the depth/stencil buffer
in an ARGB renderbuffer.
Improves performance of several oglconform testcases by better than a factor
of 2.
2008-10-15 11:17:45 +01:00
Kristian Høgsberg
4830809524
Update DRI2 implementation according to new specification.
2008-10-14 23:07:55 -04:00
Kristian Høgsberg
77c7f90ed4
Revert pointless reindents to avoid merge conflicts.
...
Why are we reindenting code that's work in progress...
2008-10-14 23:07:42 -04:00
Ben Skeggs
295d6f8e8f
Merge remote branch 'origin/gallium-0.2' into gallium-0.2
2008-10-15 13:21:11 +11:00
Brian Paul
41ccdde767
cell: initial bits for 3D texture support
2008-10-14 17:22:40 -06:00
Brian Paul
6c017c2c3c
cell: replace FREE() with align_free()
2008-10-14 17:22:06 -06:00
Brian Paul
e42a394ed5
cell: fix incorrect parameter type
2008-10-14 17:19:57 -06:00
Brian Paul
8f7c6b55ae
cell: support for cubemaps
...
Though, progs/demos/cubemap.c doesn't quite work right...
2008-10-14 17:11:29 -06:00
Brian Paul
e0931e520a
cell: fall-through case for TGSI_OPCODE_TXB
2008-10-14 17:09:56 -06:00
Brian Paul
85dc1aec9c
cell: support NPOT textures, clamp/repeat mode, normalized/unorm texcoords
...
glDrawPixels works now.
2008-10-14 15:19:01 -06:00
Brian Paul
38d396e15a
cell: fix npot texture tiling bugs
2008-10-14 14:02:07 -06:00
Brian Paul
4f56d5bbf2
cell: fix broken negative texcoord conversion
2008-10-14 12:54:31 -06:00
Brian Paul
6d2d5ceca2
cell: use minify vs magnify filters
2008-10-14 12:54:30 -06:00
Brian Paul
58ea98dc68
cell: fix assertions
2008-10-14 12:54:30 -06:00
Brian Paul
f8bddf698d
cell: basic mipmap filtering works now
...
Though, only GL_MIPMAP_NEAREST / GL_LINEAR works right now.
2008-10-14 12:54:30 -06:00
Brian Paul
3baf83db3c
cell: fix tex image stride bugs
2008-10-14 12:54:30 -06:00
Brian Paul
0bee156d85
cell: now do texture twiddling in the right way, at the right time.
...
Also handles images smaller than 32x32 now.
2008-10-14 12:54:30 -06:00
Brian Paul
b7609be0f1
cell: remove old code, clean-ups, etc.
2008-10-14 12:54:30 -06:00
Keith Whitwell
055d986efe
trivial: more vp tests
2008-10-14 14:18:36 +01:00
Keith Whitwell
5548a3072f
vp: add simple vertex transform test
2008-10-14 14:18:32 +01:00
Keith Whitwell
568e96b453
mesa: modify fixed function vertex programs not to reference constant attributes
2008-10-14 14:18:08 +01:00
Alan Hourihane
5d4f3b8417
dri: don't check the number of cliprects before swap, let
...
the swap handle the requirements.
2008-10-14 11:55:38 +01:00
Brian Paul
fc562a7acd
cell: more clean-up in spu_tri.c
2008-10-13 20:19:51 -06:00
Brian Paul
5d7cc6176d
cell: remove dead code, clean-up, reformatting
2008-10-13 19:50:20 -06:00
Brian Paul
dee18a147d
cell: finish-up perspective-corrected interpolation
2008-10-13 19:41:26 -06:00
RALOVICH, Kristóf
351de8aecc
glx: indent -br -i3 -npcs --no-tabs glxclient.h
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
03b471d389
glx: indent -br -i3 -npcs --no-tabs glcontextmodes.h
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
843a09cf5c
glx: indent -br -i3 -npcs --no-tabs glxextensions.c
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
80c83c97fc
glx: indent -br -i3 -npcs --no-tabs glxextensions.h
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
1d0a9e4377
glx: indent -br -i3 -npcs --no-tabs xfont.c
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
4a3ccc6ca5
glx: indent -br -i3 -npcs --no-tabs xf86dristr.h
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
4d2a381114
glx: indent -br -i3 -npcs --no-tabs XF86dri.c
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
04a810beac
glx: indent -br -i3 -npcs --no-tabs xf86dri.h
2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
4c4cb1b5d1
glx: kill old K&R syntax in XF86dri.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
b9a2d35429
glx: indent -br -i3 -npcs --no-tabs vertarr.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
64085b2c2c
glx: indent -br -i3 -npcs --no-tabs singlepix.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
dd0edeb887
glx: indent -br -i3 -npcs --no-tabs single2.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
507808875d
glx: indent -br -i3 -npcs --no-tabs renderpix.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
6bfd57ecde
glx: indent -br -i3 -npcs --no-tabs render2.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
40c481dc91
glx: indent -br -i3 -npcs --no-tabs pixelstore.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
6581071c1d
glx: indent -br -i3 -npcs --no-tabs pixel.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
cfe7f20d0e
glx: indent -br -i3 -npcs --no-tabs packsingle.h
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
0cff716e70
glx: indent -br -i3 -npcs --no-tabs packrender.h
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
68583292b1
glx: indent -br -i3 -npcs --no-tabs indirect_window_pos.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
ccc03b427a
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_program.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
1c916736b8
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array_priv.h
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
9389aa3c0b
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array.h
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
c868ab3dd1
glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array.c
2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
39df336635
glx: indent -br -i3 -npcs --no-tabs indirect_transpose_matrix.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
64d1c10e6c
glx: indent -br -i3 -npcs --no-tabs indirect_texture_compression.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
6020e6e66a
glx: indent -br -i3 -npcs --no-tabs glx_query.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
2d4c26b85e
glx: indent -br -i3 -npcs --no-tabs glx_pbuffer.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
bd6a3d5975
glx: indent -br -i3 -npcs --no-tabs glxhash.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
39c958944c
glx: indent -br -i3 -npcs --no-tabs glxhash.h
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
acb7e52430
glx: indent -br -i3 -npcs --no-tabs glxext.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
3a2d2fcd8a
glx: indent -br -i3 -npcs --no-tabs glxcurrent.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
1293356c60
glx: indent -br -i3 -npcs --no-tabs glxcmds.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
07c9bd246d
glx: indent -br -i3 -npcs --no-tabs glcontextmodes.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
f76724b767
glx: indent -br -i3 -npcs --no-tabs eval.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
60aa0918a1
glx: indent -br -i3 -npcs --no-tabs drisw_glx.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
4e88ae5639
glx: indent -br -i3 -npcs --no-tabs dri_glx.c
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
09c889b318
glx: indent -br -i3 -npcs --no-tabs dri_common.h
2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
4d86228321
glx: indent -br -i3 -npcs --no-tabs dri_common.c
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
2e8d62be61
glx: indent -br -i3 -npcs --no-tabs dri2.h
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
bca6e79a45
glx: indent -br -i3 -npcs --no-tabs dri2_glx.c
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
66cc150770
glx: indent -br -i3 -npcs --no-tabs dri2.c
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
f788a8ed69
glx: indent -br -i3 -npcs --no-tabs compsize.c
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
ee3a6cec36
glx: indent -br -i3 -npcs --no-tabs clientattrib.c
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
58b72103d3
glx: add a line of Emacs helping variables
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
61eb4f50eb
glx: No need to zero a local variable.
...
My previous commit e206034863 introduced this.
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
0b188d1cdc
glx: make INIT_MESA_SPARC more robust
...
Embed the macro body into do { ... } while(0) .
2008-10-13 16:53:38 -06:00
Brian Paul
978799beb2
cell: initial work for mipmap texture filtering
2008-10-13 16:43:36 -06:00
Brian Paul
b0c136cfb1
cell: remove old texture-related fields
2008-10-13 16:43:36 -06:00
Brian Paul
c05cabd646
cell: use fewer memory references in sample_texture4_bilinear_2()
2008-10-13 16:43:36 -06:00
Brian Paul
420e8cdf25
cell: remove more old texture code
2008-10-13 16:43:36 -06:00
Brian Paul
67425aaa09
cell: bilinear texture filtering using integer arithmetic
...
Fewer float/int conversions involved.
2008-10-13 16:43:36 -06:00
Brian Paul
c8fb368261
cell: remove old texture code
2008-10-13 16:43:35 -06:00
Brian Paul
3b07c28dee
cell: do texture sampling/filtering for four pixels at a time.
2008-10-13 16:43:35 -06:00
Brian Paul
734685549c
cell: added spu_unpack_A8R8G8B8_transpose4()
...
Plus, clearer shuffle masks in other funcs.
2008-10-13 16:43:35 -06:00
Alan Hourihane
5bc8ebb12b
mesa: when emitting an address load instruction, for
...
indexed elements ensure we write to a single register.
2008-10-13 12:30:40 +01:00
Xiang, Haihao
c238098bbc
i915: Texture instructions use r/t/oC/oD register as texture coordinate.
...
Fix http://bugs.freedesktop.org/show_bug.cgi?id=16287 .
2008-10-13 13:04:04 +08:00
Eric Anholt
5c39bad220
intel: Add acceleration for glDrawPixels(GL_STENCIL_INDEX).
...
This is nasty because there's no way in GL to output data to the stencil
buffer directly, so we have to do a dance to wrap the depth/stencil buffer
in an ARGB renderbuffer.
Improves performance of several oglconform testcases by better than a factor
of 2.
2008-10-11 03:17:08 -07:00
Brian Paul
ecac7996d4
cell: more instruction scheduling optimizations (MIN/MAX/LERP/etc)
...
Also, optimize register->memory stores.
2008-10-10 17:48:16 -06:00
Brian Paul
2a6c6fe01e
Merge commit 'origin/master' into gallium-0.2
2008-10-10 16:40:16 -06:00
Brian Paul
01e312a73b
cell: pass texture unit (sampler number) to txp() function
...
The glsl/multitex demo runs now.
2008-10-10 16:40:03 -06:00
Ian Romanick
33ff407874
intel: GLSL 1.20 is broken in Mesa, so disable it in the i965 driver
2008-10-10 16:40:03 -06:00
Eric Anholt
c011a9ca8c
i965: Add missing intel_pixel_draw.c symlink to fix build.
2008-10-10 16:40:03 -06:00
Brian Paul
24748268a3
mesa: fix asst. issues in _mesa_texstore_argb8888()
...
If we shift bytes into the texel word (or use the PACK_COLOR_8888 macro),
we don't have to worry about big vs. little endian. See comments about
texel formats in texformat.h.
Remove an unneeded/incorrect else-if clause that produced wrong results
on big-endian systems.
2008-10-10 16:34:08 -06:00
Brian Paul
bf9d9a9d01
mesa: include needed header
2008-10-10 16:34:08 -06:00
Brian Paul
f863ae1a04
mesa: remove unneeded includes
2008-10-10 16:34:08 -06:00
Brian Paul
85a3bf6dab
mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861
2008-10-10 16:34:08 -06:00
Brian Paul
3210a6d6c7
mesa: rename macro params to emphasize that there's no particular color ordering
2008-10-10 16:34:08 -06:00
Brian Paul
f63594bfef
mesa: remove unneeded includes
2008-10-10 16:34:08 -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
Brian Paul
53ae243869
cell: fix function prologue/epilogue code for large stack frames
...
The ai instruction is limited to a 10-bit signed immediate value.
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
Brian Paul
6d4d51d647
mesa: new _mesa_set_vp_override() function for driver-override of vertex program
...
Patch provide by Keith.
Used in state tracker by DrawPixels to indicate that the state tracker (driver)
is using its own vertex program. This prevents the texenvprogram code from
replacing conventional shader inputs with state vars.
Fixes glDraw/CopyPixels regressions.
2008-10-10 13:39:14 -06:00
Ian Romanick
e700269441
intel: GLSL 1.20 is broken in Mesa, so disable it in the i965 driver
2008-10-10 11:47:43 -07:00
Brian Paul
02931db311
cell: call cell_flush_int() at end of cell_create_context()
...
Ensures that SPUs are initialized/ready before proceeding.
This fixes a spurious assertion failure when the SPU-side shader function info
hasn't been returned to the PPU before shader codegen.
2008-10-10 12:38:27 -06:00
Brian Paul
a13f61d34d
cell: fix LERP when dst reg is a src reg
...
Also, bump up frame size and fix some assertions.
2008-10-10 12:24:39 -06:00
Brian Paul
b3a68b24bd
replace 1.0/sqrt() with inversesqrt()
2008-10-10 12:04:49 -06:00
Brian Paul
a45d293fd9
cell: fix fm/fs copy & paste bug from a few commits ago
2008-10-10 12:04:19 -06:00
Brian Paul
e43af05311
cell: fix bug in emit_FLR() when src reg == dst reg
2008-10-10 11:56:03 -06:00
Brian Paul
dc7d213c54
cell: fix bug in emit_FRC() when src register == dst register.
...
With this fix, the glsl/brick demo runs.
2008-10-10 11:52:55 -06:00
Eric Anholt
5e9cb42aa6
i965: Add missing intel_pixel_draw.c symlink to fix build.
2008-10-10 09:43:15 -07:00
Brian Paul
086a56134f
cell: updates in response to draw's struct vertex_info changes
2008-10-10 08:44:29 -06:00
Keith Whitwell
3a3801c143
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/glapi/descrip.mms
src/mesa/shader/grammar/descrip.mms
2008-10-10 15:26:28 +01: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
Brian Paul
02aea66b1a
mesa: toggle colormask values with r/g/b keys in tri-mask-tri.c
...
Plus misc clean-up.
2008-10-09 19:51:26 -06:00
Brian Paul
583098e3cb
cell: implement basic TXP instruction in fragment shaders
...
Lots of restrictions for now (one 2D texture, no mipmaps, etc.) for now
but basic texture demos work.
TEX, TXD, TXP do the same thing for the time being.
2008-10-09 19:51:26 -06:00
Brian Paul
f6e806a2b8
mesa: simple multiple textures test
2008-10-09 19:51:26 -06:00
Brian Paul
c201e357eb
cell: better immediate value allocation, better comments
2008-10-09 19:51:26 -06:00
Brian Paul
b9689791dd
cell: massage the emit functions to get better instruction scheduling
2008-10-09 19:51:26 -06:00
Brian Paul
2a3fa97be3
cell: more accurate comments
2008-10-09 19:51:26 -06:00
Alan Hourihane
ca5224945a
gallium: silence warning
2008-10-10 01:31:34 +01:00
Brian Paul
f7556fdd40
mesa: rasterizer state depends on ST_NEW_VERTEX_PROGRAM
...
Check for per-vertex point size must be done when vertex program changes.
2008-10-09 16:39:59 -06:00
Stephane Marchesin
db9de99925
Gallivm: cleanup soa storage.
2008-10-09 23:32:01 +02:00
Eric Anholt
7216679c19
i965: Accelerate depth textures with border color.
...
The fallback was introduced to fix bug #16697 , but made the test it was
fixing run excessively long.
2008-10-09 11:45:58 -07:00
Eric Anholt
91221483a6
i965: Actually hook up the accelerated DrawPixels support.
2008-10-09 10:23:47 -07:00
Eric Anholt
9aec1288ee
i915: Accelerate depth textures with border color.
...
The fallback was introduced to fix bug #16697 , but made the test it was
fixing run excessively long.
2008-10-08 23:55:58 -07:00
Brian Paul
d48a92e880
cell: implement function calls from shader code. fslight demo runs now.
...
Used for SIN, COS, EXP2, LOG2, POW instructions. TEX next.
Fixed some bugs in MIN, MAX, DP3, DP4, DPH instructions.
In rtasm code:
Special-case spe_lqd(), spe_stqd() functions so they take byte offsets but
low-order 4 bits are shifted out. This makes things consistant with SPU
assembly language conventions.
Added spe_get_registers_used() function.
2008-10-08 20:44:32 -06:00
Brian Paul
a4e477433f
cell: implement more built-in shader functions, link spu code with -lm
2008-10-08 20:34:35 -06:00
Brian Paul
feb5a26bb1
cell: increase SPU_MAX_FRAGMENT_PROGRAM_INSTS
2008-10-08 20:33:24 -06:00
Brian Paul
5c57cbec32
gallium: asst. clean-ups
...
Don't use register qualifier. Doxygen-ize comments. Remove 'extern'.
2008-10-08 16:35:40 -06:00
Brian Paul
73d00b9e93
gallium: better instruction printing for SPE code
2008-10-08 16:33:04 -06:00
Brian Paul
5c4bd76cb6
mesa: in _mesa_combine_programs() take new STATE_CURRENT_ATTRIB color into account
...
Commit 1680ef8696 changed the texenv program
to get color from a state register instead of a constant-valued vertex
attribute. This broke program concatenation (so glDraw/CopyPixels broke).
Now check if the second program get's color from a constant register and
handle that case appropriately.
2008-10-08 14:02:24 -06:00
Brian Paul
a71b1af5ad
mesa: vertex emit debug code (disabled)
2008-10-08 09:33:56 -06:00
Brian Paul
5462d447aa
mesa: fix vertex format/attribute bug
...
If the tnl output attributes matches the swsetup input attributes we still
need to check if the desired vertex color type (float vs. chan) has changed
so that we use the right emit functions.
Fixes a conformance failure found with logicop test at pathlevel 3.
2008-10-08 09:33:56 -06:00
Eric Anholt
902727b7e3
mesa: Pass the context to query object delete cb to avoid null dereference.
2008-10-07 18:52:12 -07:00
Eric Anholt
c157cfc637
i965: Add ARB_occlusion_query support.
2008-10-07 18:52:12 -07:00
Eric Anholt
fc19536aa9
intel: Push flushing for cliprects changes down into the cliprects changes.
...
This lets us short-circuit when we're leaving the same cliprects in place,
which becomes quite common with metaops clears, and may be useful for some of
our FBO paths.
2008-10-07 18:52:12 -07:00
Xiang, Haihao
94d3a30df7
i965: Fix a potential assertion failure.
2008-10-08 09:30:12 +08:00
Brian Paul
7cb723a3fd
mesa: pass 'mask', not NULL to renderbuffer->Put functions
...
Fixes bug 17800.
2008-10-07 16:52:47 -06:00
Brian Paul
b99c39ea7b
mesa: use the shaderutil.c helper functions
2008-10-07 16:24:43 -06:00
Brian Paul
800c350d71
cell: add support for fragment shader constant buffers
2008-10-07 16:16:27 -06:00
Brian Paul
ce416566bc
cell: fix incorrect extended swizzle term code in get_src_reg()
2008-10-07 16:16:27 -06:00
Brian Paul
3008657cea
cell: fix formatting
2008-10-07 16:16:27 -06:00
Brian Paul
e561058641
cell: remove old code
2008-10-07 16:16:27 -06:00
Stephane Marchesin
a0809c5271
Gallivm: reorder the functions alphabetically so I can work on it.
2008-10-07 23:43:21 +02:00
Stephane Marchesin
8463ddb740
Merge branch 'gallium-0.2' of git+ssh://marcheu@git.freedesktop.org/git/mesa/mesa into gallium-0.2
2008-10-07 23:42:48 +02:00
Stephane Marchesin
6f29c2ff2d
Progs: hook the glsl identity example into the makefile.
2008-10-07 23:42:36 +02:00
Brian Paul
be3c070b6a
cell: memset() key to zero
2008-10-07 14:50:06 -06:00
Brian Paul
44799c3b7e
cell: use new keymap to save/re-use fragment ops code
2008-10-07 14:34:29 -06:00
Brian Paul
f192ad5ebc
gallium: added general-purpose key->data map/lookup container
2008-10-07 14:34:29 -06:00
Patrice Mandin
af59f767a0
nouveau: first draft of swizzle texture upload to vram
2008-10-07 21:47:45 +02:00
Stephane Marchesin
4f1dafaa82
Mesa: fix the case where there are no vertex attributes.
...
This is a backport of 8e8208d6db to gallium-0.1
2008-10-07 21:28:38 +02:00
Stephane Marchesin
4ccbee2439
Progs: add a trivial glsl test, useful for gallium driver bringup/debug.
2008-10-07 21:21:20 +02:00
Stephane Marchesin
85e578bbc7
Gallivm: don't say hello, it's rude.
2008-10-07 21:13:49 +02:00
Stephane Marchesin
ba86520cf7
Merge branch 'gallium-0.2' of git+ssh://marcheu@git.freedesktop.org/git/mesa/mesa into gallium-0.2
2008-10-07 21:11:14 +02:00
Stephane Marchesin
94ba48bd85
Gallivm: fix the constant layout, this gets a bunch of progs/ working. Notably, gears doesn't.
2008-10-07 21:11:01 +02:00
Keith Whitwell
1ec78df1e7
trivial: add more vp tests
2008-10-07 19:14:18 +01:00
Brian Paul
239617fbe2
mesa: replace GLuint with GLbitfield to be clearer about usage
...
Also, fix up some comments to be doxygen style.
2008-10-07 11:22:47 -06:00
Keith Whitwell
23cc303994
draw: don't assume output buffer pointer is aligned
2008-10-07 16:44:24 +01:00
Keith Whitwell
4070dba28a
mesa: update state after binding vertex list in dlist path
2008-10-07 16:33:53 +01:00
Keith Whitwell
a381c9e8b3
trivial: exercise vertprog sligtly
2008-10-07 16:33:52 +01:00
Keith Whitwell
6ff1cf5b82
mesa: protect against segfault in get_fp_input_mask()
2008-10-07 16:33:52 +01:00
Keith Whitwell
c48da7d78b
draw: add switch for drivers to force vertex data passthrough
2008-10-07 16:33:52 +01:00
Brian Paul
23e62c94ee
mesa: remove old assertion
2008-10-07 08:30:56 -06:00
José Fonseca
4d7394f892
gallium: Introduce PIPE_ARCH_SSE define for SSE support.
...
Besides meaning x86 and x86-64 architecture, it also depends on SSE2
support enabled on gcc.
This fixes the linux-debug build.
2008-10-07 14:25:09 +09:00
Brian
f7ee3c9792
gallium: replace assertion with conditional/recovery code
...
The assertion failed when we ran out of exec memory.
Found with conform texcombine test.
2008-10-06 18:31:56 -06:00
Brian
d055b2c001
mesa: fix convolve/convolution mix-ups
2008-10-06 17:10:45 -06:00
Brian
4f4147eadd
mesa: fix convolve/convolution mix-ups
2008-10-06 17:10:22 -06:00
Brian Paul
f8baad2d25
mesa: set FRAG_BIT_FOGC bit in InputsUsed if FogOption!=GL_NONE
2008-10-06 12:29:29 -06:00
Stephane Marchesin
8e8208d6db
Mesa: fix the case where there are no vertex attributes.
2008-10-06 19:48:57 +02:00
Brian Paul
6e34fc0d37
mesa: adjust texcoords for swrast sprite points.
...
Fixes glean pointSprite test w/ software rendering
2008-10-06 11:34:01 -06:00
Brian Paul
145d49838f
mesa: fix static library construction
...
If the .a is made of other .a files, extract the objects from the later.
2008-10-06 11:01:31 -06:00
Brian Paul
b0ca50bd38
mesa: updated _mesa_delete_query() comments
2008-10-06 09:32:33 -06:00
Brian Paul
f362788eae
mesa: add missing GLcontext param to _mesa_delete_query().
...
Fixes vtk crash and others.
2008-10-06 09:27:31 -06:00
Brian Paul
382911bdbc
mesa: add missing GLcontext param to _mesa_delete_query().
...
Fixes vtk crash and others.
2008-10-06 09:26:45 -06:00
Michal Krol
9b82701813
draw: Fix compiler errors on Windows.
2008-10-06 13:23:56 +02:00
Keith Whitwell
7053f8c902
rtasm: fix debug build
2008-10-06 11:54:22 +01:00
Keith Whitwell
53d4706c6c
make draw's vertex_info struct smaller/quicker to compare with memcmp()
2008-10-06 11:49:42 +01:00
Eric Anholt
91d0020eec
i915: Refine the texture indirect lookup accounting.
...
Without this, we would reject programs which sampled multiple times from
registers defined in the same phase (block of instructions with the same
texture indirection count), as each sample would count as a new phase
beginning. Instead, keep track of which phases registers were written in,
and only bump phase when we're reading from one generated in this phase.
On the other hand, we failed to count oC or oD texture samples as being new
phases.
Bug #17865 .
2008-10-04 18:40:32 -07:00
Younes Manton
d008fb1786
g3dvl: Ignore client flush requests unless entire frame is buffered.
2008-10-04 13:12:09 -04:00
Younes Manton
111b8f6dd9
g3dvl: Bad semantic index in shader decl.
2008-10-04 13:12:09 -04:00
Keith Whitwell
0370d6b359
mesa: handle vertex program enabled case also in texenvprogram.c
2008-10-04 12:41:56 +01:00
Robert Ellison
afaa53040b
CELL: changes to generate SPU code for stenciling
...
This set of code changes are for stencil code generation
support. Both one-sided and two-sided stenciling are supported.
In addition to the raw code generation changes, these changes had
to be made elsewhere in the system:
- Added new "register set" feature to the SPE assembly generation.
A "register set" is a way to allocate multiple registers and free
them all at the same time, delegating register allocation management
to the spe_function unit. It's quite useful in complex register
allocation schemes (like stenciling).
- Added and improved SPE macro calculations.
These are operations between registers and unsigned integer
immediates. In many cases, the calculation can be performed
with a single instruction; the macros will generate the
single instruction if possible, or generate a register load
and register-to-register operation if not. These macro
functions are: spe_load_uint() (which has new ways to
load a value in a single instruction), spe_and_uint(),
spe_xor_uint(), spe_compare_equal_uint(), and spe_compare_greater_uint().
- Added facing to fragment generation. While rendering, the rasterizer
needs to be able to determine front- and back-facing fragments, in order
to correctly apply two-sided stencil. That requires these changes:
- Added front_winding field to the cell_command_render block, so that
the state tracker could communicate to the rasterizer what it
considered to be the front-facing direction.
- Added fragment facing as an input to the fragment function.
- Calculated facing is passed during emit_quad().
2008-10-03 18:05:14 -06:00
Ian Romanick
db9ba91971
intel: Don't advertise unsupported extensions on pre-965 hardware
...
Move GL_ARB_texture_non_power_of_two and GL_ATI_separate_stencil
from the generic extension list to the 965-specific list. Neither
extension is supported on i830-class hardware, and
GL_ATI_separate_stencil is not supported on i915-class hardare.
GL_ARB_texture_non_power_of_two is supported on i915-class hardare and
is already in the i915-specific list.
2008-10-03 12:16:04 -07:00
Keith Whitwell
1680ef8696
mesa: avoid generating constant vertex attributes in fixedfunc programs
...
Keep track of enabled/active vertex attributes.
Keep track of potential vertex program outputs.
When generating fragment program, replace references to fragment attributes
which are effectively non-varying and non-computed passthrough attributes with
references to the new CURRENT_ATTRIB tracked state value.
Only downside is slight ugliness in VBO code where we need to validate state
twice in succession.
2008-10-03 17:30:59 +01:00
Keith Whitwell
d63a36ef3a
Mesa: short-circuit case when looking up the same program twice in cache
2008-10-03 16:50:26 +01:00
Keith Whitwell
fa1b533012
mesa: add new internal state for tracking current vertex attribs
2008-10-03 16:49:52 +01:00
Keith Whitwell
0e008d3797
mesa: add missing state dependencies for various tracked constants
2008-10-03 13:53:07 +01:00
Keith Whitwell
6280e33570
mesa: shrink texenvprogram state key struct
2008-10-03 13:51:56 +01:00
Keith Whitwell
6965532e14
rtasm: add sse_movntps
2008-10-03 13:50:34 +01:00
Keith Whitwell
22eb067c88
draw: modify prefetching slightly
2008-10-02 10:19:48 -04:00
Keith Whitwell
21f98ad30a
draw: don't keep refetching constant inputs
2008-10-02 10:19:48 -04:00
Keith Whitwell
66d4beb874
rtasm: add prefetch instructions
2008-10-02 10:19:48 -04:00
Keith Whitwell
a15699c3f5
draw: add streamlined paths for fetching linear verts
2008-10-02 10:19:48 -04:00
Michal Krol
a77976d2ee
mesa: Fix compiler warnings on Windows.
2008-10-02 10:19:48 -04:00
Stephane Marchesin
8bdb4d2b2f
Gallivm: add slt. glxgears should be running, except it isn't.
2008-10-02 10:19:47 -04:00
Stephane Marchesin
3f4b67f5d7
Gallivm: port to llvm 2.4.
2008-10-02 10:19:47 -04:00
Stephane Marchesin
fdcaf569d4
Gallivm: fix off-by-one.
2008-10-02 10:19:47 -04:00
Stephane Marchesin
9859edc606
Gallivm: need to link with libstdc++ for llvm.
2008-10-02 10:19:47 -04:00
Stephane Marchesin
0116ea34e1
Gallivm: more instructions.
2008-10-02 10:19:47 -04:00
Stephane Marchesin
3f477e111a
Gallivm: make it compile again, add some opcodes.
2008-10-02 10:19:47 -04:00
Brian Paul
5620c20b24
mesa: fix temp register allocation problems.
...
Complex texcombine modes were running out of registers (>32 registers for 8 tex units).
2008-10-02 10:19:47 -04:00
Brian Paul
2cb213ff23
egl: check for null ptr/name
2008-10-02 10:19:46 -04:00
Brian Paul
5b60d6d07b
egl: remove space after -L flag
2008-10-02 10:19:46 -04:00
Keith Whitwell
918a444913
draw: modify prefetching slightly
2008-10-02 12:59:15 +01:00
Keith Whitwell
af9cfea9cc
draw: don't keep refetching constant inputs
2008-10-02 12:59:15 +01:00
Keith Whitwell
102daee1b8
rtasm: add prefetch instructions
2008-10-02 12:59:14 +01:00
Keith Whitwell
dd7e5a4980
draw: add streamlined paths for fetching linear verts
2008-10-02 12:59:14 +01:00
Ian Romanick
4741dbcbbc
Unify ARB_depth_texture and SGIX_depth_texture
...
The ARB extension is a superset of the older SGIX extension. Any
hardware that can support the SGIX version can also support the ARB
version. In Mesa, any driver that supports one also supports the
other. This unification just simplifies some bits of code.
2008-10-01 20:38:10 -07:00
Eric Anholt
17fdd1ab3b
i965: sampler default color ends up in texture cache, not instructions.
...
See volume 4, SAMPLER_BORDER_COLOR_STATE programming notes.
2008-10-01 16:59:16 -07:00
Eric Anholt
df6ae3f0a3
i965: Fix overwriting of depth override for SetTexOffset.
...
Fixes black borders around windows in compiz. Bug #17233 .
2008-10-01 14:15:17 -07:00
Michal Krol
266c5f5ccb
mesa: Fix compiler warnings on Windows.
2008-10-01 19:36:04 +02:00
José Fonseca
23e325e55a
Add -msse and -msse2 to the *-x86 configs.
2008-10-01 10:25:41 +09:00
José Fonseca
cb8a3ba433
util: No-op u_sse.h outside PIPE_ARCH_X86/X86_64.
2008-10-01 08:28:05 +09:00
José Fonseca
cbfce4175b
tgsi: Include p_config.h.
2008-10-01 08:27:20 +09:00
Stephane Marchesin
a6ff215777
Gallivm: add slt. glxgears should be running, except it isn't.
2008-10-01 00:00:58 +02:00
Jonathan White
e3378790bb
cell: Fixed usage of MAX_INSTRUCTIONS to use new MAX_PROGRAM_INSTRUCTIONS instead of old MAX_NV_XXX definitions in order to allow Cell TGSI fragment program generator to work again.
2008-09-30 15:38:38 -06:00
Jonathan White
5e585719eb
cell: Moved X86 checks to wrap #include section so that Cell targets will compile again.
2008-09-30 14:07:09 -06:00
Stephane Marchesin
4ae161e940
Gallivm: port to llvm 2.4.
2008-09-30 20:50:49 +02:00
José Fonseca
8415d06d90
util: Fix util_fast_pow/exp2/log2.
...
- Use a lookup table for log2.
- Compute (float) (1 << ipart) by tweaking with the exponent directly to
avoid integer overflow and float conversion.
- Also table negative exponents to avoid float division and branching.
- Implement util_fast_exp as function of util_fast_exp2.
2008-10-01 01:13:40 +09:00
Ben Skeggs
2882a2db7a
nouveau: some small API changes
2008-09-30 12:06:56 +10:00
Ben Skeggs
8cd046c9b1
Merge remote branch 'origin/gallium-0.2' into gallium-0.2
2008-09-30 11:57:45 +10:00
Ian Romanick
08b9e29c1d
intel: Clean-up the extension string madness!
...
- Sort extensions by ARB, then EXT, then vendor by name
- Remove redundant (only one of GL_{ARB,EXT,NV}_texture_rectangle) or
duplicate extension strings
2008-09-29 18:50:05 -07:00
Ian Romanick
3ab4b2066f
GLSL: Implement GL_OBJECT_TYPE_ARB query
...
The GL_OBJECT_TYPE_ARB query is handled directly in
_mesa_GetObjectParamterivARB because it is only supported in the
extension version of the shanding language API. glGetProgramiv and
glGetShaderiv should not accept this enum.
2008-09-29 12:30:05 -07:00
Ian Romanick
905d8e0742
GLSL: Implement _mesa_get_handle
...
Implementing _mesa_get_handle in using
glGetIntegerv(GL_CURRENT_PROGRAM, ...) allows glGetHandleARB to work.
2008-09-29 12:27:00 -07:00
Ian Romanick
d806d451e6
GLSL: AttachShader returns INVALID_OPERATION for repeated attach
...
The GL_ARB_shader_objects spec says that glAttachShaderARB is supposed
to return GL_INVALID_OPERATION if a shader is attached to a program
where it is already attached. _mesa_attach_shader perviously returned
without error in this case.
2008-09-29 12:18:06 -07:00
José Fonseca
5dc8e67078
tgsi: SSE2 optimized exp2, log2 and pow implementations.
...
Special care must be taken when calling compiler generated SSE2 functions
from the runtime generated SSE2: saving the xmm registers, and notify gcc
the stack is not 16byte aligned.
It would be more efficient to keep the stack pointer 16byte aligned, but
too hairy, and not consistent in all x86 architectures.
This has been tested in linux x86 and windows x86 userspace. Not tested on
x86-64 because it is broken for other reasons (even without this change).
2008-09-30 01:12:52 +09:00
José Fonseca
906336cd7c
util: Header for SSE2 intrinsics portability.
2008-09-30 01:07:09 +09:00
Jouk Jansen
fc13269b82
mesa: asst updates for VMS
2008-09-29 08:35:05 -06:00
José Fonseca
6607f2cf19
rtasm: Implement immediate group 1 instructions. Fix SIB emition.
2008-09-29 19:09:39 +09:00
Shunichi Fuji
e095d5812a
mesa: drop calloc from _mesa_get_fixed_func_vertex_program
...
Signed-off-by: Shunichi Fuji <palglowr@gmail.com >
2008-09-29 10:38:45 +01:00
Ian Romanick
2b8d8989fb
Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
...
Added an x86-64 CPUID function and use it to detect 3Dnow! If 3Dnow!
is available, use _mesa_3dnow_transform_points4_3d_no_rot,
_mesa_3dnow_transform_points4_perspective,
_mesa_3dnow_transform_points4_2d_no_rot, and _mesa_3dnow_transform_points4_2d.
This fixes long standing bug #8724 .
2008-09-28 20:32:05 -07:00
Ian Romanick
b5d59222cc
Remove TNL-to-VP tracking from i965
...
The i965 driver previously had it's own set of code to convert
fixed-function TNL state to a vertex program. Core Mesa has code to
do this, so there is no reason to duplicate that effort in the driver.
In fact, this duplication leads to bugs when other aspects of the Mesa
infrastructure change.
2008-09-28 20:32:05 -07:00
Stephane Marchesin
7379d0ef8f
Gallivm: fix off-by-one.
2008-09-28 23:18:55 +02:00
Stephane Marchesin
6dacc942e1
Gallivm: need to link with libstdc++ for llvm.
2008-09-28 21:45:48 +02:00
Stephane Marchesin
a0a06cbc5b
Gallivm: more instructions.
2008-09-28 19:48:26 +02:00
Stephane Marchesin
ab74b8e354
Gallivm: make it compile again, add some opcodes.
2008-09-28 18:33:23 +02:00
Tobias Jakobi
2e5d717007
glapi: add DISPATCH_FUNCTION_SIZE
2008-09-27 08:51:45 +01:00
Tobias Jakobi
a23026effc
glapi: add gl_dispatch_functions_start and end
2008-09-27 08:47:55 +01:00
Brian Paul
8fd329d048
mesa: fix temp register allocation problems.
...
Complex texcombine modes were running out of registers (>32 registers for 8 tex units).
2008-09-26 20:51:13 -06:00
Brian Paul
7944efffff
egl: check for null ptr/name
2008-09-26 20:51:13 -06:00
Brian Paul
cce2ec2754
egl: remove space after -L flag
2008-09-26 20:51:13 -06:00
Brian Paul
fe1c9872ae
cell: checkpoint: more work in emit_function_call()
...
Simple function call works now, but we don't save/restore the caller's registers yet.
2008-09-26 17:59:19 -06:00
Brian Paul
55b65d3b42
cell: stub-out sin/cos function bodies to avoid trashing caller's stack for now
2008-09-26 17:57:01 -06:00
Brian Paul
938e12c1ca
gallium: SPU register comments
2008-09-26 17:06:22 -06:00
Eric Anholt
7d99ddcb2b
intel: Fix a number of memory leaks on context destroy.
2008-09-26 15:39:20 -07:00
Jeremy Huddleston
8338cc25f9
configs: darwin: Don't build GLw
...
(cherry picked from commit ef688ba1ee366a8937a41075cbe8b76a9bf75013)
2008-09-26 12:37:31 -07:00
Brian Paul
9d00cd3fc7
cell: move command processing code into new spu_command.c file
2008-09-26 10:15:36 -06:00
Brian Paul
bb01c1a78e
cell: move debug-related declarations
2008-09-26 10:15:36 -06:00
Brian Paul
f45d39fa34
cell: move debug macros into new spu_debug.h
2008-09-26 10:15:36 -06:00
Brian Paul
a1189ea882
cell: move really_clear_tiles()
2008-09-26 10:15:35 -06:00
Brian Paul
bac5900a14
cell: align instruction buffers to 8-byte, not 32-byte boundary
2008-09-26 10:15:35 -06:00
Brian Paul
b5303446a8
cell: asst clean-up, var renaming
2008-09-26 10:15:35 -06:00
Brian Paul
6741739d1e
cell: remove unneeded blend/depth_stencil subclasses
2008-09-26 10:15:35 -06:00
Brian Paul
164fb1299e
cell: checkpoint: support for function calls in SPU shaders
...
Will be used for instructions like SIN/COS/POW/TEX/etc. The PPU needs to
know the address of some functions in the SPU address space. Send that
info to the PPU/main memory rather than patch up shaders on the SPU side.
Not finished/tested yet...
2008-09-26 10:15:35 -06:00
Brian Paul
f5127909fb
cell: inst reorder to save a cycle
2008-09-26 10:15:35 -06:00
Alan Hourihane
632055f831
st: add prototype for st_get_framebuffer_dimensions()
2008-09-26 15:08:57 +01:00
Alan Hourihane
6d3e2e7e92
st: export st_get_framebuffer_dimensions() to retrieve
...
the width & height of the fb
2008-09-26 15:05:01 +01:00
Brian Paul
a4a5a37f27
mesa: remove invalid assertions that programs have parameters
...
Fixes failure with demos/fplight.c
2008-09-26 07:45:06 -06:00
Brian Paul
4bc39c58eb
mesa: fix assertion in _mesa_reference_program()
2008-09-26 07:40:45 -06:00
Brad King
ee80c64be8
mesa: fix param indexing
2008-09-26 07:40:05 -06:00
Brian Paul
c7510ddc3f
mesa: fix incorrect parameter order
2008-09-26 07:37:32 -06:00
Brian Paul
47bf268457
mesa: remove const qualifiers to match device driver interface function
2008-09-26 07:37:15 -06:00
Brian Paul
81234666fc
gallium: rename tgsi_translate_mesa_program() to st_translate_mesa_program()
2008-09-26 07:31:42 -06:00
Brian Paul
fad2dd8447
mesa: add some braces
2008-09-26 07:31:42 -06:00
Brian Paul
f51cca72d3
mesa: fix/simplify initialization of vertex/fragment program limits
...
Defaults for program length, num ALU instructions, num indirections, etc.
basically indicate no limit for software rendering. Driver should override
as needed.
2008-09-26 07:31:42 -06:00
Brian Paul
b5e1a93036
mesa: increase MAX_INSTRUCTIONS
2008-09-26 07:31:42 -06:00
Brian Paul
d01269a57f
mesa: fix swizzle failure, fix typo
2008-09-26 07:31:42 -06:00
Brian Paul
6c72bc8089
mesa: fix default buffer object access value
2008-09-26 07:31:42 -06:00
Brian Paul
13a8c18d3d
gallium: rename tgsi_translate_mesa_program() to st_translate_mesa_program()
2008-09-26 07:25:36 -06:00
Brian Paul
1ef90b3f9a
mesa: add some braces
2008-09-26 07:25:36 -06:00
Alan Hourihane
e9c722b660
st: change from ** to * for st_unreference_framebuffer()
2008-09-26 14:20:15 +01:00
Keith Whitwell
6f83c30dd0
mesa: fix indenting
2008-09-26 14:09:20 +01:00
Keith Whitwell
9ee04ce4e4
dri: remove unused files present only on gallium-0.2 branch
2008-09-26 14:09:20 +01:00
Keith Whitwell
fb8db63a89
Merge commit 'origin/master' into HEAD
...
Conflicts:
src/mesa/vbo/vbo.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_exec_draw.c
2008-09-26 14:09:04 +01:00
Alan Hourihane
bb6a69d169
egl: cleanup doublebuffer check
2008-09-26 12:27:29 +01:00
Alan Hourihane
cc6bdf49ca
egl: switch to egl_glx.so as the default EGL driver for X.
2008-09-26 12:18:59 +01:00
Alan Hourihane
192f45606a
egl: fudge with LIBGL_DRIVERS_PATH to pick up EGL specific DRI driver.
2008-09-26 12:18:16 +01:00
Alan Hourihane
8015f3ae3b
egl: Add new EGL driver that wraps GLX.
2008-09-26 11:20:21 +01:00
Alan Hourihane
d142f216d2
link EGL demos with -lGL
2008-09-26 11:20:20 +01:00
Brian
1e3a44fab0
mesa: fix cast/conversion for optional code
2008-09-25 19:57:34 -06:00
José Fonseca
9f3e37de17
util: Update fast_log2 article url.
2008-09-26 10:47:04 +09:00
Brian Paul
092748990f
mesa: fix/simplify initialization of vertex/fragment program limits
...
Defaults for program length, num ALU instructions, num indirections, etc.
basically indicate no limit for software rendering. Driver should override
as needed.
2008-09-25 19:22:29 -06:00
Brian Paul
b3c3bc63f0
mesa: fix typo (s/feadback/feedback/). Fixes broken selection/feedback.
2008-09-25 18:55:52 -06:00
Brian Paul
3f99f501db
mesa: increase MAX_INSTRUCTIONS
2008-09-25 18:40:16 -06:00
Brian Paul
006fb63818
mesa: fix swizzle failure, fix typo
2008-09-25 18:27:22 -06:00
Brian Paul
8124faf89d
mesa: fix float->int mapping for glGetIntegerv(GL_DEPTH_CLEAR_VALUE)
2008-09-25 11:54:00 -06:00
Brian Paul
1ca512c643
mesa: fix default buffer object access value
2008-09-25 11:46:27 -06:00
Brian Paul
6222eb3fcd
mesa: fix some VBO buffer object issues
...
The VBO module may use a real VBO or a malloc'd buffer for vertex storage.
Be careful not to accidentally replace the later with the former when drawing.
Check if using a real VBO at destroy time to prevent a double-free.
2008-09-25 11:03:46 -06:00
Sam Hocevar
507ef82077
mesa: fix function params to match prototypes
2008-09-25 09:58:27 -06:00
Sam Hocevar
7be5411ce6
mesa: prevent the slang code generator from aborting when faced with a sampler variable redeclaration.
2008-09-25 09:53:09 -06:00
Sam Hocevar
561787e697
i965: support for sin() and cos() in vertex shaders.
2008-09-25 09:49:36 -06:00
Sam Hocevar
831bfb9053
i965: more meaningful message for unsupported opcodes.
2008-09-25 09:49:18 -06:00
Eric Anholt
c5945c2d17
intel: Fix clears to depth_stencil texture attachments.
...
Broken by 0adfd10210 , showed up as an assertion
failure in a software fallback in the shadowtex demo when we failed to
recognize the texture format.
2008-09-24 15:13:19 -07:00
Alan Hourihane
4fe186f8dc
add cso_hash_contains() function
2008-09-24 20:43:56 +01:00
Brian
1fe385fdc9
set SamplerUnit[] entry in load_texture() just to be safe
...
(cherry picked from commit fce4612f8a )
2008-09-24 10:15:07 -07:00
Brian
dff0b0e772
use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating immediates/literals
...
(cherry picked from commit fdc8636bdc )
2008-09-24 10:13:46 -07:00
Brian
9b7e5a51f4
set program->SamplersUsed bit when using a texture instruction
2008-09-24 10:13:31 -07:00
Brian
93fef22d05
Remove ctx field from texenvprog_cache
2008-09-24 10:11:37 -07:00
Brian
fb3c41f504
include programopt.h
...
(cherry picked from commit 83fad68ec1 )
2008-09-24 10:04:31 -07:00
Brian
c81cce7831
Disable vertex shader fog, compute fog in fragment shader.
2008-09-24 10:04:17 -07:00
Brian
19d77d6cfa
temporarily set the FRAG_BIT_FOGC bit in InputsRead when fog is enabled
...
(cherry picked from commit 63be96bdc7 )
2008-09-24 10:03:27 -07:00
Keith Whitwell
8e7d941d7a
mesa: fix main/ prefix in include
2008-09-23 21:08:50 -07:00
Keith Whitwell
33fef8be82
vbo: unmap and remap immediate vbo before/after each draw.
...
Also use BufferData(NULL) to get fresh storage and avoid synchronous
operation where we would have to flush and wait for the fence after each
draw because of the map.
This will chew through a whole load of buffer space on small draws, so
it isn't a proper solution. Need to support a no-fence or append mapping
mode to do this right, or use user buffers.
2008-09-23 18:26:17 -07:00
Brian
6f765fbde4
added vbo_use_buffer_objects() to specify that immediate mode data should be put into bufferobjects
2008-09-23 18:26:00 -07:00
Keith Whitwell
b36bc54d3c
vbo: seed initial max_element value with a more likely candidate
...
(cherry picked from commit 026e7731e5 )
2008-09-23 18:05:48 -07:00
Keith Whitwell
2a7dc79273
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/shader/shader_api.c
2008-09-23 17:40:49 -07:00
Brian Paul
9acf207277
mesa: s/GL_POLYGON+1/PRIM_OUTSIDE_BEGIN_END/
...
(cherry picked from commit 8a369b909a )
2008-09-23 17:36:01 -07:00
Brian Paul
5b98236e75
mesa: glsl: fix glGetUniform for matrix queries
...
(cherry picked from commit 7a6eba54d0 )
2008-09-23 17:34:59 -07:00
Brian Paul
eda291e316
mesa: glsl: fix a number of glUniform issues
...
Additional error checking.
Allow setting elements of uniform arrays. This involves encoding both
a uniform location and a parameter offset in the value returned by
glGetUniformLocation().
Limit glUniform[if]v()'s count to the size of the uniform array.
When setting bool-valued uniforms, convert all float/int values to 0 or 1.
2008-09-23 17:33:49 -07:00
Brian Paul
bda6ad273d
mesa: glsl: fix error check in get_uniformfv()
...
(cherry picked from commit 18cd9c229a )
2008-09-23 17:33:19 -07:00
Keith Whitwell
62dd7575f0
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/main/drawpix.c
src/mesa/shader/prog_uniform.c
src/mesa/shader/slang/slang_link.c
2008-09-23 17:24:39 -07:00
Keith Whitwell
2cb3d2b7a0
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/glapi/glapi_getproc.c
src/mesa/main/image.c
src/mesa/shader/slang/slang_link.c
2008-09-23 17:23:14 -07:00
José Fonseca
452a592ca4
mesa: Apply MSVC portability fixes from Alan Hourihane.
2008-09-23 17:20:38 -07:00
Brian Paul
9118b02fd0
mesa: update program->NumAddressRegs field in _slang_update_inputs_outputs()
2008-09-23 17:11:25 -07:00
Brian Paul
c79779aff0
mesa: add fwd decl of fill_in_entrypoint_offset()
...
(cherry picked from commit b1eff0228b )
2008-09-23 17:09:24 -07:00
Brian Paul
ec76910187
mesa: new gl_fragment_program fields indicating use of fog, front-facing, point coord
...
(cherry picked from commit d7a7b0a10d )
2008-09-23 17:01:05 -07:00
Brian
03bafd1f9f
Added new _mesa_clip_copytexsubimage() function to do avoid clipping down in the drivers.
...
This should probably be pulled into main-line Mesa...
(cherry picked from commit 324ecadbfd )
2008-09-23 16:59:56 -07:00
Brian Paul
a97226352f
mesa: refactor: move GetProcAddress code from glapi.c into new glapi_getproc.c file
2008-09-23 16:56:23 -07:00
Keith Whitwell
9e7c0724bb
Merge commit 'origin/master' into gallium-0.2
2008-09-23 15:53:29 -07:00
Eric Anholt
d533da2db8
i965: Cope with batch getting flushed in the middle of batchbuffer emits.
...
This isn't required for GEM (at least, yet), but the check_aperture code
for non-GEM results in batch getting flushed during emit. brw_state_upload
restarts state emits, but a bunch of the state emit functions were assuming
that they would be called exactly once, after prepare and before new_batch.
Bug #17179 .
2008-09-23 15:53:29 -07:00
Keith Whitwell
a0bd3972b6
remove leftover merge conflict markers
2008-09-23 15:53:19 -07:00
Eric Anholt
4b038e24b0
intel: Add missing include files for meta drawpixels since mesa shuffling.
2008-09-23 15:32:41 -07:00
Eric Anholt
f85ea6837d
intel: Replace pbo-only drawpixels function with a generic Mesa metaops.
...
Improves performance of some oglconform regression tests 9x.
2008-09-23 13:31:19 -07:00
Eric Anholt
15487e46a2
i915: Fix overlapping CopyPixels with negative pixel zoom.
...
Fixes a failure in pixel-pos.c oglconform test.
2008-09-23 13:31:12 -07:00
Eric Anholt
b9532f078a
i915: fix crash in flush_prim -> wait_flips -> flush_batch -> flush_prim.
2008-09-23 13:30:03 -07:00
Robert Ellison
1c79cf15c4
CELL: fix colormask code generation
...
The colormask code generation had assumed that its input packed pixels were
in RGBA format. In fact, the format they're in is dependent on the
pipe color format.
Now the color format is passed in to gen_colormask(), and proper
color format-dependent SPU code is generated.
2008-09-23 10:11:59 -06:00
Robert Ellison
6901d6ef24
CELL: improve legibility of CELL_DEBUG environment variable output
2008-09-23 10:09:36 -06:00
Ian Romanick
2511d57fa4
i965: Adapt to new TNL program tracking semantics
...
This fixes bugzilla #17718 .
2008-09-22 17:23:40 -07:00
Jonathan White
6642380841
cell: Fixed bug with absolute, negate, set-negative logic in source fetch for TGSI instructions. The logic should operate on the origin channel not the swizzled channel.
...
Please enter the commit message for your changes.
2008-09-22 14:33:53 -06:00
Jonathan White
6b3ec9ec2b
cell: Added TRUNC, SWZ (extended) and XPD instructions, verified against softpipe. Optimized FLR and FRC. Fixed writeback logic for DP3, DP4 and DPH.
2008-09-22 13:13:50 -06:00
Jonathan White
56c476395f
cell: Added DPH instruction and verified against softpipe.
2008-09-22 10:54:50 -06:00
Michel Dänzer
bb60fb77c7
r300: Adapt to the removal of _tnl_ProgramCacheInit() and friends.
2008-09-22 10:47:06 -06:00
Michel Dänzer
5106f1b9ac
Remove incorrect test from mmAllocMem.
...
0 is a perfectly valid alignment shift, see e.g. driTexturesGone() which was
broken by this.
2008-09-22 10:47:06 -06:00
Jakob Bornecrantz
c9122c0c03
mesa: Remove left over merge conflicts
2008-09-22 12:47:57 +02:00
Michel Dänzer
ed4c6cbe01
r300: Adapt to the removal of _tnl_ProgramCacheInit() and friends.
2008-09-22 11:49:34 +02:00
Michel Dänzer
78f4a695ad
Remove incorrect test from mmAllocMem.
...
0 is a perfectly valid alignment shift, see e.g. driTexturesGone() which was
broken by this.
2008-09-22 11:48:26 +02:00
Keith Whitwell
dace236c5f
Merge branch 'master' into gallium-0.2
...
Conflicts:
src/mesa/glapi/glapi.h
src/mesa/main/api_exec.c
src/mesa/main/attrib.c
src/mesa/main/clear.c
src/mesa/main/context.c
src/mesa/main/mfeatures.h
src/mesa/main/mipmap.c
src/mesa/main/mipmap.h
src/mesa/main/readpix.c
src/mesa/main/sources
src/mesa/main/state.c
src/mesa/main/texformat.c
src/mesa/main/texparam.c
src/mesa/main/texstate.c
src/mesa/vbo/vbo_context.c
src/mesa/x86/common_x86_asm.S
2008-09-21 22:30:55 -07:00
Brian Paul
6fd15dd806
mesa: allow for extra per-context init
...
(cherry picked from commit 815cdcfbc0 )
2008-09-21 22:13:57 -07:00
Brian Paul
1b7e909845
mesa: texture crop rect state
...
(cherry picked from commit c01fbc7866 )
2008-09-21 22:13:57 -07:00
Brian Paul
93c90d34d1
mesa: set point state
...
(cherry picked from commit af3d9dba56 )
2008-09-21 22:13:57 -07:00
Brian Paul
868c09a267
mesa: fix some feature tests
...
(cherry picked from commit 74b14fe6dd )
2008-09-21 22:13:57 -07:00
Brian Paul
8122ab2dfd
mesa: fix some pixel transfer state tests for depth formats
...
(cherry picked from commit 966e199e40 )
2008-09-21 22:13:57 -07:00
Brian Paul
6bc8749cd5
mesa: fix issues causing warnings on Windows
2008-09-21 22:13:57 -07:00
Michal Krol
9614eac85d
mesa: Silence compiler warnings on Windows.
2008-09-21 22:13:57 -07:00
Brian Paul
ce1685ce94
mesa: comments about vectors vs components
2008-09-21 22:13:57 -07:00
Brian Paul
eb10fa3ed6
mesa: remove debug code
2008-09-21 22:13:57 -07:00
Brian Paul
6246dd890f
mesa: implement glGetUniformiv() with new ctx->Driver function
...
The old implementation could overwrite the caller's param buffer.
2008-09-21 22:13:56 -07:00
Brian Paul
48cba703fa
mesa: added case for fixed pt
2008-09-21 22:13:56 -07:00
Brian Paul
1cf2c8a043
mesa: point size arrays
2008-09-21 22:13:56 -07:00
José Fonseca
f8e50dd796
mesa: Replace deprecated __MSC__ macro.
2008-09-21 22:13:56 -07:00
José Fonseca
60325331a8
mesa: More signed/unsigned float/integer fixes.
2008-09-21 22:13:56 -07:00
José Fonseca
457d7218b8
mesa: Use appropriate unsigned/signed, float/integer types.
2008-09-21 22:13:56 -07:00
José Fonseca
88f729e4ec
mesa: Use _mesa_bsearch.
2008-09-21 22:13:56 -07:00
José Fonseca
baa76e9aa2
mesa: bsearch implementation for WinCE.
2008-09-21 22:13:56 -07:00
José Fonseca
2e8af5ffcf
mesa: ASSERT macro is already defined by WinCE headers.
...
Even when just the standard headers are used....
2008-09-21 22:13:56 -07:00
Brian Paul
c115616bda
mesa: init ctx->RenderMode
2008-09-21 22:13:56 -07:00
Brian Paul
d17485fef9
mesa: GL_BYTE vertex/texcoord arrays
2008-09-21 22:13:55 -07:00
Brian Paul
394c1d1c53
mesa: initial support for fixed-pt vertex arrays
2008-09-21 22:13:55 -07:00
Brian Paul
bb00f09f1b
mesa: refactor: move initialization of DefaultPacking state.
2008-09-21 22:13:55 -07:00
Brian Paul
9b8b58b79a
mesa: fix errors in prev commit
2008-09-21 22:13:55 -07:00
Brian Paul
3a4bed8f08
mesa: revamp glBlendFunc loopback
2008-09-21 22:13:55 -07:00
Brian Paul
85f553d3c1
mesa: fix some FEATURE_x tests
2008-09-21 22:13:55 -07:00
Brian Paul
b51d73dd94
mesa: test for FEATURE_ATI_fragment_shader
2008-09-21 22:13:55 -07:00
Brian Paul
715715e230
mesa: fix ReadBuffer initialization
2008-09-21 22:13:55 -07:00
Brian Paul
cd4d4f590f
mesa: FEATURE_dispatch to control dispatch table usage
2008-09-21 22:13:55 -07:00
Brian Paul
2dbc515a66
mesa: move some glapi bits around
...
Move _glapi_proc typedef from glapitable.h to glapi.h
Also, don't include glapitable.h from glapi.h
Before we were including the huge glapitable.h file in every .c file.
2008-09-21 22:13:55 -07:00
Brian Paul
d22ef6bcba
mesa: remove some temp debug code
2008-09-21 22:13:54 -07:00
Brian Paul
4e3ae76fea
mesa: check FEATURE_ARB_occlusion_query
2008-09-21 22:13:54 -07:00
Brian Paul
049a59a87c
mesa: fix typo: s/stacks/stack/
2008-09-21 22:13:54 -07:00
Brian
74c64fa748
code refactoring, new next_mipmap_level_size() function
...
(cherry picked from commit c22d9152e3 )
2008-09-21 22:13:54 -07:00
Brian
e93243f8b7
added _mesa_tex_target_to_face()
...
(cherry picked from commit b52ce6341f )
2008-09-21 22:13:54 -07:00
Brian
abb465cdc7
refactor code, export _mesa_generate_mipmap_level()
2008-09-21 22:13:54 -07:00
Brian
12dc9c99b9
move _mesa_format_to_type_and_comps() to texformat.c
...
(cherry picked from commit 42eac65da4 )
2008-09-21 22:13:54 -07:00
Keith Whitwell
b082002379
mesa: pull in mipmap.c changes from gallium-0.2
2008-09-21 22:13:54 -07:00
Brian Paul
facfb44d37
mesa: remove unneeded #include
...
(cherry picked from commit 6363960db5 )
2008-09-21 22:13:54 -07:00
Brian Paul
ddd630ef90
mesa: refactor: move various ENUM_TO_x macros into macros.h
2008-09-21 22:13:53 -07:00
Brian Paul
ae1fdc1523
mesa: refactor: move glTexParameter-related functions into new texparam.c file
2008-09-21 22:13:53 -07:00
Brian Paul
11ebfd22bb
mesa: refactor: move glTexEnv-related functions into new texenv.c file
...
(cherry picked from commit 7ecac78ab5 )
2008-09-21 22:13:52 -07:00
Brian Paul
10db6c2d81
mesa: refactor: move glTexGen-related functions into new texgen.c file
...
(cherry picked from commit 27049189d6 )
2008-09-21 22:13:52 -07:00
Brian Paul
4fc71f3ec2
mesa: refactor: fix some FEATURE_ typos, mistakes
...
(cherry picked from commit e4cfe0854a )
2008-09-21 22:13:52 -07:00
Keith Whitwell
34a61c66fd
mesa: refactor: move #define FEATURE flags into new mfeatures.h file
...
Also, check the FEATURE flags in many places.
(cherry picked from commit 40d1a40f29 )
Conflicts:
src/mesa/main/config.h
src/mesa/main/context.c
src/mesa/main/texobj.c
src/mesa/main/texstate.c
src/mesa/main/texstore.c
2008-09-21 22:13:52 -07:00
Brian Paul
24172fe595
mesa: refactor: move _mesa_update_minmax/histogram() into image.c
...
(cherry picked from commit eded7f010d )
2008-09-21 22:13:52 -07:00
Brian Paul
c132e2b1db
mesa: refactor: move multisample-related functions into new multisample.c file
2008-09-21 22:13:52 -07:00
Brian Paul
e48defc980
mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to framebuffer.c
...
(cherry picked from commit 9091015a97 )
2008-09-21 22:13:51 -07:00
Brian Paul
5ab1d0acea
mesa: refactor: move glClear, glClearColor into new clear.c file.
2008-09-21 22:13:51 -07:00
Brian Paul
55e341c4c2
mesa: refactor: move scissor functions into new scissor.c file
...
(cherry picked from commit 4be7296bfc )
2008-09-21 22:13:51 -07:00
Brian Paul
18d2822905
mesa: refactor: move pixel map/scale/bias code into image.c
...
pixel.c is just the API-related code now.
2008-09-21 22:13:51 -07:00
Brian Paul
533c1dbe75
mesa: refactor: new _mesa_init_pixelstore() function
...
(cherry picked from commit 5f91007f99 )
2008-09-21 22:13:51 -07:00
Brian Paul
c9e5671691
mesa: refactor: move _mesa_init_exec_table() into new api_exec.c file
...
(cherry picked from commit b36e6f0baf )
2008-09-21 22:13:51 -07:00
Brian Paul
28876dd511
mesa: refactor: move glReadPixels code into new readpix.c file
2008-09-21 22:13:51 -07:00
Brian
87534210bb
Add some FLUSH_CURRENT() calls.
...
Without these we can find ourselves in _mesa_load_state_parameters()
computing derived lighting/material values whhen the current material
properties haven't been updated from the VBO.
This may be a somewhat wide-spread problem that needs more attention...
(cherry picked from commit 49adf51eee )
2008-09-21 22:13:51 -07:00
Brian Paul
411d6672a6
mesa: refactor: move glPixelStore function into new pixelstore.c file
2008-09-21 22:13:51 -07:00
Brian Paul
9228f1c881
mesa: remove EXT/NV suffixes from _mesa_PointParameter functions
2008-09-21 22:13:50 -07:00
José Fonseca
d1e1a76f62
glut: Remove EOF characters.
2008-09-22 12:09:58 +09:00
Benjamin Close
7c1fda71ac
i965: fix compilation
...
Found By: Tinderbox
2008-09-22 12:04:16 +09:30
Zack Rusin
e61793a7c0
gallium: cleanup the after merge framebuffer update code
...
adjust it and make it behave like it used to
2008-09-21 19:19:03 -04:00
Zack Rusin
90f1677fe6
gallium: fix a fbo crash
...
don't dirty the fb if we're rebining the frontbuffer
2008-09-21 19:19:03 -04:00
Chris Rankin
a7573d805e
Fix X86 compilation.
2008-09-21 23:56:17 +02:00
Keith Whitwell
3a40dee3eb
Merge commit 'origin/gallium-0.1' into gallium-0.2
2008-09-21 12:22:21 -07:00
Keith Whitwell
53dd838de6
swrast: remove merge droppings
2008-09-21 12:09:12 -07:00
Keith Whitwell
00929157de
swrast: remove dead file not present in master
2008-09-21 12:00:37 -07:00
Keith Whitwell
34d4ef7cc0
drivers/x11: remove early gallium support
...
We originally piggy-backed gallium development in the X11/swrast driver,
but the necessary code has since been moved to its own location in
gallium/winsys/xlib.
Remove the old code from here as we don't want it propogated back to master
in any future merge.
2008-09-21 11:56:45 -07:00
Keith Whitwell
a70312a154
state_tracker: remove dead file
2008-09-21 11:50:46 -07:00
Keith Whitwell
19af2db064
gallium: remove files not in master
...
Remove git droppings we've accumulated somehow.
2008-09-21 11:49:05 -07:00
Keith Whitwell
a779f3b587
gallium: remove remnants of an nouveau driver
...
This isn't present on master, so probably shouldn't be here either.
2008-09-21 11:49:05 -07:00
Keith Whitwell
f9958a1ac6
swrast: remove merge droppings
2008-09-21 11:46:36 -07:00
Keith Whitwell
dd90d304f2
Merge branch 'master' into gallium-0.2
2008-09-21 11:01:22 -07:00
Keith Whitwell
45efcc44c7
Remove CVS keywords.
...
Cherry-picked from gallium-0.1
Conflicts:
src/glu/sgi/libnurbs/interface/bezierEval.h
src/glu/sgi/libnurbs/interface/bezierPatch.h
src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
src/glu/sgi/libnurbs/internals/dataTransform.h
src/glu/sgi/libnurbs/internals/displaymode.h
src/glu/sgi/libnurbs/internals/sorter.h
src/glu/sgi/libnurbs/nurbtess/definitions.h
src/glu/sgi/libnurbs/nurbtess/directedLine.h
src/glu/sgi/libnurbs/nurbtess/gridWrap.h
src/glu/sgi/libnurbs/nurbtess/monoChain.h
src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
src/glu/sgi/libnurbs/nurbtess/partitionX.h
src/glu/sgi/libnurbs/nurbtess/partitionY.h
src/glu/sgi/libnurbs/nurbtess/polyDBG.h
src/glu/sgi/libnurbs/nurbtess/polyUtil.h
src/glu/sgi/libnurbs/nurbtess/primitiveStream.h
src/glu/sgi/libnurbs/nurbtess/quicksort.h
src/glu/sgi/libnurbs/nurbtess/rectBlock.h
src/glu/sgi/libnurbs/nurbtess/sampleComp.h
src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h
src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
src/glu/sgi/libnurbs/nurbtess/sampledLine.h
src/glu/sgi/libnurbs/nurbtess/searchTree.h
src/glu/sgi/libnurbs/nurbtess/zlassert.h
src/glu/sgi/libutil/error.c
src/glu/sgi/libutil/glue.c
src/glu/sgi/libutil/gluint.h
src/glu/sgi/libutil/project.c
src/glu/sgi/libutil/registry.c
src/glx/x11/glxclient.h
src/glx/x11/glxext.c
src/mesa/drivers/dri/ffb/ffb_dd.h
src/mesa/drivers/dri/ffb/ffb_points.h
src/mesa/drivers/dri/gamma/gamma_context.h
src/mesa/drivers/dri/gamma/gamma_macros.h
src/mesa/drivers/dri/i810/i810context.h
src/mesa/drivers/dri/r128/r128_dd.h
src/mesa/drivers/dri/tdfx/tdfx_dd.h
2008-09-21 11:00:44 -07:00
Keith Whitwell
7513bc3886
Merge branch 'master' into gallium-0.2
2008-09-21 10:49:38 -07:00
José Fonseca
64dc397d8b
mesa: Prefix main includes with dir to avoid conflicts.
...
Eliminate a couple of differences with gallium-0.2
2008-09-21 10:48:40 -07:00
Keith Whitwell
f25a90ed22
Merge branch 'master' into gallium-0.2
2008-09-21 10:34:25 -07:00
Keith Whitwell
2ea3ef9a80
mesa: remove dead file
2008-09-21 10:34:04 -07:00
Keith Whitwell
c07e274f44
mesa: add explict float casts
2008-09-21 10:31:15 -07:00
Keith Whitwell
9644fa6c48
Merge branch 'master' into gallium-0.2
...
Conflicts:
include/GLES/egl.h
include/GLES/egltypes.h
src/egl/main/eglconfig.c
src/egl/main/eglconfig.h
src/glu/sgi/libnurbs/interface/bezierEval.h
src/glu/sgi/libnurbs/interface/bezierPatch.h
src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
src/glu/sgi/libnurbs/internals/dataTransform.h
src/glu/sgi/libnurbs/internals/displaymode.h
src/glu/sgi/libnurbs/internals/sorter.h
src/glu/sgi/libnurbs/nurbtess/definitions.h
src/glu/sgi/libnurbs/nurbtess/directedLine.h
src/glu/sgi/libnurbs/nurbtess/gridWrap.h
src/glu/sgi/libnurbs/nurbtess/monoChain.h
src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
src/glu/sgi/libnurbs/nurbtess/partitionX.h
src/glu/sgi/libnurbs/nurbtess/partitionY.h
src/glu/sgi/libnurbs/nurbtess/polyDBG.h
src/glu/sgi/libnurbs/nurbtess/polyUtil.h
src/glu/sgi/libnurbs/nurbtess/primitiveStream.h
src/glu/sgi/libnurbs/nurbtess/quicksort.h
src/glu/sgi/libnurbs/nurbtess/rectBlock.h
src/glu/sgi/libnurbs/nurbtess/sampleComp.h
src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h
src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
src/glu/sgi/libnurbs/nurbtess/sampledLine.h
src/glu/sgi/libnurbs/nurbtess/searchTree.h
src/glu/sgi/libnurbs/nurbtess/zlassert.h
src/glu/sgi/libutil/error.c
src/glu/sgi/libutil/glue.c
src/glu/sgi/libutil/gluint.h
src/glu/sgi/libutil/project.c
src/glu/sgi/libutil/registry.c
src/glx/x11/Makefile
src/glx/x11/glxclient.h
src/glx/x11/glxext.c
src/mesa/drivers/dri/ffb/ffb_dd.h
src/mesa/drivers/dri/ffb/ffb_points.h
src/mesa/drivers/dri/gamma/gamma_context.h
src/mesa/drivers/dri/gamma/gamma_macros.h
src/mesa/drivers/dri/i810/i810context.h
src/mesa/drivers/dri/r128/r128_dd.h
src/mesa/drivers/dri/r128/r128_tex.h
src/mesa/drivers/dri/tdfx/tdfx_dd.h
src/mesa/drivers/x11/xm_buffer.c
src/mesa/glapi/glapi.c
src/mesa/main/dispatch.c
src/mesa/main/state.c
src/mesa/main/texstate.c
src/mesa/shader/arbprogparse.c
src/mesa/shader/arbprogram.c
src/mesa/shader/nvfragparse.c
src/mesa/shader/nvprogram.c
src/mesa/shader/shader_api.c
src/mesa/sources
src/mesa/swrast/s_aaline.c
src/mesa/swrast/s_aaline.h
src/mesa/swrast/s_aatriangle.h
src/mesa/swrast/s_accum.c
src/mesa/swrast/s_alpha.h
src/mesa/swrast/s_bitmap.c
src/mesa/swrast/s_blend.h
src/mesa/swrast/s_context.c
src/mesa/swrast/s_copypix.c
src/mesa/swrast/s_depth.c
src/mesa/swrast/s_depth.h
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_drawpix.h
src/mesa/swrast/s_feedback.c
src/mesa/swrast/s_feedback.h
src/mesa/swrast/s_fog.h
src/mesa/swrast/s_lines.h
src/mesa/swrast/s_logic.h
src/mesa/swrast/s_masking.h
src/mesa/swrast/s_points.c
src/mesa/swrast/s_points.h
src/mesa/swrast/s_readpix.c
src/mesa/swrast/s_span.c
src/mesa/swrast/s_span.h
src/mesa/swrast/s_stencil.h
src/mesa/swrast/s_texcombine.c
src/mesa/swrast/s_texcombine.h
src/mesa/swrast/s_texfilter.c
src/mesa/swrast/s_texfilter.h
src/mesa/swrast/s_texstore.c
src/mesa/swrast/s_triangle.c
src/mesa/swrast/s_triangle.h
src/mesa/swrast/s_zoom.h
src/mesa/swrast_setup/ss_context.c
src/mesa/swrast_setup/ss_triangle.h
src/mesa/tnl/t_draw.c
src/mesa/tnl/t_vb_light.c
src/mesa/tnl/t_vertex_generic.c
src/mesa/tnl/t_vertex_sse.c
src/mesa/tnl/t_vp_build.h
src/mesa/tnl/tnl.h
src/mesa/x86/common_x86.c
2008-09-21 10:28:06 -07:00
Keith Whitwell
32ef6e7583
mesa: move fixed function vertex program builder from tnl to core mesa
...
Also unify caching of fragment and vertex programs in shader/prog_cache.c`
Brought across from gallium-0.2
2008-09-21 09:46:00 -07:00
Brian Paul
e019ead5d7
mesa: add parenthesis
...
(cherry picked from commit c366fd83b6 )
2008-09-21 09:45:41 -07:00
Keith Whitwell
5a46e17671
mesa: standardize on C99's uint*_t instead of u_int*_t
2008-09-21 09:45:00 -07:00
José Fonseca
3474e9de92
mesa: Remove assyntax.h include from generated matypes.h.
...
matypes.h doesn't really depend on assyntax.h; assyntax.h is only present
on x86; and this way we remove the need of grep being available (which is
relevant for scons and non-unix platforms).
(cherry picked from commit fc286ff3ba )
2008-09-21 09:44:37 -07:00
Keith Whitwell
6b146214dc
mesa: move rastpos helper to tnl
2008-09-21 09:44:30 -07:00
Keith Whitwell
7ce597508e
mesa: improved driver query interface
...
Brought over from gallium-0.2 branch.
2008-09-21 09:44:25 -07:00
Patrice Mandin
da85a94d99
nouveau: init scaled_image_from_memory object for swizzled surface upload
2008-09-21 14:12:04 +02:00
Patrice Mandin
70071484d9
nouveau: add flag for swizzled surface upload
2008-09-21 14:02:30 +02:00
Brian Paul
99cdfc997b
cell: use different opcodes for spe_move() depending on even/odd address
2008-09-19 17:56:45 -06:00
Brian Paul
aca74a4d92
cell: make sure the fragment ops and fragment shader code buffer is at a 32-byte boundary
...
To make sure even/odd instructions hit the right pipes.
2008-09-19 17:56:45 -06:00
Brian Paul
bef3444f41
gallium: added ALIGN32_ATTRIB
2008-09-19 17:56:45 -06:00
Brian Paul
7af5f944e5
gallium: added spe_code_size()
2008-09-19 17:56:45 -06:00
Adam Jackson
dc8058c337
Update to SGI FreeB 2.0.
...
Under the terms of version 1.1, "once Covered Code has been published
under a particular version of the License, Recipient may, for the
duration of the License, continue to use it under the terms of that
version, or choose to use such Covered Code under the terms of any
subsequent version published by SGI."
FreeB 2.0 license refers to "dates of first publication". They are here
taken to be 1991-2000, as noted in the original license text:
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
Official FreeB 2.0 text:
http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf
As always, this code has not been tested for conformance with the OpenGL
specification. OpenGL conformance testing is available from
http://khronos.org/ and is required for use of the OpenGL logo in
product advertising and promotion.
2008-09-19 17:16:53 -04:00
Jonathan White
33bef5866c
cell: Added FRC instruction
2008-09-19 15:10:25 -06:00
Jonathan White
1031638c2d
cell: Added FLR instruction. Verified the following instructions match softpipe: MOV, ADD, MUL, SGE, SUB, MAD, ABS, SLT, MIN, MAX, LRP, DP3, DP4, CMP, FLR
2008-09-19 14:18:39 -06:00
Jonathan White
e9c05c5b82
cell: Fixed bugs with DP3 and DP4, they match softpipe results now.
2008-09-19 13:00:28 -06:00
Brian Paul
7abf2358d7
cell: flesh out support for other Z/stencil format
...
Also: improve float/int Z conversion.
Use clgt instead of cgt in depth test since we're comparing unsigned values.
2008-09-19 12:52:41 -06:00
Michal Krol
8701e5f702
mesa: Fix compiler error.
2008-09-19 19:11:37 +02:00
Brian Paul
0500ae574f
cell: issue warning to stderr when using fallback fragment ops
2008-09-19 10:50:46 -06:00
Brian Paul
3c6bb15b7a
cell: fix a comment
2008-09-19 10:43:04 -06:00
Brian Paul
de0a6dc04a
cell: the test for CELL_DEBUG_FRAGMENT_OP_FALLBACK in cmd_state_fragment_ops() was inverted
2008-09-19 10:42:21 -06:00
Brian Paul
44d5e607c7
cell: disable XShmPutImage for tiled surface for now
...
Multiple displays of same surface data causes pixels to get scrambled.
2008-09-19 10:41:03 -06:00
Brian Paul
0838b70275
cell: change spe_complement() to take a src and dst reg, like other instructions
2008-09-19 09:36:29 -06:00
José Fonseca
d310c52c7f
Merge branch 'gallium-0.2' of ssh+git://git.freedesktop.org/git/mesa/mesa into gallium-0.2
2008-09-19 23:49:33 +09:00
José Fonseca
dda5c0c611
util: Use OpenGL rasterization rules in blits and mipmap generation.
2008-09-19 23:25:29 +09:00
Alan Hourihane
13e7e4b634
mesa: add missing FEATURE_attrib_stack around
...
call to _mesa_free_attrib_data()
2008-09-19 14:55:49 +01:00
Jakob Bornecrantz
89f47d1645
i915simple: Use defined MSAA array
2008-09-19 15:29:08 +02:00
Alan Hourihane
256592807c
bug fix to MSAA visuals
2008-09-19 14:19:38 +01:00
Alan Hourihane
d3172cddbf
fix for MSAA
2008-09-19 14:13:57 +01:00
Alan Hourihane
f7d80aa006
re-add MSAA support
2008-09-19 13:58:45 +01:00
Jakob Bornecrantz
82623bf2e5
i915simple: Front flushing does work
2008-09-19 14:46:24 +02:00
Jakob Bornecrantz
c6dc1bf6e0
i915simple: Fix extentions being loaded
2008-09-19 14:16:37 +02:00
Brian Paul
0576e837f1
mesa: Fix arb parse constants
2008-09-19 13:04:52 +02:00
Jakob Bornecrantz
866a2c3ccb
mesa: Update ignores a bit
2008-09-19 12:43:47 +02:00
Robert Ellison
a57fbe53dc
CELL: add codegen for logic op, color mask
...
- rtasm_ppc_spe.c, rtasm_ppc_spe.h: added a new macro function
"spe_load_uint" for loading and splatting unsigned integers
in a register; it will use "ila" for values 18 bits or less,
"ilh" for word values that are symmetric across halfwords,
"ilhu" for values that have zeroes in their bottom halfwords,
or "ilhu" followed by "iohl" for general 32-bit values.
Of the 15 color masks of interest, 4 are 18 bits or less,
2 are symmetric across halfwords, 3 are zero in the bottom
halfword, and 6 require two instructions to load.
- cell_gen_fragment.c: added full codegen for logic op and
color mask.
2008-09-19 01:55:00 -06:00
Brian
19d9c81b8c
glx: re-add glapi/ path
2008-09-18 21:22:08 -06:00
Brian
cfc4b4c989
mesa: remove unneeded s_drawpix.h header
2008-09-18 20:31:05 -06:00
Brian
4eb95ce807
glx: added "glapi/" prefix to include
2008-09-18 20:27:16 -06:00
José Fonseca
984a7c4e9c
gallium: Fix doxygen comments.
2008-09-19 10:40:42 +09:00
José Fonseca
5f88d871ea
softpipe: Obey const qualifier.
2008-09-19 10:21:52 +09:00
Chris Rankin
8d41e4536d
mesa: fix asst path/include mistakes in prev commits
2008-09-18 16:48:11 -06:00
Robert Ellison
4485ac87c2
CELL: mark several transient files as .gitignore
...
progs/demos: added new demo "fbo_firecube"
progs/glsl: added new demo "pointcoord"
src/gallium/drivers/cell/spu: added the g3d_spu executable, a Cell SPU
executable file, which seems to be occasionally built as part of the
cell driver
src/glu/sgi: added "exptmp", a byproduct of the "mklib" process that
sometimes gets deleted and sometimes not.
2008-09-18 16:36:37 -06:00
Brian Paul
a9004cc79c
destroy window on exit
2008-09-18 15:37:13 -06:00
Brian Paul
8d249ca620
gallium: if we run out of memory in st_TexImage, flush and try again.
...
If the driver buffers a scene flushing should release old textures and
make space for new ones. Fixes problem with texdown.c test.
2008-09-18 15:37:13 -06:00
Brian Paul
58dce864e6
mesa: fix null ptr deref bug in _tnl_InvalidateState(), bug 15834
2008-09-18 15:29:57 -06:00
Brian Paul
ecadb51bbc
mesa: added "main/" prefix to includes, remove some -I paths from Makefile.template
2008-09-18 15:17:05 -06:00
Jonathan White
698bffb884
cell: Added CMP instruction
2008-09-18 14:49:34 -06:00
Brian Paul
374e7fd6cc
mesa: prefix more #includes with "main/"
2008-09-18 13:46:47 -06:00
Brian Paul
06370a91b3
mesa: remove a bunch of -I paths from INCLUDE_DIRS
2008-09-18 13:34:57 -06:00
Brian Paul
a25e1aa0aa
glx: remove #include "glheader.h" lines
...
Was only used to get the PUBLIC/USED macros.
Also, replace "GL_FALSE" with "False" in a couple places.
2008-09-18 13:26:30 -06:00
Brian Paul
3537da87de
glx: remove depency on glheader.h and GLboolean type in XF86DRI code
...
Return Bool instead of GLboolean to match other functions.
Define PUBLIC/USED macros locally.
2008-09-18 13:23:06 -06:00
Brian Paul
bbd287103d
mesa: prefix a bunch of #include lines with "main/".
...
This is another step toward removing a whole bunch of -I flags from
the cc commands. Still need to address driver code...
2008-09-18 12:26:54 -06:00
Keith Whitwell
a8d1521f30
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
src/mesa/shader/slang/slang_link.c
2008-09-18 19:07:33 +01:00
Keith Whitwell
89ab66448e
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
progs/trivial/Makefile
src/mesa/glapi/glthread.c
2008-09-18 19:03:02 +01:00
Keith Whitwell
1074e8e4e4
mesa: bring sources into line with sources.mak, but omit gallium code
2008-09-18 18:52:14 +01:00
George Sapountzis
841205e365
dri/swrast: fix swapBuffers after dri2
2008-09-18 18:52:14 +01:00
Xiang, Haihao
3bb8646829
i965: Add support for G41 chipset which is another 4 series.
2008-09-18 18:52:13 +01:00
Jonathan White
15fceac040
cell: Fix bug with complement logic for SGE and SLE
2008-09-18 11:11:49 -06:00
Jonathan White
3d2449247a
cell: Added SGE and SLE instructions to dispatch function
2008-09-18 10:37:45 -06:00
Jonathan White
c868a1c32d
cell: Added SGE and SLE instructions
2008-09-18 10:36:16 -06:00
Jakob Bornecrantz
0b8e19ffc5
tgsi: Build tgsi_text with make
2008-09-18 16:29:11 +02:00
José Fonseca
eb5c288df4
util: A few more memory debugging checks.
2008-09-18 23:23:02 +09:00
José Fonseca
451888ee8f
util: Add missing p_debug.h include.
2008-09-18 23:23:02 +09:00
Brian Paul
f68d2a0feb
gallium: fix surface object memory leak in cso module
2008-09-18 08:10:58 -06:00
Jakob Bornecrantz
5e1ef85dc4
tgsi: Make tgsi dumps look more like mesa shader dumps.
2008-09-18 14:48:45 +02:00
Jakob Bornecrantz
fa7529335c
progs/fp: Add a bit of local variable testing to fp-tri
2008-09-18 14:14:56 +02:00
Robert Ellison
f8bba34d4e
CELL: finish fragment ops blending (except for unusual D3D modes)
...
- Added new "macro" functions spe_float_min() and spe_float_max()
to rtasm_ppc_spe.{ch}. These emit instructions that cause
the minimum or maximum of each element in a vector of floats
to be saved in the destination register.
- Major changes to cell_gen_fragment.c to implement all the blending
modes (except for the mysterious D3D-based PIPE_BLENDFACTOR_SRC1_COLOR,
PIPE_BLENDFACTOR_SRC1_ALPHA, PIPE_BLENDFACTOR_INV_SRC1_COLOR, and
PIPE_BLENDFACTOR_INV_SRC1_ALPHA).
- Some revamping of code in cell_gen_fragment.c: use the new spe_float_min()
and spe_float_max() functions (instead of expanding these calculations
inline via macros); create and use an inline utility function for handling
"optional" register allocation (for the {1,1,1,1} vector, and the
blend color vectors) instead of expanding with macros; use the Float
Multiply and Subtract (fnms) instruction to simplify and optimize many
blending calculations.
2008-09-18 01:29:41 -06:00
Ben Skeggs
ed0c308f39
nv50: use 3D engine clears, 2D engine doesn't understand zeta formats
2008-09-18 13:39:52 +10:00
José Fonseca
1672e8e059
pipebuffer: New callback to flush all temporary-held buffers.
...
Used mostly to aid debugging memory issues or to clean up resources when
the drivers are long lived.
2008-09-18 12:26:19 +09:00
Ben Skeggs
562b31195c
nv50: hack surface alloc a bit for now
2008-09-18 13:15:55 +10:00
Ben Skeggs
b1d8b6c4d9
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-09-18 13:14:36 +10:00
Younes Manton
6fca18696d
g3dvl: Update XvMC unit tests.
2008-09-17 22:00:37 -04:00
Brian Paul
a06d38a74e
gallium: fix wide point / point coord semantic info (generic, not fog)
2008-09-17 16:51:53 -06:00
Brian Paul
4ee8d1ad67
gallium: fix fog vs. pointcoord attribute handling in mesa->TGSI conversion
2008-09-17 16:49:26 -06:00
Brian Paul
d7a7b0a10d
mesa: new gl_fragment_program fields indicating use of fog, front-facing, point coord
2008-09-17 16:48:13 -06:00
Brian Paul
3b3d34d637
egl: print multisample info
2008-09-17 15:29:59 -06:00
Brian Paul
1a820f52f6
gallium: clean-up/fix msaa override in state tracker
2008-09-17 14:32:33 -06:00
Brian Paul
e6a120fefe
gallium: fix tgsi sanity checker with respect to END.
...
Subroutine code may be found after the END instruction so it's not always
the last instruction.
At least check for presence of exactly one END instruction though.
2008-09-17 13:14:57 -06:00
Brian Paul
133693ebe8
mesa: update program->NumAddressRegs field in _slang_update_inputs_outputs()
2008-09-17 13:13:02 -06:00
Brian Paul
095ca0acd8
gallium: include prog_print.h to silence warning
2008-09-17 10:25:18 -06:00
Brian Paul
66682651b6
gallium: need to finish, not flush, in st_copy_texsubimage()
2008-09-17 10:23:00 -06:00
Brian Paul
63b915d743
gallium: new assertion on surface->texture
2008-09-17 10:23:00 -06:00
Jakob Bornecrantz
ec8398d62f
tgsi: Add a ugly fix for CONSTANT problems
2008-09-17 18:13:17 +02:00
Jakob Bornecrantz
f8a5cb8cb2
tgsi: More debug printing on sanity check error
2008-09-17 18:13:17 +02:00
Brian Paul
f10e7f0d28
gallium: fix lack of surface reference counting in cso_set/save/restore_framebuffer()
...
Fixes asst problems with FBO / render to texture.
2008-09-17 09:47:51 -06:00
Brian Paul
5e530d8384
mesa: fix bug in previous changes to _slang_resolve_attributes()
2008-09-17 09:13:55 -06:00
Brian Paul
0d20c88f62
mesa: fix bug in previous changes to _slang_resolve_attributes()
2008-09-17 09:05:04 -06:00
Brian Paul
f631093ce7
cell: example of doing fs/fm sequence with fnms in blending
2008-09-17 08:17:02 -06:00
Brian Paul
05aeb92a09
cell: dump generated code if CELL_DEBUG=asm
2008-09-17 08:14:09 -06:00
Robert Ellison
858ced0515
CELL: fleshing out the blending fragment ops
...
- Added two new debug flags (to be used with the CELL_DEBUG environment
variable). The first, "CELL_DEBUG=fragops", activates SPE fragment
ops debug messages. The second, "CELL_DEBUG=fragopfallback", will
eventually be used to disable the use of generated SPE code for
fragment ops in favor of the default fallback reference routine.
(During development, though, the parity of this flag is reversed:
all users will get the reference code *unless* CELL_DEBUG=fragopfallback
is set. This will prevent hiccups in code generation from affecting
the other developers.)
- Formalized debug message usage and macros in spu/spu_main.c.
- Added lots of new code to ppu/cell_gen_fragment.c to extend the
number of supported source RGB factors from 4 to 15, and to
complete the list of supported blend equations.
More coming, to complete the source and destination RGB and alpha
factors, and to complete the rest of the fragment operations...
2008-09-17 02:32:43 -06:00
Eric Anholt
904f31a624
intel: Destroy bufmgr in screen destroy, not context.
...
Caused server crashes on second context creation since
7e0bbdcf03 .
Bug #17600 .
2008-09-16 17:02:41 -07:00
Brian Paul
27341a97a1
mesa: rework GLSL vertex attribute binding
...
Calls to glBindAttribLocation() should not take effect until the next time
that glLinkProgram() is called.
gl_shader_program::Attributes now just contains user-defined bindings.
gl_shader_program::VertexProgram->Attributes contains the actual/final bindings.
2008-09-16 16:28:36 -06:00
Jonathan White
a3a797ffa8
cell: Added RCP and RSQ instruction support.
2008-09-16 16:00:42 -06:00
Brian Paul
e53296c928
mesa: rework GLSL vertex attribute binding
...
Calls to glBindAttribLocation() should not take effect until the next time
that glLinkProgram() is called.
gl_shader_program::Attributes now just contains user-defined bindings.
gl_shader_program::VertexProgram->Attributes contains the actual/final bindings.
2008-09-16 15:50:44 -06:00
Jonathan White
fbbaad14a6
cell: Added DP3 and DP4 instructions
2008-09-16 13:57:29 -06:00
Brian Paul
37607aeaf8
gallium: fix glTexImage(width=height=depth=0) case
...
Free old teximage/level data, then stop.
2008-09-16 13:38:10 -06:00
Brian Paul
39cb5b9f73
mesa: fix display list regression (check if save->prim_count > 0 in vbo_save_EndList())
2008-09-16 13:31:48 -06:00
Brian Paul
d43951192b
mesa: fix display list regression (check if save->prim_count > 0 in vbo_save_EndList())
2008-09-16 13:23:01 -06:00
Brian Paul
8cdab20c9a
gallium: fix info entries for KIL, KILP
...
KIL takes 1 src register. KILP uses no registers (uses cond codes).
2008-09-16 12:52:19 -06:00
Michal Krol
2010cd7810
st: hash-warning not recognised on Windows.
2008-09-16 19:28:16 +02:00
Jonathan White
dd75ca89eb
cell: Optimized LERP with fma
...
Please enter the commit message for your changes.
2008-09-16 09:42:28 -06:00
Jonathan White
2c54a6ee79
cell: Fixed MIN/MAX algorithm
2008-09-16 09:36:47 -06:00
Brian Paul
ea9568dfbe
mesa: fix bug in get_uniform_rows_cols(): sometimes returned too many rows
2008-09-16 08:55:54 -06:00
Brian Paul
753635f733
gallium: move _vbo_DestroyContext() call
...
Call it before freeing core Mesa state to avoid references to freed buffer objects.
2008-09-16 08:51:56 -06:00
Brian Paul
4992806ae5
mesa: protect against double-free in _vbo_DestroyContext()
2008-09-16 08:51:56 -06:00
Jakob Bornecrantz
358aab12c6
mesa: State tracker now checks for faulty shaders on debug
2008-09-16 16:20:19 +02:00
Jakob Bornecrantz
ad16ecbbe4
tgsi: Make tgsi_sanity.c compile with make
2008-09-16 16:20:19 +02:00
José Fonseca
eef2edadf3
trace: Fix typo in build instructions.
2008-09-16 20:24:43 +09:00
Brian Paul
32250eb959
cell: export CELL_DEBUG=asm to dump SPU assembly code
2008-09-15 19:40:02 -06:00
Brian Paul
9d48a7832b
mesa: fix MSAA enable state in update_multisample()
2008-09-15 17:14:53 -06:00
Brian Paul
b1f5fbe1cb
mesa: fix MSAA enable state in update_multisample()
2008-09-15 17:10:04 -06:00
Jonathan White
e67374b6b2
cell: Added LERP instruction
2008-09-15 15:46:04 -06:00
Brian Paul
ae3373441d
gallium: emit SPU instructions in assembler-compatible syntax
2008-09-15 15:10:02 -06:00
Jonathan White
81aa90e883
cell: Added support for SLT, SEQ and SNE instructions
2008-09-15 13:45:09 -06:00
Jonathan White
0a75773fed
cell: Added support for ABS instruction
2008-09-15 12:27:10 -06:00
Jonathan White
5a4ab148a7
Added support for SUB and MAD instructions
2008-09-15 11:58:00 -06:00
Jonathan White
367774a62a
Fixed emit_RRR
2008-09-15 11:57:59 -06:00
Jakob Bornecrantz
4c9cd725d5
i915simple: dri winsys does now compile and works
...
Glxgears hits an assert, but tri works
2008-09-15 17:55:09 +02:00
Brian Paul
987c4b35b8
mesa: remove some assertions that are invalid during context tear-down
2008-09-15 09:18:59 -06:00
Keith Whitwell
cd23c5c599
mesa: get another class of degenerate dlists working
...
Primitive begin in one dlist, end in another.
2008-09-15 09:18:45 -06:00
Brian Paul
d36f4ef16b
mesa: remove some assertions that are invalid during context tear-down
2008-09-15 09:07:32 -06:00
Keith Whitwell
bd953e872f
mesa: get another class of degenerate dlists working
...
Primitive begin in one dlist, end in another.
2008-09-15 13:49:04 +01:00
Keith Whitwell
a30d2c5727
add dlist-degenerate test case
2008-09-15 13:49:04 +01:00
Shane Blackett
641b80275b
glut: s/glut_fbc.c/glut_fcb.c/
2008-09-14 17:51:01 -06:00
Michal Krol
e852232ebf
draw: Silence compiler warnings on Windows.
2008-09-14 19:04:53 +02:00
Brian Paul
777aca8fc9
cell: implement negation, absolute value and set-sign for src regs in code gen
2008-09-13 15:33:07 -06:00
Brian Paul
870afb8319
negate.txt - test negation of a src reg
2008-09-13 15:33:07 -06:00
Brian Paul
75c19eb5a1
gallium: add another value check to util_fast_pow()
...
Fixes glitches seen in morph3d demo.
2008-09-13 15:22:52 -06:00
Brian Paul
809e81c0b4
gallium: add another value check to util_fast_pow()
...
Fixes glitches seen in morph3d demo.
2008-09-13 15:21:58 -06:00
Jakub Bogusz
68a19e353e
tdfx: fix crash and lack of visuals bug
2008-09-13 14:35:02 -06:00
Guillaume Melquiond
87ccb9504d
i915: fix himask constant init for 64-bit build
2008-09-13 14:25:02 -06:00
Guillaume Melquiond
811d8b86eb
glx: fix 64-bit datatype issue
2008-09-13 14:24:31 -06:00
Guillaume Melquiond
11a889db8f
mesa: return after _mesa_problem() calls
2008-09-13 14:23:39 -06:00
Guillaume Melquiond
d2e0504d4e
mesa: #include <stdio.h>
2008-09-13 14:23:14 -06:00
Guillaume Melquiond
5d4c8ec5e0
remove invalid XDestroyWindow() call
2008-09-13 14:22:15 -06:00
Guillaume Melquiond
ee2c8d6d3e
silence warning
2008-09-13 14:21:50 -06:00
Guillaume Melquiond
6e51febc6b
GLU: fix asst warnings
2008-09-13 14:20:14 -06:00
Younes Manton
3122f2bebe
g3dvl: Fix field coded block copy.
2008-09-13 01:35:14 -04:00
Brian Paul
8d768c5101
cell: remove old disassembly/dump code; use dumper code in SPE emitter.
2008-09-12 21:54:25 -06:00
Brian Paul
8b5013d232
gallium: added print/dump code to SPE code emitter
2008-09-12 21:52:47 -06:00
Brian Paul
6f3eee9213
cell: implement DDX/DDY codegen (untested)
2008-09-12 21:09:10 -06:00
Brian Paul
31a112cad4
gallium: added spe_splat_word()
2008-09-12 21:08:01 -06:00
Brian Paul
5f3ec82338
cell: implement TGSI immediates in SPE code generator
2008-09-12 17:10:20 -06:00
Eric Anholt
8db761409d
intel: Add a width field to regions, and use it for making miptrees in TFP.
...
Otherwise, we would use the pitch as width of the texture, and compiz would
render the pitch padding on the right hand side.
2008-09-12 15:48:13 -07:00
Brian Paul
af2ca5dc38
cell: initial support for IF/ELSE/ENDIF in fragment shader codegen
...
Only one level of if/else/endif nesting is currently working.
2008-09-12 16:31:53 -06:00
Brian Paul
5ab221549d
cell: evaluate multiple fragment inputs
2008-09-12 16:11:52 -06:00
Eric Anholt
bdc8ac4ae2
Finish off the previous fix for TFP.
...
A couple of those lines of debug printfs I deleted weren't actually debug
printfs.
2008-09-12 15:09:43 -07:00
Brian Paul
d598a5d230
cell: disable invalid spe_release_func() calls, fixes crash on exit
2008-09-12 15:07:31 -06:00
Eric Anholt
34bba445a1
intel: Don't segfault on TFP from a bad drawable.
2008-09-12 13:49:23 -07:00
Eric Anholt
201d3419a6
intel: Remove dead allow_batchbuffer param.
2008-09-12 13:49:23 -07:00
Jonathan White
272810125b
Makefile was previously checked in with merge diffs still present. I just selected HEAD and removed the old.
2008-09-12 13:25:40 -06:00
Younes Manton
56c22687e1
g3dvl: Use winsys_buffer_reference() instead of pipe_buffer_reference().
...
Old pipe_buffer_reference() renamed winsys_buffer_reference(), new
pipe_buffer_reference() expects a screen.
2008-09-12 15:10:43 -04:00
Younes Manton
f3f449a491
g3dvl: Implement surface sync functions.
2008-09-12 14:31:07 -04:00
Younes Manton
42a42dec3d
g3dvl: Fullscreen fixes. Respect src & dst coords during scaling, clear FB.
2008-09-12 14:31:07 -04:00
Brian Paul
c9c2b1b016
mesa: bump gallium version string to 0.2
2008-09-12 12:05:10 -06:00
Brian Paul
9b9eba5a42
cell: more documentation updates
2008-09-12 12:04:49 -06:00
Brian Paul
38bacb6f32
cell: implement colormask on fallback path
...
Also, some var renaming and additional comments
2008-09-12 11:43:37 -06:00
Brian Paul
9defef29c5
gallium: avoid redundant tgsi_exec_machine_bind_shader() calls on draw exec path
...
tgsi_exec_machine_bind_shader() isn't cheap so avoiding unecessary calls
is a big win.
A similar change should be done for softpipe's fragment exec path but
extra care needs to be taken with the texture sampler state/params.
2008-09-12 11:42:33 -06:00
Brian Paul
bd34b8a4fe
gallium: use copy_token() function to avoid type punning/aliasing problems
...
This fixes parsing errors seen with optimized builds on PPC (which led to crashes).
The memcpy() is heavy-handed, but works. A lighter uint assignment could
be used on x86...
2008-09-12 11:40:31 -06:00
Brian Paul
44e53b37a0
cell: fix twiddled tile display for XSHM. Fixed blank window problem.
2008-09-12 11:37:08 -06:00
Brian Paul
73193b7735
cell: fix twiddled tile display for XSHM. Fixed blank window problem.
2008-09-12 11:35:22 -06:00
Younes Manton
59f23e92e2
g3dvl: Update softlinks to nouveau winsys files, related fixes.
2008-09-12 13:22:43 -04:00
Brian Paul
31d2e5b954
gallium: use new compare32() function to fix warnings about type punning and aliasing
2008-09-12 11:02:18 -06:00
Brian Paul
50f78fcc2e
gallium: silence warning
2008-09-12 11:01:31 -06:00
Younes Manton
ca0efa84ed
g3dvl: Cleanup.
2008-09-12 12:33:52 -04:00
Younes Manton
6b50fd27b8
g3dvl: Clean up Makefile deps.
2008-09-12 12:33:52 -04:00
Brian Paul
a449465556
cell: fix non-debug build error
2008-09-12 09:43:11 -06:00
Brian Paul
e8b199c6e3
cell: implement swizzling for src regs
2008-09-12 08:48:08 -06:00
Brian Paul
6c0fa79857
cell: setup fragment program inputs in SOA format
...
Also remove old code, etc.
2008-09-12 08:47:45 -06:00
Brian Paul
c436f96b10
simple add with swizzle and mul with swizzle tests
2008-09-12 08:40:50 -06:00
Brian Paul
0c0e5b71c0
cell: updated docs/status
2008-09-12 08:26:47 -06:00
Brian Paul
b71f4150c8
gallium: minor optimization to spe_load_int()
2008-09-12 08:22:15 -06:00
Brian Paul
be5d8bd078
gallium: initial PPC/Altivec codegen
2008-09-12 08:21:43 -06:00
Ben Skeggs
8c14bd6992
Merge remote branch 'upstream/gallium-0.2' into nouveau-gallium-0.2
2008-09-13 00:07:19 +10:00
Brian Paul
33aa5b6964
cell: disable calls to old gen code
2008-09-12 07:58:06 -06:00
Brian Paul
2d28c2e356
cell: update branch info in docs
2008-09-12 07:57:28 -06:00
Brian Paul
fa0aa1443b
cell: disable calls to old gen code
2008-09-12 07:57:08 -06:00
Brian Paul
690f5af337
gallium: don't build winsys/ here
2008-09-12 07:56:43 -06:00
Ben Skeggs
d64da83a2c
nouveau: rework nouveau_screen for latest and greatest changes
2008-09-12 23:51:39 +10:00
Ben Skeggs
d37e6f9a7f
Merge remote branch 'upstream/gallium-0.2' into nouveau-gallium-0.2
2008-09-12 23:21:41 +10:00
Jakob Bornecrantz
3df0647027
i915simple: A step closer to compiling
2008-09-12 15:09:44 +02:00
Ben Skeggs
63c49bee3a
Merge remote branch 'upstream/gallium-0.2' into nouveau-gallium-0.2
2008-09-12 22:53:44 +10:00
Keith Whitwell
f7d7a212cd
mesa: build gallium directories before core mesa
2008-09-12 12:24:21 +01:00
Keith Whitwell
4b458555ab
mesa: regenerate shader files
2008-09-12 12:23:28 +01:00
Ben Skeggs
cbe05a4734
Merge remote branch 'nouveau/gallium-0.1' into nouveau-gallium-0.2
...
Conflicts:
configs/linux-dri
2008-09-12 20:37:33 +10:00
Ben Skeggs
81335d0f17
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-09-12 20:33:59 +10:00
George Sapountzis
d3dc95e26a
dri/swrast: fix swapBuffers after dri2
2008-09-12 12:43:10 +03:00
Keith Whitwell
522139dd14
vp: add run script
2008-09-12 10:31:51 +01:00
Keith Whitwell
176c454765
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
progs/fp/Makefile
2008-09-12 10:31:23 +01:00
Keith Whitwell
1f13545679
fp: put test name in window title, add run script
2008-09-12 10:28:36 +01:00
Keith Whitwell
af74abab6b
mesa: get fixed-function program generation working again
2008-09-12 10:04:56 +01:00
Keith Whitwell
52a9dfd4fe
use APP_CC, remove redundant target
2008-09-12 10:02:16 +01:00
Xiang, Haihao
b2e083eba2
i965: Add support for G41 chipset which is another 4 series.
2008-09-12 09:25:34 +08:00
Brian Paul
aa66f08a21
cell: initial support for fragment shader code generation.
...
TGSI shaders are translated into SPE instructions which are then sent to
the SPEs for execution. Only a few opcodes work, no swizzling yet, no
support for constants/immediates, etc.
2008-09-11 17:59:52 -06:00
Brian Paul
dbbbc33344
use APP_CC
2008-09-11 17:55:53 -06:00
Brian Paul
084ab37b7f
cell: fix tile twidding bug seen in the event of multiple expose events
2008-09-11 17:10:32 -06:00
Brian Paul
bc304bbd49
cell: minor improvements to fragment code-gen
2008-09-11 17:10:32 -06:00
Brian Paul
178bbaff80
gallium: add special cases in spe_load_float(), spe_load_int(), added spe_splat()
2008-09-11 17:10:32 -06:00
Brian Paul
be925ab6e8
cell: put cell_ prefix on gen_fragment_function()
2008-09-11 17:10:32 -06:00
Keith Whitwell
fd0ee68305
trivial: remove stray merge conflict
2008-09-11 20:11:11 +01:00
Keith Whitwell
b66ee9e32f
st: adapt to new framebuffer struct, with one FIXME outstanding
2008-09-11 20:09:14 +01:00
Keith Whitwell
7ee599d30b
mesa: update PointParameter usage
2008-09-11 20:08:07 +01:00
Keith Whitwell
a90cae8a17
demos: fix LIBS ref in makefile
2008-09-11 20:07:41 +01:00
Brian Paul
fbf1586b36
gallium: typo: s/PIPE_FORMAT_Z16UNORM/PIPE_FORMAT_Z16_UNORM/
2008-09-11 12:01:19 -06:00
Dima Zavin
7d3d5fb7a5
egl_xdri: Add the top-level lib dir so we link against the libGL we built.
2008-09-11 11:43:56 -06:00
Dima Zavin
912488a8d0
egl_dri/egl_xdri: Makefiles should use pkg-config to find libdrm.
2008-09-11 11:43:56 -06:00
Keith Whitwell
536092f9e0
xlib: fix typo
2008-09-11 18:35:19 +01:00
Keith Whitwell
cc7dd4fc1b
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
Makefile
progs/demos/Makefile
progs/glsl/Makefile
progs/redbook/Makefile
progs/samples/Makefile
progs/tests/Makefile
progs/trivial/Makefile
progs/xdemos/Makefile
src/gallium/Makefile
src/mesa/main/attrib.c
src/mesa/main/bufferobj.c
src/mesa/vbo/vbo_exec_draw.c
2008-09-11 18:32:05 +01:00
Keith Whitwell
685248bea1
mesa: use sources.mak -- need to figure out how to support non-gallium builds also
2008-09-11 18:08:01 +01:00
Alan Hourihane
cdd97ceca0
add gallium dir
...
winsys/common -> winsys/
2008-09-11 18:06:05 +01:00
Brian Paul
d50d68a1c9
glut: only call glFinish() in processWindowWorkList() for indirect contexts.
...
Basically, do as the comment says.
2008-09-11 11:05:13 -06:00
Brian Paul
90c93bbeee
define new APP_CC configuration variable for building apps/demos/tests
...
For Cell, need to use different compilers for the libraries vs. the demos/tests
to avoid strange link error regarding "_Unwind_GetIPInfo@GCC_4.2.0"
2008-09-11 11:00:54 -06:00
Alan Hourihane
5835d7e573
tree builds
2008-09-11 17:59:58 +01:00
Brian Paul
7ce1d0fb67
cell: more comments, stub code for colormask/logicop/etc
2008-09-11 10:52:03 -06:00
Brian Paul
5c459b3925
simple quad drawing test
2008-09-11 10:43:14 -06:00
Brian Paul
1b5331d7eb
cell: fix typos in blend code-gen
2008-09-11 10:39:30 -06:00
Brian Paul
73c6ae98c1
cell: remove old state CMDs, added comments
2008-09-11 10:39:30 -06:00
Brian Paul
f6bf8d9d41
cell: clean-up, comments
2008-09-11 10:39:30 -06:00
Brian Paul
a558369ec6
cell: disable NEW_VS emit
2008-09-11 10:39:29 -06:00
Brian Paul
924653e37d
cell: don't build unused sources
2008-09-11 10:39:29 -06:00
Brian Paul
f19903aa83
cell: remove old blend/depth/stencil/logicop structs
2008-09-11 10:39:29 -06:00
Brian Paul
aa4a08d429
cell: asst. clean-up
2008-09-11 10:39:29 -06:00
Brian Paul
283ffdf996
cell: checkpoint: remove more of the old per-fragment code
2008-09-11 10:39:29 -06:00
Brian Paul
add86031db
cell: begin new blending code (both codegen and fallback paths)
2008-09-11 10:39:29 -06:00
Brian Paul
6092a05704
cell: fix shuffle in spu_unpack_B8G8R8A8()
2008-09-11 10:39:29 -06:00
Brian Paul
5336e758a4
cell: added cast in spu_splats() call
2008-09-11 10:39:28 -06:00
Brian Paul
701fcee65d
cell: remove old per-fragment code, replace with all new code
2008-09-11 10:39:28 -06:00
Brian Paul
284ab5a612
cell: checkpoint commit of new per-fragment processing
...
Do code generation for alpha test, z test, stencil, blend, colormask
and framebuffer/tile read/write as a single code block.
Ian's previous blend/z/stencil test code is still there but mostly disabled
and will be removed soon.
2008-09-11 10:39:28 -06:00
Brian Paul
ee582fd3a7
gallium: assorted additions and fixes to Cell SPE rtasm code
...
Fix incorrect opcode for fsmbi.
Added "macro" functions for loading floats/ints, register complement, zero, move.
Added #defines for return address and stack pointer registers.
Added assertions to check that the instruction buffer doesn't overflow.
2008-09-11 10:39:28 -06:00
Brian Paul
04ae4fba3c
cell: minor change to Z float/int conversion code (avoid switch)
2008-09-11 10:39:28 -06:00
Brian Paul
cd9722dcdd
cell: comments
2008-09-11 10:39:28 -06:00
Brian Paul
0e79e474de
cell: comments, etc.
2008-09-11 10:39:28 -06:00
Brian Paul
bb5becf1e2
gallium: comments, assertions, etc
2008-09-11 10:39:28 -06:00
Brian Paul
83054d9297
press 'c' to toggle Z clear value between 0/1
2008-09-11 10:39:27 -06:00
Brian Paul
8df4c3a21f
press 'f' to cycle through depth test funcs
2008-09-11 10:39:27 -06:00
Alan Hourihane
47ad296a18
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa into gallium-0.2
...
Conflicts:
src/mesa/drivers/dri/i915/intel_ioctl.c
src/mesa/main/texstore.c
src/mesa/tnl/t_vp_build.c
src/mesa/vbo/vbo_exec_draw.c
2008-09-11 17:32:18 +01:00
Keith Whitwell
b645822503
mesa: fix srcRowStride vs srcRowBytes conflict
2008-09-11 16:36:41 +01:00
Keith Whitwell
0397b2bb41
Merge branch 'gallium-0.1' into gallium-0.2
...
A first attempt at moving gallium onto a branch directly off master...
It will be interesting to see how much work this takes to get running.
Have resolved the conflicts semi-arbitarily, not compiled or tested.
Conflicts:
.gitignore
Makefile
configs/config.mgw
configs/darwin
configs/darwin-x86ppc
configs/default
configs/freebsd-dri
configs/linux-dri
configs/linux-dri-xcb
configs/linux-fbdev
configs/linux-static
configs/linux-x86-64-static
configs/linux-x86-static
doxygen/Makefile
include/GL/gl.h
progs/demos/Makefile
progs/demos/descrip.mms
progs/demos/texenv.c
progs/egl/.gitignore
progs/egl/Makefile
progs/glsl/.gitignore
progs/glsl/Makefile
progs/glsl/convolutions.c
progs/samples/Makefile.mgw
progs/tests/.gitignore
progs/trivial/.gitignore
progs/trivial/point-param.c
progs/trivial/tri.c
progs/xdemos/.gitignore
progs/xdemos/glthreads.c
src/egl/drivers/demo/Makefile
src/egl/drivers/dri/Makefile
src/egl/main/Makefile
src/glu/Makefile
src/glu/sgi/Makefile
src/glu/sgi/Makefile.mgw
src/glut/glx/Makefile.mgw
src/glut/os2/WarpWin.cpp
src/glut/os2/glut_cindex.cpp
src/glut/os2/glut_gamemode.cpp
src/glut/os2/glut_win.cpp
src/glut/os2/glut_winmisc.cpp
src/glut/os2/os2_glx.cpp
src/glut/os2/os2_menu.cpp
src/glut/os2/os2_winproc.cpp
src/glw/Makefile
src/glx/x11/dri_glx.c
src/glx/x11/glxext.c
src/mesa/Makefile
src/mesa/Makefile.mgw
src/mesa/descrip.mms
src/mesa/drivers/beos/Makefile
src/mesa/drivers/common/descrip.mms
src/mesa/drivers/common/driverfuncs.c
src/mesa/drivers/directfb/Makefile
src/mesa/drivers/dri/Makefile.template
src/mesa/drivers/dri/common/dri_bufmgr.c
src/mesa/drivers/dri/common/dri_bufmgr.h
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/extension_helper.h
src/mesa/drivers/dri/common/mmio.h
src/mesa/drivers/dri/common/utils.c
src/mesa/drivers/dri/common/utils.h
src/mesa/drivers/dri/glcore/Makefile
src/mesa/drivers/dri/i810/i810screen.c
src/mesa/drivers/dri/i915/intel_ioctl.c
src/mesa/drivers/dri/i915/intel_ioctl.h
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i915/server/i830_common.h
src/mesa/drivers/dri/i915/server/i830_dri.h
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/server/i830_common.h
src/mesa/drivers/dri/i965/server/i830_dri.h
src/mesa/drivers/dri/mach64/mach64_screen.c
src/mesa/drivers/dri/nouveau/nouveau_context.h
src/mesa/drivers/dri/nouveau/nouveau_fifo.c
src/mesa/drivers/dri/nouveau/nouveau_fifo.h
src/mesa/drivers/dri/nouveau/nouveau_screen.c
src/mesa/drivers/dri/nouveau/nouveau_screen.h
src/mesa/drivers/dri/r128/r128_tex.h
src/mesa/drivers/dri/savage/savageioctl.h
src/mesa/drivers/fbdev/Makefile
src/mesa/drivers/osmesa/Makefile
src/mesa/drivers/osmesa/descrip.mms
src/mesa/drivers/x11/Makefile
src/mesa/drivers/x11/descrip.mms
src/mesa/drivers/x11/xm_dd.c
src/mesa/glapi/glapi.c
src/mesa/glapi/glthread.c
src/mesa/main/api_validate.c
src/mesa/main/attrib.c
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h
src/mesa/main/buffers.c
src/mesa/main/config.h
src/mesa/main/context.c
src/mesa/main/descrip.mms
src/mesa/main/drawpix.c
src/mesa/main/enums.c
src/mesa/main/fbobject.c
src/mesa/main/glheader.h
src/mesa/main/imports.c
src/mesa/main/mipmap.c
src/mesa/main/mm.c
src/mesa/main/mm.h
src/mesa/main/mtypes.h
src/mesa/main/points.c
src/mesa/main/sources
src/mesa/main/state.c
src/mesa/main/texcompress_fxt1.c
src/mesa/main/texenvprogram.c
src/mesa/main/texobj.c
src/mesa/main/texstate.c
src/mesa/main/texstore.c
src/mesa/math/descrip.mms
src/mesa/shader/arbprogram.c
src/mesa/shader/descrip.mms
src/mesa/shader/prog_execute.c
src/mesa/shader/prog_statevars.c
src/mesa/shader/prog_statevars.h
src/mesa/shader/prog_uniform.c
src/mesa/shader/program.c
src/mesa/shader/program.h
src/mesa/shader/shader_api.c
src/mesa/shader/slang/descrip.mms
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
src/mesa/sources
src/mesa/swrast/descrip.mms
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_fragprog.c
src/mesa/swrast/s_readpix.c
src/mesa/swrast/s_span.c
src/mesa/swrast_setup/descrip.mms
src/mesa/tnl/descrip.mms
src/mesa/tnl/t_context.h
src/mesa/tnl/t_vp_build.c
src/mesa/tnl/tnl.h
src/mesa/vbo/descrip.mms
src/mesa/vbo/vbo_context.c
src/mesa/vbo/vbo_exec_array.c
src/mesa/x86-64/xform4.S
src/mesa/x86/rtasm/x86sse.c
src/mesa/x86/rtasm/x86sse.h
windows/VC6/progs/glut/glut.dsp
windows/VC7/mesa/gdi/gdi.vcproj
windows/VC7/mesa/glu/glu.vcproj
windows/VC7/mesa/mesa.sln
windows/VC7/mesa/mesa/mesa.vcproj
windows/VC7/mesa/osmesa/osmesa.vcproj
windows/VC7/progs/glut/glut.vcproj
windows/VC8/mesa/gdi/gdi.vcproj
windows/VC8/mesa/glu/glu.vcproj
windows/VC8/mesa/mesa.sln
windows/VC8/mesa/mesa/mesa.vcproj
windows/VC8/progs/glut/glut.vcproj
2008-09-11 16:05:15 +01:00
Shane Blackett
4d42c5bebf
added 24bpp support
2008-09-11 08:36:03 -06:00
Shane Blackett
bc3b2a5d7a
Fixes for Mingw
2008-09-11 08:36:03 -06:00
Eric Anholt
35fd72756a
intel: track move of bo_exec from drivers to bufmgr.
2008-09-10 13:59:45 -07:00
Eric Anholt
3628185f56
intel: track bufmgr move to libdrm_intel and bufmgr_fake irq emit/wait change.
2008-09-10 13:59:45 -07:00
Eric Anholt
7e0bbdcf03
intel: Move the bufmgr back to the screen.
...
Mesa requires that we be able to share objects between contexts, which means
that the objects need to be created by the same bufmgr, and the bufmgr
internally requires pthread protection for thread safety.
Rely on the bufmgr having appropriate locking.
2008-09-10 13:59:45 -07:00
Ben Skeggs
f302fca5eb
nouveau: gallium directory structure changed again..
2008-09-11 06:41:18 +10:00
Ben Skeggs
7158203b08
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
...
Conflicts:
configs/default
2008-09-11 06:09:05 +10:00
José Fonseca
eb5b16d278
tgsi: Fix newline pos.
2008-09-10 10:33:03 +09:00
José Fonseca
dc1834a873
tgsi: Verify constants are set before attempting to read them.
2008-09-10 10:32:52 +09:00
José Fonseca
d671cf460f
softpipe: Code (commented out) to dump BMPs.
2008-09-09 22:19:31 +09:00
José Fonseca
bfe45670ae
util: Ensure we always have a full qualified file name on windows display.
2008-09-09 22:19:31 +09:00
Michal Krol
67c213499a
util: Enable u_stream_std.c for PIPE_SUBSYSTEM_WINDOWS_USER.
2008-09-09 11:25:05 +02:00
Michal Krol
05ecd6d402
softpipe: Silence compiler warning on Windows.
2008-09-09 11:21:57 +02:00
Michal Krol
56e7c5522e
softpipe: Protect pipe_condvar_signal/broadcast calls with a mutex.
2008-09-08 23:04:17 +02:00
Michal Krol
68e672a864
softpipe: Set SP_NUM_QUAD_THREADS 1 effectively disabling multithreaded softpipe.
...
We want to make it env variable, or even better, autodetect as the feature makes
softpipe run slower on a single CPU.
2008-09-08 17:25:47 +02:00
Michal Krol
b40732622f
softpipe: More improvements for multithreaded softpipe.
...
Store only input and inout of a quad_header in job que.
2008-09-08 17:25:46 +02:00
Michal Krol
01f9e51203
softpipe: Split changing fields of quad_header into input, inout and output parts.
2008-09-08 17:25:46 +02:00
Michal Krol
84cde72b3e
softpipe: Improve multithreaded softpipe.
...
Use condition vars to communicate between threads instead of stalling.
2008-09-08 17:25:46 +02:00
Michal Krol
ebe6160d7c
softpipe: First attempts at multithreaded softpipe.
...
Configured for 2 cores.
2008-09-08 17:25:46 +02:00
Michal Krol
5a25628bd2
tgsi: Cleanup code.
2008-09-08 17:25:46 +02:00
José Fonseca
d25611ede0
trace: Request a growable file.
2008-09-08 22:57:01 +09:00
José Fonseca
a4a739eb58
util: Allow to define the maximum file size.
...
This avoids splitting the bitmaps in many files.
2008-09-08 22:56:38 +09:00
José Fonseca
1da0a13389
util: Dump surfaces to BMP.
...
This allows quick inspection of surfaces in mass scale.
2008-09-08 22:21:33 +09:00
José Fonseca
7cfc294c70
scons: Install shared libs in the right subdir.
2008-09-08 21:50:50 +09:00
José Fonseca
2444c0c81a
trace: Use util's stream.
2008-09-08 11:09:48 +09:00
José Fonseca
86a15954bf
util: Rip-off trace's os-independent stream code.
2008-09-08 11:09:23 +09:00
José Fonseca
52c2dd1f73
scons: Install libGL.so and respective symlinks.
2008-09-08 07:54:15 +09:00
Younes Manton
02025148c2
g3dvl: Initialize DRI drawables correctly.
2008-09-07 15:47:44 -04:00
Younes Manton
2f41095e04
g3dvl: Zero-block optimization.
...
For blocks whose contents are derived completely from ref surfaces, don't
bother zero-ing the corresponding block in the luma/chroma textures, except
for the first such luma, chroma Cb, and chroma Cr each frame. All later
zero blocks are textured from that first zero block.
2008-09-07 15:47:44 -04:00
Younes Manton
0bfbe834d3
g3dvl: Define texcoords seperately for luma, Cb, Cr textures.
...
Need to be able to address each texture separately to do zero-block.
2008-09-07 15:47:43 -04:00
Younes Manton
7891efdac1
g3dvl: Define block texcoords for each vertex instead of reusing pos.
...
This is needed for zero-block optimization.
2008-09-07 15:47:43 -04:00
Brian Paul
8af4794afc
cell: code clean-up, comments
2008-09-05 10:18:00 -06:00
Brian Paul
a267934b23
cell: convert clear color if needed
2008-09-05 10:16:27 -06:00
Brian Paul
a1886d5391
softpipe: convert clear color to surface format if needed
2008-09-05 10:11:22 -06:00
Brian Paul
79200c9087
gallium: document that clear color is intentionally always PIPE_FORMAT_A8R8G8B8_UNORM
2008-09-05 10:10:55 -06:00
Brian Paul
2877727c9b
gallium: remove debug code from prev commit
2008-09-05 10:10:18 -06:00
Brian Paul
7071e774e4
gallium: new util_unpack_color_ub() function
2008-09-05 10:09:48 -06:00
Michal Krol
78a4589b10
gallium: Add pipe_thread primitives for PIPE_OS_LINUX.
2008-09-05 16:55:51 +02:00
Brian Paul
0f6e76d7f1
mesa: replace MALLOC w/ CALLOC to fix memory error in glPushClientAttrib()
2008-09-05 08:07:20 -06:00
Brian Paul
11d694b1bb
mesa: replace MALLOC w/ CALLOC to fix memory error in glPushClientAttrib()
2008-09-05 08:06:59 -06:00
Brian Paul
9246c2fad4
mesa: replace MALLOC w/ CALLOC to fix valgrind warning
2008-09-05 08:06:24 -06:00
Michal Krol
a0b5ac424b
gallium: Add pipe_thread primitives for PIPE_SUBSYSTEM_WINDOWS_USER config.
2008-09-05 15:10:47 +02:00
Michal Krol
ce3cf63251
mesa: _mesa_program_state_string() returns char *, not const char *.
2008-09-05 12:25:50 +02:00
Dave Airlie
06537296f1
intel: only enable occlusion query if the drm has defines.
...
This interface has to be re-written to not be dumb and to work
for multiple apps.
2008-09-05 13:48:51 +10:00
José Fonseca
b8a7eef242
tgsi: Refactor tgsi_dump to avoid using string buffers when dumping.
...
This fixes a stack overflow when dumping shaders.
It ended up being pretty much as the original code Michal had before,
before I went on a cleanup rampage on it and took things that ended up
needing...
2008-09-05 10:31:38 +09:00
José Fonseca
50524c2845
gallium: Pass 512 bytes max to EngDebugPrint.
2008-09-05 10:31:38 +09:00
José Fonseca
53979d0a35
gallium: New pf_has_alpha utility function.
2008-09-05 10:31:38 +09:00
José Fonseca
46efe73daf
python: Cleanup tri example.
2008-09-05 10:31:38 +09:00
Brian Paul
2b53512073
cell: move batch buffer init code
2008-09-04 19:10:05 -06:00
Brian Paul
c9cd0f4628
cell: comments
2008-09-04 19:09:50 -06:00
Brian Paul
2ebeab0422
cell: more cell_init_*_functions()
2008-09-04 19:00:56 -06:00
Brian Paul
5cf2e22654
cell: implement CELL_DEBUG env/options var
...
Options so far:
"checker" module tile clear color by SPU ID to see where the tiles are
"sync" to do synchronous DMA (only partially implemented)
2008-09-04 18:36:22 -06:00
Brian Paul
a69fc5129b
mesa: improved gl_buffer_object reference counting
...
Use new _mesa_reference_buffer_object() function wherever possible.
Fixes buffer object/display list crash reported in ParaView.
2008-09-04 15:25:45 -06:00
Brian Paul
9a64440154
mesa: fix minor mem leak
2008-09-04 15:05:03 -06:00
Brian Paul
37c74af01c
mesa: improved gl_buffer_object reference counting
...
Use new _mesa_reference_buffer_object() function wherever possible.
Fixes buffer object/display list crash reported in ParaView.
2008-09-04 14:59:40 -06:00
Brian Paul
dc248fc288
cell: assorted comments, clean-ups, etc.
2008-09-04 12:36:20 -06:00
Brian Paul
27ae1bcabf
cell: use util_surface_copy/fill()
2008-09-04 10:38:00 -06:00
Brian Paul
93ad2d5a5e
cell: include p_inlines.h
2008-09-04 10:37:30 -06:00
Brian Paul
dd82c06ca3
softpipe: use the new util_surface_copy/fill() functions
2008-09-04 10:32:29 -06:00
Brian Paul
69897223a8
gallium: remove the copyHeight hack for compresssed formats
2008-09-04 10:31:50 -06:00
Brian Paul
ce8c08c2b0
gallium: new util_surface_copy() and util_surface_fill() helpers
...
These are plug-in fallbacks for the pipe->surface_copy() and
pipe->surface_fill() functions.
2008-09-04 10:31:23 -06:00
Michal Krol
978f07bebd
mesa: Silence compiler warnings on Windows.
2008-09-04 13:37:15 +02:00
Kristian Høgsberg
4a32f0c638
configure.ac: bump dri2proto requirement, drop TTM_API define.
2008-09-04 06:23:14 -04:00
Xiang, Haihao
55e89eecff
mesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24
...
Cherry-picked from master
2008-09-04 11:45:25 +08:00
Xiang, Haihao
0adfd10210
intel: Fix depth_stencil texture.
2008-09-04 11:36:04 +08:00
Xiang, Haihao
218df7f9c5
mesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24
2008-09-04 11:32:52 +08:00
Jakob Bornecrantz
dc44bb8e92
mesa: Support for MESA_FORMAT_S8_Z24 texture
...
cherry-picked from gallium-0.1
2008-09-04 10:35:01 +08:00
José Fonseca
2c45b5575a
mesa: Remove unused var.
2008-09-04 11:15:19 +09:00
José Fonseca
1d7a213dad
softpipe: Add missing include.
2008-09-04 11:15:08 +09:00
José Fonseca
f754b45bef
i915: Add missing include.
2008-09-04 11:14:59 +09:00
José Fonseca
135a0dd75c
gallium: Fix typo.
2008-09-04 11:14:35 +09:00
José Fonseca
dffad1751e
cell: Use pipe_buffer_* inlines as much as possible.
2008-09-04 09:38:24 +09:00
José Fonseca
34cc7f5f19
i915: Use pipe_buffer_* inlines as much as possible.
2008-09-04 09:38:23 +09:00
José Fonseca
65a094101f
i965: Use pipe_buffer_* inlines as much as possible.
2008-09-04 09:38:23 +09:00
José Fonseca
c93fff86ea
softpipe: Use pipe_buffer_* inlines as much as possible.
2008-09-04 09:38:23 +09:00
José Fonseca
78435d9142
python: Use pipe_buffer_* inlines as much as possible.
2008-09-04 09:38:23 +09:00
José Fonseca
a3e39a4aa9
gallium: Use pipe_buffer_* inlines as much as possible.
2008-09-04 09:38:23 +09:00
Brian Paul
e5085b83d0
cell: flush rendering to current surfaces before installing new ones
...
This fixes crashes when resizing windows.
2008-09-03 14:38:02 -06:00
Brian Paul
e082298e31
cell: update comments, fix typos
2008-09-03 14:36:56 -06:00
Brian Paul
f89b74d97e
cell: change context type passed to cell_flush_int()
2008-09-03 14:31:11 -06:00
Brian Paul
5531c986bd
gallium: comments about nblocksx/y, etc
2008-09-03 14:23:22 -06:00
Brian Paul
a563a27c07
gallium: silence warnings
2008-09-03 13:35:06 -06:00
Brian Paul
6c84652dc3
cell: replace assert() with special spu ASSERT() macro
2008-09-03 13:35:06 -06:00
Brian Paul
439dca4992
cell: add pipe_texture_reference() call in cell_get_tex_surface()
2008-09-03 13:35:06 -06:00
Brian Paul
b035c85b3e
cell: updated assertion
2008-09-03 13:35:06 -06:00
Brian Paul
ba2812f23e
cell: comments
2008-09-03 13:35:06 -06:00
Brian Paul
6ebf712d88
gallium: do image clipping in xmesa_display_surface_tiled()
2008-09-03 13:35:06 -06:00
Brian Paul
8b8952aa69
cell: fix texture/surface allocation to allocate by multiple of tile size
...
This fixes the garbage blocks/pixels seen along the bottom of some windows.
2008-09-03 13:35:06 -06:00
Brian Paul
2ab394a3b4
cell: move misplaced assertions; put them after ximage is assigned.
2008-09-03 13:35:05 -06:00
Jakob Bornecrantz
1d5ad2c244
i915: Fix typo in intel_lock.c
2008-09-03 18:31:21 +02:00
Brian Paul
fafc36920e
cell: add -DDEBUG flag, fixes to Cell Makefiles
2008-09-03 09:31:36 -06:00
Eric Anholt
a04aeea5c0
intel: Fix prototype warning.
2008-09-03 16:13:18 +01:00
Brian Paul
ab93aa774e
Cell: added linux-cell-debug config
...
linux-cell is now the optimized configuration.
Remove some Cell-specific stuff from winsys/xlib/Makefile.
2008-09-03 09:08:46 -06:00
Brian Paul
01a76f4fee
cell: add missing cell_tex_surface_release()
2008-09-03 09:08:45 -06:00
Eric Anholt
e32721c46a
intel: Fix refcounting on depth buffer initialization in DRI2.
...
(Reverts a change to work around the problem on 965).
2008-09-03 13:31:44 +01:00
Xiang, Haihao
3bb2a24921
intel: Fix a crash if dri2 is disabled.
2008-09-03 14:47:36 +08:00
José Fonseca
f637a96e85
gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.
...
We want to use the pipe_buffer_* inlines everywhere, but a pipe context
is not always available nor is it needed.
2008-09-03 11:53:39 +09:00
José Fonseca
82086f5d21
draw: Describe the steps in emit_load_R32G32B32A32.
2008-09-03 11:53:39 +09:00
Brian Paul
a28aa18543
fix BUFFER_DEPTH/BUFFER_ACCUM mix-up
2008-09-02 18:13:48 -06:00
Brian Paul
0fd1a8c4a1
fix BUFFER_DEPTH/BUFFER_ACCUM mix-up
2008-09-02 18:10:51 -06:00
Brian Paul
e3509fd4d0
gallium: increase string buffer size to 16000 to avoid truncated output of long shaders
2008-09-02 18:05:25 -06:00
Brian Paul
feea0c9d95
gallium: fix out of bounds array errors in SSE execution
...
1. #define MAX_INPUTS/OUTPUTS/TEMPS/etc with better values.
2. Add assertions in aos_get_x86() to check register file indexes
3. Assert that constant regs haven't changed after running SSE code.
2008-09-02 18:05:24 -06:00
Patrice Mandin
72b90b7894
Intialize swizzled_surface object
2008-09-02 17:56:10 +02:00
Jakob Bornecrantz
2774b09d4e
i915: Fix typo in ws_dri_bufmgr.c
2008-09-02 17:29:19 +02:00
Jakob Bornecrantz
4d27c027ab
i915: Small fixes for tiled textures
2008-09-02 17:28:42 +02:00
Roland Scheidegger
418b603513
fix no error generated when calling glLight{if}[v] inside begin/end (bug 17408)
2008-09-02 15:48:50 +02:00
Younes Manton
2ab5e69f16
g3dvl: Use consistent variable names.
2008-09-01 20:22:41 -04:00
Younes Manton
ff1a506651
g3dvl: Use one VB for all MBs, sort MBs at flush to determine placement.
2008-09-01 20:13:50 -04:00
Brian Paul
28b4090922
gallium: remove glthread.h file (not used)
2008-09-01 15:33:19 -06:00
Brian Paul
e54f1abca7
gallium: removed p_pointer.h (use util/u_pointer.h instead)
2008-09-01 15:33:19 -06:00
Brian Paul
f3a7463fee
gallium: include u_pointer,h, not p_pointer.h
2008-09-01 15:33:19 -06:00
Brian Paul
39e8860e45
mesa: use CALLOC instead of MALLOC to fix valgrind warning
2008-09-01 13:10:54 -06:00
Brian Paul
c074b86cbc
gallium: added st_bind/release_teximage() functions
2008-09-01 13:10:54 -06:00
Brian Paul
9d9143d889
gallium: move st_texture_image() cast wrapper to header file
2008-09-01 13:10:53 -06:00
Brian Paul
102529cf1b
egl: CreatePbufferSurface, Bind/ReleaseTexImage functions
2008-09-01 13:10:53 -06:00
Brian Paul
b36f906573
egl: additional error checking in _eglBind/ReleaseTexImage()
2008-09-01 13:10:53 -06:00
Younes Manton
72bcb69459
g3dvl: Some clean ups.
2008-09-01 14:43:55 -04:00
Younes Manton
29f876cc90
g3dvl: Inline hint for relatively small, frequently called functions.
2008-09-01 14:43:54 -04:00
Younes Manton
e959c23a31
g3dvl: Re-enable buffer rotation, disable high quality 420->444 conversion.
...
Using linear interpolation when upscaling the chroma blocks causes some
discoloration around the edges.
2008-09-01 14:43:54 -04:00
José Fonseca
038d53cbdb
pipebuffer: Add missing break statement to cache lookup logic.
...
Second loop was never run. Spotted by Keith.
2008-09-02 02:51:06 +09:00
José Fonseca
5c198f660a
pipebuffer: Comment the slab code. Remove the freeSlabs list.
...
The freeSlabs list is not really needed as we free empty slabs immediately.
Time based cached is done separately.
2008-09-02 02:16:58 +09:00
José Fonseca
a6c7258394
scons: Optimize for speed, not size, with MSVC.
2008-09-02 02:16:58 +09:00
José Fonseca
f4d707b40e
draw: Put INLINES where appropriate.
...
In the hope of MSVC inline some more functions, but without much result.
2008-09-02 02:16:58 +09:00
Keith Whitwell
5e184894d2
util: make timed_winsys os independent
2008-09-01 14:24:33 +01:00
Keith Whitwell
c118c654fa
util: add func to return time as uint64 microseconds
2008-09-01 14:24:33 +01:00
Keith Whitwell
a4d04d71a4
add u_timed_winsys.[ch]
2008-09-01 14:24:33 +01:00
Keith Whitwell
a9345511d8
remove depend.bak in realclean
2008-09-01 14:24:33 +01:00
Michel Dänzer
55270310c5
Fix build by removing #include of removed dri_sarea.h.
...
Thanks to JohnFlux on IRC for pointing out the problem.
2008-09-01 11:43:29 +02:00
Patrice Mandin
0c47bd0374
nv30: set fp samplers with fragprog generation
2008-08-31 11:10:08 +02:00
José Fonseca
8c092def6c
Remove CVS keywords.
...
Please remove CVS keywords when importing third-party code into the git
repository.
2008-08-31 17:43:20 +09:00
José Fonseca
ef823dd543
util: Fix compiler errors in the release build of C++ sources.
2008-08-31 17:40:08 +09:00
José Fonseca
8156c30a5d
gallium: winsys/common no longer exists
2008-08-31 16:51:16 +09:00
Patrice Mandin
248831e741
nv30: activate fp texture units when needed, to get texturing
2008-08-30 22:30:03 +02:00
Jonathan White
3c81992676
Added command line option for Scons to select which version of MSVS to use. Versions 7.1, 8.0 and 9.0 are allowed. Usage is scons MSVS_VERSION=8.0.
2008-08-29 11:30:32 -06:00
Kristian Høgsberg
f56b569e9a
DRI2: Drop sarea, implement swap buffers in the X server.
2008-08-29 12:13:14 -04:00
Younes Manton
4d9d192672
g3dvl: Buffer the entire frame before rendering.
2008-08-28 23:25:13 -04:00
Xiang, Haihao
7a2ab6d055
i965: force thread switch after IF/ELSE/ENDIF. partial fix for #16882 .
...
A thread switch is implicitly invoked after the issuance of an IF/ELSE/ENDIF
instruction if necessary. Unfortunately it seems sometimes a forced thread
switch is needed.
2008-08-29 09:49:16 +08:00
Xiang, Haihao
6073b49c79
i965: mask control for BREAK/CONT/DO/WHILE. partial fix fox #16882
2008-08-29 09:28:08 +08:00
Xiang, Haihao
fd81433a4e
i965: Push/pop instruction state. partial fix for #16882
2008-08-29 09:23:25 +08:00
Brian Paul
380385ab7d
mesa: added test for very long fixed-function vertex programs
2008-08-28 15:22:44 -06:00
Brian Paul
ee87d7d9ec
mesa: remove debug code
2008-08-28 15:21:44 -06:00
Brian Paul
6138ee9de0
mesa: bump MAX_INSN to 350
2008-08-28 15:15:00 -06:00
Brian Paul
cacf5f21ef
mesa: dynamically grow the fixed function vertex program as needed
...
Don't use a fixed-size array. Saves memory in most cases and avoids
potential overflow for long programs.
2008-08-28 15:11:04 -06:00
Brian Paul
5048457372
gallium: change the conditional which tests for combined Z+stencil buffers
...
The caller might be requesting 16-bit Z + 8-bit stencil be placed in a
PIPE_FORMAT_S8Z24 or PIPE_FORMAT_Z24S8 buffer.
2008-08-28 14:18:46 -06:00
Brian Paul
4e4cb02740
mesa: bump MAX_INSN to 300
2008-08-28 14:18:46 -06:00
José Fonseca
c46c07f6c6
pipebuffer: Fix/add detail to the under- overflow report messages.
2008-08-28 22:03:42 +09:00
José Fonseca
c6739e8cea
pipebuffer: Check buffer over- & underflows when mapping/unmapping too.
2008-08-28 21:06:06 +09:00
Brian Paul
c5f0fd95a4
egl: free display ext data in xdri_eglTerminate().
2008-08-27 16:20:19 -06:00
José Fonseca
a341586d03
gallium: s/PIPE_OS_WINDOWS/PIPE_SUBSYSTEM_WINDOWS_USER/ in p_thread.
...
PIPE_OS_WINDOWS is an umbrella for all Windows variants and subsystems,
PIPE_SUBSYSTEM_WINDOWS_USER is just for user-space windows (e.g., OpenGL),
and the thread primitives currently included in p_thread only support the
later.
2008-08-28 06:53:57 +09:00
Brian Paul
ee402e5ce2
gallium: better support for user-space interleaved arrays
...
Basically, set up one user-space wrapper for all arrays instead of
the individual arrays.
2008-08-27 14:42:50 -06:00
Brian Paul
ce40bc2ae0
gallium: in st_draw_vbo() try to detect interleaved arrays in a single VBO.
2008-08-27 13:22:54 -06:00
Brian Paul
8eb85f6f2a
gallium: remove old assertions
2008-08-27 13:22:54 -06:00
Brian Paul
6f33b778ae
gallium: call st_finish() in XMesaFlush()
2008-08-27 13:22:54 -06:00
Brian Paul
d29cf58b1d
gallium: s/_glthread_Cond/unsigned/ in p_thread.h
2008-08-27 08:46:29 -06:00
Michal Krol
da66a7640d
gallium: Add dummy defines of pipe_condvar for Windows to make it compile.
2008-08-27 11:06:08 +02:00
Brian Paul
0bb852fa49
gallium: thread wrapper clean-up
...
In p_thread.h replace _glthread_* functions with new pipe_* functions.
Remove other old cruft.
2008-08-26 16:35:12 -06:00
Brian Paul
bafefccff8
mesa: don't check for GLSL 1.2 to advertise GL 2.1
...
The GLSL 1.2 features are minor...
2008-08-26 16:13:39 -06:00
Brian Paul
9aeb6e7825
added 7.1 MD5 sums
2008-08-26 16:12:29 -06:00
Brian Paul
019b9529e5
change MESA_MINOR to 3
2008-08-26 15:59:06 -06:00
Brian Paul
17e9bbd5a4
7.1 updates from 7.2 branch
2008-08-26 15:58:42 -06:00
Brian Paul
b5ab3b7dfc
cell: use SDK 3.0 by default
2008-08-26 14:10:29 -06:00
Timo Jyrinki
385d6b2e68
asst. html doc updates
2008-08-26 12:36:39 -06:00
Keith Whitwell
e6887a5752
draw: attempt atomic submit of large drawelements calls
2008-08-26 09:36:52 +01:00
Keith Whitwell
026e7731e5
vbo: seed initial max_element value with a more likely candidate
2008-08-26 09:36:47 +01:00
Brian
6ba9fb9b66
cell: asst fixes to get driver building/running again.
...
Note that SPU vertex transformation is disabled at this time.
2008-08-25 11:31:59 -06:00
Brian
60ac76175b
gallium: added const qualifiers on some draw funcs
2008-08-25 11:30:57 -06:00
Brian
a644c5a850
gallium: include p_debug.h for non-HAVE_POSIX_MEMALIGN
2008-08-25 11:30:20 -06:00
Brian
fd06d01b80
gallium: include <sched.h> on linux to get sched_yield() proto
2008-08-25 11:29:39 -06:00
Brian Paul
80af50b35b
mesa: glsl: regenerated file
2008-08-25 09:20:26 -06:00
Brian Paul
2d5087bf74
mesa: glsl: grab latest fixes from gallium-0.1 branch
...
Includes:
1. Fixes failed asserting about bad swizzles in src reg emit.
2. Tracks uniform var usage.
3. Emit exp() in terms of EXP2 instruction.
2008-08-25 09:20:00 -06:00
Brian Paul
d6df735f1c
mesa: set version string to 7.3-devel
2008-08-25 09:18:33 -06:00
Brian Paul
85813e36f2
gallium: include u_math.h
2008-08-25 08:32:50 -06:00
Michal Krol
2c4661f8fc
gallium: Add missing includes.
2008-08-25 10:42:25 +02:00
Brian
6fd2feaad7
gallium: include u_memory.h, u_math.h
2008-08-24 18:10:50 -06:00
Brian Paul
4c84e940d0
gallium: remove old tile util files
2008-08-24 17:49:11 -06:00
Brian Paul
4f25420bdd
gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.h
...
Also, rename p_tile.[ch] to u_tile.[ch]
2008-08-24 17:48:55 -06:00
Dave Airlie
f75843a517
Revert "Revert "Merge branch 'drm-gem'""
...
This reverts commit 7c81124d7c .
2008-08-24 17:59:10 +10:00
Michal Krol
ec7415642d
trace: Include u_string.h.
2008-08-23 12:31:50 +02:00
Michal Krol
e7ff7f78be
util: Silence compiler warnings on Windows.
2008-08-23 12:31:16 +02:00
Michal Krol
f3dfd5969d
util: Include missing u_rect.h.
2008-08-23 12:30:39 +02:00
Brian Paul
2b87174ec3
gallium: rename p_util.c to u_rect.c (it only contains rect copy/fill helpers)
2008-08-22 16:22:35 -06:00
Brian Paul
fe1e39afbb
gallium: move pipe_copy_rect(), pipe_fill_rect() protos into new u_rect.h header
2008-08-22 16:19:22 -06:00
Brian Paul
a13475ff00
gallium: replace align_int() with align()
...
The two functions are identical. Removed align_int() from p_util.h
2008-08-22 16:09:37 -06:00
Brian Paul
f9c04d55d0
gallium: insert __cplusplus/extern wrappings
2008-08-22 15:53:28 -06:00
Brian Paul
a22bdd42d7
gallium: move math macros from p_util.h to u_math.h
...
More can be done...
2008-08-22 15:51:38 -06:00
Brian Paul
9935e3b730
gallium: stop using ifloor(), FABSF(), etc
2008-08-22 15:51:02 -06:00
Brian Paul
120270def7
gallium: stop using FABSF() macro
2008-08-22 15:49:36 -06:00
Brian Paul
1a46dcc8a9
gallium: replace LOG2() macro with util_fast_log2() inline func
2008-08-22 15:25:21 -06:00
Brian Paul
1c2ff4d9e6
gallium: use new util_fast_exp2(), _log2(), pow() functions
...
New code surrounded with #if FAST_MATH to allow comparing against original
code if we need to debug.
2008-08-22 15:16:43 -06:00
Brian Paul
07bebb839d
mesa: glsl: regenerated file
2008-08-22 15:14:47 -06:00
Brian Paul
47d4b958cf
mesa: glsl: implement exp() functions in terms of EXP asm instruction, not pow
2008-08-22 15:14:36 -06:00
Brian Paul
9e2b867b3f
gallium: new u_math.[ch] files for math functions
...
So far, optimized/low-precision versions of exp(), exp2(), log2(), pow().
2008-08-22 15:13:47 -06:00
José Fonseca
d32f51d471
python/retrace: Interpret texture/surfaces destructions.
2008-08-22 03:14:51 +01:00
José Fonseca
807a7487ff
trace: Don't trace texture/surfaces releases, only destructions.
2008-08-22 03:14:24 +01:00
José Fonseca
152d00d199
trace: Use a 4 hexadecimal digit suffix.
2008-08-22 03:13:27 +01:00
José Fonseca
7f3c3683ce
python/retrace: Process the trace call-by-call (instead of reading everything into memory).
2008-08-22 01:23:48 +01:00
José Fonseca
10624065b0
python/retrace: Support gziped traces.
2008-08-21 18:46:04 +01:00
José Fonseca
34d12c1787
trace: Hack to detect writes to user buffers.
...
It often happens that new data is written directly to the user buffers
without mapping/unmapping. This hack marks user buffers and dumps them
before passing them to pipe context.
2008-08-21 18:46:04 +01:00
José Fonseca
0fff3e4ea9
trace: Split the output stream on windows.
...
Because windows limits the ammount of memory that can be mapped.
2008-08-21 18:46:04 +01:00
José Fonseca
f52db6cd44
scons: Build the trace pipe driver by default.
2008-08-21 18:46:03 +01:00
Brian Paul
ad9c862ffb
mesa: glsl: fix a swizzle bug in storage_to_src_reg()
...
Need to remove the 'nil' components before swizzling a swizzle
2008-08-20 14:40:02 -06:00
Brian Paul
e55093bf2f
mesa: glsl: add check for exceeding max number of constants/uniforms
2008-08-20 14:39:10 -06:00
Brian Paul
29bee15b1e
mesa: glsl: regenerated file
2008-08-20 11:07:25 -06:00
Brian Paul
ef33697c7e
mesa: glsl: better implementation of ftransform()
2008-08-20 11:06:53 -06:00
Brian Paul
0fae764898
gallium: test for and cull prims with inf/nan vertices in sp_setup.c code.
2008-08-20 10:32:26 -06:00
Brian Paul
f6abdb2043
gallium: fix typo in LINE() macro (replace i+1 with i1 var)
...
We were sometimes referencing an invalid vertex.
Fixes progs/trivial/line-clip.c test among others.
2008-08-20 10:32:26 -06:00
José Fonseca
34cffce334
python/retrace: Retrace draw_elements and draw_range_elements.
2008-08-20 16:57:51 +01:00
José Fonseca
1d881b8e84
python: bindings for draw_range_elements.
2008-08-20 16:57:51 +01:00
Brian Paul
815cdcfbc0
mesa: allow for extra per-context init
2008-08-19 18:14:15 -06:00
Brian Paul
7f9959ae83
gallium: fix do_flip bug in sp_surface_copy()
...
Surfaces are always in y=0=top raster order so the caller should invert
the Y coordinate if needed; don't do it in sp_surface_copy().
Fixes a glCopyTexture regression.
2008-08-19 17:41:34 -06:00
Brian Paul
63c0970dca
gallium: fix an assertion
2008-08-19 17:04:48 -06:00
Brian Paul
84a496746e
gallium: implement a fast-path for glReadPixels for common cases
2008-08-19 14:35:32 -06:00
Brian Paul
e90c0c976d
gallium: do a proper implementation of GL_OES_read_format
...
Examine the currently bound color buffer's format to see if there's a good
format/type match.
2008-08-19 14:35:31 -06:00
José Fonseca
9e3aaa5048
gallium: WinCE build fixes.
2008-08-19 21:35:06 +01:00
José Fonseca
d7f8b95e09
python/retrace: Add several missing functions.
2008-08-19 21:35:06 +01:00
José Fonseca
d27ffb8c6d
trace: Fix pipe_clip_state dump.
2008-08-19 21:35:06 +01:00
José Fonseca
9adfc57a4c
python: Handle null state.
2008-08-19 21:35:06 +01:00
José Fonseca
5f1ef11ad2
python/retrace: Trim null chars.
...
They are often left in memory mapped files, and are not part of the XML
accept chars anyway.
2008-08-19 21:35:06 +01:00
José Fonseca
200d6dcc83
trace: Support C++.
2008-08-19 21:35:06 +01:00
Brian Paul
ff01a12b23
mesa: glsl: more writemask error checking
2008-08-19 12:04:35 -06:00
Brian Paul
bec1519a32
mesa: glsl: added some post incr/decr error checks
2008-08-19 11:31:10 -06:00
Brian Paul
c4cf2513e6
mesa: glsl: limit function matching through casting
2008-08-19 11:23:25 -06:00
Brian Paul
3e1706f720
mesa: glsl: add usage tracking for uniform vars
...
Unused uniforms are no longer included in the active uniforms list.
2008-08-19 10:27:06 -06:00
Brian Paul
df9bd01ea0
mesa: glsl: put var emit/ref code into separate functions
2008-08-19 10:05:11 -06:00
Michal Krol
146a0fba00
gallium: Add note about vs_2_0 EXPP mapping.
2008-08-19 15:32:09 +02:00
Michal Krol
47e14cc093
Add NV_vertex_program specific tests.
2008-08-19 14:44:41 +02:00
Michal Krol
2858ec66c2
Add support for NVIDIA programs.
2008-08-19 14:43:19 +02:00
Michal Krol
4405e428e4
tgsi: Implement LOG opcode for SSE2 codegen.
2008-08-19 12:08:14 +02:00
Michal Krol
0d9d2045e8
tgsi: Implement EXP opcode for SSE2.
2008-08-19 11:47:30 +02:00
José Fonseca
7f2d349b2d
mesa: Call pipe->destroy on context destruction for all platforms.
2008-08-19 02:24:13 +01:00
José Fonseca
f9e14e0dac
xlib: Revert destroying pipe_screen (temporary).
2008-08-19 00:18:55 +01:00
Michal Krol
de3083be71
tgsi: Fix ARL opcode in SSE2 codegen.
2008-08-19 00:44:18 +02:00
Michal Krol
5d0a079fd0
st: Do not translate program constants to immediates when
...
indirect addressing used.
2008-08-19 00:44:16 +02:00
Michal Krol
3eeaa943e2
st: Translate address register declaration.
2008-08-19 00:44:15 +02:00
Michal Krol
81dbc31f8b
st: Fix immediate construction.
2008-08-19 00:44:13 +02:00
Michal Krol
2b512c0135
tgsi: Workaround debug output buffer size limitations.
2008-08-19 00:44:11 +02:00
Michal Krol
5b16730df8
Port vp to Windows.
2008-08-19 00:44:09 +02:00
Michal Krol
93305bd680
tgsi: Use NUM_CHANNELS.
2008-08-19 00:44:08 +02:00
Brian Paul
c71161f1b1
gallium: use PIPE_TEXTURE_USAGE_RENDER_TARGET for stencil renderbuffers
2008-08-18 16:30:10 -06:00
Brian Paul
a88de345cd
egl: don't put the example/demo driver in the lib/ dir
2008-08-18 16:12:39 -06:00
Brian Paul
e3f3e22cf7
gallium: fix vertex program output translation/mapping bug
...
In some cases, the vertex program output's semantic info didn't match up
with the fragment program's input semantic info. This info is now explicitly
passed into the st_translate_fragment_program() function.
2008-08-18 16:10:01 -06:00
José Fonseca
90a1c6e403
trace: Explain how to integrate with a state tracker or winsys.
2008-08-18 20:47:41 +01:00
José Fonseca
747762f379
trace: Preliminary stream implementation for GDI.
2008-08-18 20:47:41 +01:00
José Fonseca
d042f415fc
trace: Use long longs to ensure covering 64bits integers.
2008-08-18 20:47:41 +01:00
José Fonseca
6a31bb6ad8
trace: Get the trace file from the GALLIUM_TRACE option itself.
2008-08-18 20:47:40 +01:00
Brian Paul
145a45e9d6
gallium: fix do_flip bug on glCopyTexImage / surface_copy() path
2008-08-18 13:18:01 -06:00
Michal Krol
235981d871
gallium: Remove TGSI_CC_UN.
2008-08-18 17:49:01 +02:00
Michal Krol
e9ec60097c
tgsi: Update condition code vector when storing dest register.
2008-08-18 17:20:14 +02:00
Michal Krol
56c30bf17b
tgsi: Saturate modifier obeys ExecMask.
...
Implement NVIDIA [-1;+1] saturate mode.
2008-08-18 17:20:12 +02:00
Michal Krol
6aacca106b
tgsi: Respect condition codes when storing destination register.
2008-08-18 17:20:10 +02:00
Michal Krol
880b751e8e
tgsi: Cosmetic changes.
2008-08-18 17:20:08 +02:00
Michal Krol
e2da7edd64
tgsi: Add condition code (CC) register.
2008-08-18 17:20:06 +02:00
Brian Paul
087ee474ed
mesa: rearrange some code in _mesa_BindTexture() to fix error detection bug 17173
...
Also, move GL_TEXTURE_RECTANGLE init code into separate function.
2008-08-18 08:56:17 -06:00
Michal Krol
6fdc057887
scons: Fix build.
2008-08-18 14:40:02 +02:00
Younes Manton
7f100d04dd
g3dvl: Use rotating buffers to avoid waiting for map().
2008-08-18 00:04:29 -04:00
Stephane Marchesin
f90e50dff9
nv30: add some opcodes.
2008-08-18 03:00:25 +02:00
Alan Hourihane
5c9d0c7052
pick first mode
2008-08-17 21:59:00 +01:00
Alan Hourihane
9bbc55116f
if we can't find a mode, return first. At least we should
...
see the top left portion if we've got larger screens on
other CRTC's
2008-08-17 21:55:37 +01:00
Alan Hourihane
ccf1910dd4
consolidate intel directories.
...
we now have
src/gallium/winsys/drm/intel/{common,dri,egl}
2008-08-17 20:17:18 +01:00
Alan Hourihane
2037b1381c
rather than use CRTC 1 (aka LVDS), try and setup all connectors/encoders
...
and get the same output on all.
2008-08-17 19:14:00 +01:00
Alan Hourihane
b6db08a91b
choose a 1024x768 resolution
2008-08-17 19:13:17 +01:00
Alan Hourihane
3eeafb7179
choose sane default for dri driver location
2008-08-17 19:12:54 +01:00
Younes Manton
6858dd50c9
g3dvl: Modularized rendering, refactored to accommodate VAAPI, other APIs.
2008-08-16 13:04:54 -04:00
Younes Manton
fb2732ff05
g3dvl: Merged tgsi/util and tgsi/exec moved some headers around.
2008-08-16 13:04:54 -04:00
Hanno Böck
404166217a
fix DESTDIR omissions
2008-08-15 17:14:54 -06:00
Brian Paul
2e40e44bf4
mesa: glsl: fix linking of varying vars which are arrays
2008-08-15 15:00:18 -06:00
Brian Paul
52a6b7e6da
gallium: in st_draw_vbo() use ctx->Current.Attrib[] values when arrays are missing/null
...
fixes potential segfaults when vertex arrays are missing
2008-08-15 11:52:28 -06:00
José Fonseca
4b1b5ca9bd
xlib: Kill xmesa_surface.
...
A winsys cannot expect that the surfaces passed display_surface are the
surfaces it created, as surface are now in generate texture views created
by pipe_screen. Indeed, the fact it was working so far was mere luck.
This fixes a weird tiled output when using the trace pipe driver.
Winsys' surfaces should die.
2008-08-15 11:24:06 +01:00
José Fonseca
9d58b2a432
trace: Fix typo.
2008-08-15 11:20:57 +01:00
José Fonseca
52ecb8f563
python/retrace: Update frame when PIPE_FLUSH_FRAME spotted.
2008-08-15 10:35:19 +01:00
José Fonseca
f40de50def
trace: Wrap all textures and surface created by the pipe driver.
...
That is,
Unfortunately, this causes a regression in softpipe, where the
output gets tyled.
2008-08-15 10:35:19 +01:00
José Fonseca
f121d0e54f
trace: Allow multiple screens. Flush after call.
2008-08-15 10:35:19 +01:00
José Fonseca
c9751522b0
pyhon/retrace: Retrace surface contents.
...
Now capable of replaying trivial/quad-tex-2d
2008-08-15 10:35:19 +01:00
José Fonseca
14fe0d62ee
python/retrace: Keep addresses as strings.
...
To simplify looking up these in the trace.
2008-08-15 10:35:19 +01:00
José Fonseca
4fffc9d63f
trace: Several fixes.
2008-08-15 10:35:18 +01:00
José Fonseca
37336b7d9e
python: Fix put/get_tile_raw bindings.
2008-08-15 10:35:18 +01:00
José Fonseca
424dea98d4
trace: Trace surface contents.
2008-08-15 10:35:18 +01:00
José Fonseca
196167e9d5
trace: Make stream a global variable.
...
This not only simplifies the code, but allows to use atexit() to ensure
the log is closed when applications don't exit cleanly.
2008-08-15 10:35:18 +01:00
José Fonseca
2f34c851c0
mesa: Issue PIPE_FLUSH_FRAME in glSwapBuffers/glFlush/glFinish.
2008-08-15 10:35:18 +01:00
José Fonseca
daa481a9c0
gallium: New PIPE_FLUSH_FRAME flag to signal the end of a frame.
2008-08-15 10:35:18 +01:00
José Fonseca
df3d694851
python/retrace: Commit unsaved changes to the doc.
2008-08-15 10:35:17 +01:00
Brian Paul
a7b818d53a
gallium: init default texture image to gray
2008-08-14 15:44:28 -06:00
Brian Paul
8f6d9e12be
gallium: use a default texture in update_textures(), update_samplers() when needed
...
The default texture is used when the current fragment shader has texture
sample instructions but the user has not provided/bound a texture.
2008-08-14 15:44:28 -06:00
Brian Paul
6c46b49d12
gallium: added queries to determin GL_EXT_packed_depth_stencil support
2008-08-14 15:44:28 -06:00
Patrice Mandin
d4c199d056
nv30: set mipmap min/max lod accordingly
2008-08-14 17:24:06 +02:00
Patrice Mandin
a145c107c1
nv30: disable setting nv40 RECT bit, this is not the same on nv30, plus gallium does not support rectangle textures currently, only full POT or NPOT
2008-08-14 16:52:51 +02:00
Patrice Mandin
a7ea6bae4e
nv30: does not support mirror clamp, only mirror repeat
2008-08-14 16:36:52 +02:00
José Fonseca
19aee90179
trace: Update status.
2008-08-14 11:01:43 +01:00
José Fonseca
31bb6c0d17
python: Update status.
2008-08-14 11:01:43 +01:00
José Fonseca
468c9775cb
python/retrace: Application capable of replaying gallium traces.
...
At the moment it is capable of replaying trivial/tri kind of apps.
See README for status.
2008-08-14 11:01:43 +01:00
José Fonseca
ffaa4e816f
python: Allow to use trace pipe driver with python.
2008-08-14 11:01:43 +01:00
José Fonseca
92675f6e22
python: Fix typo in buffer::write.
2008-08-14 11:01:43 +01:00
José Fonseca
90ed1742d5
python: Remove unused var.
2008-08-14 11:01:42 +01:00
José Fonseca
969ff9e9bf
xlib: Use trace usage.
2008-08-14 11:01:42 +01:00
José Fonseca
3c90678ea6
trace: Separate the trace screen/context vs the original screen/context.
2008-08-14 11:01:42 +01:00
José Fonseca
c67f353c0f
mesa: Don't use alignments < 4.
2008-08-14 11:01:42 +01:00
José Fonseca
449cb6b37b
mesa: posix_memalign requires alignment to be multiple of sizeof(void*)
2008-08-14 11:01:42 +01:00
José Fonseca
a8540ef9fb
gallium: Catch errors from posix_memalign.
2008-08-14 11:01:42 +01:00
José Fonseca
50c6092355
python: Simplify st_winsys.
2008-08-14 11:01:42 +01:00
José Fonseca
0ecaa37e49
python: Bindings fixes.
2008-08-14 11:01:42 +01:00
José Fonseca
d756f9512d
translate: Draw can request up to PIPE_MAX_ATTRIBS + 1 vertex elements.
2008-08-14 11:01:42 +01:00
Alan Hourihane
73467e1080
check for winsys->destroy before calling
2008-08-14 09:52:15 +01:00
Brian Paul
19ff2326e9
gallium: fix exec_kilp(), fix Exec/FuncMask test for TGSI_OPCODE_RET
...
Fixes a few glean glsl regressions.
2008-08-13 17:26:58 -06:00
Brian Paul
f3048ad90e
gallium: in fallback_copy_texsubimage() create new tex surface for CPU read access
...
Was trying to use the strb->surface but it's made for GPU read/write only.
2008-08-13 14:59:48 -06:00
Michal Krol
3a1af846fe
tgsi: Initial code for KILP, needs CCs working to be complete.
2008-08-13 20:11:41 +02:00
Michal Krol
83a5a225d7
tgsi: Use a homebrew version of toupper().
2008-08-13 19:31:38 +02:00
Michal Krol
bfdb1d55d5
tgsi: Fix typo.
2008-08-13 19:28:10 +02:00
Michal Krol
4b929b32d0
tgsi: Validate instruction opcode and operand counts.
2008-08-13 17:35:20 +02:00
Michal Krol
2caaba8195
tgsi: Use tgsi_info to dump opcode names.
2008-08-13 17:35:17 +02:00
Michal Krol
79e52779bd
tgsi: Use tgsi_opcode_info.
2008-08-13 17:35:15 +02:00
Michal Krol
6d83a0cc68
make: List tgsi_info.c.
2008-08-13 17:35:12 +02:00
Michal Krol
668ac25725
scons: List tgsi_info.c.
2008-08-13 17:35:10 +02:00
Michal Krol
94f9faab31
tgsi: Opcode information.
2008-08-13 17:35:08 +02:00
Ben Skeggs
dbec107c25
nv30/nv40: KIL/KILP swapped meanings
2008-08-14 00:22:49 +10:00
Ben Skeggs
56f5c0c001
Merge remote branch 'origin/gallium-0.1' into nouveau-gallium-0.1
2008-08-14 00:20:52 +10:00
Zack Rusin
d8be393cb6
fix compilation
2008-08-13 07:14:47 -04:00
Michal Krol
e7e992b12a
mesa: KIL -> KIL, KIL_NV -> KILP.
2008-08-13 11:19:24 +02:00
Michal Krol
db38708c43
i915: Swap meanings of KIL and KILP.
2008-08-13 11:13:46 +02:00
Michal Krol
e8e75c8c86
cell: KILP is a predicated discard, KIL is a conditional discard.
2008-08-13 11:10:58 +02:00
Michal Krol
f0874d1a6b
tgsi: Swap meanings of KIL and KILP opcodes.
2008-08-13 11:09:20 +02:00
Michal Krol
f633b14b92
gallivm: Translate KIL instead of KILP.
2008-08-13 10:58:54 +02:00
Michal Krol
0c8f4c25ff
draw: Use KIL instead of KILP.
2008-08-13 10:52:55 +02:00
Michal Krol
9804ab9acc
gallium: Make a note that OPCODE_KIL is a conditional kill.
...
Map OPCODE_TEXKILL to OPCODE_KIL.
2008-08-13 09:15:27 +02:00
Brian Paul
4424c66875
gallium: more context clean-up
2008-08-12 18:02:44 -06:00
Brian Paul
a6880ace4c
mesa: glsl: fix error detection of writing to read-only variables
2008-08-12 17:42:13 -06:00
Brian Paul
c01fbc7866
mesa: texture crop rect state
2008-08-12 17:41:57 -06:00
Brian Paul
5af60556ed
mesa: glsl: fix comment
2008-08-12 17:41:21 -06:00
Brian Paul
faad665594
gallium: distinguish between KIL and KILP
...
Note: KIL (unconditional) not done yet.
2008-08-12 12:00:57 -06:00
Brian Paul
8f243d6593
mesa: glsl: enable bzero() in slang_typeinfo_construct()
2008-08-12 11:47:46 -06:00
Brian Paul
ee7296d319
mesa: glsl: remove reads of output regs from fragment shaders too
2008-08-12 10:00:59 -06:00
Brian Paul
af3d9dba56
mesa: set point state
2008-08-12 10:00:36 -06:00
Brian Paul
49c2ee9d99
mesa: allow _mesa_remove_output_reads() to work on fragment programs
2008-08-12 10:00:02 -06:00
Brian Paul
0fe0dc32e4
mesa: glsl: better error messages
2008-08-12 08:53:49 -06:00
Brian Paul
ef82311b3d
mesa: glsl: regenerated files
2008-08-12 08:53:49 -06:00
Brian Paul
3e0bbd404a
mesa: glsl: additional constructors
2008-08-12 08:53:49 -06:00
Brian Paul
42b262d01a
mesa: glsl: better mod() functions
2008-08-12 08:53:49 -06:00
José Fonseca
3eea56dc93
mesa: Rename sources to sources.mak.
2008-08-12 13:00:31 +01:00
José Fonseca
0f5a2ebec4
gallium: Disable debug break by default on windows.
2008-08-12 13:00:27 +01:00
José Fonseca
80d3a653f0
tgsi: Prevent division by zero.
2008-08-12 13:00:20 +01:00
José Fonseca
3b5ee3d6de
gallium: Allow compilation inside X.
2008-08-12 13:00:18 +01:00
José Fonseca
cf16285d1b
gdi: Remove CVS keyword.
2008-08-12 13:00:13 +01:00
José Fonseca
ebb5855821
glut: Remove EOF characters.
2008-08-12 13:00:10 +01:00
José Fonseca
506b8ebdba
python: Use st_buffers instead of pipe_buffers.
2008-08-12 11:34:41 +01:00
José Fonseca
4a77fadd10
trace: More dump fixes.
2008-08-12 11:34:41 +01:00
José Fonseca
7b8fa937eb
trace: Fix create_blend_state dump.
2008-08-12 11:34:41 +01:00
José Fonseca
e54fa77d13
trace: Dump polygon stipple state as an array.
2008-08-12 11:34:41 +01:00
José Fonseca
e08072c5db
python: Bindings for p_compiler.h types.
2008-08-12 11:34:41 +01:00
José Fonseca
d4d8f80388
trace: Fix create_depth_stencil_alpha_state trace.
2008-08-12 11:34:41 +01:00
José Fonseca
e69e94d301
python: Bindings for pipe_{depth,stencil,alpha}_state.
2008-08-12 11:34:41 +01:00
José Fonseca
166b939d52
trace: Dump pipe_{depth,stencil,alpha}_state names.
2008-08-12 11:34:41 +01:00
José Fonseca
ca826d79a6
gallium: Name pipe_depth_stencil_alpha_state member structures.
...
So that the previously anonymous depth/stencil/alpha structures can be
identified in the traces.
This is just syntactic sugar: it does not break source or binary compatibility.
2008-08-12 11:34:40 +01:00
José Fonseca
ae0c9b56d4
python: Simplify setting the constant buffers.
2008-08-12 11:34:40 +01:00
José Fonseca
e7f1ac39be
python: Split the interface definition file in smaller ones.
2008-08-12 11:34:40 +01:00
José Fonseca
b5f7dd0c08
python: Add unsigned arrays.
2008-08-12 11:34:40 +01:00
José Fonseca
8dbb3011a1
trace: Replace buffer_map+memcpy+buffer_unmap by buffer_write
2008-08-12 11:34:40 +01:00
José Fonseca
a318325b51
trace: Zero the buffers to avoid dumping uninitialized memory.
2008-08-12 11:34:40 +01:00
José Fonseca
a304d27118
python: Allow writing to buffers.
2008-08-12 11:34:40 +01:00
José Fonseca
e5a606883f
trace: Fix hexadecimal dumping.
2008-08-12 11:34:40 +01:00
José Fonseca
94cf4f15c3
trace: Trace winsys/screen/context creation.
2008-08-12 11:34:40 +01:00
José Fonseca
91f6032919
trace: Trace texture depth.
2008-08-12 11:34:40 +01:00
José Fonseca
23e8c92543
python: Update the documentation.
2008-08-12 11:34:40 +01:00
Michal Krol
66ef96f6dc
softpipe: Include missing header.
2008-08-12 11:30:50 +02:00
Brian Paul
40436b31a6
mesa: glsl: regenerated file
2008-08-11 17:10:39 -06:00
Brian Paul
1c30e56cd2
mesa: glsl: change refract() functions to allow inlining
2008-08-11 17:10:24 -06:00
Brian Paul
2023f7f91d
mesa: glsl: use SGE instead of SGT in step() functions
2008-08-11 16:13:39 -06:00
Brian Paul
90ffd2736c
mesa: glsl: fix bugs in refract() functions, plus minor optimization
2008-08-11 16:07:40 -06:00
Brian Paul
0423a39239
version 20 of glxext.h
2008-08-11 15:21:40 -06:00
Brian Paul
1a1079e066
version 41 of glext.h
2008-08-11 15:21:40 -06:00
Brian Paul
6fccd8d064
mesa: glsl: add missing sampler types in sizeof_glsl_type(), bug 17079
2008-08-11 15:21:40 -06:00
Brian Paul
a0a6144809
gallium: added comment
2008-08-11 15:21:40 -06:00
Brian Paul
e552140a9a
gallium: added _NEW_PROGRAM to dependencies
2008-08-11 15:21:40 -06:00
Brian Paul
d506fc0acf
gallium: debug/print vertex tweak
2008-08-11 15:21:40 -06:00
Brian Paul
22604727e4
gallium: emit sprite coords (gl_PointCoord)
2008-08-11 15:21:40 -06:00
Ben Skeggs
df4228dedd
nouveau: pf_sprint_name -> pf_name
2008-08-11 16:14:42 +10:00
Ben Skeggs
f56eda6a85
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-08-11 16:07:56 +10:00
José Fonseca
5549d35db5
trace: Dump writes to pipe_buffers.
2008-08-09 14:10:25 +01:00
José Fonseca
376f2cbb19
trace: Prevent tracing internal pipe driver calls.
2008-08-09 14:10:25 +01:00
José Fonseca
dc31bb5076
gallium: Invert include order.
2008-08-09 14:10:25 +01:00
José Fonseca
696067e781
trace: Dump shaders as text.
2008-08-09 14:10:25 +01:00
José Fonseca
673489fa5c
tgsi: Dump shaders to a string too.
...
Again.
2008-08-09 14:10:25 +01:00
José Fonseca
3e1974f94e
util: Utility functions to print to a string buffer without overflowing.
2008-08-09 14:10:25 +01:00
José Fonseca
b65259de6c
trace: Allow to dump binary data.
2008-08-09 14:10:25 +01:00
José Fonseca
6c7aff209c
trace: Trace pipe_winsys calls.
2008-08-09 14:10:24 +01:00
José Fonseca
fcfe63805d
trace: Remove unused code.
2008-08-09 14:10:24 +01:00
Brian Paul
74b14fe6dd
mesa: fix some feature tests
2008-08-08 13:06:54 -06:00
Brian Paul
966e199e40
mesa: fix some pixel transfer state tests for depth formats
2008-08-08 12:29:48 -06:00
Brian Paul
27858226dc
gallium: fix additional glCopyTex[Sub]Image issues
...
Use the TexFormat->StoreImage() routine for fallbacks. This handles the
case of copying RGBA framebuffer data into an RGBA texture when the base
format is GL_RGB (or GL_LUMINANCE, etc). In that case, we need to set
the texture's alpha=1 and override the framebuffer's alpha.
2008-08-08 10:39:56 -06:00
Brian Paul
48cf46a29d
mesa: fix out-of-bounds memory reads in swizzle_copy()
2008-08-08 09:08:44 -06:00
José Fonseca
74d649d9a9
trace: Prevent from internal calls from pipe_context to pipe_screen from being traced.
2008-08-08 12:32:23 +01:00
José Fonseca
9dcb956a06
gallium: Add destroy callback to all *_winsys interfaces.
...
For consistency and to simplify these objects' destruction.
2008-08-08 12:32:23 +01:00
José Fonseca
be36f7869e
i965: Remove extraneous arg to debug_printf.
2008-08-08 12:32:23 +01:00
Brian Paul
4e070f10c0
gallium: clean-up, remove dead code, update comments
2008-08-07 17:59:41 -06:00
Brian Paul
c1c4ff28f0
gallium: use PIPE_FORMAT_X8Z24_UNORM for 24-bit Z but no stencil
2008-08-07 15:14:52 -06:00
Brian Paul
fdb7dc889f
softpipe: add support for PIPE_FORMAT_X8Z24_UNORM, PIPE_FORMAT_Z24X8_UNORM
2008-08-07 15:14:52 -06:00
José Fonseca
6a82ea2ed2
trace: Simplify HTML output.
2008-08-07 20:58:09 +01:00
José Fonseca
05e90964cf
trace: Merge the CSS into the XSL.
2008-08-07 20:58:09 +01:00
José Fonseca
ce2137a6a4
trace: Dump format names.
2008-08-07 20:58:09 +01:00
Brian Paul
8fb55dab78
gallium: s/pf_sprint_name/pf_name/
2008-08-07 13:35:21 -06:00
Brian Paul
275b09f256
gallium: fix a few bugs on the fallback CopyTex[Sub]Image() path.
2008-08-07 13:32:43 -06:00
Brian Paul
ae2195caf5
gallium: s/printf/debug_printf/
2008-08-07 13:32:43 -06:00
Brian Paul
b1ff7dac53
gallium: new/better debug code (disabled)
2008-08-07 13:32:43 -06:00
Brian Paul
600aa7501f
gallium: implement a bunch of missing put_tile functions
2008-08-07 13:32:43 -06:00
Brian Paul
c8f3191383
gallium: enable the call to r16_put_tile_rgba(), silences warning
2008-08-07 13:32:43 -06:00
Brian Paul
2c2d6c90fe
mesa: fix glBindTexture comment/error string
2008-08-07 13:32:43 -06:00
Brian Paul
14ac52e457
mesa: glsl: regenerated files
2008-08-07 13:32:43 -06:00
Brian Paul
a78f295f7c
mesa: glsl: finish up support for precision qualifiers
2008-08-07 13:32:43 -06:00
José Fonseca
1ffd6908d4
mesa: pf_sprint_name->pf_name.
2008-08-07 19:25:54 +01:00
José Fonseca
fdafa1f863
gallium: Simplify format->name conversion.
2008-08-07 19:25:28 +01:00
José Fonseca
9dee60969d
trace: Dump state.
2008-08-07 18:58:30 +01:00
José Fonseca
f2e19c34e0
trace: Trace pipe context calls.
2008-08-07 18:58:30 +01:00
José Fonseca
c76d86f0ab
raw2png: Fix channel order in a8b8g8r8/x8b8g8r8 formats.
2008-08-07 18:58:30 +01:00
José Fonseca
f6e0514736
trace: Add missing XSL and CSS.
2008-08-07 18:58:30 +01:00
José Fonseca
18fb8f1486
xlib: Integrate with the trace pipe driver.
2008-08-07 18:58:30 +01:00
José Fonseca
35355f7610
trace: New pipe driver to trace incoming calls.
...
Only pipe_screen calls traced, and only linux supported, for now.
2008-08-07 18:58:29 +01:00
José Fonseca
1ee500ac73
pipebuffer: Add an extra assertion to ensure buffers do not jump between lists.
2008-08-07 18:58:29 +01:00
José Fonseca
eb422a7243
raw2png: support some depth formats.
2008-08-07 18:58:29 +01:00
José Fonseca
72a5e47978
gallium: New function to dump surfaces.
2008-08-07 18:58:29 +01:00
Michal Krol
9a20cecc5c
mesa: Extend GLSL syntax to accept type precision in full type specifiers.
2008-08-07 16:49:54 +02:00
Michal Krol
c5c7130385
mesa: Silence compiler warnings on Windows.
2008-08-07 16:23:15 +02:00
Michal Krol
d50d7a54de
softpipe: Silence compiler warnings on Windows.
2008-08-07 16:22:34 +02:00
Ben Skeggs
ce8e846ffe
nv40/nv50: enable mirror wrap modes
2008-08-07 11:38:56 +10:00
Ben Skeggs
fda01b5847
nouveau: fix build
2008-08-07 11:26:17 +10:00
Ben Skeggs
4b1c508f49
Merge remote branch 'origin/gallium-0.1' into nouveau-gallium-0.1
2008-08-07 11:19:15 +10:00
Brian Paul
a56ccb90c6
gallium: fix clipping/stride bugs in pipe_get_tile_raw(), pipe_put_tile_raw()
...
We need to compute the default dst_stride and src_stride _before_ clipping.
After clipping, the width value may have changed.
This fixes visible tile glitches in some demos like progs/glsl/texdemo.c
2008-08-06 19:15:10 -06:00
Brian Paul
be66a8f431
gallium: added PIPE_CAP_TEXTURE_MIRROR_CLAMP, PIPE_CAP_TEXTURE_MIRROR_REPEAT
...
Check for these caps in state tracker and enable corresponding GL extensions
if supported.
2008-08-06 17:22:29 -06:00
Brian Paul
ea0007cc4c
softpipe: add texture border color code
2008-08-06 17:14:22 -06:00
Jonathan White
b908ce93d4
egl: define vsnprintf
2008-08-06 16:42:38 -06:00
Jonathan White
bd953fdd54
egl: fixes for Windows
2008-08-06 16:37:49 -06:00
Brian Paul
695fc32503
mesa: glsl: regenerated file
2008-08-06 16:29:50 -06:00
Brian Paul
35b9aedf7f
mesa: glsl: report 'Syntax Error' instead of 'Invalid external declaration'
2008-08-06 16:29:40 -06:00
Brian Paul
95d3642122
mesa: glsl: additional error checking
2008-08-06 16:29:10 -06:00
Brian Paul
8a40fe06d7
mesa: glsl: fix a number of glUniform issues
...
Additional error checking.
Allow setting elements of uniform arrays. This involves encoding both
a uniform location and a parameter offset in the value returned by
glGetUniformLocation().
Limit glUniform[if]v()'s count to the size of the uniform array.
When setting bool-valued uniforms, convert all float/int values to 0 or 1.
2008-08-06 16:26:47 -06:00
Jonathan White
7e2458c7b5
egl: fix version handling
2008-08-06 13:40:03 -06:00
Brian Paul
7a6eba54d0
mesa: glsl: fix glGetUniform for matrix queries
2008-08-06 13:07:09 -06:00
Brian Paul
18cd9c229a
mesa: glsl: fix error check in get_uniformfv()
2008-08-06 12:45:14 -06:00
Brian Paul
5fc6f6a33f
mesa: glsl: check for rect tex samplers
2008-08-06 12:21:25 -06:00
Brian Paul
ac553c6ce4
mesa: glsl: disallow initializers for varying vars
2008-08-06 11:58:52 -06:00
Brian Paul
acb81d0268
mesa: glsl: more type checking for attribute/varying/uniform vars/locals
2008-08-06 11:45:42 -06:00
Brian Paul
64a795d8e6
mesa: glsl: check that attribute vars are of float/vec/mat type
2008-08-06 11:22:36 -06:00
Brian Paul
b9be69b85e
mesa: glsl: more assignment type checking
...
Also that const declarations have initializers and that uniforms/samplers
can't have initializers.
2008-08-06 11:15:55 -06:00
Brian Paul
93ed8f9fc9
mesa: glsl: fix SLANG_OPER_VARIABLE_DECL type checking case
2008-08-06 11:15:42 -06:00
Haihao Xiang
8d1627c25a
mesa: glsl: count number of temp regs used
2008-08-06 09:05:09 -06:00
Brian Paul
d23b54a423
fix some FBO/texture queries (bug 15296)
2008-08-06 08:42:09 -06:00
Brian Paul
efd730c5d3
mesa: glsl: code consolidation in _slang_gen_declaration()
2008-08-05 20:57:17 -06:00
Brian Paul
a4fad98dfb
mesa: glsl: disallow user-defined functions/vars prefixed with gl_
2008-08-05 20:57:17 -06:00
Brian Paul
6b888a10d3
mesa: glsl: additional type checking for assignments, inequalities
2008-08-05 20:57:17 -06:00
Brian Paul
bf3040d476
mesa: glsl: generate error for main(any args)
2008-08-05 20:57:17 -06:00
Jonathan White
ab0d13dd60
egl: changes for Windows
2008-08-05 19:22:09 -06:00
Jonathan White
240962faf7
egl: added snprintf, strcasecmp defines
2008-08-05 19:20:43 -06:00
Brian Paul
096b5fa524
mesa: glsl: regenerated file
2008-08-05 16:59:22 -06:00
Brian Paul
7a63e317d1
mesa: glsl: remove invalid use of f.x syntax where f is a float
2008-08-05 16:58:44 -06:00
Brian Paul
013de307ed
mesa: glsl: re-enable assignment type checking
2008-08-05 16:58:31 -06:00
Brian Paul
8abeeb35d3
mesa: glsl: regenerated files
2008-08-05 16:24:53 -06:00
Brian Paul
1308ca6d21
mesa: glsl: re-org of intermediate/temp storage
...
Simplify the code for allocating storage for intermediate results. Use fewer
temps in some cases.
Also, use new asm vec4_move intrinsic instead of regular assigments in various
constructors. For example:
float f;
vec3 v;
v.xyz = f;
is not legal GLSL, so do this instead:
__asm vec4_move v.xyz, f; // note: f will auto-expand into f.xxxx
Plus, fix assorted bugs in structure comparison.
2008-08-05 16:18:39 -06:00
Brian Paul
749c1b9fbe
mesa: glsl: disable broken assignment type checking for now
2008-08-05 11:13:51 -06:00
Jonathan White
2eb4f86785
egl: don't include stdint.h on Windows
2008-08-05 08:13:50 -06:00
Jonathan White
b51584184a
egl: typedef uint8_t for Windows
2008-08-05 08:12:38 -06:00
Brian Paul
2d8551b30f
mesa: glsl: check struct types in _slang_assignment_compatible()
2008-08-04 17:14:49 -06:00
Brian Paul
793bab2a36
mesa: glsl: varying vars can't be user-defined structs
2008-08-04 17:14:49 -06:00
Brian Paul
9564e58df0
mesa: glsl: regenerated files
2008-08-04 17:14:49 -06:00
Brian Paul
3b5f9588e7
mesa: glsl: added vec4(ivec4) constructor
2008-08-04 17:14:49 -06:00
Brian Paul
50ecc38545
mesa: glsl: if/while/do condition must be boolean
2008-08-04 17:14:49 -06:00
Brian Paul
f70f6e076c
mesa: glsl: additional type checking for ?: and = operators
2008-08-04 17:14:49 -06:00
Brian Paul
e194c457fd
mesa: glsl: don't allow comparision of arrays
2008-08-04 17:14:49 -06:00
Brian Paul
250910a59d
mesa: glsl: error on const-qualified array declarations
2008-08-04 17:14:49 -06:00
Brian Paul
b57c53b2bc
mesa: glsl: added null ptr check
2008-08-04 17:14:49 -06:00
Brian Paul
c610c0d77d
mesa: glsl: set literal_size for const vars
2008-08-04 17:14:49 -06:00
Brian Paul
95ecc33330
mesa: glsl: add missing code emit for struct/field
2008-08-04 17:14:48 -06:00
Brian Paul
02d223a781
mesa: glsl: stop code emit after error is recorded
2008-08-04 17:14:48 -06:00
Brian Paul
1028458354
mesa: glsl: check that rhs of const var initializer is also const
2008-08-04 17:14:48 -06:00
Brian Paul
901c4db2ed
mesa: glsl: handle user-defined const vars in expression simplification
2008-08-04 17:14:48 -06:00
Brian Paul
26ec3780b8
mesa: glsl: fix initialize size error check
2008-08-04 17:14:48 -06:00
Brian Paul
e68a3ef1ef
mesa: glsl: added initializer size/type error checking
2008-08-04 17:14:48 -06:00
Brian Paul
7c59a2b5a2
mesa: glsl: only allow one #version directive
2008-08-04 17:14:48 -06:00
Brian Paul
d95bb24ddc
mesa: glsl: regenerated file
2008-08-04 17:14:48 -06:00
Brian Paul
012a1f1cf6
mesa: glsl: new bvec4 constructor
2008-08-04 17:14:48 -06:00
Jonathan White
73c3c4d1cc
egl: typedef u_int32_t for Windows
2008-08-04 16:30:58 -06:00
Jonathan White
655ca5afad
egl: fix _eglGlobal initialization for Windows
2008-08-04 16:30:04 -06:00
Michal Krol
2783f3bfab
tgsi: Put a newline after IMM.
2008-08-04 12:18:09 +02:00
Younes Manton
7fde9febd6
g3dvl: Temporarily disable IDCT.
2008-08-03 18:21:13 -04:00
Younes Manton
a55ced5676
nv40: Support for PIPE_FORMAT_R16_SNORM.
2008-08-03 17:20:48 -04:00
Brian Paul
eb80ed0d2e
added null ptr check (fix bug 16959)
2008-08-03 11:14:47 -06:00
Younes Manton
4a8b908a46
softpipe: support PIPE_FORMAT_R16_SNORM.
2008-08-02 19:37:16 +02:00
Younes Manton
1d27b4bc0f
g3dvl: Use R16_SNORM instead of A8L8_UNORM for block rendering.
2008-07-30 16:47:10 -04:00
Brian Paul
ab945fc38c
mesa: glsl: remove old assertion (fixes glsl/bitmap.c)
2008-07-29 17:49:47 -06:00
Brian Paul
43ac397fb8
mesa: disable debug code
2008-07-29 17:47:39 -06:00
José Fonseca
76164bf7a2
tgsi: Insert newlines after the statements, instead of before.
...
Prevents shader dumps from getting concatenated with the next debug message.
2008-07-30 00:44:56 +09:00
José Fonseca
28454a512a
util: Don't define replacement math functions for CE.
...
It appears to be working without this before, and it is probably necessary.
2008-07-28 22:42:18 +09:00
José Fonseca
c208a2c791
Merge tgsi/exec and tgsi/util directories.
2008-07-28 12:42:13 +09:00
Younes Manton
a17e6c046c
g3dvl: Recursively build dependencies.
...
Run `make` in src/libXvMC and everything should be built for Nouveau.
Run `make DRIVER=softpipe` in src/libXvMC for SoftPipe.
2008-07-26 16:55:46 -04:00
Ben Skeggs
9e445d3e63
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-07-27 00:54:57 +10:00
José Fonseca
ff7a7031ca
gallium: Windows miniport portability fixes.
2008-07-26 09:18:07 +09:00
Brian Paul
40acf8cce2
mesa: glsl: assorted fixes for resolving polymorphic functions
...
Plus,
- fix some issues in casting function arguments to format param types.
- fix some vec/mat constructor bugs
- find/report more syntax/semantic errors
2008-07-25 15:33:02 -06:00
Brian Paul
4b3fb99b50
mesa: regenerated files
2008-07-25 14:48:49 -06:00
Brian Paul
9d9076af5c
mesa: glsl: re-order some constructors
2008-07-25 14:48:36 -06:00
Brian Paul
c72bc3f372
mesa: glsl: remove unneeded operators
2008-07-25 14:48:14 -06:00
Brian Paul
72809f3773
mesa: fix issues causing warnings on Windows
2008-07-25 08:34:54 -06:00
Brian Paul
03de81aea1
mesa: glsl: additional error detection
...
Plus begin some fixes for vec/matrix constructors.
2008-07-25 08:26:53 -06:00
Michal Krol
2acf917f00
mesa: Mark as XXX unresolved warnings on windows.
2008-07-25 10:41:53 +02:00
Brian Paul
7b2ef2b884
mesa: gls: fix broken else clause of conditional break/continue
...
In the following case:
for () {
if (cond)
break; // or continue;
else
something;
}
The "something" block didn't get emitted.
2008-07-24 15:49:09 -06:00
Brian Paul
643228c506
mesa: move extensions->version code into separate function
2008-07-24 15:12:42 -06:00
Brian Paul
0216a58430
mesa: don't include Mesa version in GL_SHADING_LANGUAGE_VERSION string
2008-07-24 15:11:59 -06:00
Brian Paul
90a3af7d9d
mesa: glsl: only try to link shaders defining main()
2008-07-24 15:11:38 -06:00
Younes Manton
d1dc937c62
g3dvl: Added more XvMC stubs to get mplayer working.
2008-07-24 16:50:18 -04:00
José Fonseca
4ec4ea14a5
scons: Lookup WINDDK and WINCE SDK directories in the registry.
2008-07-24 21:24:58 +09:00
José Fonseca
101d1a658a
mesa: Prefix main includes with dir to avoid conflicts.
...
Some of the headers in src/mesa/main have pretty common names which
easily conflict with third-party code, e.g. config.h
2008-07-24 21:24:10 +09:00
José Fonseca
fd6865c7e5
softpipe: Remove unused variables.
2008-07-24 21:23:09 +09:00
José Fonseca
83869ceab5
tgsi: Silent msvc warning.
...
Rather stupid warning: msvc is warning that converting from a 1bit
structure bitfield to a unsigned char looses precision... /WX makes this
an error.
2008-07-24 21:23:08 +09:00
Michal Krol
b4ed6e9b17
mesa: Silence compiler warning on windows.
2008-07-24 11:03:05 +02:00
Younes Manton
a8da04cb86
nv all: Copy shader tokens on create, free on delete.
...
Must copy token stream on shader create, client is allowed to free
their copy after creating the state object.
2008-07-23 23:46:45 -04:00
Brian Paul
f7be39ea10
gallium: bump TGSI_EXEC_NUM_TEMPS to 128
2008-07-23 16:28:15 -06:00
Brian Paul
d5835c1d0f
mesa: glsl: fix/simplify built-in constant lookup
2008-07-23 15:14:22 -06:00
Brian Paul
564c97660a
mesa: glsl: fix/simplify array element handling
...
Also fix bug in comparing large structs/arrays.
2008-07-23 15:04:25 -06:00
Brian Paul
576c5fcc61
mesa: glsl: mark constructor params as const
2008-07-23 12:00:48 -06:00
Brian Paul
5f2a5f6164
gallium: print extended swizzle negation flags
2008-07-23 09:56:44 -06:00
Brian Paul
93f553ed4d
gallium: fix translation of extended swizzles, per-component negation
2008-07-23 09:56:20 -06:00
Michal Krol
0aa0141e0c
tgsi: Fix tgsi_util_get_full_src_register_extswizzle().
2008-07-23 17:53:50 +02:00
Jakob Bornecrantz
818cd9dca2
i915: intel_flush_frontbuffer does work
2008-07-23 14:07:26 +02:00
Younes Manton
b4d198e477
g3dvl: Minor fixes.
2008-07-23 02:28:41 -04:00
Ben Skeggs
39793a262f
nouveau: is_format_supported() interface changes
2008-07-23 14:14:55 +10:00
Ben Skeggs
704dca40c4
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-07-23 14:05:22 +10:00
Younes Manton
0c25ac5242
g3dvl: Add Nouveau winsys, libdriclient.
...
Nouveau winsys is based on Mesa's Nouveau winsys and soft-links to most of
it. The 'nouveau_context' and 'nouveau_screen' code contains most of the
changes, 'nouveau_winsys_pipe', 'nouveau_swapbuffers' and 'nouveau_lock'
contain some minor changes. The driclient library contains the DRI
userland stuff, most of which was based on Mesa's DRI code.
2008-07-22 22:41:31 -04:00
Younes Manton
90bd0e338d
g3dvl: Add stubs for some XvMC functions.
...
Some of these may need to be implemented on the DDX side.
2008-07-22 22:41:30 -04:00
Brian Paul
7f3d6e7481
mesa: glsl: rework swizzle storage handling
...
Build on the heirarchal approach implemented for arrays/structs.
2008-07-22 18:27:56 -06:00
Brian Paul
0d1ed45cbf
mesa: fix uninitialized var
2008-07-22 17:38:55 -06:00
Brian Paul
11a5c2d4ee
mesa: glsl: implement constructor functions for user-defined types
2008-07-22 15:17:10 -06:00
Brian Paul
e4139657e0
mesa: remove stray debug assertion
2008-07-22 11:54:22 -06:00
Michal Krol
51d219dbfe
tgsi: Fix immediate usage checks.
...
Provide more info for register usage errors/warnings.
2008-07-22 17:14:54 +02:00
Roland Scheidegger
7467a943fc
add env var to override msaa visual selection
2008-07-22 16:51:48 +02:00
Brian
63025ec726
mesa: fix glUniform error checking for samplers
2008-07-21 20:42:05 -06:00
Brian
e3ca92aa28
mesa: refactor: move _mesa_Bind/Gen/DeleteProgram() to arbprogram.c
...
No API-level functions now in program.c.
2008-07-21 20:33:42 -06:00
José Fonseca
883097053d
win32kprof: Store the profile data as an caller->callee hash table, instead of a trace.
2008-07-22 09:45:33 +09:00
José Fonseca
4db631a399
gallium: Open a new file when existing profile memory map is exhausted.
2008-07-22 09:45:33 +09:00
José Fonseca
2fafe29793
win32kprof: Generate callgraphs.
...
Relies on gprof2dot.py.
2008-07-22 09:45:33 +09:00
José Fonseca
ac25408c47
win32kprof: Convert tabs to spaces.
2008-07-22 09:45:33 +09:00
José Fonseca
1662be3764
win32kprof: Consider the section alignment when estimating the image base.
2008-07-22 09:45:32 +09:00
Zack Rusin
4d38d86b2c
add edge detection to that example
2008-07-21 19:19:22 -04:00
Brian Paul
ec9c79a7dd
mesa: initial support for GLSL struct/array comparisons
2008-07-21 17:18:22 -06:00
Brian Paul
c9a7ee2d00
mesa: added null ptr check (error handling case)
2008-07-21 16:04:56 -06:00
Brian Paul
5ba32b79d8
mesa: fix +=, -=, etc. operators
2008-07-21 16:04:24 -06:00
Jonathan White
467e6526a8
gallium: Temporary workaround for mismatched pipe create and pipe destroy
2008-07-21 15:34:38 -06:00
Brian Paul
7e8f79e39d
mesa: remove an error check for NV_v_p that doesn't apply to ARB_v_p
2008-07-21 14:23:33 -06:00
Brian Paul
70d3928f63
mesa: fix some issues in _mesa_validate_program()
2008-07-21 14:16:07 -06:00
Brian Paul
fbf26e109b
mesa: assorted glsl uniform/attribute fixes
...
Fix incorrect uniform/attribute size query results.
Add missing error checking for glUniform, glUniformMatrix params
Fix an array size/allocation error.
2008-07-21 13:58:50 -06:00
Brian Paul
d8cbac5330
mesa: remove debug code
2008-07-21 10:25:02 -06:00
Jakob Bornecrantz
1753ff9872
tgsi: Update Makefile to include tgsi_iterate.c
2008-07-21 14:38:57 +02:00
Ben Skeggs
a3616067fe
nv50: add NV86 and NV94 to list of "supported" chips
2008-07-21 19:07:07 +10:00
Younes Manton
c243573faf
g3dvl: Fix some memory leaks in the winsys.
2008-07-20 19:16:41 -04:00
Younes Manton
8878d8d4b3
g3dvl: Minor SP winsys cleanup.
2008-07-20 19:16:41 -04:00
Michal Krol
b3c8d0c348
tgsi: Parse source register extended swizzle.
2008-07-20 21:58:07 +02:00
Michal Krol
9d068d4b90
tgsi: Add support for branch instructions with target labels.
2008-07-20 21:38:20 +02:00
Michal Krol
25a7f422b4
tgsi: Warn if an indirect register not ADDR[0].
2008-07-20 21:28:28 +02:00
Michal Krol
73e1d0be75
tgsi: Add support for indirect addressing in dump, sanity and text modules.
2008-07-20 21:23:04 +02:00
Michal Krol
613f0df64d
tgsi: Remove redundant code.
2008-07-20 19:29:52 +02:00
Michal Krol
83f245bd24
tgsi: Use tgsi_iterate in tgsi_dump.
2008-07-20 16:43:26 +02:00
Michal Krol
57482e1549
tgsi: Keep version and processor info in iterate_ctx.
2008-07-20 16:42:57 +02:00
Michal Krol
fef7f2b070
tgsi: Fix error handling.
2008-07-20 16:42:43 +02:00
Michal Krol
82f11f7e7c
tgsi: Tidy up and fix tgsi_dump.
2008-07-20 16:28:59 +02:00
Michal Krol
307a252d15
tgsi: Fix dump enums.
2008-07-20 16:12:44 +02:00
Michal Krol
15c902455f
tgsi: Preserve flags parameter for tgsi_dump().
2008-07-20 16:09:18 +02:00
Michal Krol
5e9ea9d938
scons: List util/tgsi_dump_c.c.
2008-07-20 16:07:06 +02:00
Michal Krol
5ded4ffc50
tgsi: Split tgsi_dump into two modules.
2008-07-20 16:06:46 +02:00
José Fonseca
2170ec9048
pipebuffer: More detailed description of bufer over-/undereflows.
2008-07-20 18:11:43 +09:00
José Fonseca
5853b6c2fe
python/tests: Check support for non-pot/non-square textures.
2008-07-20 09:28:27 +09:00
José Fonseca
43df2fe2d9
gallium: Fix typo in function name.
2008-07-20 09:27:48 +09:00
José Fonseca
939be248fe
raw2png: Handle r5g6b5 format.
2008-07-20 09:27:27 +09:00
José Fonseca
b1d6ff1afd
python/tests: Specify the right texture target when querying formats.
2008-07-19 12:32:29 +09:00
José Fonseca
8aafc03b26
gallium: Finer grained is_format_supported.
2008-07-19 12:32:29 +09:00
José Fonseca
ff26c50153
tgsi: Make tgsi_sanity return TRUE on success as documented.
2008-07-19 12:32:29 +09:00
José Fonseca
1a8ceb3828
gallium: Move PIPE_TEXTURE_USAGE* to p_defines.h
2008-07-19 12:32:29 +09:00
Brian Paul
72e57b52f0
mesa: glsl: various writemask/swizzle improvements and clean-ups
2008-07-18 19:46:19 -06:00
Brian Paul
7218626cf5
mesa: rework array/struct addressing code.
...
The slang_ir_storage type now has a pointer to parent storage to represent
storage of an array element within an array, or a field within a struct.
This fixes some problems related to addressing of fields/elements in non-
trivial cases. More work to follow.
2008-07-18 14:46:42 -06:00
Brian Paul
a4fd90e325
mesa: regenerated file
2008-07-18 14:46:41 -06:00
Brian Paul
2b3515c5b2
mesa: fix some GLSL /= int operators
...
plus add a few more special constructors to improve code quality.
2008-07-18 14:46:41 -06:00
Brian Paul
b64882d0f8
mesa: fix set_program_uniform_matrix(): need to loop over matrix count
2008-07-18 14:46:41 -06:00
José Fonseca
583b9ccbd5
gallium: Add a pf_is_ycbcr utility function.
2008-07-18 22:22:22 +09:00
José Fonseca
3ca935d9ef
python/tests: Extend the texture tests to cover volumes.
2008-07-18 10:42:44 +09:00
José Fonseca
bfee84df86
python: Add methods to get texture width, height, etc.
...
SWIG does a poor job with arrays inside structures.
2008-07-18 10:42:44 +09:00
Michal Krol
1e5419fa30
tgsi: Express tgsi_sanity in terms of tgsi_iterate.
2008-07-18 00:41:45 +02:00
Michal Krol
e1fd3ea415
scons: List util/tgsi_iterate.c.
2008-07-18 00:40:28 +02:00
Michal Krol
638ecbda3e
tgsi: Add tgsi_iterate_shader utility.
...
Walks the token stream and invokes callbacks.
2008-07-18 00:39:23 +02:00
Michal Krol
f2053cfa1a
tgsi: Fix parsing an instruction with no operands.
2008-07-17 20:40:13 +02:00
Michal Krol
10d1dc68a4
tgsi: Perform a sanity check after reading a shader from text.
2008-07-17 20:23:26 +02:00
Michal Krol
3c5ec98e45
scons: List util/tgsi_sanity.c.
2008-07-17 20:22:47 +02:00
Michal Krol
2727702b17
tgsi: New file.
2008-07-17 20:19:40 +02:00
José Fonseca
e74f94b39a
python: Reimplement the generation of random texture samples in C.
2008-07-18 01:20:44 +09:00
José Fonseca
174c6912d6
gallium: Expose the ability to get a tile outside a surface.
2008-07-18 01:20:44 +09:00
José Fonseca
6a65a0d9ef
gallium: Be less verbose with debug options messages.
2008-07-18 01:20:44 +09:00
José Fonseca
c76787a1dc
scons: Set default LIBS env var.
2008-07-18 01:20:44 +09:00
José Fonseca
381e3489c2
scons: Convert tabs to spaces.
2008-07-18 01:20:44 +09:00
José Fonseca
d398e1360d
python: Reimplement tile comparison in C to speed up tests.
2008-07-18 01:20:44 +09:00
Brian Paul
457bb10cee
mesa: regenerated file
2008-07-17 10:04:56 -06:00
Brian Paul
91de7b6cd3
mesa: fix/improve the atan(y,x) function
2008-07-17 10:04:56 -06:00
Brad Smith
8336fbc35c
mesa: added checks for OpenBSD
2008-07-17 10:04:56 -06:00
José Fonseca
f610deed37
python/tests: Cover all last_level combinations.
2008-07-17 08:52:51 +09:00
Jonathan White
e4f3770690
mesa: WinCE fixes
2008-07-16 16:11:38 -06:00
Brian Paul
ab8f838060
mesa: fix temp re-use bug in emit_arith()
2008-07-16 16:11:38 -06:00
Brian Paul
a1e55dcd9c
mesa: regenerated files
2008-07-16 16:11:38 -06:00
Brian Paul
bd09676de5
mesa: fix copy&paste errors in degrees() functions
2008-07-16 16:11:38 -06:00
Brian Paul
ebcdbff6f1
mesa: implement grammar/parsing for precision/invariant syntax
...
Plus, fix some issues with pre-defined preprocessor symbols and version checking.
2008-07-16 16:11:38 -06:00
Michal Krol
7a0b79fe36
mesa: Silence compiler warnings on Windows.
2008-07-16 20:14:42 +02:00
Brian Paul
26df49cd7a
egl: set EGL_SAMPLES, EGL_SAMPLE_BUFFERS config attribs
2008-07-16 10:35:12 -06:00
Brian Paul
479a807e01
mesa: add GL_POLYGON_OFFSET_POINT/LINE/FILL queries, remove GL_TEXTURE_ENV_COLOR, GL_TEXTURE_ENV_MODE
...
Issues found by Bob Ellison.
2008-07-16 10:27:33 -06:00
José Fonseca
7f32834df3
python/tests: Extend the texture tests to cover cube maps.
2008-07-16 23:27:15 +09:00
José Fonseca
1049e65240
python: Set PIPE_TEX_MIPFILTER_NONE by default.
2008-07-16 23:26:23 +09:00
José Fonseca
32fe752d31
python: Test all miplevels.
2008-07-16 19:36:59 +09:00
José Fonseca
78d18bb690
gallium: ycbcr_get_tile_rgba allow reading an uneven number of pixels from yuv surfaces.
2008-07-16 19:36:36 +09:00
José Fonseca
70b1ff9ff3
python: Expand the texture test suit to cover one YUV and one DXT format.
2008-07-16 14:13:10 +09:00
José Fonseca
61c4de53c3
python: Silent debug output.
2008-07-16 14:13:10 +09:00
José Fonseca
fbf0f6bd4d
gallium: Add pf_is_compressed utility function.
2008-07-16 14:13:09 +09:00
José Fonseca
0c2c0a862c
softpipe: DXT formats not really supported.
2008-07-16 14:13:09 +09:00
Blair Sadewitz
99233e483d
additional preprocessor checks for stdint.h, inttypes.h, etc
...
The patches to glext.h and glxext.h have been sent to Khronos/bugzilla.
2008-07-15 17:30:51 -06:00
Blair Sadewitz
b4adb9e1de
mesa: added test for __NetBSD__
2008-07-15 17:30:36 -06:00
Blair Sadewitz
45209baf5d
mesa: added test for __NetBSD__
2008-07-15 17:30:21 -06:00
Brian Paul
178726ebce
mesa: add missing IR_LOG2 case
2008-07-15 16:04:26 -06:00
Brian Paul
9d43e387a3
mesa: regenerated file
2008-07-15 15:33:04 -06:00
Brian Paul
e35329c701
mesa: fix some broken /= operators
2008-07-15 15:32:53 -06:00
Brian Paul
0bafe4b771
mesa: regenerated file
2008-07-15 15:04:15 -06:00
Brian Paul
5e8e532cd0
mesa: fix some broken bool, bvec2, bvec3, bvec4 constructors
2008-07-15 15:03:42 -06:00
Brian Paul
5bf89cf2c3
mesa: fix storage size computation in emit_arith()
2008-07-15 14:41:47 -06:00
Brian Paul
f006358d56
gallium: added some sanity check assertions
2008-07-15 13:29:25 -06:00
Brian Paul
f6152c3510
mesa: fix some function inlining bugs
...
Need to add local vars of original function to the new scope's variable
list (though the DECLs were already present).
In slang_operation_copy() call slang_replace_scope() for SLANG_OPER_BLOCK_NEW_SCOPE opers.
2008-07-15 13:29:25 -06:00
Brian Paul
bc4b1ca563
mesa: improved printing
2008-07-15 13:29:25 -06:00
Michal Krol
f9c574d719
mesa: Silence compiler warnings on Windows.
2008-07-15 11:49:02 +02:00
Michal Krol
6c534b830c
st: Silence compiler warnings on Windows.
2008-07-15 11:48:59 +02:00
Michal Krol
090e212c0c
mesa: Silence compiler warnings on Windows.
2008-07-15 11:48:55 +02:00
José Fonseca
3392bcaaa8
python: Cleanup.
2008-07-15 17:58:48 +09:00
José Fonseca
ee470020e1
python: Request/respect the texture & buffer usage flags in the examples.
2008-07-15 17:58:48 +09:00
José Fonseca
d5ed158dc8
python: Get object ownership done correctly.
2008-07-15 17:58:48 +09:00
José Fonseca
9a99b19949
python: Don't use python cflags as they conflict with existing flags.
2008-07-15 17:58:48 +09:00
José Fonseca
1d03102b31
python: Allow hardware support.
2008-07-15 17:58:48 +09:00
José Fonseca
2c4349aa3a
python: Move the python scons code to a separate tool module.
2008-07-15 17:58:47 +09:00
José Fonseca
ead8fcd92a
python: Get it to build on windows too.
2008-07-15 17:58:47 +09:00
Michal Krol
c60e009a91
tgsi: Numerical label before an instruction is optional.
2008-07-15 10:58:17 +02:00
Brian Paul
6eb7f763fb
tgsi: fix bug in execution of loops inside of conditionals.
...
Fixes infinite loop bug.
2008-07-14 18:08:52 -06:00
Brian Paul
ec698034d1
mesa: assemble main() after all other functions
...
Before, main() had to come after any functions it called.
2008-07-14 16:00:35 -06:00
Brian Paul
51654783ef
mesa: comments about vectors vs components
2008-07-14 16:00:35 -06:00
Brian Paul
e7fd3de927
egl: set EGL_CONFORMANT, EGL_RENDERABLE_TYPE config fields, fix null ptr crashes in MakeCurrent
2008-07-14 12:09:07 -06:00
Brian Paul
2833d4e715
mesa: fix stencil state problem when GL_ATI_separate_stencil wasn't enabled
...
In glStencilFunc/Op/Mask() set both the front and back-face state, unless
GL_EXT_stencil_two_side is enabled. Before, we only set the front+back state
if GL_ATI_separate_stencil was enabled.
Ultimately, we probably should remove GL_EXT_stencil_two_side since it's
incompatible with GL 2.x.
2008-07-14 09:55:33 -06:00
Julien Cristau
6852ef64f3
glu: only export public symbols
2008-07-14 08:42:02 -06:00
Julien Cristau
270b2a5c54
mklib: don't version symbols when using --exports
...
Use the default version instead of one based on the library SONAME
in the version script created by --exports.
2008-07-14 08:41:54 -06:00
Blair Sadewitz
2f5cd68797
mesa: also check for __NetBSD__
2008-07-14 08:16:46 -06:00
José Fonseca
64979d618a
python: Basic test case for 2d texture.
2008-07-14 22:27:40 +09:00
José Fonseca
3aea28b9b1
python: Raw tile access to surface.
2008-07-14 22:26:40 +09:00
José Fonseca
00cd96b68f
python: Get the sample app to draw triangle like trivial/tri exanple.
2008-07-14 12:41:07 +09:00
José Fonseca
f07ad529af
python: Surface clears.
2008-07-14 12:41:07 +09:00
José Fonseca
3679f69023
python: Set default state.
2008-07-14 12:41:06 +09:00
José Fonseca
05a23e6c6f
python: Allow to create/specify shaders.
2008-07-14 12:41:06 +09:00
Jakob Bornecrantz
16c2267d55
i915: Ops should not have pushed that
...
This reverts commit 930a863c4f .
2008-07-13 18:55:38 +02:00
Jakob Bornecrantz
e59086ab91
EGL: Only build EGL dri based drivers under linux-dri based configs
2008-07-13 18:05:20 +02:00
Ben Skeggs
d68a3ebf0e
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-07-14 01:14:52 +10:00
Jakob Bornecrantz
930a863c4f
i915: WIP swap rework
2008-07-13 16:49:00 +02:00
José Fonseca
6410e94b96
python: New state tracker which exposes the pipe driver to python scripts.
...
Still under development. Just barely works.
2008-07-13 23:37:40 +09:00
José Fonseca
36dd89c8a7
util: Eliminate pipe from the arguments to pipe_get/put_tile_xxx functions.
...
You don't need a pipe_context * for this, and all other necessary info is
already inside pipe_surface.
2008-07-13 23:37:40 +09:00
José Fonseca
17af66fc1a
pb: buffer over/underflows are errors.
2008-07-13 23:37:40 +09:00
Michal Krol
f5c51ebd2a
tgsi: Parse destination operand modulate modifier.
2008-07-13 15:23:14 +02:00
Michal Krol
94013b66b9
tgsi: Parse extended source register modifiers.
2008-07-13 15:14:31 +02:00
Michal Krol
47a45aaa0f
tgsi: Parse _SAT and _SAT opcode suffix.
2008-07-13 14:50:12 +02:00
Michal Krol
a7d8eed61c
tgsi: Parse IMM statements.
2008-07-13 14:11:26 +02:00
Michal Krol
3d5dcc2203
tgsi: Parse texture instructions correctly.
2008-07-13 13:17:41 +02:00
Michal Krol
46a7843099
tgsi: Fix instruction operand counts.
2008-07-13 13:17:39 +02:00
Michal Krol
cfd2bf9fa1
tgsi: Fix instruction opcode parsing.
2008-07-13 13:17:37 +02:00
Michal Krol
625034104a
tgsi: Add missing SWZ opcode.
2008-07-13 13:17:34 +02:00
Michal Krol
ee647b9020
tgsi: Parse DCL statements.
2008-07-13 13:17:32 +02:00
Michal Krol
bd3b47590e
tgsi: Remove depricated ATTRIB interpolate mode.
2008-07-13 13:17:30 +02:00
Stephane Marchesin
92d711e9e6
llvm: build fixes.
2008-07-13 11:33:41 +02:00
Michal Krol
c415de5e25
scons: List `util/tgsi_text.c'.
2008-07-12 17:10:21 +02:00
Michal Krol
d0386d55ff
tgsi: Add tgsi_text utility module.
...
Translates textual shader into a binary token stream.
The syntax matches the tgsi_dump module, so it's possible to
simply copy-paste the shader dump and transform it back
to a binary form.
2008-07-12 17:06:37 +02:00
Michal Krol
9ea485f886
tgsi: Fix dumping of indirect addressing.
2008-07-12 17:03:30 +02:00
Patrice Mandin
1d50e26f4a
nv30: no npot textures
2008-07-12 15:07:02 +02:00
Patrice Mandin
fa167eedeb
nv30: update caps
2008-07-12 13:59:24 +02:00
Patrice Mandin
a9863caefc
nv30: do not shift texture format
2008-07-12 13:59:01 +02:00
Patrice Mandin
12118fcd12
nv30: Emit vertex buffer objects using state objects
2008-07-12 13:16:47 +02:00
Patrice Mandin
ac44f334e3
nv30: Move edgeflag stuff
2008-07-12 12:24:37 +02:00
Patrice Mandin
3d0e18ff5f
nv30: Reorder, remove useless stuff
2008-07-12 11:53:10 +02:00
Patrice Mandin
4ca346a8c0
nv30: Rename state emission func
2008-07-12 11:45:51 +02:00
Michal Krol
7279d663e9
tgsi: Add missing copyright headers.
2008-07-12 11:17:21 +02:00
Patrice Mandin
9489de9980
nv30: was setting wrong register
2008-07-12 10:13:58 +02:00
Patrice Mandin
b23e20a386
nv30: does not have vp_attrib/result
2008-07-12 10:10:16 +02:00
Patrice Mandin
740c93a08c
nv30: Change comment about slowdown
2008-07-12 00:48:44 +02:00
Patrice Mandin
58737dc875
nv30: Emit fragment program using state objects
2008-07-12 00:48:26 +02:00
Patrice Mandin
2419a5fe36
nv30: Emit vertex program using state objects
2008-07-12 00:19:15 +02:00
Brian Paul
80b24166a5
egl: a minor overhauld of egl_xdri.c
...
Rely more on the libGL code to avoid duplicated efforts. Also fix confusion
arising from multiple __DRIscreen objects.
2008-07-11 15:45:03 -06:00
Brian Paul
df2c9424d3
glx: added __glXPreferEGL() to tell libGL to prefer "egl_" drivers over regular DRI drivers.
...
Also, clean-up, consolidate the dlopen() code a bit.
2008-07-11 15:45:03 -06:00
Brian Paul
7986baf7cf
build egl subdirs
2008-07-11 15:45:03 -06:00
Patrice Mandin
c708627754
nv30: Move constant buffers out of vert/frag prog structures
2008-07-11 23:17:47 +02:00
Patrice Mandin
5acbd0b096
nv30: Emit fragtex state using state objects
2008-07-11 22:42:42 +02:00
Patrice Mandin
b327b06405
nv30: split fragprog_upload from fragprog_bind
2008-07-11 22:06:12 +02:00
Patrice Mandin
37a418b3b0
nv30: split fragprog_prepare from fragprog_translate
2008-07-11 21:31:24 +02:00
Patrice Mandin
36ac2ade17
nv30: Update miptree to match latest changes
2008-07-11 21:14:32 +02:00
Jakob Bornecrantz
6e938e4f82
gallium: Make dri drivers create a egl_name_dri.so if supported
2008-07-11 20:09:52 +02:00
Ben Skeggs
7c949fb2a2
nv50: obey do_flip in surface_copy()
2008-07-11 22:50:10 +10:00
Ben Skeggs
9b0add0be4
nv50: quick hack to get textures untiled on map, and tiled on unmap
...
progs/fp/tri-tex is all good now rather than all scrambled :)
2008-07-11 22:46:07 +10:00
Ben Skeggs
5180a668a7
nouveau: winsys surface funcs deprecated, remove them
2008-07-11 22:24:24 +10:00
Ben Skeggs
866a68dbd1
nv50: demagic tex filter / wrap mode
2008-07-11 22:01:29 +10:00
Ben Skeggs
7c745de749
nv50: add some texture formats
2008-07-11 21:19:41 +10:00
Ben Skeggs
62100692b8
nv50: split tic construction out into own file
2008-07-11 20:49:06 +10:00
Ben Skeggs
857a3294a9
nv50: add license headers to .c files
2008-07-11 20:44:39 +10:00
Jakob Bornecrantz
5de823c00b
gallium: Re-order the GALLIUM_AUXILIARY_DIRS to satisfy dependencies on util
2008-07-10 22:41:34 +02:00
Brian Paul
bae90edfda
gallium: check for FEATURE_feedback and FEATURE_drawpix when creating/using the aux draw module
2008-07-10 14:23:27 -06:00
Brian Paul
f5cdc657b2
egl: added EGL_OPENVG_API case (allow all APIs)
2008-07-10 13:30:52 -06:00
Brian Paul
b101890c15
egl: add all EGL_*_BITs to ClientAPIsMask
2008-07-10 13:29:42 -06:00
Brian Paul
a452e0cbde
gallium: re-order the GALLIUM_AUXILIARY_DIRS to satisfy .a interdependencies
...
libutil.a and libtranslate.a depend on libcso_cache.a so put them in that order.
2008-07-10 13:28:22 -06:00
Brian Paul
fb3867aec0
egl: implement xdri_eglGetProcAddress() for gallium
...
Plus comments, clean-ups.
2008-07-10 10:48:28 -06:00
Ben Skeggs
17e95de852
nv50: enable GART usage for vertex buffers
...
AKA "I can haz fast b0rk3d glxgears!!!"
2008-07-11 02:01:23 +10:00
Ben Skeggs
7a81ffa115
nv50: get clear-scissor working
2008-07-11 01:53:28 +10:00
Ben Skeggs
add89c7845
nouveau: update to latest object header
2008-07-11 00:21:42 +10:00
Ben Skeggs
861629d1fd
nv50: more "abuse" by using libc malloc etc..
2008-07-11 00:15:01 +10:00
Ben Skeggs
19171ab1d3
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-07-11 00:05:53 +10:00
Brian Paul
64f92e00c8
mesa: check for null shader->Source
2008-07-09 15:54:21 -06:00
Brian Paul
811a183a27
mesa: return -1, not GL_FALSE if _glapi_add_dispatch() fails name sanity check
2008-07-09 15:54:06 -06:00
Brian Paul
547e487df2
mesa: call glutDestroyWindow() on exit
2008-07-09 15:52:04 -06:00
Brian Paul
eb9efc6ad5
mesa: disable fprintf() error
2008-07-09 15:51:18 -06:00
Brian Paul
e3b13dba4d
egl: link libEGL w/ additional libs
2008-07-09 15:49:59 -06:00
Brian Paul
70b0a949b0
egl: misc updates/fixes
...
Set surface size when created.
Implement dri_find_dri_screen().
Look for "egl_xxx_dri.so" library before regular DRI driver.
2008-07-09 15:47:27 -06:00
Patrice Mandin
225863aeb5
nv30: min/max lod are used for mipmap, there is just enable bit in tx_format
2008-07-09 23:23:39 +02:00
Patrice Mandin
2fed964a27
nv30: Update defines from nouveau_class.h
2008-07-09 22:13:01 +02:00
Patrice Mandin
7a838ef411
nv30: Update defines from nouveau_class.h
2008-07-09 22:03:59 +02:00
Patrice Mandin
456550293a
nv30: update nouveau_class.h
2008-07-09 21:51:22 +02:00
Brian Paul
93ff702b4f
gallium: fix logic in pb_check_usage()
2008-07-09 11:46:16 -06:00
Brian Paul
520dbdea22
mesa: check for OpenBSD (bug 15604)
...
cherry-picked from master
2008-07-09 08:48:41 -06:00
Brian Paul
57f2d071d1
mesa: fix state.clip[n].plane parsing bug (bug 16611)
...
cherry-picked from master
2008-07-09 08:47:23 -06:00
Zack Rusin
48b8a32c6d
egl: plug a small memleak
2008-07-09 10:20:28 -04:00
Zack Rusin
d25709df1d
draw: remove some debug output
2008-07-09 09:54:57 -04:00
Brian Paul
cdc0b6e523
mesa: remove debug code
2008-07-08 16:58:50 -06:00
Brian Paul
072c474836
mesa: implement glGetUniformiv() with new ctx->Driver function
...
The old implementation could overwrite the caller's param buffer.
2008-07-08 16:12:01 -06:00
Brian Paul
3bdf50bab0
mesa: fix bug/failure in recursive function inlining
...
Fixes a failure for cases such as y = f(a, f(a, b))
All the usual tests still pass but regressions are possible...
2008-07-08 15:07:28 -06:00
Brian Paul
7cbc244c52
gallium: tweak printing of generic declarations
2008-07-08 15:07:28 -06:00
Brian Paul
fe1c0e44aa
mesa: more debug output
2008-07-08 15:07:28 -06:00
Brian Paul
0d1f54db6b
mesa: compute global var size before doing codegen
2008-07-08 15:07:28 -06:00
Brian Paul
2e638cfe3c
mesa: add missing VARYING case to storage_string()
2008-07-08 15:07:28 -06:00
Stephane Marchesin
a62a738f3d
nv10: use the gallium alloc/free wrappers.
2008-07-08 20:26:04 +02:00
Stephane Marchesin
511693d00c
nv04: use FREE/MALLOC like a good gallium boy should.
2008-07-08 20:06:57 +02:00
Jakob Bornecrantz
2e7e183751
i915: Takedown EGL screen
2008-07-08 16:54:22 +02:00
Stephane Marchesin
98c1b12ea0
Merge branch 'gallium-0.1' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/mesa into gallium-0.1
2008-07-08 16:38:55 +02:00
Stephane Marchesin
28268f7b22
nv30: use native instructions.
2008-07-08 16:38:27 +02:00
Jakob Bornecrantz
1257bb9b13
i915: Use deviceID in EGL device create
2008-07-08 14:44:23 +02:00
Jakob Bornecrantz
0c6efeb02b
i915: Complete the screen -> device renaming
2008-07-08 14:41:17 +02:00
Jakob Bornecrantz
b13b1210c0
i915: Renamed intel_screen to intel_device
...
The renameing makes more sense, why because:
In egl you have a display/driver/device as the
basis, and you have screens as outputs.
2008-07-08 14:16:15 +02:00
Ben Skeggs
06d87b44cf
nv50: make use of nouveau drm 0.0.11 to get 3d going
2008-07-08 12:51:29 +10:00
Jonathan White
8d2400f216
mesa: added GLAPIENTRY keywords
2008-07-07 17:57:02 -06:00
Jonathan White
f4caddd66f
egl: updated GL_APIENTRY for Windows
2008-07-07 17:57:02 -06:00
Stephane Marchesin
205101dafb
nv10: there are no 3D textures.
2008-07-08 01:34:36 +02:00
Stephane Marchesin
fec4e427f8
nv04: Hook the lib into the build.
2008-07-08 01:32:32 +02:00
Stephane Marchesin
97646f1045
nv04: use BEGIN_RING_NI
2008-07-08 01:30:48 +02:00
Stephane Marchesin
52a68dd9eb
nv04.
2008-07-08 01:06:18 +02:00
José Fonseca
6701ecb3ba
raw2png: More helpful messages. Handle PIPE_FORMAT_A8B8G8R8_SNORM.
2008-07-08 07:29:18 +09:00
José Fonseca
30b6b0b9ef
raw2png: Update formats from p_formats.h
2008-07-08 07:29:18 +09:00
Brian Paul
de71e4741d
egl: bump up MAX_ATTRIBS, added assertion
2008-07-07 14:34:30 -06:00
Brian Paul
1828b6d031
gallium: move assertion (though not really significant)
2008-07-07 10:12:55 -06:00
Brian Paul
b7dfabcaab
gallium: simplify/fix buffer_offset, src_offset computation for VBO arrays
...
Things broke when vertex position wasn't the first attribute.
2008-07-07 10:10:20 -06:00
Jakob Bornecrantz
3596339d31
i915: Fix wrong pointer to cleanup
2008-07-07 15:56:19 +02:00
Jakob Bornecrantz
7420bc05a8
i915: Fix EGL make current
2008-07-07 15:49:09 +02:00
Jakob Bornecrantz
88b806a069
i915: More cleanup of display
2008-07-07 15:26:47 +02:00
Jakob Bornecrantz
687c8d8941
i915: Fetch the real deviceID for EGL
2008-07-07 14:29:11 +02:00
Jakob Bornecrantz
1315f720ba
i915: Destruction of surface, context and device in EGL
2008-07-07 13:24:09 +02:00
Younes Manton
6235141fd2
g3dvl: IDCT part 1.
...
Very basic IDCT support is in, performed CPU-side for now.
2008-07-06 22:05:07 -04:00
Younes Manton
49937b9985
g3dvl: Round surfaces up to POT, use src rect when outputting surfaces.
2008-07-06 22:05:07 -04:00
Jakob Bornecrantz
b30fb6d540
i915: Fix EGL version and name
2008-07-05 16:53:29 +02:00
Jakob Bornecrantz
c6d6a57424
i915: Added a intel be function to wrap a drm bo handle
2008-07-05 15:58:42 +02:00
Jakob Bornecrantz
74db8e9b3f
i915: Fix haveDepth and haveStencil for visual in EGL
2008-07-05 14:04:02 +02:00
José Fonseca
152ed98b84
softpipe: Prevent NULL ptr derreference on takedown.
2008-07-05 03:51:26 +09:00
José Fonseca
c23b64f164
softpipe: Compute block size for display targets.
2008-07-05 03:51:25 +09:00
Jakob Bornecrantz
e6c24539c3
i915: Added debug filling code of texture, not active
2008-07-04 19:33:40 +02:00
Jakob Bornecrantz
f6e8963bb1
i915: Clean up intel_egl.c a bit
2008-07-04 19:33:34 +02:00
Jakob Bornecrantz
52912d8616
egl: Add egltri
...
First tri for EGL drivers with mesa screen ext
2008-07-04 19:33:09 +02:00
Patrice Mandin
f99643ca6e
nv30: Emit sampler state using state objects
2008-07-04 18:53:44 +02:00
Brian Paul
0bc2409e38
mesa: Replace Proxy1D/2D/etc with ProxyTex[] indexed by TEXTURE_x_INDEX.
...
Simplification in colortab.c too.
cherry-picked from master (fe46900703 )
2008-07-04 10:37:07 -06:00
Brian Paul
a3de65659c
gallium: fix st_choose_format(internalFormat=GL_RGBA16)
...
Need to check if we're choosing a surface or texture format.
2008-07-04 10:35:32 -06:00
Brian Paul
2fa7b3f786
mesa: Implement mutex/locking around texture object reference counting.
...
Use new _mesa_reference_texobj() function for referencing/unreferencing
textures. Add new assertions/tests to try to detect invalid usage of
deleted textures.
cherry-picked from master (9e01b915f1 )
2008-07-04 10:29:15 -06:00
Brian Paul
9ca1c62a96
gallium: replace assertion with conditional
2008-07-04 10:02:44 -06:00
Brian Paul
ba9e633902
gallium: fix trim() function bug when count < first
...
If the user called glDrawArrays(GL_TRIANGLES, count=1), trim() returned a
very large integer because of the unsigned arithmetic.
2008-07-04 10:02:43 -06:00
Brian Paul
294b061256
mesa: generate GL_INVALID_OPERATION in _mesa_get_uniform_location() if program isn't linked
2008-07-04 10:02:43 -06:00
Brian Paul
c4b6941e62
mesa: move assertion
2008-07-04 10:02:43 -06:00
José Fonseca
4a18324c0b
psb: Fill all texture fields when creating texture blanket.
2008-07-05 00:56:36 +09:00
José Fonseca
1942e29bf7
softpipe: Implement texture blankets.
2008-07-05 00:55:18 +09:00
Ben Skeggs
77f8167d75
Merge remote branch 'upstream/gallium-0.1' into gallium-0.1
2008-07-05 00:53:13 +10:00
José Fonseca
194cfc7a4e
scons: Enable gcc SSE2 intrinsics on x86.
2008-07-04 22:28:57 +09:00
Brian Paul
dd3311aa89
mesa: added _vbo_VertexAttrib4f()
2008-07-03 17:21:23 -06:00
Brian Paul
7366f3fc54
mesa: fix incorrect array size, added assertion
2008-07-03 17:21:23 -06:00
Brian Paul
0ed3f6f575
mesa: fix array storage allocation bug
2008-07-03 17:21:23 -06:00
Brian Paul
22ac107971
mesa: regenerated file
2008-07-03 17:21:22 -06:00
Brian Paul
4d1d6ed159
mesa: additional vec4 constructor
2008-07-03 17:21:22 -06:00
Brian Paul
d4172263e5
mesa: fix various error codes
2008-07-03 17:21:22 -06:00
Brian Paul
bb18a8b2ea
mesa: fix some error codes in _mesa_ShaderSourceARB()
2008-07-03 17:21:22 -06:00
Brian Paul
d015ffa6ea
mesa: fix problem freeing framebuffer/renderbuffer objects
...
Basically, set up no-op Delete() methods for the DummyFrame/Renderbuffer obj
2008-07-03 17:21:22 -06:00
Brian Paul
51abbdd227
gallium: added a4r4g4b4_put_tile_rgba()
2008-07-03 17:21:22 -06:00
Brian Paul
78388c0e37
mesa: added case for fixed pt
2008-07-03 17:21:22 -06:00
Brian Paul
f042d662e2
gallium: increase TGSI interpreter's number of temp registers to 64
...
Also, clean up the definitions of the misc/extra temp regs.
A few new assertions too.
2008-07-03 17:21:22 -06:00
Brian Paul
00eb309c31
gallium: move, increase ST_MAX_SHADER_TOKENS
2008-07-03 17:21:22 -06:00
Brian Paul
3c12874857
gallium: increase TGSI_EXEC_MAX_COND_NESTING, etc
2008-07-03 17:21:21 -06:00
Patrice Mandin
6f56b527d8
nv30: Reemit state when changing context
2008-07-03 22:47:15 +02:00
Patrice Mandin
568b477b9c
nv30: Emit viewport state using state objects
2008-07-03 22:42:30 +02:00
Patrice Mandin
e7e231a511
nv30: Emit polygon stipple state using state objects
2008-07-03 22:31:23 +02:00
Patrice Mandin
f1d24c1d27
nv30: Emit scissor state using state objects
2008-07-03 22:18:38 +02:00
Patrice Mandin
c66f376e27
nv30: Emit depth/stencil/alpha state using state objects
2008-07-03 22:10:53 +02:00
Patrice Mandin
360f7a3e23
nv30: Emit rasterizer state using state objects
2008-07-03 21:48:18 +02:00
Patrice Mandin
c0e9eb3b09
nv30: Emit blend state using state objects
2008-07-03 21:25:47 +02:00
Patrice Mandin
52cf7a6c1c
nv30: Emit blend color state using state objects
2008-07-03 21:11:07 +02:00
Patrice Mandin
36488ed052
nv30: Emit framebuffer state using state objects
2008-07-03 20:58:31 +02:00
Brian Paul
2212c214f1
gallium: fix surface memleak in bitmap code
...
Found w/ tunnel2.c demo.
2008-07-03 10:12:37 -06:00
José Fonseca
ade03755bc
pipebuffer: Silent warnings.
...
Although rarely hit in normal apps, they are too noisy with test suites.
2008-07-03 21:28:56 +09:00
José Fonseca
79ca9734ea
Support conversion of YUV surfaces.
2008-07-03 20:50:23 +09:00
José Fonseca
c193cc506f
gallium: Don't forget to get overllaping blits working again.
2008-07-03 20:50:23 +09:00
Jakob Bornecrantz
d94c7063ec
i915: EGL almost works again
2008-07-03 12:12:25 +02:00
Jakob Bornecrantz
28f3d390dd
egl: Fix demodriver
2008-07-03 12:10:36 +02:00
José Fonseca
8ccab31356
gallium: Use surface_copy for 1:1 blits.
2008-07-03 15:06:24 +09:00
José Fonseca
27d8d6f44f
scons: Add a env.CodeGenerate method to simplify code generation via python scripts.
...
env.CodeGenerate(
target = 'my_source.c',
script = 'my_generator.py',
source = ['input.txt', 'another.txt'],
command = 'python $SCRIPT $SOURCE > $TARGET'
)
It will take care generating all appropriate dependencies, including any
module imported by the generator script, and the respective .pyc file
side effects.
2008-07-03 15:06:24 +09:00
Brian Paul
1ca2306147
mesa: fix vertex array validation test for attribute 0 (vert pos)
...
We don't actually need vertex array[0] enabled when using a vertex
program/shader.
cherry-picked from master
2008-07-02 19:18:10 -06:00
Brian Paul
98b7174ad6
gallium: replace an assertion with "if (!texobj) continue"
...
It's possible to call update_samplers() between the time a fragment shader
is bound and when a texture image is defined (such as glClear). This
fixes the case where we don't have a complete texture object yet.
2008-07-02 19:11:49 -06:00
Brian Paul
dad8a7c90d
gallium: fix a bug in vertex program output mapping
...
Need to translate VERT_RESULT_PSIZ, BFC0, BFC1 to TGSI shader output slots
after all other attributes have been handled. This fixes a bug where
generic vertex program outputs (varying vars) could get mapped to the
same slot at point size or back-face colors.
2008-07-02 19:07:11 -06:00
Brian Paul
8fb4d602db
gallium: nr_attrs was off by one, updated comments, minor code movement
2008-07-02 19:05:18 -06:00
Brian Paul
39b9b05313
mesa: additional GLSL built-in constants
2008-07-02 17:10:42 -06:00
Brian Paul
dff477a5e2
mesa: when linking a shader program, make sure all the shaders compiled OK
...
cherry-picked from master
2008-07-02 17:08:47 -06:00
Brian Paul
40739d4ae9
mesa: added some debug code (disabled)
...
cherry-picked from master
2008-07-02 17:08:28 -06:00
Brian Paul
088c42c5c3
mesa: fix error codes in _mesa_shader_source(), _mesa_get_shader_source()
...
If the 'shader' parameter is wrong, need to either generate GL_INVALID_VALUE
or GL_INVALID_OPERATION. It depends on whether 'shader' actually names a
'program' or is a totally unknown ID.
There might be other cases to fix...
cherry-picked from master
2008-07-02 17:08:09 -06:00
Brian Paul
16caeeab4b
mesa: regenerated file
2008-07-02 17:06:26 -06:00
Brian Paul
adc709e996
mesa: added some missing equal() notEqual() intrinsics
...
cherry-picked from master
2008-07-02 17:05:56 -06:00
Brian Paul
8f98242d40
mesa: disable some debug assertions
...
We can sometimes fail these assertions because of how swizzled storage
works. Will revisit someday.
2008-07-02 12:47:18 -06:00
Brian Paul
eab88236b3
mesa: regenerated files
2008-07-02 12:46:18 -06:00
Brian Paul
789fae163d
mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
...
cherry-picked from master
2008-07-02 12:45:55 -06:00
Brian Paul
019ad5e284
gallium: replace 128 with MAX_LABELS
2008-07-02 12:41:39 -06:00
Brian Paul
511733b862
mesa: added _mesa_print_swizzle() debugging helper
2008-07-02 12:41:39 -06:00
Roland Scheidegger
489fc4d10a
mesa: fix issues around multisample enable
...
multisample enable is enabled by default, however gl mandates multisample
rendering rules only apply if there's also a multisampled buffer.
2008-07-02 20:22:08 +02:00
Michel Dänzer
cc31eecbcb
gallium: Allow draw module to work on non-x86 platforms again.
2008-07-02 12:10:15 +02:00
José Fonseca
d16fcd07f8
pipebuffer: Debug buffer manager to detect buffer under- and overflows.
...
It should detect both cpu and gpu buffer overflows.
2008-07-02 12:29:07 +09:00
José Fonseca
ea4ca10b1b
pipebuffer: Verify usage flag consistency. Minor cleanups.
2008-07-02 12:29:07 +09:00
Brian Paul
66b48202c2
mesa: fix a GLSL vector subscript/writemask bug
...
This fixes a failure for cases like:
vec4 v;
v[1] *= 2.0;
The v[1] actually acts like a writemask, equivalent to v.y
The fix is a bit convoluted, but will do for now.
cherry-picked from master
2008-07-01 18:40:23 -06:00
Brian Paul
eeefe175de
mesa: move some functions
...
cherry-picked from master
2008-07-01 18:39:46 -06:00
Brian Paul
81a0acca31
mesa: make _slang_swizzle_swizzle() non-private
...
cherry-picked from master
2008-07-01 18:39:22 -06:00
Brian Paul
44c99ad236
mesa: better function inlining in the presence of 'return' statements
...
Before, the presence of a 'return' statement always prevented inlining
a function. This was because we didn't want to accidentally return from
the _calling_ function. We still need the semantic of 'return' when inlining
but we can't always use unconditional branches/jumps (GPUs don't always
support arbitrary branching).
Now, we allow inlining functions w/ return if the return is the last
statement in the function. This fixes the common case of a function
that returns a value, such as:
vec4 square(const in vec4 x)
{
return x * x;
}
which effectively compiles into:
vec4 square(const in vec4 x)
{
__retVal = x * x;
return;
}
The 'return' can be no-op'd now and we can inline the function.
cherry-picked from master
2008-07-01 11:48:57 -06:00
Brian Paul
7d4f01413f
mesa: add/fix some IrInfo entries for debugging purposes
...
cherry-picked from master
2008-07-01 11:48:27 -06:00
Jakob Bornecrantz
e99ce4af8a
i915: Last reference to surface -> pitch
2008-07-01 15:52:37 +02:00
José Fonseca
b3da2a9524
gallium: Use the inline keyword on C++.
2008-07-01 22:04:58 +09:00
José Fonseca
846f87d826
scons: Output mapfile on windows ddk profile builds.
2008-07-01 22:04:01 +09:00
Younes Manton
9833aec6cb
g3dvl: Use block and stride instead of cpp and pitch.
2008-06-30 19:26:22 -04:00
Younes Manton
1c893fd513
g3dvl: Simplify shader code.
2008-06-30 10:11:02 -04:00
Younes Manton
3933fec6bd
g3dvl: Support for field and frame based MC for progressive pictures.
...
MC support for frame and field based motion prediction. Also various bug
fixes, clean up.
2008-06-30 10:11:02 -04:00
Younes Manton
0a6aec8c0f
g3dvl: Work around SP tex cache bug, specify resource usage flags.
2008-06-30 10:11:02 -04:00
Younes Manton
14d4f9e44e
g3dvl: Get rid of some Valgrind errors.
...
Get rid of some Valgrind memory leak and uninitialized var errors.
2008-06-30 10:11:02 -04:00
José Fonseca
810888f656
gles: Don't define GLAPIENTRY here.
2008-06-30 12:49:32 +09:00
Ben Skeggs
c6ddcc10e3
nouveau: oops, bump the drm patchlevel back down again
2008-06-29 16:02:01 +10:00
Ben Skeggs
bf94027fdd
nv50: fixes after rebase + commits note on the code that was just pushed.
...
OK, seems a lot of people have been getting the idea that nouveau is
dying lately - I decided to commit some of the work I've been doing lately
to prove them wrong :) Progress on my side is slow due to lack of time
mainly, but I'm still around.
Firstly, don't even bother trying to use gallium on G8x/G9x yet, it won't
work. I've deliberately left all the necessary winsys changes out of the
commits for a very good reason - I don't know what we're going to need from
the DRM exactly yet and don't want to be continually breaking interfaces
as I discover additional requirements. On my side, I think I've gone
through about 3 different DRM interface changes, and have just discovered
that I may need more yet. It'd be very annoying for everyone who uses
nouveau to keep things in sync. Once I've got it sorted - I'll commit a
lot of cool stuff. Stay tuned.
Also, don't look at the shader code.. it's horribly nasty and full of hacks,
I used it as an opportunity to learn G8x GPU programs at the same time.
New semi-decent code is in works, and will follow at some point. :)
2008-06-29 16:00:42 +10:00
Ben Skeggs
70f0f0ebdf
nv50: reverse stencil sides, header is wrong
2008-06-29 15:46:53 +10:00
Ben Skeggs
e52d37d56c
nv50: fix line stipple
2008-06-29 15:46:53 +10:00
Ben Skeggs
fea9eb2842
nv50: don't multiply polygon offset units by 2.0 like on nv40
2008-06-29 15:46:53 +10:00
Ben Skeggs
e05f67cbe6
nv50: maybe some scissor fixes..
2008-06-29 15:46:53 +10:00
Ben Skeggs
95d64ceb5a
nv50: vpt translate/scale backwards
2008-06-29 15:46:53 +10:00
Ben Skeggs
e002ad7739
nv50: whoops
2008-06-29 15:46:52 +10:00
Ben Skeggs
2c2cb86461
nv50: rework miptree/texture/texsurf code a bit
2008-06-29 15:46:52 +10:00
Ben Skeggs
5a3362521d
nv50: turn on depth test/write again, not 100% but winsys handles it better
2008-06-29 15:46:20 +10:00
Ben Skeggs
47771bcd2f
nv50: maintain pipe surface status field
2008-06-29 15:46:19 +10:00
Ben Skeggs
e901302575
nv50: remove some debug
2008-06-29 15:46:19 +10:00
Ben Skeggs
5a3ea9ee59
nv50: simplify emit_interp a bit
2008-06-29 15:46:19 +10:00
Ben Skeggs
714cb4a86c
nv50: make sure static buffers (constbuf, tex control etc) get on reloc list
2008-06-29 15:46:19 +10:00
Ben Skeggs
3b88c3f411
nv50: R32_FLOAT vbo format
2008-06-29 15:46:19 +10:00
Ben Skeggs
65ad8176ca
nv50: move surface_map/unmap into nv50_surface.c
2008-06-29 15:46:19 +10:00
Ben Skeggs
fd7412a7f1
nv50: some people are just born stupid.. really..
2008-06-29 15:46:19 +10:00
Ben Skeggs
598b2a5105
nv50: make TEX a halfie
2008-06-29 15:46:19 +10:00
Ben Skeggs
035a04d9c1
nv50: get tri-scissor-tri working
2008-06-29 15:46:19 +10:00
Ben Skeggs
bb9efb5534
nv50: separate state validation and upload, similar to nv40
2008-06-29 15:46:19 +10:00
Ben Skeggs
94999d39d4
nv50: fix blend colour
2008-06-29 15:46:19 +10:00
Ben Skeggs
5d30701492
nv50: use stateobjs for sampler/image_control uploads
2008-06-29 15:46:18 +10:00
Ben Skeggs
431504b99c
nv50: hack of a TEX opcode
2008-06-29 15:46:18 +10:00
Ben Skeggs
bcbe6baac3
nv50: hacks for stuff I don't really get yet
2008-06-29 15:46:18 +10:00
Ben Skeggs
cae38d0fcc
nv50: abuse constbuf upload for program upload
2008-06-29 15:46:18 +10:00
Ben Skeggs
fea0b16516
nv50: a couple more bits'n'pieces
2008-06-29 15:46:18 +10:00
Ben Skeggs
da66b8a2f4
nv50: disable inline IMMD for now, IMMD+pred == BANG!
...
fixes progs/fp/lit.txt
2008-06-29 15:46:18 +10:00
Ben Skeggs
fa5cd63f96
nv50: simplify interp crap a bit...
...
hopefully there wasn't a good reason I went the route I did.. can't recall..
2008-06-29 15:46:18 +10:00
Ben Skeggs
c0ed6a871c
nv50: do tsc/tic upload + stub out shader TEX stuff
2008-06-29 15:46:18 +10:00
Ben Skeggs
0d7f25c890
nv50: disable ztest for now - it doesn't work still
2008-06-29 15:46:18 +10:00
Ben Skeggs
101305f37f
nv50: flag to indicate to winsys we want a surface for use as a zeta buffer
...
NVIDIA love to make life difficult.. we need different flags in PTEs for
zeta.. yay.. not.
2008-06-29 15:46:18 +10:00
Ben Skeggs
2fdeb4d5a5
nv50: comment on a so-far unseen bug
2008-06-29 15:46:18 +10:00
Ben Skeggs
4d520e0b76
nv50: another vbo format
2008-06-29 15:46:18 +10:00
Ben Skeggs
4bde3a72ab
nv50: fix blend cso
2008-06-29 15:46:18 +10:00
Ben Skeggs
619549a637
nv50: valgrind complaint
2008-06-29 15:46:17 +10:00
Ben Skeggs
027ed25c12
nv50: draw_elements() - inline only for the moment
2008-06-29 15:46:17 +10:00
Ben Skeggs
163d9aa1fe
nv50: support a couple more common VBO formats
2008-06-29 15:46:17 +10:00
Ben Skeggs
f700d6be63
nv50: remove some cruft, don't upload program unless really needed
2008-06-29 15:46:17 +10:00
Ben Skeggs
ab3d55e2e3
nv50: more efficient const upload + fixes (fp/* works now!)
2008-06-29 15:46:17 +10:00
Ben Skeggs
aea1669ff2
nv50: use constbuf segment 0 for everything - I can't make the others work..
2008-06-29 15:46:17 +10:00
Ben Skeggs
1c7489bd7e
nv50: allow relocating a shader's constants at upload time
2008-06-29 15:46:17 +10:00
Ben Skeggs
40137ea263
nv50: carry instructions around in nv50_program_exec, not a flat array
2008-06-29 15:46:17 +10:00
Ben Skeggs
f50e78e83c
nv50: get vp working again, fp is broken regardless somehow..
...
g8x sucks :)
2008-06-29 15:46:17 +10:00
Ben Skeggs
19a1e9015e
nv50: rename nv50_state.h to nv50_program.h
2008-06-29 15:46:17 +10:00
Ben Skeggs
585ae74d87
nv50: move magics take 2
2008-06-29 15:46:17 +10:00
Ben Skeggs
bce558b37c
Revert "nv50: move some magics"
...
This reverts commit 0a38de30429d3075fc6dfc9ff3729c5ca11f0c2f.
2008-06-29 15:46:17 +10:00
Ben Skeggs
7e9f6e290d
nv50: move some magics
2008-06-29 15:46:16 +10:00
Ben Skeggs
7b7df34781
nv50: various fixes + SCS
2008-06-29 15:46:16 +10:00
Ben Skeggs
21e688e0a3
nv50: LRP
2008-06-29 15:46:16 +10:00
Ben Skeggs
454394e749
nv50: quick hack so progs/fp/fp-tri works for the moment
2008-06-29 15:46:16 +10:00
Ben Skeggs
51ea3aae03
nv50: fix SGE/SLT when sources need swapping
2008-06-29 15:46:16 +10:00
Ben Skeggs
31f6a24b59
nv50: support the other TGSI_UTIL_SIGN modes
2008-06-29 15:46:16 +10:00
Ben Skeggs
6d0f7ea954
nv50: note some things discovered during renouveau session
2008-06-29 15:46:16 +10:00
Ben Skeggs
713ef6ccd2
nv50: use emit_flop() instead of building RCP manually on interp
2008-06-29 15:46:16 +10:00
Ben Skeggs
b5bbf09c42
nv50: remove NV50_PROG_{VERTEX,FRAGMENT}
2008-06-29 15:46:16 +10:00
Ben Skeggs
776e9581d1
nv50: delayed write of fragprog result regs until end of program
2008-06-29 15:46:16 +10:00
Ben Skeggs
34a039ae7b
nv50: fix src1 & src2 == const
2008-06-29 15:46:16 +10:00
Ben Skeggs
afcaeaa0e4
nv50: note a critical bug
2008-06-29 15:46:15 +10:00
Ben Skeggs
6ca31aa55e
nv50: hehe, damage from tex-surfaces.. surface_fill() reenabled now :)
2008-06-29 15:46:15 +10:00
Ben Skeggs
9a37a56c8a
nv50: obey writemask in a couple of places
2008-06-29 15:46:15 +10:00
Ben Skeggs
01e36eb531
nv50: LIT - sort-of
...
*somehow* we have the exact same bug here as on nv4x, the difference being
on nv4x the hw actually has a LIT opcode.. NVIDIA doesn't have the bug on
either arch FWIW.
2008-06-29 15:46:15 +10:00
Ben Skeggs
fe90cc509f
nv50: obey per-source abs (TGSI_UTIL_SIGN_CLEAR)
2008-06-29 15:46:15 +10:00
Ben Skeggs
faa1c02546
nv50: create emit_pow() - emit_lit() will need to use it
2008-06-29 15:46:15 +10:00
Ben Skeggs
686bc00c05
nv50: oops, copy+pasto
2008-06-29 15:46:15 +10:00
Ben Skeggs
ea4b09cbcb
nv50: POW!
2008-06-29 15:46:15 +10:00
Ben Skeggs
688064236b
nv50: fixes + untested _SAT modifier
2008-06-29 15:46:15 +10:00
Ben Skeggs
34abb858e2
nv50: handle 0/1 SWZ
2008-06-29 15:46:15 +10:00
Ben Skeggs
33e4d30d50
nv50: DST
2008-06-29 15:46:15 +10:00
Ben Skeggs
68091b0c89
nv50: ABS
2008-06-29 15:46:15 +10:00
Ben Skeggs
b4f7463585
nv50: FLR/FRC
2008-06-29 15:46:14 +10:00
Ben Skeggs
bdd31c20ab
nv50: SGE/SLT
2008-06-29 15:46:14 +10:00
Ben Skeggs
d69f334230
nv50: small cleanup
2008-06-29 15:46:14 +10:00
Ben Skeggs
21e18e2b74
nv50: DPH, XPD, some TODOs
2008-06-29 15:46:14 +10:00
Ben Skeggs
fbf4027dd9
nv50: fix EX2.. somehow
2008-06-29 15:46:14 +10:00
Ben Skeggs
7df7f7bb99
nv50: big fuckup, fix it
2008-06-29 15:46:14 +10:00
Ben Skeggs
52a69196c1
nv50: some fixes + MIN/MAX
2008-06-29 15:46:14 +10:00
Ben Skeggs
2a1fb44d75
nv50: checkpoint: shader code now exceeds caps of "old" code
2008-06-29 15:46:14 +10:00
Ben Skeggs
e55964099b
nv50: remove hardcoded fp stuff
2008-06-29 15:46:14 +10:00
Ben Skeggs
8ec6415e9f
nv50: start using interpreter for fragprog too, not hardcoded passthrough
2008-06-29 15:46:14 +10:00
Ben Skeggs
55b2fe1047
nv50: drop the majority of the old shader code, reimplement, only MOV so far.
2008-06-29 15:46:14 +10:00
Ben Skeggs
22e0acc466
nv50: split code/data upload out, fp will use it later on
2008-06-29 15:46:13 +10:00
Ben Skeggs
207b797472
nv50: DPH
2008-06-29 15:46:13 +10:00
Ben Skeggs
38ce697e59
nv50: implement SUB
2008-06-29 15:46:13 +10:00
Ben Skeggs
41cd9bddf7
nv50: fucking horrible hack, I really hate G8x shaders..
2008-06-29 15:46:13 +10:00
Ben Skeggs
716c1cd2ec
nv50: use "real" constbufs for shaders + tcb uploads
2008-06-29 15:46:13 +10:00
Ben Skeggs
f722fd937d
nv50: import current "state of the art" nv50 code
2008-06-29 15:46:13 +10:00
Ben Skeggs
b6478021d5
nouveau: adapt to cpp->pf_block changes
2008-06-29 15:00:28 +10:00
Ben Skeggs
cc8e628563
Revert "mesa: Use the appropriate relocation."
...
This reverts commit cb09d1ef60 .
2008-06-29 13:02:31 +10:00
Ben Skeggs
01de2293d5
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-06-29 12:16:13 +10:00
Brian Paul
9d94d133b0
mesa: added null ptr checks
2008-06-28 16:47:39 -06:00
Brian Paul
2242769a13
s/GL_INVALID_VALUE/GL_INVALID_OPERATION/ in _mesa_get_uniformfv()
2008-06-28 16:47:22 -06:00
Brian Paul
a1ec6efce0
mesa: check FEATURE_point_size_array
2008-06-28 16:15:03 -06:00
Brian Paul
d4b100a6a1
egl: set config's EGL_CONFORMANT, EGL_RENDERABLE_TYPE, EGL_SURFACE_TYPE attributes
2008-06-28 16:04:01 -06:00
Brian Paul
8f91a83669
egl: fix default value of EGL_SURFACE_TYPE, added some sanity check assertions
2008-06-28 16:03:28 -06:00
José Fonseca
0f9a1e43bc
egl: WinCE doesn't have sys/types.h
2008-06-28 20:40:44 +09:00
Zack Rusin
a7499b7fc7
egl: helps if the stride is right
2008-06-27 16:47:22 -04:00
Zack Rusin
838b0d6e48
eh, we need a buildbot... fix the compilation
2008-06-27 15:56:09 -04:00
Roland Scheidegger
429a08384c
gallium: handle msaa
2008-06-27 16:10:16 +02:00
Robert Ellison
a1fb565ea7
egl: These changes allow an eglBindAPI(EGL_OPENGL_ES_API) to succeed, and to work correctly with GLES1 and GLES2.
...
- egl_xdri.c just sets the EGL_OPENGL_ES_BIT as well as the
EGL_OPENGL_BIT in ClientAPIsMask
- eglconfig.c allows the renderable type to include EGL_OPENGL_ES2_BIT
as well as EGL_OPENGL_ES_BIT.
- egl_xlib.c sets the EGL_NATIVE_RENDERABLE attribute to EGL_FALSE for
all softpipe configurations. (Otherwise, an eglChooseConfig() that
looks for particular values of EGL_NATIVE_RENDERABLE will fail.)
2008-06-27 07:17:02 -06:00
Jonathan White
b028b0cc53
egl: Windows updates to the platform.h files
2008-06-27 07:13:58 -06:00
Jakob Bornecrantz
5b9d823545
i915: Fix the last of the stride/pitch changes
2008-06-27 14:33:02 +02:00
José Fonseca
fb95b603ef
mesa: Replace void * arithmetic.
2008-06-27 20:56:49 +09:00
José Fonseca
4f45dbc6aa
gdi: Update for cpp removal.
2008-06-27 20:56:29 +09:00
José Fonseca
891469a3a5
cell: Update for cpp removal.
...
Not tested -- just mymic the softpipe changes.
2008-06-27 20:10:04 +09:00
José Fonseca
4ddd659679
gallium: Drop pipe_texture->cpp and pipe_surface->cpp.
...
The chars-per-pixel concept falls apart with compressed and yuv images,
where more than one pixel are coded in a single data block.
2008-06-27 19:37:56 +09:00
José Fonseca
05cfb4c4b8
scons: Get x86-64<->x86 cross build of assembly files right.
2008-06-27 13:41:23 +09:00
José Fonseca
6106db4c5d
scons: Fix i965/xlib build.
2008-06-27 13:01:37 +09:00
José Fonseca
fb4361a93d
scons: Fix typo.
2008-06-27 12:35:18 +09:00
José Fonseca
cb09d1ef60
mesa: Use the appropriate relocation.
...
I don't fully understand this, but this matches the assembly code gcc
generates glapi.c and fixes following error on x86-64 with assembly:
relocation R_X86_64_PC32 against `_gl_DispatchTSD' can not be used when making a shared object
2008-06-27 12:34:57 +09:00
José Fonseca
38d779a3e6
gallium: Describe pixel block.
...
Chars-per-pixel paradigm is not enough to represent compressed and yuv
pixel formats.
2008-06-26 23:39:13 +09:00
Brian Paul
d378f7b3df
mesa: point size arrays
2008-06-25 08:45:14 -06:00
Patrice Mandin
b831aa06dc
nv30: add context value
2008-06-24 21:04:37 +02:00
Ben Skeggs
bb10891925
nouveau: major thinko
2008-06-25 04:08:17 +10:00
Ben Skeggs
b40ed6a0b5
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-06-25 04:05:11 +10:00
Brian Paul
0561a293b6
gallium: remove some old dispatch code
2008-06-24 08:47:15 -06:00
Brian Paul
2b69233510
gallium: remove bad assertion
2008-06-24 08:45:59 -06:00
Jakob Bornecrantz
62fd280c52
gallium: Fix whole source being used in u_blit
2008-06-24 16:14:46 +02:00
José Fonseca
fd6676c249
Fix CRLF line endings.
2008-06-24 22:26:19 +09:00
José Fonseca
67262c82a1
Allow CRLF automatic conversion on MSVC project files.
...
MSVC doesn't really care, and it is frequently causing merge conflicts.
2008-06-24 22:25:52 +09:00
Jakob Bornecrantz
e95697758e
i915: Create a texture and surface for shared frontbuffer
2008-06-24 14:42:12 +02:00
Jakob Bornecrantz
19dad109bb
i915: Added texture_blanket function
2008-06-24 14:33:28 +02:00
Jakob Bornecrantz
2d11411b19
i915: Moved screen creation to intel_be_device
2008-06-24 14:33:18 +02:00
Jakob Bornecrantz
e8af160b24
gallium: Fix warning in u_blit.h
2008-06-24 14:33:07 +02:00
Jakob Bornecrantz
72edcd1711
egl: Stdint was missing from eglconfigutil.h
2008-06-24 14:32:53 +02:00
José Fonseca
8c90148cb9
mesa: Fix Windows GDI winsys build.
2008-06-24 20:44:47 +09:00
José Fonseca
9dfa6063be
gallium: Avoid double arithmetic.
2008-06-24 14:22:09 +09:00
José Fonseca
a148025d94
mesa: Use standard integer types.
...
Especially get rid of the non-portable long long.
2008-06-24 14:18:07 +09:00
José Fonseca
b6f053739f
mesa: Replace deprecated __MSC__ macro.
2008-06-24 14:02:24 +09:00
José Fonseca
4802a687a7
dri/intel: Use standard integer types.
2008-06-24 14:00:10 +09:00
José Fonseca
e8b52b3f56
gallium: Drop deprecated __MSC__ macro.
2008-06-24 13:56:41 +09:00
José Fonseca
0d94767430
egl: Use standard integer types.
2008-06-24 13:55:38 +09:00
José Fonseca
2e328dcde2
mesa/dri: User standard integer types.
2008-06-24 13:51:52 +09:00
José Fonseca
5c1a78b7a8
mesa: More signed/unsigned float/integer fixes.
2008-06-24 13:12:41 +09:00
José Fonseca
0b3d1b1ea4
mesa: WGL is not part of the WinCE API.
...
Although it would be interesting having the GDI winsys running on WinCE
several Windows GDI API functions and data structures are missing from
WinCE headers, making this far from a trivial endeavor.
2008-06-24 13:00:03 +09:00
José Fonseca
b750b5326d
gdi: Update for surface_alloc_storage changes.
2008-06-24 11:40:25 +09:00
José Fonseca
18ec140ef2
mesa: Use appropriate unsigned/signed, float/integer types.
2008-06-24 11:34:46 +09:00
José Fonseca
80b359f574
mesa: Use _mesa_bsearch.
2008-06-24 11:33:03 +09:00
José Fonseca
182b644c71
mesa: bsearch implementation for WinCE.
2008-06-24 11:00:01 +09:00
José Fonseca
c921a29b3a
mesa: Replace abort by asserts.
2008-06-24 11:00:01 +09:00
José Fonseca
c47248bdf8
mesa: Move variable declarations to the scope top.
2008-06-24 11:00:01 +09:00
José Fonseca
543bba6ee3
mesa: Don't include sys/types.h on WinCE.
...
We probably shouldn't be including sys/types.h at all, but let's leave that
for another time.
2008-06-24 11:00:01 +09:00
Brian Paul
89e9d6b6db
gallium: added support for fixed-point formats, drawing
2008-06-23 17:13:14 -06:00
Jonathan White
dc73d15a9a
gallium: code for PIPE_SUBSYSTEM_WINDOWS_USER
2008-06-23 16:25:26 -06:00
Patrice Mandin
95fe122f67
nv30: add state zsa, based on nv40 one
2008-06-23 21:46:51 +02:00
Patrice Mandin
0e1b36b0b2
nv30: add state viewport, based on nv40 one
2008-06-23 21:37:41 +02:00
Patrice Mandin
d4bc56ca49
nv30: add state stipple, based on nv40 one
2008-06-23 21:13:27 +02:00
Patrice Mandin
e5bbb18441
nv30: add state scissor, based on nv40 one
2008-06-23 20:43:22 +02:00
Patrice Mandin
8b72737a0b
nv30: add state rasterizer, based on nv40 one
2008-06-23 20:37:27 +02:00
José Fonseca
8db7ef544c
mesa: ASSERT macro is already defined by WinCE headers.
...
Even when just the standard headers are used....
2008-06-24 02:39:17 +09:00
José Fonseca
ab7ad60d47
mesa: No getenv on WinCE.
2008-06-24 02:39:17 +09:00
José Fonseca
d9f38a2ad1
gallium: Use the more portable PIPE_ARCH_* PIPE_CC_* macros instead of ad-hoc ones.
2008-06-24 02:39:17 +09:00
José Fonseca
72b6fddefb
gallium: WinCE does not have cosf, sinf, etc.
2008-06-24 02:39:16 +09:00
Brian Paul
25da42a650
gallium: in softpipe_get_tex_surface() use the pitch specified in the softpipe_texture object.
...
Fixes a pitch/width mix-up.
2008-06-23 11:28:38 -06:00
Jakob Bornecrantz
f52ab4cc22
i915: Add render and texture support for tiled texture and buffers
...
This is step towards tiled textures and buffer support for
i915. But the tiled attribute is never set.
2008-06-23 18:36:36 +02:00
Brian Paul
a479bf6235
gallium: fix-up inverted do_copy_texsubimage()
...
The logic/arithmetic for inverting the src image is a bit simpler now.
2008-06-23 09:50:09 -06:00
Brian Paul
f738c3acac
gallium: fix Y-inverted copies
...
Don't require the caller to pass a non-intuitive negative src_y coord anymore
when doing a src-inverted copy.
2008-06-23 09:47:12 -06:00
Brian Paul
81b1a4224d
gallium: remove dead/prototype code
2008-06-23 09:07:56 -06:00
Brian Paul
e14126ec81
gallium: change surface_copy()'s do_flip to boolean
2008-06-23 08:54:16 -06:00
Brian Paul
f1601c2b75
gallium: fix bad srcy coord if do_flip
2008-06-23 08:51:00 -06:00
Brian Paul
92d48a4cb9
gallium: fix bad srcy coord if do_flip
2008-06-23 08:44:30 -06:00
Brian Paul
016dbb0cf3
gallium: added some assertions
2008-06-23 08:35:41 -06:00
Brian Paul
76b94a636e
Don't make libmesa.a or libglapi.a depend on asm_subdirs
...
Since the asm_subdirs target does not actually create a file, make will
always consider that it needs to be rebuilt. If libmesa.a and libglapi.a
have asm_subdirs as a prerequisite, then they will always need to be
rebuilt, too. The correct order will be preserved by the default target,
though.
This should fix #16358 .
Conflicts:
src/mesa/Makefile
cherry-picked from master
2008-06-23 08:14:49 -06:00
Dan Nicholson
8319f2f326
Create $(TOP)/$(LIB_DIR) for install, too
...
If `make install' is run without running `make' first, the $(LIB_DIR)
will not be created. This also changes the mkdir a little bit so that it
isn't run if necessary and added `-p' so that it is immune to races.
2008-06-23 08:14:49 -06:00
Dan Nicholson
464c585681
Ensure all objects are built when installing DRI
2008-06-23 08:14:49 -06:00
Jakob Bornecrantz
708bb35194
util: Blit can now copy from texture to surface
2008-06-23 16:09:38 +02:00
Jakob Bornecrantz
52501801c7
gallium: Add accessor functions to get textures from a st_framebuffer
2008-06-23 16:08:23 +02:00
José Fonseca
f78cc24c4b
scons: Update to target WinCE 6.0.
2008-06-23 19:44:37 +09:00
Jakob Bornecrantz
f08da6b821
gallium: Fix warning in u_draw_quad.h
2008-06-23 12:31:46 +02:00
Jakob Bornecrantz
d40ff29451
i915: Removed level_offset from i915_texture
...
All offsets are now on image_offset.
2008-06-23 11:57:34 +02:00
Ben Skeggs
5a01060eb9
nouveau: update for interface changes + hack around gallium x86_64 bustage
2008-06-23 00:14:21 +10:00
Ben Skeggs
aa3ab377e6
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
...
Conflicts:
configs/default
2008-06-23 00:01:17 +10:00
Keith Whitwell
e2c3f06e96
draw: fix non-i386 builds
2008-06-22 13:17:01 +01:00
Patrice Mandin
8c26a521ee
Update for extra vertex attributes
2008-06-21 22:59:05 +02:00
Patrice Mandin
5fea663b5f
nv30: Add state for blend
2008-06-21 12:03:05 +02:00
Patrice Mandin
582b39ebb9
nv30: Update nouveau_class.h to get its proper defines instead of using nv40 ones
2008-06-21 10:11:37 +02:00
Brian
2a5a95d0c0
gallium: s/feadback/feedback/, duh
2008-06-20 18:29:23 -06:00
Brian Paul
be4259b06c
gallium: fix invalid call to draw_set_mapped_constant_buffer()
...
We were indexing sp_constants[i] outside the loop so i was 2.
Replace i with PIPE_SHADER_VERTEX.
Also, replace magic '2' with PIPE_SHADER_TYPES in a few places.
2008-06-20 17:28:42 -06:00
Brian Paul
f38bb10969
gallium: fix some surface usage bugs
...
When a surface is created with GPU_WRITE that really means "GPU render"
and that can involve reads (blending). Set surface usage to
PIPE_BUFFER_USAGE_CPU_READ + WRITE. Fixes progs/demos/lodbias demo.
Also, mark texture as 'modified' when mapped for writing so that the tile
cache can know when to freshen a cached tile. Fixes glTexSubImage2D().
2008-06-20 15:58:19 -06:00
Brian Paul
78791d1065
egl: added cpp assertions/sanity checks
2008-06-20 14:30:21 -06:00
Brian Paul
36aae18683
mesa: init ctx->RenderMode
2008-06-20 14:29:49 -06:00
Brian Paul
677151ad71
egl: added null ptr check
2008-06-20 14:28:59 -06:00
Patrice Mandin
5e1d657d50
nv30: Add separate nv30 state stuff for fb, based on nv40 one, need to use it now
2008-06-20 22:19:22 +02:00
Brian Paul
a9b46b9e4c
mesa: GL_BYTE vertex/texcoord arrays
2008-06-20 11:49:25 -06:00
Brian Paul
42c468a5de
mesa: initial support for fixed-pt vertex arrays
2008-06-20 11:32:22 -06:00
Brian Paul
8e0f166eb5
mesa: refactor: move initialization of DefaultPacking state.
2008-06-20 11:31:05 -06:00
Brian Paul
722db809e6
gallium: always need st_init-blit()
2008-06-20 11:30:43 -06:00
Brian Paul
62d1d591d5
gallium: remove unneeded #include
2008-06-20 11:30:21 -06:00
Brian Paul
39ce394082
mesa: fix errors in prev commit
2008-06-20 11:15:30 -06:00
Brian Paul
9cae37870e
mesa: revamp glBlendFunc loopback
2008-06-20 11:05:00 -06:00
Brian Paul
1b241a4369
mesa: added _vbo_Materialfv()
2008-06-20 11:04:37 -06:00
Brian Paul
71f67dde34
mesa: _vbo_Color4f, _vbo_Normal3f, _vbo_MultiTexCoord4f functions
2008-06-20 10:48:14 -06:00
Brian Paul
95c9fc82f5
mesa: fix some FEATURE_x tests
2008-06-20 10:47:38 -06:00
Brian Paul
a87e717d0d
egl: added null ptr checks
2008-06-20 10:20:47 -06:00
Brian Paul
fbd6e86b8f
egl: implment EGL_LARGEST_PBUFFER query
2008-06-20 10:20:25 -06:00
Brian Paul
8a75d10953
egl: added null ptr check
2008-06-20 10:20:06 -06:00
Brian Paul
cae4444fa1
egl: default API should be ES
2008-06-20 10:19:51 -06:00
Brian Paul
d7a4d498e4
gallium: assorted FEATURE tests
2008-06-20 08:09:59 -06:00
Brian Paul
2dcd4ce4b6
gallium: remove unneeded #include
2008-06-20 08:09:46 -06:00
Brian Paul
907c0978af
mesa: test for FEATURE_ATI_fragment_shader
2008-06-20 08:07:38 -06:00
Brian Paul
9f6a4e2a65
egl: fix assorted context-related bugs
...
Move memset() to proper place.
Added EGL_CONTEXT_CLIENT_VERSION query.
Fix bad return EGL_FALSE -> EGL_TRUE.
2008-06-19 21:19:33 -06:00
Brian Paul
78d05bcc27
gallium: new st_api.c file with token symbol for identifying the API
2008-06-19 16:26:21 -06:00
Brian Paul
158298eea0
gallium: remove unused vars
2008-06-19 16:26:21 -06:00
Brian Paul
064001dbe7
egl: use dlsym() to try to identify APIs
2008-06-19 16:26:21 -06:00
Brian Paul
a8533d5493
egl: clean up prototype code, new _eglFindAPIs() function.
2008-06-19 16:26:20 -06:00
Jakob Bornecrantz
8d0329fb6a
i915: Fixed cubemap layouts
...
Apprently we shouldn't do all the advanced layout
operation for none compressed formats.
The compressed code was also broken, its currently
disabled, but should be fixed once i915simple starts
to support compressed formats.
2008-06-19 17:11:06 +02:00
José Fonseca
6fbfcf9222
gallium: Handle malloc failure.
2008-06-19 23:05:09 +09:00
Jakob Bornecrantz
6cbc2734d1
i915: Refractored and clean up i915_texture.c
2008-06-19 14:43:54 +02:00
José Fonseca
c5bf215b1b
gallium: Add extra parenthesis as advised by gcc.
2008-06-19 21:17:33 +09:00
Michal Krol
b440cea343
util: Add missing format names.
2008-06-19 14:08:06 +02:00
José Fonseca
aa816d114e
draw: Fix MSVC integer size conversion warning.
2008-06-19 10:47:54 +09:00
José Fonseca
4a49f1d2e2
Parse the section:offset instead of the rva+base when reading mapfiles.
2008-06-19 10:47:49 +09:00
Brian Paul
f140138558
gallium: additional fixes to ensure even number of vertices per buffer
2008-06-18 15:08:19 -06:00
Brian Paul
7d7f3e2c94
gallium: split long prims into chunks with an even number of vertices
...
This fixes culling "parity" errors when splitting long tri strips. Splitting
strips into chunks with an odd number of vertices causes front/back-face
orientation to get reversed and upsets culling.
2008-06-18 14:55:12 -06:00
Brian Paul
b623fa9e2d
mesa: Fix bug in _mesa_swizzle_ubyte_image
2008-06-18 19:43:06 +02:00
Jakob Bornecrantz
ba344753b1
tests: Added a test for a strange bug in texstore_a8
2008-06-18 19:07:07 +02:00
Brian Paul
b1eff0228b
mesa: add fwd decl of fill_in_entrypoint_offset()
2008-06-18 11:00:43 -06:00
Brian Paul
9a2c70f075
gallium: added new st_set_framebuffer_surface()
...
This allows the winsys to explicitly specify gallium surfaces for a
framebuffer object.
2008-06-18 10:20:13 -06:00
Brian Paul
19f872f2ec
mesa: fix ReadBuffer initialization
2008-06-18 09:30:13 -06:00
Brian Paul
a668b43568
egl: use RTLD_LAZY
2008-06-18 09:22:01 -06:00
Brian Paul
0cf79316d0
egl: omit libmesa.a glapi.c from library
2008-06-18 09:22:01 -06:00
Brian Paul
51f24ef5ba
gallium: remove duplicated u_mm.c in file list
2008-06-18 09:22:01 -06:00
Brian Paul
414b535134
gallium: more FEATURE_x tests
2008-06-18 09:22:01 -06:00
Brian Paul
03d579aa19
mesa: FEATURE_dispatch to control dispatch table usage
2008-06-18 09:22:01 -06:00
Brian Paul
1496bba429
egl: call st_get_proc_address()
2008-06-18 09:22:01 -06:00
Brian Paul
5ebd8495b3
gallium: added st_get_proc_address()
2008-06-18 09:22:00 -06:00
Brian Paul
29d632efbc
mesa: refactor: move GetProcAddress code from glapi.c into new glapi_getproc.c file
2008-06-18 09:22:00 -06:00
Brian Paul
04996bcef6
gallium: added FEATURE_x tests
2008-06-18 09:22:00 -06:00
Brian Paul
8a369b909a
mesa: s/GL_POLYGON+1/PRIM_OUTSIDE_BEGIN_END/
2008-06-18 09:22:00 -06:00
Brian Paul
c366fd83b6
mesa: add parenthesis
2008-06-18 09:22:00 -06:00
Jakob Bornecrantz
666b771e51
mesa: _mesa_texstore_s8_z24 now supports depth only uploads
2008-06-18 11:39:08 +02:00
Michal Krol
28ac7d37fe
gallium: Remove PIPE_FORMAT_A8UB8UG8SR8S_NORM definition.
2008-06-18 08:51:38 +02:00
Jakob Bornecrantz
081c05605f
i915: Fix for s8_z24 textures not being shown
2008-06-18 01:48:24 +02:00
Jakob Bornecrantz
a1524162bf
mesa: Added _mesa_texstore_s8_z24
2008-06-18 01:48:20 +02:00
Brian Paul
3bf8fb6486
mesa: fix inconsistent use of GL_UNSIGNED_INT vs. GL_UNSIGNED_INT_24_8_EXT for Z unpacking
2008-06-17 16:44:55 -06:00
Michal Krol
4539410d71
gallium: Add facilities for mixed pipe formats.
2008-06-17 21:48:39 +02:00
Brian Paul
318f00ae9f
gallium: need to flush bitmap cache when raster color changes
2008-06-17 12:20:22 -06:00
Brian Paul
93deede760
gallium: check if sampler->max_lod < sampler->min_lod
2008-06-17 10:28:00 -06:00
Brian Paul
3ccbde627e
mesa: make mm.c use unsigned ints for offsets.
...
If you have a GPU using this code and it has the offsets up in this space,
this fails.
cherry-picked from master
2008-06-17 10:11:53 -06:00
Jakob Bornecrantz
5805a9e328
i915: Made region pool a slabpool
2008-06-17 17:46:45 +02:00
Jakob Bornecrantz
d9d1e39d95
i915: Max and Min lod now works
2008-06-17 15:47:01 +02:00
seventh guardian
7db9034b04
added ARCH_FLAGS
2008-06-16 15:10:14 -06:00
Jakob Bornecrantz
4e52fa9b91
git: Updated .gitignore files
2008-06-16 12:20:17 +02:00
Michal Krol
64d854ebf7
util: Use pf_get_size().
2008-06-14 09:34:02 +02:00
Brian Paul
8b11fa4d44
mesa: move some glapi bits around
...
Move _glapi_proc typedef from glapitable.h to glapi.h
Also, don't include glapitable.h from glapi.h
Before we were including the huge glapitable.h file in every .c file.
2008-06-13 16:45:15 -06:00
Brian Paul
e9a6832737
mesa: remove some temp debug code
2008-06-13 14:13:25 -06:00
Brian Paul
2b4e2841a7
mesa: check FEATURE_ARB_occlusion_query
2008-06-13 13:58:09 -06:00
Brian Paul
be16f04e76
egl: added a debug msg
2008-06-13 13:58:08 -06:00
Jakob Bornecrantz
3da77b33bb
i915: Improved the not used tile code
2008-06-13 20:46:14 +02:00
Jakob Bornecrantz
d89b1e4a03
trivial: Update clear-undefined
2008-06-13 19:18:56 +02:00
Jakob Bornecrantz
907b753ae6
mesa: Fix libglapi.a build for dri
2008-06-13 19:13:35 +02:00
Jakob Bornecrantz
d1397fd779
i915: Fix offsets not being used for surface targets
2008-06-13 19:07:29 +02:00
Jakob Bornecrantz
c341094921
i915: Fix most of the clear problems
...
trivial/clear-undefined still fails
2008-06-13 19:03:51 +02:00
Jakob Bornecrantz
39bd7eb6dc
trival: Added test for undefined context of buffer
2008-06-13 17:45:55 +02:00
Brian Paul
2cc1b7c742
gallium: another attempt at fixing libglapi.a compilation for DRI builds
...
If building for DRI, make a dummy/empty libglapi.a for now.
2008-06-13 09:15:07 -06:00
Brian Paul
9350fd62b6
mesa: fix typo: s/stacks/stack/
2008-06-13 09:10:09 -06:00
Michal Krol
62f03a9ecc
gallium: Fix PIPE_FORMAT_A2B10G10R10_UNORM definition.
...
Whoops!
2008-06-13 15:21:11 +02:00
Michal Krol
b03a0373a2
gallium: Add PIPE_FORMAT_A2B10G10R10_UNORM.
2008-06-13 14:58:24 +02:00
Michal Krol
6f548c88e2
gallium: Allow pipe format component sizes to be specified
...
with finer granularity.
This will allow us to define A2R10G10B10 format.
2008-06-13 14:50:29 +02:00
Michal Krol
b850453497
mesa: Remove duplicate code.
2008-06-13 14:49:04 +02:00
Jakob Bornecrantz
de35bf5bdc
i915: Messed up lineloop now works
2008-06-13 14:11:20 +02:00
Jakob Bornecrantz
e9b8df69b4
i915: Support all primtive types in vbuf path
2008-06-13 12:21:58 +02:00
Zack Rusin
314c460604
silly bug: it's PROGRAM_VARYING
2008-06-12 19:41:54 -04:00
Zack Rusin
3911ef0327
glsl: make sure we replace all output reads with temporaries
...
test in if.glsl
2008-06-12 19:04:28 -04:00
Brian Paul
e961a5da77
mesa: add some #if FEATURE_x tests
2008-06-12 16:58:04 -06:00
Brian Paul
5b51cc020e
gallium: add some #if FEATURE_x tests
2008-06-12 16:58:04 -06:00
Brian Paul
6363960db5
mesa: remove unneeded #include
2008-06-12 16:58:04 -06:00
Brian Paul
73f78dedad
gallium: add missing comma
2008-06-12 16:37:16 -06:00
Brian Paul
20ee00754d
gallium: disable the codegen for TGSI_OPCODE_EXPBASE2 for now.
...
The x86 code seems to fail for exponents of 4 or larger.
See glean's vertProg1/EX2 test.
2008-06-12 16:01:43 -06:00
Keith Whitwell
08f1b8ac70
gallium: fix SSE codegen for instructions that use both a CONSTANT and IMMEDIATE
...
Fixes codegen for instructions like MUL dst, CONST[0], IMM[0]; the two operands
would up getting aliased in the x86/sse code.
Fixes glean/vertProg1/fogparams test.
2008-06-12 16:01:05 -06:00
Brian Paul
b19e8f720b
gallium: test for FEATURE_convolution
2008-06-12 15:46:10 -06:00
Brian Paul
cfe8763714
gallium: remove unused/old st_atom_fixedfunction.c file
2008-06-12 15:08:49 -06:00
Zack Rusin
494c40dbed
almost forgot - RelAddr is a boolean so use it here
2008-06-12 14:19:10 -04:00
Zack Rusin
f49dd47dc9
add some glsl example testing different arrays of uniforms
2008-06-12 14:15:37 -04:00
Zack Rusin
38fdf130d4
shaders: fix allocation of arrays of parameters
2008-06-12 14:15:37 -04:00
Zack Rusin
68ef8e89a5
glsl: implement variable array indexes
2008-06-12 14:15:37 -04:00
Brian Paul
5ecb2f2d0f
mesa: restore and fix Keith's "further degenerate the special case lit substitute"
...
There was a bug in emit_degenerate_lit() that caused the SLT to produce
unpredictable results in lit.z
Plus, added a bunch of new comments.
2008-06-12 11:17:46 -06:00
Keith Whitwell
23d340c9ed
pb: don't assert(0) on failure to allocate - this is a normal condition in many drivers
2008-06-12 14:41:25 +01:00
Brian Paul
34ff12ca1f
Revert "mesa: further degenerate the special case lit substitute"
...
This reverts commit e841b92d9c .
This fixes two specular lighting conform failures.
2008-06-11 20:50:26 -06:00
Brian Paul
11461f52be
mesa: refactor: update SConscript with recently added new source files
2008-06-11 20:17:08 -06:00
Brian Paul
222c80893a
mesa: refactor: move various ENUM_TO_x macros into macros.h
2008-06-11 20:17:08 -06:00
Brian Paul
77b794201a
mesa: refactor: move glTexParameter-related functions into new texparam.c file
2008-06-11 20:17:08 -06:00
Brian Paul
7ecac78ab5
mesa: refactor: move glTexEnv-related functions into new texenv.c file
2008-06-11 20:17:08 -06:00
Brian Paul
27049189d6
mesa: refactor: move glTexGen-related functions into new texgen.c file
2008-06-11 20:17:08 -06:00
José Fonseca
2fed8d8496
gallium: Support L16 pixel format.
2008-06-12 10:56:19 +09:00
José Fonseca
0f552f500c
pipebuffer: Fix improper memory free.
2008-06-12 10:56:16 +09:00
José Fonseca
23422d603a
gallium: Implement debug_get_num_option.
...
For numeric options.
2008-06-12 10:56:04 +09:00
Brian Paul
f61923441f
egl: some basic docs for libEGL
2008-06-11 19:35:52 -06:00
Brian Paul
6b389b5c2f
egl: some prototype Windows code (eq for dlopen,dlsym)
2008-06-11 19:35:32 -06:00
Alan Hourihane
6f7ed99b30
revert the DRI2 commits
2008-06-12 00:11:54 +01:00
Keith Whitwell
2161b0fafc
draw: don't assume vertex position is in data[0]
2008-06-11 23:48:45 +01:00
Keith Whitwell
807f8f177b
draw: preserve specular alpha when flatshading -- may be FOGC
2008-06-11 18:47:43 +01:00
Alan Hourihane
d45e99060d
fix card_extensions
2008-06-11 15:50:07 +01:00
Alan Hourihane
f851ba705a
fix legacy DRI
2008-06-11 15:35:12 +01:00
Alan Hourihane
5e9fe62c70
add missed files for DRI2 merge
2008-06-11 15:25:35 +01:00
Alan Hourihane
1bcb817167
Hook gallium i915 up to DRI2
2008-06-11 14:52:55 +01:00
Alan Hourihane
4dd1917e4b
small optimization
2008-06-11 14:51:41 +01:00
Alan Hourihane
4566b006f1
Bring in DRI2 changes
2008-06-11 14:10:08 +01:00
Keith Whitwell
bd92642100
draw: remove another debug assert on failover to generic vs varient
2008-06-11 09:36:58 +01:00
Keith Whitwell
3bdeff5bec
trivial: add test for integer vertex arrays
2008-06-11 09:19:48 +01:00
Keith Whitwell
ab399b555c
draw: remove debug assert on failover to generic vs varient
2008-06-11 09:19:48 +01:00
Brian Paul
e4cfe0854a
mesa: refactor: fix some FEATURE_ typos, mistakes
2008-06-10 16:43:49 -06:00
Brian Paul
0f36a29d5e
gallium: work-around glapi.c build problem for dri configs
2008-06-10 16:26:23 -06:00
Brian Paul
e9b6ed395a
egl: only windows are renderable at this time
2008-06-10 16:14:35 -06:00
Brian Paul
b9c5b0bc4b
egl: some prototype API detection code
2008-06-10 16:14:09 -06:00
Brian Paul
40d1a40f29
mesa: refactor: move #define FEATURE flags into new mfeatures.h file
...
Also, check the FEATURE flags in many places.
2008-06-10 16:13:42 -06:00
Brian Paul
ef27bdbfa8
mesa: include mtypes.h
2008-06-10 15:23:51 -06:00
Brian Paul
4c1892ca89
mesa: remove unnecessary swrast, tnl includes
2008-06-10 12:08:40 -06:00
Brian Paul
00d90fe845
gallium: remove stray include of st_context.h
2008-06-10 12:07:38 -06:00
Brian Paul
5493c775b7
add some missing rule dependencies
2008-06-10 10:10:00 -06:00
Keith Whitwell
aa7c21a45b
Revert "draw: no need to rearrange most primitives in vcache for flatshade-first"
...
This reverts commit ad44e68706 .
2008-06-10 16:56:32 +01:00
Keith Whitwell
ad44e68706
draw: no need to rearrange most primitives in vcache for flatshade-first
...
The driver/pipeline will still be applying flatshade-first state to the
triangles emitted from vcache, so there's no need to rotate the vertices
of most primitives. The only exception is POLYGON, as explained in the
code.
2008-06-10 14:48:57 +01:00
Keith Whitwell
14a13e3767
draw: fix edgeflags on clipped poly emit
2008-06-10 14:48:57 +01:00
Keith Whitwell
ac833b9aef
trivial: add trifan tests
2008-06-10 14:48:57 +01:00
Keith Whitwell
f5801fba24
trivial: add poly-flat-clip tests
2008-06-10 14:48:57 +01:00
Keith Whitwell
d915f40195
trivial: add tristrip-flat to makefile
2008-06-10 14:48:57 +01:00
Roland Scheidegger
d85f1e95d3
copy msaa visuals capability
2008-06-10 15:44:48 +02:00
Keith Whitwell
061e1c6c57
draw: rework splitting of fan/loop prims in varray.c, fix flatshade issues
2008-06-10 09:23:45 +01:00
José Fonseca
7d3bab537c
softpipe: Replace GETENV by debug_get_bool_option.
2008-06-10 08:52:10 +09:00
José Fonseca
3531c5284b
gallium: Detect buffer overflows in the homegrown memory debugger.
2008-06-10 08:38:31 +09:00
José Fonseca
0c5b1a8ffb
pipebuffer: Alternative buffer manager.
...
For situations where one has a reserve memory pool, or
a faster/slower pool.
2008-06-10 08:38:24 +09:00
José Fonseca
4b52f4df1b
pipebuffer: Be more lenient when matching cached buffer sizes.
...
Reuse cached buffers up to twice as big a requested.
2008-06-10 08:37:38 +09:00
José Fonseca
a70684bf25
gallium: Deprecate GETENV. Replace by debug_get_bool_option.
...
debug_get_bool_option will interpret "n", "no", "0", "f", or
"false" as FALSE; and everything else as TRUE. The default value
(used when the variable is not set) is received as a parameter.
2008-06-10 08:33:21 +09:00
Brian Paul
5f46bf77af
mesa: Xlib libGL.so fixes from master
2008-06-09 16:18:41 -06:00
Brian Paul
0116ec1af3
mesa: remove unused api_eval.h header file
2008-06-09 15:19:08 -06:00
Brian Paul
eded7f010d
mesa: refactor: move _mesa_update_minmax/histogram() into image.c
2008-06-09 15:14:02 -06:00
Brian Paul
bce428c4a6
mesa: refactor: move multisample-related functions into new multisample.c file
2008-06-09 15:09:21 -06:00
Brian Paul
9091015a97
mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to framebuffer.c
2008-06-09 15:04:31 -06:00
Brian Paul
eade430682
mesa: refactor: move glClear, glClearColor into new clear.c file.
2008-06-09 15:01:02 -06:00
Brian Paul
8cad3189d3
gallium: include scissor.h
2008-06-09 14:56:29 -06:00
Brian Paul
4be7296bfc
mesa: refactor: move scissor functions into new scissor.c file
2008-06-09 14:55:24 -06:00
Brian Paul
b36e6f0baf
mesa: refactor: move _mesa_init_exec_table() into new api_exec.c file
2008-06-09 14:49:04 -06:00
Brian Paul
74c82ebbb3
mesa: refactor: move pixel map/scale/bias code into image.c
...
pixel.c is just the API-related code now.
2008-06-09 14:32:27 -06:00
Brian Paul
5f91007f99
mesa: refactor: new _mesa_init_pixelstore() function
2008-06-09 14:25:23 -06:00
Brian Paul
d960a0621d
mesa: refactor: move glReadPixels code into new readpix.c file
2008-06-09 14:22:15 -06:00
Brian Paul
f26baad2e1
mesa: refactor: move glPixelStore function into new pixelstore.c file
2008-06-09 14:14:34 -06:00
Brian Paul
ffeb90169f
s/SOLO/MESA/
2008-06-09 14:09:28 -06:00
Brian Paul
4f15e3eefb
mesa: chmod a-x context.c
2008-06-09 14:03:01 -06:00
Brian Paul
d7205ba971
Makefile clean-ups
2008-06-09 13:52:01 -06:00
Brian Paul
ac7f416bda
more old stuff, rename SOLO->MESA, etc
2008-06-09 13:52:01 -06:00
Brian Paul
137dbe7eb1
mesa: disable VF_SOURCES
2008-06-09 13:52:01 -06:00
Brian Paul
5f621f68dd
mesa: remove some obsolete gallium bits
2008-06-09 13:52:00 -06:00
Brian Paul
44c347c49e
mesa: get rid of FBDEV/SVGA/etc bits
2008-06-09 13:52:00 -06:00
Brian Paul
6420a62cf0
egl: s/softpipe_egl.so/egl_softpipe.so/
2008-06-09 12:28:07 -06:00
Brian Paul
50d59c8be1
egl: choose between DRI and softpipe drivers
2008-06-09 12:28:07 -06:00
Zack Rusin
1954f49a17
glsl: fix array size initialiazers using const variables
...
e.g.
const int kernelSize = 9;
uniform vec2 kernel[kernelSize];
2008-06-09 11:42:48 -04:00
Brian Paul
1c316f1e82
gallium: disable a tgsi_dump() call
2008-06-09 09:27:52 -06:00
Jakob Bornecrantz
cfc23bc54c
i915: Disable color buffer writes if no color buffer is attached
2008-06-09 16:33:28 +02:00
Jakob Bornecrantz
2e3e518417
mesa: Most of the functions of MESA_TEXTURE_S8_Z24 are now supported
2008-06-09 16:33:14 +02:00
Younes Manton
d785a0c8b2
Merge branch 'gallium-0.1' of ssh://ymanton@git.freedesktop.org/git/nouveau/mesa into gallium-0.1
2008-06-08 20:24:13 -04:00
Younes Manton
f5a3768c4e
g3dvl: Reduce number of input vert streams by copying, reusing in shaders.
...
Reduce number of input vertex streams by using same texcoord stream for
chroma textures, reusing pos stream when calculating texcoords for P, B
macroblocks.
2008-06-08 14:46:21 -04:00
Jakob Bornecrantz
80ab4c3f8c
mesa: Do not compile the dri drivers in mesa
2008-06-08 17:29:56 +02:00
Jakob Bornecrantz
f4535f6e5a
mesa: Add MESA_FORMAT_S8_Z24 texture format
...
None of the fetch and store functions implemented.
This atleast stops shadowtex from locking the GPU on
i915 with the linux-dri-x86 target. It most of it looks
okay, with the exception of actually displaying the texture.
2008-06-08 16:58:19 +02:00
Younes Manton
c11a7ec821
Initial commit for g3dvl.
...
Initial commit for g3dvl, contains support for basic XvMC features.
- Context, surface, block, macroblock creation and deletion
- Surface rendering
- Frame pictures
- Frame based motion compensation
- Intra-coded macroblocks
- Predicted macroblocks
- Bi-directionally predicted macroblocks
- Surface display
- Color conversion
- Scaling
2008-06-08 03:04:14 -04:00
Ben Skeggs
edea59e8e5
nouveau: kill off surface_alloc_storage()
2008-06-08 12:51:04 +10:00
Keith Whitwell
a47c222803
draw: fix temp vs output buffer typo in vsvg_run_elts
2008-06-07 13:28:22 +01:00
Jose Fonseca
3c207936be
Fix CRLF line endings.
2008-06-07 12:40:39 +09:00
Jose Fonseca
e9c895919f
Fix CRLF line endings.
2008-06-07 12:40:36 +09:00
Brian Paul
f374734d61
egl: improved Makefile
2008-06-06 15:59:54 -06:00
Brian Paul
8dafe470fc
egl: EGL->DRI adaptor/driver
...
Allows regular DRI drivers to work with libEGL.
2008-06-06 15:52:47 -06:00
Brian Paul
ab102d5a9f
egl: clean-ups
2008-06-06 15:52:47 -06:00
Brian Paul
f82d5cf769
mesa: disable visual warning unless LIBGL_DEBUG is defined
2008-06-06 15:52:47 -06:00
Brian Paul
47ddcd2a71
egl: make _eglChooseDRMDriver() non-static
2008-06-06 15:52:47 -06:00
Brian Paul
f6e030f531
egl: change default logging level to _EGL_WARNING
2008-06-06 15:52:47 -06:00
Brian Paul
f0fdf0c23a
gallium: additional comment
2008-06-06 15:52:47 -06:00
Jonathan White
adaf0385e8
egl: updated EGLAPI for Windows
2008-06-06 15:13:59 -06:00
Brian Paul
53076e8b5b
mesa: sync up with latest Makefile changes on master
2008-06-06 12:33:40 -06:00
Keith Whitwell
463a47bf59
draw: fix intermediate buffer confusion in draw_vs_varient.c
...
The final output buffer can't be used to hold intermediate results
as the intermediate vertex size may be greater than the final vertex
size, and in any case the output buffer may be uncached in hw drivers.
2008-06-06 18:11:01 +01:00
Brian Paul
0a84d327de
egl: open X display if needed
2008-06-06 10:42:13 -06:00
Keith Whitwell
e4fda51404
mesa: turn off ffvertex prog debug
2008-06-06 15:57:37 +01:00
Jakob Bornecrantz
3d514a9070
gallium: Only build intel_drm for linux-dri targets
2008-06-06 16:50:52 +02:00
Keith Whitwell
0931b421d6
draw: make sure middle-end primitive is uptodate in vcache
2008-06-06 15:08:05 +01:00
Jakob Bornecrantz
1a2c445baf
i915: Moved EGL_i915 to the common code
2008-06-06 14:51:11 +02:00
Jakob Bornecrantz
adbdabb85a
i915: Moved pipe_buffer and i915_winsys functions to a common folder
2008-06-06 14:49:02 +02:00
José Fonseca
18953a8771
scons: Don't force MSVS 2003.
2008-06-06 15:20:42 +09:00
José Fonseca
b04aa714af
scons: Put the tool logic in a frontend tool.
...
More logic can be shared between public and private branches this way.
2008-06-06 14:55:51 +09:00
José Fonseca
f27c7729a9
draw: Compile draw_vs_aos only on x86.
2008-06-06 14:49:44 +09:00
Brian Paul
eb189c856d
sync up with Makefile changes on master
2008-06-05 16:46:29 -06:00
Brian Paul
949600b693
Move construction of libOSMesa.so into src/mesa/drivers/osmesa/Makefile
...
This removes some cruft from src/mesa/Makefile.
Something similar could be done for stand-alone / Xlib-Mesa libGL...
2008-06-05 15:42:25 -06:00
Brian Paul
20e2bb3e8a
insert mesa/ before include files
...
(picked from master)
2008-06-05 15:38:29 -06:00
Jonathan White
fe1a2d1fff
egl: assorted fixes for Windows
...
Note that int32_t is typedef'd both in p_compiler.h and eglplatform.h
2008-06-05 15:07:03 -06:00
Brian Paul
b11aad2abe
build egl_xlib/ too (softpipe_egl.so library)
2008-06-05 14:41:28 -06:00
Brian Paul
d607e30232
mesa: always build libglapi.a, updated subdir, gl.pc rule code from master
2008-06-05 14:40:27 -06:00
Brian Paul
e7725e136f
egl: build libEGL and softpipe_egl.so by default
2008-06-05 14:12:27 -06:00
Brian Paul
3b28aab161
egl: updated SUBDIRS
2008-06-05 14:11:54 -06:00
Brian Paul
d5cf57de2d
egl: new src/egl/drivers/Makefile
2008-06-05 14:11:39 -06:00
Brian Paul
cca1ae79aa
mesa: Makefile comment
2008-06-05 14:10:42 -06:00
Brian Paul
16e8ee33bd
mesa: remove EXT/NV suffixes from _mesa_PointParameter functions
2008-06-05 12:08:19 -06:00
Brian Paul
feb722fa98
mesa: added _mesa_DrawArrays, DrawElements, DrawRangeElements() wrappers for VBO funcs
2008-06-05 12:01:33 -06:00
Brian Paul
f6bb2f87b9
egl: minor tweaks
2008-06-05 12:01:33 -06:00
Keith Whitwell
da7b3d294b
pull in minor mklib change to fix debugging
2008-06-05 10:05:37 +01:00
Brian Paul
d8de01ba41
sync up with glxgears.c from master
2008-06-04 16:55:19 -06:00
Alan Hourihane
25641d599f
Set the attribute as used.
2008-06-04 21:25:41 +01:00
Brian Paul
2154cb4994
egl: single triangle test
2008-06-04 11:41:37 -06:00
Brian Paul
bf527cc8d4
egl: fix X visual selection
2008-06-04 11:40:25 -06:00
Brian Paul
b9d35c7c44
egl: query/print EGL_NATIVE_VISUAL_ID
...
Other whitespace/etc clean-ups.
2008-06-04 11:36:59 -06:00
Brian Paul
af31e5d429
egl: do proper setup/init of EGL configs
2008-06-04 11:36:59 -06:00
Brian Paul
97035cb19a
egl: in _eglAddConfig() just save a pointer to the config; don't copy the config
...
This allows subclassing by drivers.
2008-06-04 11:36:59 -06:00
Jakob Bornecrantz
88f86c9d02
egl: Added peglgears, gears that uses pbuffers
2008-06-04 19:31:05 +02:00
Brian Paul
1b386f4416
egl: new GLES/glplatform.h header
2008-06-04 10:27:22 -06:00
Brian Paul
3783994048
egl: updated GLES/gl.h and GLES/glext.h headers from Khronos.org
2008-06-04 10:17:56 -06:00
Brian Paul
af540ef369
egl: updated egl.h include paths
2008-06-04 10:11:25 -06:00
Brian Paul
19ca6ce573
egl: updated include paths (s/GLES/EGL/)
2008-06-04 10:09:49 -06:00
Brian Paul
0ebc94d236
egl: added OpenGL ES 2.0 header files in new GLES2 directory
2008-06-04 10:04:31 -06:00
Brian Paul
df8f9a1690
egl: created GLES/egl.h backward-compatibility header (see comments inside)
2008-06-04 10:03:39 -06:00
Brian Paul
493f3a0032
egl: moved egl.h into EGL/ directory
2008-06-04 10:01:16 -06:00
Brian Paul
3e702fa881
egl: moved eglext.h into EGL/ directory
2008-06-04 10:00:32 -06:00
José Fonseca
113ab51a8c
scons: Some provisions to cross-compile x86 on x86_64 machines and vice-versa.
2008-06-04 23:58:45 +09:00
José Fonseca
5c9c6b0d23
scons: Generate matypes.h at build time.
...
Also cleanup mesa SConscript.
2008-06-04 23:58:45 +09:00
José Fonseca
fc286ff3ba
mesa: Remove assyntax.h include from generated matypes.h.
...
matypes.h doesn't really depend on assyntax.h; assyntax.h is only present
on x86; and this way we remove the need of grep being available (which is
relevant for scons and non-unix platforms).
2008-06-04 23:58:44 +09:00
Brian Paul
8223add330
gallium: added tgsi_is_passthrough_shader() function
...
Checks if all instructions are of the form MOV OUT[n], IN[n]
Untested at this time.
2008-06-04 08:57:15 -06:00
Brian Paul
4ebfc3c8ff
egl: prototype some multi-API code
2008-06-04 08:57:15 -06:00
Keith Whitwell
b98ac1d472
draw: init vsvg draw pointer
2008-06-04 15:51:17 +01:00
Michal Krol
43b92a6424
gallium: Define PIPE_CAP_GUARD_BAND_* capabilities.
2008-06-04 11:42:26 +01:00
Keith Whitwell
0a4aea0e86
draw: respect driver's max vertex buffer size
2008-06-04 11:25:54 +01:00
Alan Hourihane
c218b8c6c6
Build with -O2
2008-06-04 09:56:00 +01:00
Keith Whitwell
5b6ea6bfc8
Merge branch 'gallium-tex-surfaces' into gallium-0.1
2008-06-03 15:32:45 +01:00
Jakob Bornecrantz
afd635a950
i915: Fix compile on linux-dri-debug
2008-06-03 12:35:01 +02:00
Michal Krol
0a5df5bc7d
draw: Use register names more consistently.
2008-06-03 11:22:00 +02:00
Michal Krol
183d490ab1
draw: Fix fetch_src(). Resurrect SSE version of DP3.
2008-06-03 10:59:46 +02:00
Michal Krol
58cccc8d6b
draw: Fix DP3 implementation by replacing SSE with x87 version.
2008-06-02 21:51:31 +02:00
Jakob Bornecrantz
6a3aab1983
i915: Removed useless defines
2008-06-02 17:24:31 +02:00
Jakob Bornecrantz
7cc23a9eae
i915: Implement and use the reworked batchbuffer code
2008-06-02 17:24:30 +02:00
Jakob Bornecrantz
4ee14279f3
i915: Rework of batchbuffer code
2008-06-02 17:24:30 +02:00
José Fonseca
5a67df6d7c
scons: Integrate gdi winsys.
...
Conditional build of the winsys based on the platform.
2008-06-03 00:05:54 +09:00
José Fonseca
7c22bb383a
gdi: Port of the gdi mesa driver to gallium (Alan Hourihane).
2008-06-03 00:05:54 +09:00
Keith Whitwell
6a39bcf375
draw: fast element translate path without delta
2008-06-02 14:37:03 +01:00
José Fonseca
e0860518df
gallium: Replace XSTDCALL by PIPE_CDECL.
2008-06-02 22:31:02 +09:00
José Fonseca
8d9a96386a
gallium: Port util_time functions to windows userspace.
2008-06-02 21:45:25 +09:00
José Fonseca
5027411134
gallium: More tweaks for the cosf/sinf logic.
2008-06-02 21:43:31 +09:00
José Fonseca
aa1a39d1a7
rtasm: Use enum sse_cc in sse_cmpps.
2008-06-02 20:46:05 +09:00
José Fonseca
acdf24e530
gallium: Fix log<->cos typo in logf.
2008-06-02 20:28:50 +09:00
José Fonseca
969a207fe3
gallium: Fix log<->cos typo in logf.
2008-06-02 20:17:16 +09:00
Jakob Bornecrantz
c1949e2bd3
i915: Fixed some warnings
2008-06-02 13:00:32 +02:00
Jakob Bornecrantz
f4364cd1a6
i915: Fixed initialization of surface
2008-06-02 12:59:59 +02:00
José Fonseca
9b50043ea9
gallium: Hopefully fix the cosf/sinf/etc. conditional compolation logic for good.
2008-06-02 19:46:18 +09:00
José Fonseca
275fc32d58
gallium: Identify each Windows platform individually from scons.
2008-06-02 19:46:18 +09:00
José Fonseca
5463420741
scons: Set /W3 warning level for all MSVC based platforms.
2008-06-02 19:46:18 +09:00
José Fonseca
5b86ae60fe
draw: Fix MSVC warnings.
2008-06-02 19:46:18 +09:00
Michal Krol
2c7ae3371b
tgsi: Add assertions to the new rule that when an extended swizzle
...
is used, the simple swizzle must be set to identity.
2008-06-02 11:59:04 +02:00
Michal Krol
49ed85d6b1
brw: SWZ no longer aliases MOV.
2008-06-02 11:42:16 +02:00
Michal Krol
dfd30b8786
i915: SWZ no longer aliases MOV.
2008-06-02 11:41:17 +02:00
Michal Krol
dc6068a8bc
cell: SWZ no longer aliases MOV.
2008-06-02 11:40:44 +02:00
Michal Krol
c6ae627fdc
tgsi: SWZ no longer aliases to MOV.
2008-06-02 11:39:59 +02:00
Michal Krol
837d49a84e
gallium: The SWZ opcode no longer aliases MOV.
...
Also, when the extended swizzle token is used, the simple swizzle
and negate are set to X,Y,Z,W and FALSE, respectively.
2008-06-02 11:34:56 +02:00
Michal Krol
a3212ee313
mesa: Fix build after TGSI declaration interface changes.
2008-05-31 19:55:27 +02:00
Michal Krol
0112211614
brw: Fix build after TGSI declaration interface changes.
2008-05-31 19:54:20 +02:00
Michal Krol
99b4655549
i915: Fix build after TGSI declaration interface changes.
2008-05-31 19:52:41 +02:00
Michal Krol
347d28fd20
cell: Fix build after TGSI declaration interface changes.
2008-05-31 19:51:50 +02:00
Michal Krol
56fc7690d7
util: Fix build after TGSI declaration interface changes.
2008-05-31 19:50:58 +02:00
Michal Krol
a49381587f
tgsi: Fix build after TGSI declaration interface changes.
2008-05-31 19:48:13 +02:00
Michal Krol
3de18c2ac3
gallivm: Fix build after TGSI declaration interface changes.
2008-05-31 19:41:29 +02:00
Michal Krol
c2ff3a66a1
draw: Fix build after TGSI declaration interface changes.
2008-05-31 19:40:36 +02:00
Michal Krol
4e33edfd06
gallium: Refactor TGSI decalaration tokens.
...
* Incorporate declaration_interpolation into declaration itself.
* Remove declaration_mask -- always use declaration_range.
2008-05-31 18:56:20 +02:00
Michal Krol
140e0e0718
i915: Comment out dead & problematic code.
2008-05-31 18:44:47 +02:00
Michal Krol
9b3c1582be
i915: Add mising include.
2008-05-31 18:42:17 +02:00
Michal Krol
a4abedc4f5
draw: Remove const qualifier.
2008-05-31 18:40:39 +02:00
Michal Krol
9046d1acfa
gallium: Fix preprocessor logic.
2008-05-31 18:40:00 +02:00
Michal Krol
13581958bd
draw: Remove const qualifier.
2008-05-31 18:19:21 +02:00
José Fonseca
ffc6afcdbf
scons: Enable mesa state tracker in all platforms by default.
...
But only actually build it on some. This results in a better default
scons experience.
2008-05-31 18:55:41 +09:00
José Fonseca
3b77f391db
draw: Eliminate stdio usage.
2008-05-31 18:55:40 +09:00
José Fonseca
53174afeeb
mesa: Apply MSVC portability fixes from Alan Hourihane.
2008-05-31 18:55:40 +09:00
José Fonseca
45b2c23d7a
i915: Eliminate void pointer arithmetic.
2008-05-31 18:55:40 +09:00
José Fonseca
054189e87a
gallium: MSVC 8.0 already defines the cosf, sinf, etc.
2008-05-31 18:55:40 +09:00
José Fonseca
a9d6b1afa5
gallium: Port timing functions to WinCE.
2008-05-31 18:55:40 +09:00
Brian Paul
12bb907522
gallium: fix some PIPE_FORMAT_Z24S8_UNORM bugs in softpipe driver
2008-05-30 15:07:58 -06:00
Brian Paul
3c4162ed2a
egl: eglGetProcAddress() stub
2008-05-30 14:51:40 -06:00
Brian Paul
e3805cad0d
egl: new eglGetProcAddress() code
...
The idea is to pass the call down to the device driver where an API-specific
query can be made. Untested.
2008-05-30 14:50:33 -06:00
Brian Paul
6b9b49127e
egl: bind the OpenGL API
2008-05-30 13:46:50 -06:00
Brian Paul
ba7aeb8b34
egl: specify client API by bit flag, not string
2008-05-30 13:46:31 -06:00
Brian Paul
d5078b9432
egl: clean-up re-org of the client API state
2008-05-30 13:45:40 -06:00
Brian Paul
52676207e3
egl: added eglDestroySurface function
2008-05-30 12:06:06 -06:00
Brian Paul
64d0eb111d
egl: fix-up window resizes
2008-05-30 11:51:50 -06:00
Brian Paul
834aa8cfbc
egl: check for EGL_DRIVER env var to override normal driver selection process
2008-05-30 11:47:09 -06:00
Brian Paul
80ed996803
egl: new version of gears demo that uses Xlib+EGL (and full OpenGL for now)
2008-05-30 11:47:09 -06:00
Brian Paul
750782a327
egl: assorted fixes. The code works now.
2008-05-30 11:47:09 -06:00
Brian Paul
057ee55720
egl: added surface_alloc_storage()
2008-05-30 11:47:08 -06:00
Brian Paul
274dd381a3
egl: fix width/height tests
2008-05-30 11:47:08 -06:00
Brian Paul
d0de5a2daf
link libEGL with Xlib
2008-05-30 11:47:08 -06:00
Keith Whitwell
1529a2c983
draw: trim incoming primitives
2008-05-30 17:49:10 +01:00
Keith Whitwell
63faab0150
mesa: undo accidental setting of _ForceEyeCoords
2008-05-30 17:49:10 +01:00
Brian Paul
df7d1ee2a5
Fix segfault in _save_OBE_DrawElements() when using VBO and display list (bug 16156)
...
This was previously fixed in master by commit 982dcb74fd by Haihao Xiang.
2008-05-30 10:08:04 -06:00
Jakob Bornecrantz
b12a31f59d
i915: Now using draw_elements_range
2008-05-30 13:46:54 +02:00
Jakob Bornecrantz
7b0a551c4c
i915: Made batch buffer size much larger
2008-05-30 13:46:50 +02:00
Jakob Bornecrantz
3869c3c87a
Merge branch 'gallium-tex-surfaces' into gallium-0.1
...
Conflicts:
src/gallium/drivers/i915simple/i915_context.h
2008-05-30 13:46:18 +02:00
Jakob Bornecrantz
2ade5268dc
i915: Remade texture allocation code again
2008-05-30 13:42:21 +02:00
Jakob Bornecrantz
9760ab2349
i915: Fix extentions not being set
2008-05-30 13:42:17 +02:00
Jakob Bornecrantz
012c0dd632
sis: Removed useless comment
2008-05-30 13:36:52 +02:00
Ben Skeggs
cf13cf245e
nouveau: fix warning
2008-05-30 14:32:59 +10:00
Ben Skeggs
996b549fdb
nv40: a couple of memory leaks
2008-05-30 11:04:55 +10:00
Ben Skeggs
8b31d5fc8a
nouveau: flush pending pushbuf if buffer on validate list at map/del
2008-05-30 11:00:59 +10:00
Ben Skeggs
524408f1a5
nouveau: rework buffer validation a bit
2008-05-30 10:54:33 +10:00
Brian Paul
bee79eb9b9
egl: new EGL/gallium/softpipe/xlib winsys
...
Checkpoint commit. Most required code is in place, and compiles, but
totally untested.
2008-05-29 17:04:25 -06:00
Brian Paul
1c73b4ba86
egl: added Name field to _EGLDriver so a driver name string can propogate up through EGL_VERSION string
2008-05-29 17:04:24 -06:00
Brian Paul
d1a0faffc3
egl: use softpipe_egl driver by default
2008-05-29 17:04:24 -06:00
Brian Paul
31e70fa275
comments in _eglMain()
2008-05-29 17:04:24 -06:00
José Fonseca
ae10775b73
gallium: Provide the INT64_C/UINT64_C macros.
...
"long long" types and 1234LL constants are not supported by eVC.
2008-05-30 03:33:06 +09:00
José Fonseca
2691c22870
gallium: Replace getenv by placeholder code on WinCE.
...
WinCE processes supposedly have environment, but it is not clear which API to use.
2008-05-30 03:33:06 +09:00
Keith Whitwell
22be9ea4a6
draw: quieten some debug
2008-05-29 18:18:56 +01:00
Jakob Bornecrantz
529b3f4cc0
i915: Fix GPU lockup on resize
2008-05-29 19:07:40 +02:00
Ben Skeggs
d0c0c0d1e6
nouveau: oops, more tex-surfaces fallout
2008-05-30 00:28:29 +10:00
Jakob Bornecrantz
643cc9387d
i915: Cleaned up intel_winsys_pipe.c
2008-05-29 16:03:21 +02:00
Jakob Bornecrantz
056bea86b0
i915: Deprecated pipe_winsys buffer functions
2008-05-29 15:49:23 +02:00
Keith Whitwell
807e7c4ccf
draw: add more switches to turn FSE on/off
2008-05-29 14:35:47 +01:00
José Fonseca
8808d62f60
gallium: MSVC warning fixes.
...
Conflicts:
src/gallium/auxiliary/draw/draw_pt_varray.c
src/gallium/auxiliary/draw/draw_pt_varray_tmp.h
src/gallium/auxiliary/draw/draw_pt_vcache.c
2008-05-29 22:28:12 +09:00
José Fonseca
4a7198fdcf
psb: Make msvc happy.
...
Conflicts:
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
2008-05-29 22:28:12 +09:00
Keith Whitwell
8f887b4252
draw: michal's patch for calling powf... teapot still not quite right
2008-05-29 13:26:01 +01:00
Keith Whitwell
a233f65f9b
draw: better calculation of fetch_count
2008-05-29 13:08:15 +01:00
Keith Whitwell
45eecb9392
draw: remove printf
2008-05-29 12:42:39 +01:00
Keith Whitwell
bb2e13b9e8
draw: make sure constant buffer data is aligned before passing to aos.c
2008-05-29 12:38:49 +01:00
Jakob Bornecrantz
79b67d8408
i915: Remove last usage of surface_alloc_storage
2008-05-29 13:10:12 +02:00
Jakob Bornecrantz
837601af52
i915: Ops how did that get there
2008-05-29 12:54:08 +02:00
Jakob Bornecrantz
0cd75a4c99
i915: Get up to date with the latest EGL changes
2008-05-29 12:54:01 +02:00
Keith Whitwell
82605d7bcd
draw: draw_range_elements trial
2008-05-29 11:48:04 +01:00
Michal Krol
cb87d7e44a
scons: Remove duplicate entry.
2008-05-29 12:11:37 +02:00
José Fonseca
6945bcb893
draw: Put PIPE_CDECL in the right places.
...
MSVC seems picky about this.
2008-05-29 18:28:02 +09:00
Keith Whitwell
62628c4d3d
draw: share machine
2008-05-29 00:17:53 +01:00
Keith Whitwell
728d1f7f43
draw: enable FSE by default
2008-05-28 23:54:18 +01:00
Brian Paul
f751371028
egl: re-enable LOCAL_CFLAGS
2008-05-28 16:48:35 -06:00
Brian Paul
260ac3c983
egl: remove unused Display field
2008-05-28 16:08:50 -06:00
Brian Paul
11a261ef4f
egl: move a few small functions into new eglmisc.[ch] files
2008-05-28 15:50:58 -06:00
Brian Paul
c56e15b093
egl: make sure EGL_VERSION_STRING query returns same version as eglInitialize()
2008-05-28 15:43:41 -06:00
Brian Paul
8cd33faee6
egl: query/print EGL_CLIENT_APIS
2008-05-28 15:25:01 -06:00
Brian Paul
e084fe54f9
egl: include egldefines.h
2008-05-28 15:22:17 -06:00
Brian Paul
cf3c7d74cc
egl: added egldefines.h
2008-05-28 15:21:52 -06:00
Brian Paul
9843c6420d
egl: bring card->driver lookup code into egldriver.c
2008-05-28 14:51:40 -06:00
Brian Paul
aa6e350bed
egl: pass args to _eglOpenDriver()
2008-05-28 13:03:59 -06:00
Brian Paul
0c8908c411
egl: added args string to _eglMain()
2008-05-28 12:56:36 -06:00
Brian Paul
e94d383b9b
egl: added eglstring.[ch]
2008-05-28 12:54:33 -06:00
Brian Paul
17ec3b3cc5
prototype new code to map card number to driver name
2008-05-28 11:45:50 -06:00
Brian Paul
aa4ca9119d
link libEGLdri.so with libdrm
2008-05-28 11:44:47 -06:00
Keith Whitwell
648da5158e
rtasm: special case for [ebp]
2008-05-28 17:06:18 +01:00
Brian Paul
95c917f7dd
x-related EGL code (stub)
2008-05-28 08:42:36 -06:00
José Fonseca
364f75d9db
draw: Use PIPE_CDECL.
2008-05-28 22:23:34 +09:00
José Fonseca
25cec212d0
scons: Add new files.
2008-05-28 22:22:50 +09:00
Michal Krol
e407e83966
scons: List missing files for draw module.
2008-05-28 15:10:39 +02:00
Michal Krol
ff44dd5cde
draw: Decorate callbacks with PIPE_CDECL.
2008-05-28 15:10:19 +02:00
Jakob Bornecrantz
276552c0dd
i915: Add draw_flush to state changes
2008-05-28 14:52:10 +02:00
José Fonseca
7a986792da
tgsi: Observe constness.
2008-05-28 21:48:30 +09:00
José Fonseca
4767c10cbb
translate: Mark functions as PIPE_CDECL.
2008-05-28 21:47:25 +09:00
Keith Whitwell
7fd6cd9af3
Merge branch 'gallium-vertex-linear' into gallium-tex-surfaces
2008-05-28 13:33:09 +01:00
Jakob Bornecrantz
2c004a4bec
i915: DriConfigOptions started complaining on this line
2008-05-28 14:22:50 +02:00
Jakob Bornecrantz
4b1f382e13
i915: Remove workaround for buggy draw module
2008-05-28 14:22:07 +02:00
Jakob Bornecrantz
ce56bcb640
i915: Prepare for tiled private front and back buffers
2008-05-28 13:44:36 +02:00
Jakob Bornecrantz
cb5e05d99c
i915: Made vertex submission eaven faster
2008-05-28 13:44:36 +02:00
Jakob Bornecrantz
08130512b9
i915: Made vbuf work
2008-05-28 13:44:36 +02:00
Jakob Bornecrantz
938d9d5963
Merge branch 'gallium-vertex-linear' into gallium-0.1
...
Conflicts:
src/gallium/auxiliary/draw/draw_pt_varray.c
2008-05-28 12:42:42 +02:00
Jakob Bornecrantz
5d90f97f48
i915: Don't segfault on buffer allocation error
2008-05-28 12:27:52 +02:00
Jakob Bornecrantz
ae3795a968
i915: Make EGL_i915 compile
2008-05-28 12:27:27 +02:00
Jakob Bornecrantz
c2bd95abf6
i915: Make EGL_i915 segfault if modesetting is not working
2008-05-28 10:55:27 +01:00
Jakob Bornecrantz
b870bf79b5
egl: Temporarily disable eglx.[c|h] building
2008-05-28 10:55:26 +01:00
Jakob Bornecrantz
68ff873c20
egl: Make dri driver compile
2008-05-28 10:55:26 +01:00
Jakob Bornecrantz
003afbe5bd
egl: Make demo driver compile
2008-05-28 10:55:26 +01:00
Jakob Bornecrantz
3e867959e9
egl: Fix warning in eglgears
2008-05-28 11:17:14 +02:00
Jakob Bornecrantz
d8a693ee49
egl: Make demo3 compile
2008-05-28 11:17:10 +02:00
José Fonseca
55d29a8d48
gallium: Windows CE portability fixes.
2008-05-28 16:13:24 +09:00
Brian Paul
96a40345bb
include eglconfigutil.h
2008-05-27 16:58:23 -06:00
Brian Paul
a772bbb16e
Move some config-related utility functions into new eglconfigutil.c file.
2008-05-27 16:57:49 -06:00
Brian Paul
07e92b1742
misc updates, clean-ups, remove dependency on mtypes.h
2008-05-27 16:49:11 -06:00
Brian Paul
6052af172f
minor overhaul/re-org of driver selection/loading code
2008-05-27 16:48:23 -06:00
Keith Whitwell
b7b9ce0f86
softpipe: enable vbuf by default
...
The non-vbuf option is going away...
2008-05-27 23:28:27 +01:00
Keith Whitwell
e38bb10824
draw: reset stipple counter whenever non-line prim encountered
2008-05-27 23:21:50 +01:00
Brian Paul
721ba15bf4
added _eglGet*Handle() functions
...
These are the inverse of the _eglLookup*() functions.
Returns the public handle for a private surface/config/display/etc.
Removes glapi.c's direct access of private fields.
2008-05-27 14:33:54 -06:00
Brian Paul
5f8a4f3e5e
added EGL_OPENGL_API case
2008-05-27 14:23:56 -06:00
Brian Paul
5e7dba5412
eliminate the context hash table
...
In EGL 1.4 the opaque EGLContext type is a pointer so we can just cast
between public EGLContext handles and private _EGLContext pointers.
2008-05-27 14:21:25 -06:00
Brian Paul
209a557574
fix typo: s/Contexts/Surfaces/
2008-05-27 14:17:40 -06:00
Brian Paul
fcce6c068c
s/GLuint/unsigned/
2008-05-27 13:47:44 -06:00
Brian Paul
a6af2e3345
include eglext.h, define EGL_EGLEXT_PROTOTYPES
2008-05-27 13:47:23 -06:00
Brian Paul
096b79bf17
updates for EGL 1.4
2008-05-27 13:47:07 -06:00
Brian Paul
1ed1027e88
assorted changes to compile with new EGL 1.4 headers (untested)
2008-05-27 13:45:41 -06:00
Brian Paul
3e4128963d
pipe stderr to /dev/null
2008-05-27 13:45:16 -06:00
Brian Paul
c6426c97b9
obsolete with EGL 1.4
2008-05-27 13:45:01 -06:00
Brian Paul
2fe1a55ab2
added EGL_MESA_screen_surface, EGL_MESA_copy_context extensions
2008-05-27 13:43:56 -06:00
Brian Paul
57da567dc5
added typedefs for X/Mesa
2008-05-27 13:43:34 -06:00
Brian Paul
0841f0a85e
remove stray ! character
2008-05-27 13:43:17 -06:00
Brian Paul
704a5c7efb
new eglplatform.h from Khronos.org (replaces GLES/egltypes.h)
2008-05-27 13:43:01 -06:00
Brian Paul
6438f6fdf7
new eglext.h from Khronos
2008-05-27 13:42:38 -06:00
Brian Paul
d0f5d8c5a3
EGL 1.4 header from Khronos
2008-05-27 13:42:12 -06:00
Keith Whitwell
7b85ea19de
draw: support psize in vs_varient paths
...
Preserve the vinfo "EMIT_*" format descriptors in the varient key,
and deal with PSIZE directly in each implementation.
2008-05-27 19:05:16 +01:00
Keith Whitwell
fd20d1c7e8
draw: add disabled debug code
2008-05-27 17:52:24 +01:00
Keith Whitwell
660fee8351
draw: ensure vs outputs mapped correctly to vinfo attribs
2008-05-27 17:52:24 +01:00
Keith Whitwell
2ec419d40d
draw: fix ABS aliasing bug
2008-05-27 17:52:24 +01:00
José Fonseca
26f34dcff2
gallium: Autodetect WINCE.
2008-05-28 01:24:26 +09:00
José Fonseca
b215d7d10c
scons: Play nice with MS Embedded Visual C++.
2008-05-28 01:24:06 +09:00
Michel Dänzer
44a7bd0019
gallium: Always unreference bitmap cache texture before resetting the cache.
...
Fixes assertion failure with tunnel2 demo.
2008-05-27 17:00:59 +01:00
Keith Whitwell
f8762ba523
draw: explicitly list nr_inputs, outputs in varient key
2008-05-27 14:45:52 +01:00
Keith Whitwell
f64c44ad3e
draw: remove dead file
2008-05-27 14:45:31 +01:00
Jakob Bornecrantz
9f9f6c21be
draw: Fixed typo in draw_pt_varray and added comments
2008-05-27 13:28:47 +02:00
Jakob Bornecrantz
9752ebd99e
draw: Fix for EMIT_4UB case
2008-05-27 13:28:47 +02:00
Keith Whitwell
a08c574bfc
draw: hook up viewport / rhw emit to varient key state
2008-05-27 12:26:23 +01:00
Keith Whitwell
50c1d329b9
draw: restore extras path in draw_pt_vcache.c, keep pipeline flags out of non-pipeline elts
2008-05-27 11:58:55 +01:00
Keith Whitwell
f7946bc7c0
draw: dump individual instructions as they are processed
2008-05-27 11:15:31 +01:00
Keith Whitwell
adaaa29218
tgsi: export utils for dumping individual instructions
2008-05-27 11:12:42 +01:00
Keith Whitwell
5dc44184fa
draw: fix writemask/shufps confusion
2008-05-27 11:10:50 +01:00
Keith Whitwell
4e2567f0ab
draw: some possible fixes for spilling
2008-05-27 10:42:58 +01:00
Keith Whitwell
2109ddafef
ffvertex: emit full LIT when attenuating (needs the 1 in X position)
2008-05-27 10:35:33 +01:00
Keith Whitwell
dc1537bc25
ffvertex: don't compute whole eye vector if only eye.z is required
2008-05-27 09:48:32 +01:00
Brian Paul
f172148c6e
gallium: free renderbuffer's old texture in st_renderbuffer_alloc_storage()
2008-05-26 13:35:29 -06:00
Brian Paul
635abed109
gallium: free renderbuffer's old texture in st_renderbuffer_alloc_storage()
2008-05-26 13:30:10 -06:00
Keith Whitwell
aa16e3a275
draw: defensively flush pipeline backend when setting primitive
2008-05-26 19:10:44 +01:00
Keith Whitwell
93bfc94c35
draw: defensively reset render primitive some more
2008-05-26 18:54:35 +01:00
Keith Whitwell
d80c24a81a
draw: defensively reset render primitive, which can get clobbered by clipping
2008-05-26 18:37:34 +01:00
Keith Whitwell
529762d5df
draw: add missing break
2008-05-26 18:29:47 +01:00
Ben Skeggs
fa4b2439d4
nouveau: very quick port to tex-surface changes.
...
probably the last match-gallium-upstream merge for a bit, some cleanup+nv50
work coming RSN...
2008-05-27 01:23:31 +10:00
José Fonseca
35cfd0a490
pipebuffer: Malloc buffer provider.
...
Simple wrapper around pb_malloc_buffer_create for convenience.
2008-05-27 00:19:41 +09:00
José Fonseca
a0e2955a16
pipebuffer: Allow slab allocations of buffers of inequal size.
2008-05-27 00:13:57 +09:00
Ben Skeggs
0f9635d9d5
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-05-27 00:59:41 +10:00
José Fonseca
c428997a52
Revert DOS line endings.
2008-05-26 23:38:03 +09:00
José Fonseca
253066d716
Revert DOS line endings.
2008-05-26 23:29:38 +09:00
José Fonseca
fc72d7e032
Remove CVS keywords.
2008-05-26 20:39:26 +09:00
José Fonseca
77ce568ff7
Remove CVS keywords.
2008-05-26 20:14:40 +09:00
Jakob Bornecrantz
791eee64e0
i915: Removed screen sufixes on texture functions
2008-05-26 13:05:38 +02:00
Jakob Bornecrantz
e0fd3449f8
i915: Fix for tex-surface merge
2008-05-26 13:05:31 +02:00
Jakob Bornecrantz
e3ddafd1d3
Merge branch 'gallium-tex-surface' into gallium-0.1
...
Conflicts:
src/gallium/include/pipe/p_util.h
2008-05-26 13:04:25 +02:00
José Fonseca
d0e2a9add2
Add copyright header.
2008-05-26 20:02:43 +09:00
Keith Whitwell
351eca365c
draw: extend precision in RSQ opcode
2008-05-26 11:03:00 +01:00
Keith Whitwell
721fb5597e
draw: more aos tweaks
2008-05-26 00:09:02 +01:00
Keith Whitwell
359058e7b7
cso: use memcpy rather than structure asignment for copying
...
Apparently gcc will omit to copy hidden padding bytes under some circumstances,
which means later on memcmp() will indicate a difference between structs
even though all the visible members are identical.
2008-05-25 15:54:40 +01:00
Keith Whitwell
9c7568965c
draw: slight tweak for XPD opcode
2008-05-25 15:47:04 +01:00
Keith Whitwell
3afb7198e0
draw: remove EXP & LOG from vs_aos.c
...
These don't get hit & look like bug magnets to me...
2008-05-25 15:45:27 +01:00
Keith Whitwell
ce331e3a5e
draw: special case for writing out scalar results
2008-05-25 15:44:17 +01:00
Keith Whitwell
caadc8d944
draw: clean up some of the xmm register manipulation function names
2008-05-25 15:37:47 +01:00
Keith Whitwell
dc52622fcf
cso: use memcpy rather than structure asignment for copying
...
Apparently gcc will omit to copy hidden padding bytes under some circumstances,
which means later on memcmp() will indicate a difference between structs
even though all the visible members are identical.
2008-05-25 15:28:30 +01:00
Keith Whitwell
584a3dcf8e
draw: add viewport support to generic vs varient code
2008-05-25 11:25:09 +01:00
Keith Whitwell
a6fca8acb5
draw: fix input vs output typo in emit
2008-05-25 11:20:38 +01:00
Ben Skeggs
8f67f98959
nouveau: missed PCI case
2008-05-25 14:26:18 +10:00
Ben Skeggs
f5599a7a3c
nouveau: remove final PIPE_FORMAT_U_* usage
2008-05-25 14:25:15 +10:00
Ben Skeggs
9212085194
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-05-25 14:19:18 +10:00
José Fonseca
eab4472ee6
Demangle C++ symbols.
2008-05-25 01:35:53 +09:00
Keith Whitwell
48a24f0ff7
Revert "mesa: save a temp on normalizes"
...
This reverts commit feceb43948 .
2008-05-24 16:32:08 +01:00
Keith Whitwell
86e529ad90
draw: use lookup tables to avoid calling pow() in LIT opcode
2008-05-24 16:31:11 +01:00
Keith Whitwell
e1590abb17
mesa: pre-swizzle normal scale state value
2008-05-24 13:23:06 +01:00
Keith Whitwell
a2b1c46535
mesa: evaluate _NeedEyeCoords prior to generating internal vertex shader
2008-05-24 13:22:39 +01:00
Keith Whitwell
6172f1295c
draw: add a debug-print which can be called from inside generated shaders
2008-05-24 13:22:29 +01:00
Keith Whitwell
6b3723ee8d
rtasm: add some helpers for calling out from generated code
2008-05-24 13:22:15 +01:00
José Fonseca
63ddae0990
gallium: Pre-processor for win32 kernel profile output.
2008-05-24 19:26:14 +09:00
José Fonseca
345eb7fb70
gallium: Poor-man profiler for win32 kernel.
2008-05-24 19:25:33 +09:00
José Fonseca
059a652d64
scons: New profile build.
2008-05-24 19:25:02 +09:00
Keith Whitwell
feceb43948
mesa: save a temp on normalizes
2008-05-23 20:37:50 +01:00
Keith Whitwell
e841b92d9c
mesa: further degenerate the special case lit substitute
2008-05-23 20:05:36 +01:00
Keith Whitwell
333d377bbd
glapi: fix include path & make build work
2008-05-23 19:17:57 +01:00
Keith Whitwell
0ac2f7955c
mesa: don't emit LIT instruction when mat shininess known to be zero
...
Use a faster path in that case & make gears go faster.
2008-05-23 19:17:02 +01:00
Jakob Bornecrantz
7fbb61eedd
i915: Revert accidental change
2008-05-23 16:55:30 +02:00
Jakob Bornecrantz
5bf6ffb0b2
i915: Improved vertex buffer performance
2008-05-23 16:30:00 +02:00
Jakob Bornecrantz
845db16dbe
i915: Fix for edgeflags
2008-05-23 16:26:20 +02:00
Jakob Bornecrantz
a3dbd412df
Merge branch 'gallium-i915-current' into gallium-0.1
2008-05-23 16:26:14 +02:00
Jakob Bornecrantz
a22462f6ef
egl: Don't build EGL programs either
2008-05-23 16:25:51 +02:00
Jakob Bornecrantz
2064826bda
egl: Stoped compiling EGL completely
2008-05-23 16:18:42 +02:00
Jakob Bornecrantz
d607a02da9
i915: Made EGL report the actual modes on the screen/output pair
2008-05-23 11:24:33 +02:00
Thomas Hellstrom
01cc1eebe9
i915: Make batchbuffers larger.
2008-05-23 11:14:12 +02:00
Thomas Hellstrom
45fd9ec462
i915: Use the malloc pool for constant buffers since they don't go to the GPU directly.
2008-05-23 11:02:14 +02:00
Jakob Bornecrantz
9395fb6e8d
mesa: Added linux-egl target, that only builds the i915simple driver and egl drivers
2008-05-23 11:02:14 +02:00
Jakob Bornecrantz
3972961e62
mesa: On second thought lets not build the driver
2008-05-23 11:02:14 +02:00
Keith Whitwell
3b41d619a1
draw: faster LIT(), incorrect though
2008-05-23 09:16:58 +01:00
Keith Whitwell
adc1f88fc9
mesa: do object-space lighting in ffvertex_prog.c
...
Start pulling over some of the optimizations from the fixed function
paths.
2008-05-23 09:16:58 +01:00
Keith Whitwell
7106da1360
draw: correct but slow LIT() in aos varient
2008-05-23 09:16:58 +01:00
Keith Whitwell
43df4642f1
draw: tweak x87_emit_ex2 to avoid changing x87 fpu settings
2008-05-23 09:16:58 +01:00
Keith Whitwell
260001430b
draw: use aligned movs within draw_vs_aos.c
2008-05-23 09:16:58 +01:00
Keith Whitwell
65cb09249e
draw: for debug, do rhw divide in aos_sse viewport calcs
2008-05-23 09:16:58 +01:00
Keith Whitwell
6780a6dede
draw: shortcircuit shuffle in aos_sse when possible
2008-05-23 09:16:58 +01:00
Keith Whitwell
7b25c1a403
draw: remove FPU_MANIP ifdef
2008-05-23 09:16:58 +01:00
Keith Whitwell
05029c919d
draw: clean up masked writes in aos sse, make some xmm function names clearer
2008-05-23 09:16:57 +01:00
Keith Whitwell
c684ffa02d
draw: clean up internal immediates in aos sse
2008-05-23 09:16:57 +01:00
Keith Whitwell
a5c3b499fa
draw: fse works with elts, remove assert
2008-05-23 09:16:57 +01:00
Keith Whitwell
6f407b0724
rtasm: remove debug
2008-05-23 09:16:57 +01:00
Keith Whitwell
5b1bd30f22
draw: when preloading args to x87 stack, need to use reverse order
2008-05-23 09:16:57 +01:00
Keith Whitwell
083f3f5c32
draw: avoid a pointless mov in many sse opcodes
2008-05-23 09:16:57 +01:00
Keith Whitwell
0a7a0d79f6
draw: fix x87_ex2 and partially fix lit insn
2008-05-23 09:16:56 +01:00
Keith Whitwell
2302a5d3c1
draw: fix fpu control word manipulations
2008-05-23 09:16:56 +01:00
Keith Whitwell
194a7be28f
draw: fix vs aos internal/machine state
2008-05-23 09:16:56 +01:00
Keith Whitwell
889473b3f5
draw: add viewport to varient state
2008-05-23 09:16:56 +01:00
Keith Whitwell
030af06691
rtasm: add x87 instructions and debug-check for x87 stack usage
2008-05-23 09:16:56 +01:00
Keith Whitwell
2f13d4cd58
vp-tris: use test name as window name
2008-05-23 09:16:56 +01:00
Keith Whitwell
1ba10e5ccf
draw: add aos vertex shader varient
2008-05-23 09:16:56 +01:00
Keith Whitwell
ba738a3135
draw: mark varient functions as PIPE_CDECL
2008-05-23 09:16:56 +01:00
Keith Whitwell
b5c8b3fba6
translate: mark functions as PIPE_CDECL
2008-05-23 09:16:55 +01:00
Keith Whitwell
9343779a8c
gallium: define PIPE_CDECL calling convention, which really is cdecl everywhere
2008-05-23 09:16:55 +01:00
Keith Whitwell
d3e64caef6
rtasm: export debug reg print function
2008-05-23 09:16:55 +01:00
Keith Whitwell
8618e6aa16
translate: remove spurious comment
2008-05-23 09:16:55 +01:00
Keith Whitwell
9232f0c023
rtasm: remove unused struct member
2008-05-23 09:16:55 +01:00
Keith Whitwell
7c99d7fe60
draw: create specialized vs varients incorporating fetch & emit
2008-05-23 09:16:55 +01:00
Keith Whitwell
2f0d1396e4
draw: move some state into a new 'vs' area
2008-05-23 09:16:55 +01:00
Keith Whitwell
b23706454b
draw: get rid of fetch-shade-emit frontend hack
...
The code is now living in it's intended place as a pt middle end.
2008-05-23 09:16:54 +01:00
Keith Whitwell
8b25b5256f
draw: remove disabled non-sse swizzle code
2008-05-23 09:16:54 +01:00
Zack Rusin
6f25d6d48d
disable egl by default
2008-05-22 22:13:38 -04:00
José Fonseca
781676c7cc
pipebuffer: More robust face null pointers.
...
It is really the caller responsibility not to call pipebuffer with null
buffers, etc. But don't let the crash happen here, and still asserting
early.
2008-05-22 21:54:41 +09:00
José Fonseca
bd4eec0561
pipebuffer: Don't retry allocating in slab suballocator.
...
In pipebuffer, fencing is done at on a level above sub-allocation, so no
matter how many times slab allocator retries no buffer will be freed. The
pipebuffer fencing implemention already retries allocating.
2008-05-22 20:33:17 +09:00
Michel Dänzer
019fc3aa04
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-21 17:15:07 +01:00
Brian
e8d5be9c76
fix assorted bugs, works now
...
(cherry picked from commit 55d4f32fc2 )
2008-05-21 17:13:26 +01:00
Brian
13a2be4446
mesa: fix #include path for glapioffsets.h (fixes x86 build)
2008-05-21 06:59:49 -06:00
Zack Rusin
f869ddf297
add new binaries to ignore to make 'git status' cleaner
2008-05-20 19:18:22 -04:00
Dan Nicholson
0a4867bd4c
Ignore more generated files in progs/
...
Many of the directories in progs/ were missing .gitignore files or
were tracking generated files. This patch is basically the process of
running `make' in each directory and then finding the untracked files
with `git-ls-files -o --exclude-per-directory=.gitignore'. The existing
files were also sorted.
2008-05-20 19:04:57 -04:00
Zack Rusin
cd87aeae00
add a simple but nice example of convolution filters in glsl
...
shows basics of image processing with glsl
2008-05-20 18:49:51 -04:00
Brian Paul
bf7519b0a4
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-20 15:30:23 -06:00
Brian Paul
26f874e967
gallium: fix vertex shader mem leak (glRasterPos)
2008-05-20 15:20:29 -06:00
Brian Paul
8f792a0707
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-20 15:12:50 -06:00
Brian Paul
7899ecdd65
gallium: replace assignment with pipe_texture_reference()
2008-05-20 15:12:26 -06:00
Brian Paul
ac09b0e0eb
gallium: fix shader mem leak
2008-05-20 15:11:53 -06:00
Brian Paul
417719c0a6
mesa: call glutDestroyWindow()
2008-05-20 15:11:33 -06:00
Brian Paul
cf1ae676ec
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-20 14:38:45 -06:00
Brian Paul
69fd676240
gallium: move vertex/fragment program unbinding
2008-05-20 14:38:22 -06:00
Brian Paul
13c7491406
gallium: fix default case in st_new_program()
2008-05-20 14:38:00 -06:00
Brian Paul
71eb108831
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-20 13:50:10 -06:00
Brian Paul
4b4ac9ed34
gallium: fix mem leaks
2008-05-20 13:49:18 -06:00
Brian Paul
d7cf6b2978
mesa: call glutDestroyWindow()
2008-05-20 13:49:18 -06:00
Brian Paul
90ce8467a8
gallium: clean-up glDraw/CopyPixels shaders when destroying context
2008-05-20 13:49:18 -06:00
Brian Paul
479174c398
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-20 13:39:27 -06:00
Brian Paul
a3f9ae4fea
mesa: call glutDestroyWindow()
2008-05-20 13:38:59 -06:00
Brian Paul
5c431c2222
gallium: clean-up glDraw/CopyPixels shaders when destroying context
2008-05-20 13:38:45 -06:00
Brian Paul
0a95f203fa
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-20 11:34:36 -06:00
Brian Paul
34149ec89d
copy StateFlags in _mesa_clone_parameter_list()
...
cherry-picked from master (b539b61321 )
2008-05-20 11:31:20 -06:00
Brian Paul
c95c4efa54
fix incorrect sampler numbering/indexing.
...
All samplers indexes were zero.
cherry-picked from master (b6fb0940c2 )
2008-05-20 11:29:58 -06:00
Brian Paul
de03e8e960
gallium: remove dead code
2008-05-19 16:07:10 -06:00
Brian Paul
65075da8c3
fix tempReg test in _mesa_combine_programs()
2008-05-19 16:07:10 -06:00
Brian Paul
655374bda7
gallium: remove dead code
2008-05-19 16:05:41 -06:00
Brian Paul
8493f0849f
fix tempReg test in _mesa_combine_programs()
2008-05-19 16:04:46 -06:00
Brian Paul
d00c8a52f3
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-19 12:48:06 -06:00
Brian Paul
21e614eabc
gallium: fix some texture object leaks
2008-05-19 12:40:49 -06:00
Zack Rusin
09900df429
Merge commit 'origin/gallium-0.1' into gallium-vertex-linear
2008-05-19 12:10:42 -04:00
Brian Paul
a846b156b8
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-19 09:36:10 -06:00
Brian Paul
59007a811d
if x86_get_func() returns NULL, handle it properly instead of aborting
2008-05-19 09:34:28 -06:00
Brian Paul
38fb20b224
fix program delete/refcount bug
...
cherry-picked from gallium-tex-surfaces
2008-05-19 09:04:02 -06:00
Brian Paul
62f96ddbbc
Fix program refcounting assertion failure during context tear-down
...
When purging the program hash table, the refcount _should_ be one since
the program is referenced by the hash table. Need to explicitly set to
zero before calling delete().
Also, purge high-level shader hash tables before low-level program hash tabl
cherry-picked from master
2008-05-19 08:59:41 -06:00
José Fonseca
aafe3ddee2
i915simple: Fix win9x build.
2008-05-19 15:18:40 +09:00
José Fonseca
5ca4f9e97c
gallium: Additional formats for bump mapping.
2008-05-19 15:01:17 +09:00
José Fonseca
820fe36863
gallium: Fix typo.
2008-05-19 15:01:17 +09:00
Brian Paul
88cdc5e23f
fix program delete/refcount bug
2008-05-18 16:37:35 -06:00
Brian Paul
54fbd8bbd4
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-18 16:17:50 -06:00
Brian Paul
a0bfeb0c3c
print vertex.attrib[n] (from master)
2008-05-18 15:46:58 -06:00
Brian Paul
1036ec94e5
Fix some bugs in material, depth range state
...
picked from master
2008-05-18 15:32:58 -06:00
Brian Paul
1bb30b02dd
Regenerated API dispatch files
...
Follow on to cherry-pick from master
2008-05-18 15:23:03 -06:00
Brian Paul
f9e1ef2a5b
alias ProgramEnvParameter4xyARB and ProgramParameter4xyNV (bug #12935 )
...
these should be the same functions (as per spec).
cherry-picked from master (86a4810b09 )
2008-05-18 15:21:28 -06:00
Zack Rusin
0bf82c0111
cosmetic changes
2008-05-17 13:58:45 -04:00
Zack Rusin
a7449d4d84
fix rsq
2008-05-17 13:58:44 -04:00
Zack Rusin
02e45b2dad
fix abs and start on rsq
2008-05-17 13:58:44 -04:00
Zack Rusin
1d1cf8edf6
do the lit (some artifacts present)
2008-05-17 13:58:44 -04:00
Zack Rusin
ea1a607292
implement min/max and abstract ops on vectors
2008-05-17 13:58:44 -04:00
Zack Rusin
59766ac273
llvm: implement sub and abs
2008-05-17 13:58:44 -04:00
Zack Rusin
735752e8dc
fix injections of functions from builtins into shaders
2008-05-17 13:58:44 -04:00
Zack Rusin
aeae57693b
move the swizzling code to gallivm in preperation for code-generating it
...
also some minor cleanups
2008-05-17 13:58:44 -04:00
Brian Paul
9671f7ae47
gallium: in drivers, make copy of tokens passed to pipe->create_vs/fs_state()
...
The caller can then free the token array immediately.
2008-05-17 10:30:21 -06:00
Brian Paul
718a2d8c7a
gallium: remove deprecated format names
2008-05-17 08:47:56 -06:00
Brian Paul
1de0af303a
s/PIPE_FORMAT_U_S8/PIPE_FORMAT_S8_UNORM/
2008-05-17 08:46:43 -06:00
Brian Paul
b4219e35e2
gallium: fix glBitmap surface memleak in context tear-down
2008-05-16 16:11:00 -06:00
Brian Paul
87afc9bcad
gallium: release textures during context tear-down (fix mem leak)
2008-05-16 16:04:30 -06:00
Brian Paul
f8dce51083
gallium: ref counting clean-ups
2008-05-16 16:04:04 -06:00
Brian Paul
b86cf71491
mesa: call glutDestroyWindow() on exit to help find mem leaks
2008-05-16 16:02:52 -06:00
Brian Paul
fc0a48d587
bring in fixes/changes from master
2008-05-16 15:48:11 -06:00
Brian Paul
470f699505
Fix a program refcounting error, don't share program parameter lists.
...
The refcounting bug was causing a memleak (unfreed programs).
The old parameter list sharing is not needed since the change in how
uniforms are handled.
2008-05-16 15:40:44 -06:00
Brian Paul
ffbd455a36
fix an attr/src mix-up when setting-up/binding vertex arrays
...
This fixes problems with incorrect material coefficients when glMaterial
is called per-vertex.
2008-05-16 15:34:22 -06:00
Brian Paul
5f6a726d9f
fix parsing of state.texenv.color (bug 14931)
...
cherry-picked from master
2008-05-14 19:19:53 -06:00
Brian Paul
826218d386
Consolidate texture fetch code and use partial derivatives when possible.
...
picked from master
2008-05-14 19:14:41 -06:00
Brian Paul
887bfee6e3
mesa: fix InfoLog memleak, misc sync with master
2008-05-14 16:44:08 -06:00
Eric Anholt
23db6287d4
Bug #13492 : Only call ProgramStringNotify if program parsing succeeded.
...
Wine intentionally tries some out-of-spec programs to test strictness, and
calling ProgramStringNotify on the results of a failed program parse resulted
in crashes in the 965 driver.
2008-05-14 16:37:20 -06:00
Brian
217e5b5551
fix swizzle error test (bug 11881)
2008-05-14 16:35:51 -06:00
Brian Paul
087fa7e390
fix-up inlined/non-inlined function inconsistencies
...
cherry-picked from master
2008-05-14 16:32:18 -06:00
Brian Paul
7aed3751c7
mesa: rm unneeded file
2008-05-14 16:30:15 -06:00
Brian Paul
215a847e3f
mesa: prefix rm command with -
2008-05-14 16:27:34 -06:00
Brian Paul
753f979a32
rewrite some of the mat*mat, mat*vec intrinsics
...
Also, remove obsolete matrix codegen code.
cherry-picked from master
2008-05-14 16:20:28 -06:00
Brian Paul
8cf38c7e6a
mesa: regenerate slang built-in data (asin(vec4) fix)
2008-05-14 16:07:18 -06:00
Brian Paul
a9997657b9
mesa: fix missing w assignment in asin(vec4)
2008-05-14 16:06:10 -06:00
Brian Paul
26988c170c
mesa: use CALLOC_STRUCT()
2008-05-14 16:05:48 -06:00
Brian Paul
afa4c792b0
mesa: sync up swrast/s_fragprog.c with master
2008-05-14 16:05:25 -06:00
Brian Paul
4f915b0f83
mesa: updated comment
2008-05-14 16:04:51 -06:00
Brian Paul
05cacc06cc
mesa: minor bug fixes from master
2008-05-14 16:04:29 -06:00
Brian Paul
fcb23d7db7
mesa: dead code removal
2008-05-14 16:04:00 -06:00
Brian Paul
c4ceb4e4f3
mesa: minor bug fixes, null ptr checks, dead code removal
2008-05-14 16:03:38 -06:00
Brian Paul
6c536b9924
mesa: fix errors in LightModelProduct state, other misc error cases
2008-05-14 16:02:20 -06:00
Brian Paul
f84005c0a1
mesa: glUniform(location==-1) is not an error
2008-05-14 16:01:31 -06:00
Brian Paul
b256273689
fix some additional program refcounting bugs
...
cherry-picked from master
2008-05-14 12:47:29 -06:00
Brian Paul
d791386b09
fix some additional program refcounting bugs
...
cherry-picked from master
2008-05-14 12:19:22 -06:00
Jakob Bornecrantz
6c78b8e97b
mesa: Made linux-dri targets build EGL
2008-05-14 17:20:56 +02:00
Jakob Bornecrantz
3f9de6ff7d
egl: Updated EGL samples to use new i915 EGL winsys
2008-05-14 17:20:25 +02:00
Jakob Bornecrantz
d07fbdd939
i915: Added EGL winsys
2008-05-14 17:19:44 +02:00
Ben Skeggs
9a01ee4424
nv40: fix typo in one of the previous commits
2008-05-14 18:35:37 +10:00
Ben Skeggs
bc1696862c
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-05-14 18:13:36 +10:00
Zack Rusin
1c624846a8
decomposition from keith, adds decomposition of more prim to the pipeline
2008-05-13 17:59:09 -04:00
Ben Skeggs
666ac923f0
nouveau: remove winsys-related stuff from nouveau_local.h
2008-05-14 00:25:09 +10:00
Ben Skeggs
1ef08564d2
nouveau: remove chipset fields in all nv pipe driver context/screen structs.
2008-05-13 12:16:35 +10:00
Ben Skeggs
2f80d4d2a7
nouveau: make nouveau_device.h part of public API
2008-05-13 12:09:04 +10:00
Ben Skeggs
c962ad7cd5
nouveau: create objnull during channel creation
2008-05-13 12:06:32 +10:00
Ben Skeggs
83e6df12ea
nouveau: chipset is a device property, remove from nv/nvc.
2008-05-13 12:01:08 +10:00
Ben Skeggs
9b0054c7f8
nv50: slightly less skeletal texture funcs, prevents fun segfaults
2008-05-13 12:00:18 +10:00
Ben Skeggs
32ed02bcfb
nv50: report some supported formats to keep the state tracker from asserting.
2008-05-13 12:00:14 +10:00
Zack Rusin
19f15277d1
adjust llvm code to the changes in 2.3
2008-05-12 17:17:18 -04:00
Keith Whitwell
bbda45ec76
draw: turn fse path into a middle end
...
Also add some util functions in pt_util.c
2008-05-12 19:40:20 +01:00
Keith Whitwell
44463b2997
draw: streamline the varray path
...
- drop support for running the pipeline (ie. don't populate the flags values)
- pass through all split-able primitives intact to the middle end
- only primitives that can't be split are shunted on the draw-element path
2008-05-12 17:40:55 +01:00
Keith Whitwell
f116a14916
softpipe: more work to get non-reduced primitives working in vbuf
2008-05-12 17:40:55 +01:00
Keith Whitwell
90e86363de
softpipe: make vbuf handle all primitive types
2008-05-12 17:40:55 +01:00
Keith Whitwell
b5e5369da5
draw: add fetch-shade-emit path
...
Enable with TEST_FSE=t. Performs fetch from API-provided vertex buffers,
transformation with one of three (two working) hard-coded shaders, and
final emit to hardware vertices all in a single pass.
Currently only really useful for profiling in conjunction with SP_NO_RAST=t.
2008-05-12 17:40:55 +01:00
Keith Whitwell
de818835de
softpipe: add failure paths for context creation
2008-05-12 17:40:55 +01:00
Keith Whitwell
2258f6b437
xlib: add failure paths for context creation
2008-05-12 17:40:55 +01:00
Keith Whitwell
7ddb925b8b
draw: mimize cost of translate key compares, use cache universally
2008-05-12 17:40:54 +01:00
Keith Whitwell
c0a6040f56
translate: helper functions for mimizing cost of key compares
2008-05-12 17:40:54 +01:00
Brian
6807b4f6b1
gallium: optimize the flush_spans() function
2008-05-10 12:46:55 -06:00
Brian
140b3f7f9c
gallium: remove unused code
2008-05-10 12:46:55 -06:00
Michel Dänzer
73c5505c13
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-09 18:16:02 +01:00
Michel Dänzer
7462f0557f
draw: Fix number of vertices allocated in draw_pt_emit().
2008-05-09 18:15:49 +01:00
Roland Scheidegger
a1f95a8bf6
gallium: depth textures have usage depth_stencil instead of render_target
2008-05-09 16:56:23 +02:00
Keith Whitwell
501be9c7dd
draw: fix translate double-free, minor cleanups
2008-05-09 15:04:14 +01:00
Keith Whitwell
5ee2b5bdcc
draw: fix translate double-free, minor cleanups
2008-05-09 15:02:59 +01:00
Keith Whitwell
2f9b1b9cc2
Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces
2008-05-09 13:11:48 +01:00
Keith Whitwell
1a03812fb5
draw: mimize cost of translate key compares, use cache universally
2008-05-09 13:10:15 +01:00
Keith Whitwell
80474d576c
translate: helper functions for mimizing cost of key compares
2008-05-09 13:09:58 +01:00
José Fonseca
54777e124c
gallium: Define util_vsprintf.
2008-05-09 18:48:01 +09:00
Keith Whitwell
36e1bc865b
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-09 08:56:01 +01:00
José Fonseca
47f639a629
gallium: Disable debug_get_option for release builds on Windows.
...
It always creates the C:\gallium.cfg , even if it does not exists, which
might be confusing.
2008-05-09 14:34:51 +09:00
José Fonseca
2268306f58
gallium: Don't serialize GPU writes.
...
Only make sure the GPU is finished with a buffer before mapping.
The opposite -- waiting for the CPU to be finished before handing
to the CPU -- must be done before fencing.
2008-05-09 11:02:26 +09:00
Brian Paul
f763cc3cb5
gallium: don't free shader.tokens in get_passthrough_fs()
2008-05-08 19:32:49 -06:00
Brian Paul
2a39dbe736
gallium: fix out of tex memory crashes
2008-05-08 19:19:52 -06:00
Brian Paul
044d583ba1
gallium: handle null ptrs
2008-05-08 18:38:02 -06:00
Brian Paul
f9e2f26df3
gallium: re-enable call to init_renderbuffer_bits(), remove dead code
2008-05-08 17:45:59 -06:00
Brian Paul
2f07e1caa0
gallium: fix render to depth texture
2008-05-08 17:42:18 -06:00
Brian Paul
a7e8e31eee
gallium: replace pipe_buffer_destroy() call with pipe_buffer_reference(NULL)
2008-05-08 17:13:01 -06:00
Brian Paul
f3ecd488dd
gallium: remove dead code
2008-05-08 17:11:55 -06:00
Brian Paul
29d9f6b0d2
gallium: no-op st_Bitmap() if width or height is zero
2008-05-08 17:11:05 -06:00
Brian Paul
e93243cb80
gallium: clean-up, minor fix
2008-05-08 16:02:19 -06:00
Keith Whitwell
cec016271c
Merge branch 'gallium-0.1' into gallium-vertex-linear
2008-05-08 22:16:05 +01:00
Keith Whitwell
b514f5f3ba
draw: only fill in / compare the part of the translate key we're using.
...
It's quite a big struct & we examine it a lot (too much). Reduce
the impact of this by just looking at the active part where possible.
2008-05-08 22:15:00 +01:00
Keith Whitwell
fec1d215f6
xlib: more SP_NO_RAST support
...
For some resaon normal (non-display-buffer) buffers are being allocated
through Xshm... Bypass at least for SP_NO_RAST
2008-05-08 22:14:59 +01:00
Keith Whitwell
9002cdb48e
softpipe: don't calc det if NO_RAST set
2008-05-08 22:14:59 +01:00
Brian Paul
6548e9b018
gallium: plug in dummy stage->destroy func
2008-05-08 14:21:10 -06:00
Zack Rusin
8ea6106f01
fix quad strips
2008-05-08 15:26:37 -04:00
Zack Rusin
8d709ae159
fix triangle strips
2008-05-08 15:26:34 -04:00
Zack Rusin
22323af525
fix silly mistakes
2008-05-08 15:26:30 -04:00
Zack Rusin
fe586f8612
redo the linear paths
2008-05-08 15:26:26 -04:00
Zack Rusin
e897fd6cd3
fix the regressions
2008-05-08 15:26:23 -04:00
Zack Rusin
66d72f176d
silence debugging output
2008-05-08 15:26:20 -04:00
Zack Rusin
a24cb269e1
implement linear path for fetch_emit pipeline
2008-05-08 15:26:16 -04:00
Zack Rusin
ff1fee2cae
don't fill in linear fetch_elts
2008-05-08 15:26:13 -04:00
Zack Rusin
abb08e9335
implement linear emition and fetching and plug it in the varray paths
2008-05-08 15:26:08 -04:00
Zack Rusin
90a46ed277
split larger primitives in the simple varray pt
2008-05-08 15:26:03 -04:00
Zack Rusin
2abc1b3641
abstract fetching elts
2008-05-08 15:26:00 -04:00
Michel Dänzer
d2ec02f440
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-08 19:01:34 +01:00
Michel Dänzer
1dfb3d4729
cso_cache: Fix test for currently bound blend state.
2008-05-08 19:00:11 +01:00
José Fonseca
8eab7de888
pipebuffer: Temporarily reimplement validation as growable array.
...
Jose
2008-05-09 00:37:50 +09:00
Brian Paul
79e57695e1
disable GL_DEPTH_TEST before glDrawPixels in case window has unrequested depth buffer
2008-05-08 08:33:44 -06:00
Michel Dänzer
7ffbfaccfb
gallium: Make sure functions have proper prototypes and remove unused variable.
2008-05-08 13:26:23 +01:00
José Fonseca
82dd0225e7
pipebuffer: Preliminary buffer validation.
...
Use table to store a list of buffers to validate. Unfortunately cso_hash
shrinks/regrows the hash every time, so still has to be addressed.
Multi-thread validation is still WIP.
2008-05-08 15:29:20 +09:00
José Fonseca
665b327a47
gallium: Really free hash entries.
...
Hook up to the new cso_hash_erase function.
2008-05-08 15:29:20 +09:00
José Fonseca
53996e562f
pipebuffer: Don't include standard headers directly.
2008-05-08 15:29:20 +09:00
Brian Paul
a266af9200
mesa: minor fixes in _mesa_free_shader_program_data() and _mesa_link_program()
...
From master:
Set shProg->NumShaders = 0 after freeing program's list of shaders.
Set _NEW_PROGRAM in _mesa_link_program() to fix a state validation bug.
2008-05-07 20:18:49 -06:00
Brian Paul
1a82d9648b
gallium: fix some render to texture bugs
...
Before, we were sometimes rendering into a stale texture because
st_finalize_texture() would discard the old texture and create a new one.
Moved st_update_framebuffer atom after texture validation so that we
can create a new renderbuffer surface if the texture changes.
Also, split texture validation into two parts: finalize_textures and
update_textures. Do finalize_textures first to avoid getting into the
situtation where we're doing a pipe->surface_copy() mid-way through
state validation.
Some debug code still in place, but disabled...
2008-05-07 16:44:33 -06:00
Brian Paul
8f76459f62
mesa: document a/s keys
2008-05-07 11:57:46 -06:00
Brian Paul
f34a30bf79
mesa: add texturing to thread test
...
Run with -t to enable texture mapping.
Press 't' to update the texture image. When the texture is changed in one
thread it should also get updated in the other threads since textures are
shared by all contexts.
2008-05-07 11:57:46 -06:00
Keith Whitwell
ffe78987dc
Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces
2008-05-07 15:57:36 +01:00
Brian Paul
3e1a4c2869
mesa: free shader program data before deleting shader objects.
...
Picked from master.
Fixes mem corruption seen when glean/api2 test exits.
2008-05-07 08:56:08 -06:00
Brian Paul
a56a59ce74
gallium: implement full reference counting for vertex/fragment programs
...
Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Another memory bug involving shaders yet to be fixed...
Picked from gallium-0.1
2008-05-07 08:55:33 -06:00
Brian Paul
deceeca18d
mesa: update/add newer GL ES headers
2008-05-07 08:47:55 -06:00
José Fonseca
10b7192747
gallium: Implement util_pack_color for A8, L8, and I8 formats.
2008-05-07 22:01:27 +09:00
José Fonseca
33cda1e5e5
gallium: Fix release build.
...
pf_sprint_name might be used there too.
2008-05-07 21:37:32 +09:00
Michal Krol
5efd2d59eb
gallium: Fix compilation errors.
2008-05-07 14:24:14 +02:00
José Fonseca
55c13f5af7
gallium: Implement pf_sprint_name as a simple static table.
2008-05-07 20:27:42 +09:00
José Fonseca
942b02956e
gallium: Use the u_string.h functions.
2008-05-07 19:39:34 +09:00
Michel Dänzer
79931e38ab
Revert "gallium: move setup of dest_surface in do_copy_texsubimage()"
...
This reverts commit f7dbd18371 .
Looks like an accidental revert of commit
650c57f193 .
2008-05-07 08:46:28 +01:00
José Fonseca
4d1bf8a85e
gallium: Output the total of leaked memory.
2008-05-07 16:29:36 +09:00
José Fonseca
c7ad942c54
gallium: Propagate tex_usage flags down to winsys.
2008-05-07 14:17:59 +09:00
José Fonseca
fe06a47361
gallium: New PIPE_TEXTURE_USAGE_PRIMARY flag for primary surfaces.
2008-05-07 14:14:48 +09:00
Brian
05370685fe
mesa: free shader program data before deleting shader objects.
...
Picked from master.
Fixes mem corruption seen when glean/api2 test exits.
2008-05-06 23:08:02 -06:00
Brian
103ae5d16f
gallium: implement full reference counting for vertex/fragment programs
...
Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Another memory bug involving shaders yet to be fixed...
2008-05-06 22:13:06 -06:00
Brian
10f6ae0355
mesa: comments, whitespace
2008-05-06 19:16:26 -06:00
Brian Paul
6b0fd0f157
gallium: re-enable temporarily disabled code in do_copy_texsubimage()
2008-05-06 15:39:39 -06:00
Brian Paul
296378b6c8
gallium: create drawing surfaces as GPU_READ/WRITE only
...
Create different temporary surfaces for CPU_READ/WRITE when needed (such as
for glReadPixels, glAccum, some glCopy/DrawPixels, glCopyTexSubImage, etc).
2008-05-06 13:48:27 -06:00
Michal Danzer
973d0c014d
gallium: create renderbuffer surface w/out CPU_READ/WRITE flags
2008-05-06 13:48:27 -06:00
Michal Danzer
f7dbd18371
gallium: move setup of dest_surface in do_copy_texsubimage()
2008-05-06 13:48:27 -06:00
José Fonseca
a6ad492774
gallium: Simple facility to dump and view images for debugging.
2008-05-07 04:51:55 +09:00
Brian Paul
66f703dca9
gallium: change calculate_first_last_level() to match gallium-tex-surfaces branch
2008-05-06 08:40:41 -06:00
Brian Paul
809dd9089b
gallium: sync up texture/sampler changes with master
2008-05-06 08:37:28 -06:00
Michel Dänzer
d0279fc4b3
gallium: Make sure to release texture surfaces (at the right time).
2008-05-06 12:24:04 +01:00
Michel Dänzer
650c57f193
gallium: glCopyTexSubImage improvement.
...
Only get a texture surface for attempting an accelerated copy, and mark it for
GPU use only.
2008-05-06 12:23:16 +01:00
Michel Dänzer
4c6c073f99
gallium: Define util_sprintf for non-WIN32.
2008-05-06 09:07:11 +01:00
Keith Whitwell
09e6be9b57
Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces
...
Conflicts:
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_cb_texture.c
2008-05-06 07:45:28 +01:00
José Fonseca
6361d6f48d
gallium: New pipe_screen interface to overlay a texture on existing memory.
2008-05-06 14:57:18 +09:00
Alan Hourihane
f77442fbd3
fix _mesa_ffs for alternative compilers
2008-05-05 23:09:38 +01:00
Alan Hourihane
736374c105
declare atoms as extern
2008-05-05 23:08:59 +01:00
José Fonseca
131a1fbc91
util: Alternative implementation for standard c library string functions.
2008-05-05 23:58:37 +09:00
José Fonseca
a3195e9d4e
scons: A few more compiler flags adjustments to match winddk.
2008-05-05 23:57:51 +09:00
Ben Skeggs
612f44266c
nouveau: bitmap texcoord bias has been removed
2008-05-05 19:45:21 +10:00
Ben Skeggs
33d9e213ee
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-05-05 19:44:16 +10:00
Brian Paul
ffde4e03cf
gallium: fix some BaseLevel, lastLevel bugs
2008-05-03 17:01:20 -06:00
Brian Paul
736f535b4f
gallium: fix warnings
2008-05-03 09:26:25 -06:00
Brian Paul
bc57a7c9f7
Press <space> to reset limit/bias values, clean-up limit/bias printf
2008-05-03 09:10:44 -06:00
Brian Paul
3837d401cc
gallium: fix sampler->max_lod computation
2008-05-03 09:07:11 -06:00
Brian Paul
3668d20a9f
gallium: fix computation of sampler->min_lod
...
The texture BaseLevel is accounted for in texture layout so it doesn't factor
in here. May also need to adjust max_lod...
2008-05-03 08:58:44 -06:00
Keith Whitwell
8e6a380798
gallium: add pipe surface layout value (Roland Scheidegger)
2008-05-03 15:41:05 +01:00
Brian Paul
6e004e973b
gallium: remove 0.5 vertex biases in set_vertex_data()
...
These should not be needed and were causing garbage to appear along the
edges of the mipmap images.
2008-05-02 14:00:35 -06:00
Brian Paul
07aaf3a7a7
gallium: remove obsolete PIPE_CAP_BITMAP_TEXCOORD_BIAS
2008-05-02 14:00:08 -06:00
Brian Paul
99df379b2c
gallium: set template.target = PIPE_TEXTURE_2D
2008-05-02 11:14:08 -06:00
Keith Whitwell
b2021e7c06
gallium: identify depth-stencil textures
...
And don't use the display-target path to allocate them.
2008-05-02 17:56:01 +01:00
Keith Whitwell
7849ccb2a7
brw: remove dead code
2008-05-02 17:55:22 +01:00
Brian Paul
ce50940173
gallium: minor code, comments clean-up
2008-05-02 10:43:29 -06:00
Brian Paul
479d19f5a2
gallium: in st_finalize_texture() check texture dimensions
...
Check dimensions in addition to target, format, etc.
Fixes a bug where we failed to detect a change in texture image sizes and
wound up using the old texture data.
2008-05-02 10:38:39 -06:00
Brian Paul
3d53d38d5e
gallium: new debug code (disabled)
2008-05-02 10:37:20 -06:00
Keith Whitwell
5cb29dae06
i915: update to new display target allocation
2008-05-02 16:56:06 +01:00
Keith Whitwell
a73ae3d5eb
gallium: Add texture usage flags, special-case allocation of display targets
...
For many envirionments it's necessary to allocate display targets
in a window-system friendly manner. Add facilities so that a driver
can tell if a texture is likely to be used to generate a display surface
and if use special allocation paths if necessary.
Hook up softpipe to call into the winsys->surface_alloc_storage()
routine in this case, though we probably want to change that interface
slightly also.
2008-05-02 16:46:31 +01:00
Brian Paul
cc2af38f2a
gallium: fix typos, comments, whitespace
2008-05-02 09:31:38 -06:00
Brian Paul
cff8d3bdcb
gallium: remove ^M (CR) chars
2008-05-02 09:31:38 -06:00
Brian Paul
e9513bd403
gallium: code movement (XSHM code)
2008-05-02 09:31:38 -06:00
Brian Paul
522f11b632
set TextureID = NULL after deleting the array
2008-05-02 09:31:38 -06:00
Brian Paul
8a5bf456dc
gallium: comments, clean-ups
2008-05-02 09:31:38 -06:00
Michel Dänzer
d4074c509b
gallium: Reallocate pipe_texture in st_TexImage if the texture object was used.
...
Fixes problems with interleaved glTexImage and rendering calls.
2008-05-02 16:22:20 +01:00
Alan Hourihane
be8a42b4fc
snprintf -> util_snprintf
2008-05-02 15:26:45 +00:00
Michal Krol
6c15a70b75
tgsi: Enable fast high precision rsqrt.
2008-05-02 16:12:55 +02:00
Keith Whitwell
17058e0746
tgsi: Implement fast rsqrtf. Not tested, inactive.
2008-05-02 16:02:18 +02:00
Keith Whitwell
4a15913208
gallium: remove usage of winsys->surface_alloc_storage from state tracker
...
Allocate a texture containing storage instead.
Also clean up ACCUM buffer allocation slightly -- drivers will need
some changes to texture allocation logic to accomodate the concept of
a texture that will only as image storage by the CPU, but it's cleaner
than it was.
2008-05-02 14:27:10 +01:00
Keith Whitwell
25d60838b5
gallium: fix build after merge
2008-05-02 12:17:11 +01:00
Keith Whitwell
c3a8a41faa
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-02 12:00:13 +01:00
Alan Hourihane
5e49037caa
revert mode change back to 644
2008-05-02 10:34:58 +00:00
Alan Hourihane
7e4bc84dfc
inline -> INLINE
2008-05-02 10:31:46 +00:00
Alan Hourihane
54507125e7
Some changed for non-C99 compilers
2008-05-02 10:30:34 +00:00
Keith Whitwell
731e7b961c
re-add pipe_surface map/unmap inlines
2008-05-02 11:11:27 +01:00
Keith Whitwell
251db95945
cso: can memcmp-compare pipe_framebuffer_state now it includes fb dimensions
2008-05-02 11:11:27 +01:00
Michal Krol
a1cb0c2b91
tgsi: Do not assume IN and OUT registers are declared sequentially.
2008-05-02 11:13:58 +02:00
Michal Krol
36f93c5e51
tgsi: Fix build on Win32.
2008-05-02 10:20:53 +02:00
Michal Krol
9d151a2517
tgsi: Dump destination register modulate modifier.
2008-05-02 10:15:54 +02:00
Brian
869b0836c1
gallium: temporarily disable broken SSE2 code for ARL opcode
2008-05-01 18:56:20 -06:00
Brian
3b63bc8ac6
gallium: implement TGSI_OPCODE_EXP
2008-05-01 18:49:20 -06:00
Brian
7a4313b63b
gallium: implement TGSI_OPCODE_LOG
2008-05-01 18:42:01 -06:00
Brian Paul
bc49529874
added cast for MSVC
2008-05-01 15:21:40 -06:00
Brian Paul
c1abd758c5
gallium: remove the unused softpipe_winsys code
...
The struct is still there though until all winsys layers are updated
2008-05-01 15:20:34 -06:00
Brian Paul
4687272b20
gallium: use screen->tex_surface_release()
2008-05-01 15:08:05 -06:00
Keith Whitwell
f067c6c452
tgsi: remove some bogus win vs. linux crud
...
Pass arguments properly in linux now. Still need to change this to use
a single calling convention on both platforms.
2008-05-01 20:49:45 +01:00
Keith Whitwell
2c89b75e36
rtasm: learn another version of push
2008-05-01 20:49:45 +01:00
Keith Whitwell
2004b8a769
draw: label fn args -- shouldn't this be defined where the fn is created?
2008-05-01 20:49:45 +01:00
Keith Whitwell
fb3623b235
rtasm: fix labels after (not so) recent change to allow dynamic fn growth
...
Using char * for labels doesn't work if you realloc the function
during assembly and free the old storage...
2008-05-01 20:49:45 +01:00
Keith Whitwell
b8936ca1c2
i915: avoid crashing on bad parameter
2008-05-01 20:49:45 +01:00
Keith Whitwell
26bcef898a
i915: fix warning
2008-05-01 20:49:44 +01:00
Keith Whitwell
f30285e99c
softpipe: fix warning
2008-05-01 20:49:44 +01:00
Keith Whitwell
0000792a20
sct: fix bug in remove_context_from_surface
2008-05-01 20:49:44 +01:00
Michel Dänzer
de7277f81a
gallium: Set sampler->min_lod instead of always reallocating pipe_textures.
2008-05-01 17:39:33 +01:00
Michel Dänzer
f1f52a8be9
gallium: Notify driver of texture updates in util_blit_pixels().
2008-05-01 17:30:17 +01:00
Keith Whitwell
419f3c4475
tgsi: restore HIGH_PRECISION setting
2008-05-01 15:45:51 +01:00
Keith Whitwell
afe67db803
tgsi: add some const qualifiers to immediate pointers
2008-05-01 15:37:30 +01:00
Keith Whitwell
bf1e120b31
mesa: squash harmless warning
2008-05-01 15:37:30 +01:00
Keith Whitwell
727257f320
rtasm: assert stack is fully popped in return
2008-05-01 15:37:30 +01:00
Keith Whitwell
6980823da9
draw: avoid aliasing warning
2008-05-01 15:37:30 +01:00
Keith Whitwell
47aa416821
tgsi: use EBX everywhere, be sure to push/pop it
2008-05-01 15:37:30 +01:00
Keith Whitwell
7810e7f623
tgsi: use x86_fn_arg instead of get_argument() -- it knows about push/pops to the stack
2008-05-01 15:37:30 +01:00
Keith Whitwell
1e4217e1b8
tgsi: use ESI instead of EBX on non-win32 platforms
2008-05-01 15:37:30 +01:00
Keith Whitwell
35b0efb8c6
gallium: do something sensible on the error path to try to avoid crashing in release builds
2008-05-01 15:37:30 +01:00
Alan Hourihane
e97bedb302
Fix build problem with MSVC
2008-05-01 14:56:11 +01:00
José Fonseca
073bb94a41
Add Brian's explanation for inheritance in C.
2008-05-01 22:32:49 +09:00
José Fonseca
c6fadd9fad
gallium: Add newline to eof.
2008-05-01 22:32:49 +09:00
Keith Whitwell
be7e1297f4
draw: squash warnings
2008-05-01 13:47:27 +01:00
Keith Whitwell
4584c0efbd
draw: turn on SSE swizzle code
2008-05-01 13:47:09 +01:00
Keith Whitwell
b59f9c95c1
gallium: add information to surface to identify which texture image it is pointing at
2008-05-01 12:28:59 +01:00
Keith Whitwell
228aaa6cab
softpipe: missing file
2008-05-01 12:24:23 +01:00
Keith Whitwell
27e46611f0
softpipe: use CPU flags for mapping
...
But when creating surfaces, adjust incoming flags from GPU->CPU usage.
2008-05-01 12:00:45 +01:00
Keith Whitwell
c9ed86a964
gallium: tex surface checkpoint
2008-05-01 12:00:45 +01:00
Brian Paul
7584bcf3f7
gallium: remove old files
2008-04-30 18:23:17 -06:00
Brian Paul
21989edd55
gallium: fix texture border removal bug
2008-04-30 18:21:10 -06:00
Brian Paul
54f94a790e
gallium: use the newer PIPE_FORMAT_x_UNORM format names
2008-04-30 16:51:53 -06:00
Brian Paul
8d45576ec5
gallium: rename old PIPE_FORMAT_U_I8 with PIPE_FORMAT_I8_UNORM, etc.
...
Now all the packed color types are consistantly named.
Added temporary #defines for the old names until all drivers are updated.
2008-04-30 16:51:52 -06:00
Brian Paul
18f4d96265
gallium: replace old PIPE_FORMAT_U_S8 with PIPE_FORMAT_S8_UNORM
2008-04-30 16:51:52 -06:00
Brian Paul
c32477742f
Add support for GL_REPLACE_EXT texture env mode.
...
GL_REPLACE_EXT comes from the ancient GL_EXT_texture extension. Found an old demo that
actually uses it.
The values of the GL_REPLACE and GL_REPLACE_EXT tokens is different, unfortunately.
2008-04-30 16:08:19 -06:00
Brian Paul
07b551f7cf
added xdemos/sharedtex.c test
...
Test that modifications to a texture object in one rendering context are seen
in a second rendering context.
Press 't' to change the texture's image/colors.
2008-04-30 15:30:29 -06:00
Brian Paul
bd5b99d389
gallium: fix typo: s/custam/custom/
2008-04-30 15:29:32 -06:00
Zack Rusin
653da2d069
plug a memleak, destroy setup context
2008-04-30 15:04:58 -04:00
Zack Rusin
026e31a068
try to fix the deleting of the bound cso during cleanup of the hash
2008-04-30 15:04:58 -04:00
José Fonseca
dadb11f5d9
gallium: Fix release build.
2008-05-01 03:43:19 +09:00
José Fonseca
cafb545721
d3d: Windows miniport driver portability fixes.
2008-05-01 02:25:23 +09:00
José Fonseca
c9acd439b1
scons: Try to cope with scons 0.98+.
2008-05-01 02:25:23 +09:00
Brian Paul
99fba5466b
gallium: use new buffer wrapper functions in p_inlines.h
...
This allows us to remove most of the direct references to winsys in the state tracker.
2008-04-30 10:43:59 -06:00
Brian Paul
15318c8d8e
gallium: new pipe_buffer alloc/map/unmap/ref wrappers
2008-04-30 10:43:09 -06:00
Brian Paul
7146a1a29d
gallium: consolidate the bitmap->texel conversion code
2008-04-30 10:10:44 -06:00
Brian Paul
d3b98330d8
gallium: create a new texture each time we init/flush the bitmap cache
2008-04-30 10:00:44 -06:00
Brian Paul
eefb9d3b51
gallium: simplify texture format selection
2008-04-30 09:41:55 -06:00
Ben Skeggs
1e6191e0af
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-30 21:42:23 +10:00
Brian Paul
42fb48492e
gallium: init hw_key with memset() to silence valgrind warnings
...
We shouldn't be hashing with keys that have uninitialized memory.
2008-04-29 18:35:30 -06:00
Brian Paul
d0b2561c57
gallium: updated comment in xm_flush_frontbuffer()
2008-04-29 18:35:30 -06:00
Brian Paul
62a29412b9
gallium: test for new PIPE_ARCH_X86
2008-04-29 18:35:30 -06:00
Brian Paul
6fb4009226
gallium: flush pipe before updating bitmap texture
...
Fixes duplicated text bug in progs/tests/texwrap.c
2008-04-29 17:30:21 -06:00
Zack Rusin
0d80f407f1
silence p_debug.h:63: warning: ISO C forbids forward references to ‘enum’ types
2008-04-29 17:21:10 -04:00
Brian Paul
5692e09be8
disable GL_TEXTURE_1D at end of frame to fix failed assertion
2008-04-29 15:03:06 -06:00
Brian Paul
fce5951b56
gallium: declare pipe_format enum to silence warnings
2008-04-29 14:39:42 -06:00
Keith Whitwell
1e97ab6856
gallium: add pack for _FLOAT formats to pack_ub
2008-04-29 21:30:31 +01:00
Keith Whitwell
bbafa8aa2f
gallium: fix pack for A1R5B5G5
2008-04-29 21:30:04 +01:00
Keith Whitwell
fbddc8097c
gallium: add pack for A4R4G4B4
2008-04-29 21:05:48 +01:00
Keith Whitwell
7441f2e3ea
gallium: add pack for A1R5B5G5
2008-04-29 20:48:15 +01:00
Keith Whitwell
9bfe1a3d50
gallium: add debug_print_format() make it easier to print format error messages
2008-04-29 20:48:14 +01:00
Brian Paul
733bc4df1a
gallium: added some assertions to be sure the blit's surface formats are suitable
2008-04-29 12:55:41 -06:00
Brian Paul
dd9dc7df80
gallium: added some assertions to st_render_texture() to check surface format
...
Make sure we can really render to the texture surface given its format.
2008-04-29 12:54:52 -06:00
Brian Paul
cc94863429
gallium: fix broken GL_DEPTH_COMPONENT case in fallback_copy_texsubimage()
...
Also, make sure surfaces are suitable for blitting before calling util_blit_pixels().
2008-04-29 12:53:37 -06:00
Brian Paul
5fb774ab31
mesa: added _mesa_scale_and_bias_depth_uint()
2008-04-29 12:51:06 -06:00
Brian Paul
1cff4992b3
gallium: add \n to error strings
2008-04-29 11:11:47 -06:00
Brian Paul
5e8d7899a8
gallium: fix error msg typo
2008-04-29 11:11:47 -06:00
Roland Scheidegger
216603348c
gallium: set border color
2008-04-29 17:54:38 +02:00
Ben Skeggs
95295081a8
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-29 09:00:48 +10:00
Ben Skeggs
480ab1b789
nv40: enable DXTn formats
...
GL state tracker capable enough for progs/tests/texcompress2 at least.
2008-04-29 08:56:41 +10:00
Brian Paul
059ab50c60
mesa: explicitly delete textures before creating new ones
...
Also, call glutDestroyWindow() upon exit.
2008-04-28 14:20:11 -06:00
Brian Paul
c2497879f1
gallium: fix incorrect level param in copy_image_data_to_texture()
...
This fixes a weird conform test failure that depended on something that
happened several tests earlier. This took waaaaaay too long to find/fix.
2008-04-28 14:04:56 -06:00
Keith Whitwell
c4917c6231
tgsi: make loop structure clearer, use x86_lea for increments
2008-04-28 18:50:31 +01:00
Keith Whitwell
9fb444f191
tsgi: add a makefile
2008-04-28 18:43:27 +01:00
Keith Whitwell
546ab045d8
translate: squash warnings
2008-04-28 18:11:55 +01:00
Keith Whitwell
a41b78d107
pb: remove unused variable, squash warning
2008-04-28 18:11:55 +01:00
Michal Krol
b6d9666a42
gallium: Set SSE_SWIZZLES to 0 by default.
2008-04-28 19:03:20 +02:00
Michal Krol
58d3dff0d3
gallium: Generate SSE code to swizzle and unswizzle vs inputs and outputs.
...
Change SSE_SWIZZLES #define to 0 to disable it.
2008-04-28 18:50:58 +02:00
Brian Paul
7f5e9d3f07
gallium: check for PIPE_FORMAT_X8Z24_UNORM format
2008-04-28 09:40:26 -06:00
Brian Paul
44c79f88b8
gallium: replace some code with a call to st_choose_format()
2008-04-28 09:39:48 -06:00
Brian Paul
ee4434121c
gallium: return enum pipe_format, not uint, for a few functions
2008-04-28 09:38:18 -06:00
Brian Paul
0d179ffe97
gallium: add cases for PIPE_FORMAT_X8Z24_UNORM
2008-04-28 09:33:20 -06:00
Ben Skeggs
58b1bcaa09
nv40: do full swtnl fallback when edge flags present.
...
This isn't necessary, with some effort we can do this on the hw. However,
until I encounter something "real" that uses them there's not a lot of
point.
2008-04-28 19:25:40 +10:00
José Fonseca
083008d808
pipebuffer: Be extra cautious with the incoming buffers.
...
A common mistake is trying to fence user or malloc buffers. So don't let
the crash happen inside pipebuffer lib.
2008-04-27 21:19:34 +09:00
José Fonseca
e3c4159957
rtasm: Implement x86_retw.
2008-04-27 21:09:45 +09:00
Ben Skeggs
2193578851
nouveau: stub set_edgeflags for all nv pipe drivers
2008-04-27 18:12:14 +10:00
Ben Skeggs
0cca90cea1
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-27 18:04:50 +10:00
Brian
a8e39b6f5a
gallium: fix broken SGT, SLE
2008-04-25 19:25:26 -06:00
Brian
a94aad297d
use PIPE_ARCH_X86
2008-04-25 18:46:29 -06:00
Brian Paul
aad9dd14d8
gallium: tweak comments, minor var renaming
2008-04-25 16:27:52 -06:00
Brian Paul
5e3b0d227c
gallium: tweak comments, minor var renaming
2008-04-25 16:27:52 -06:00
Brian Paul
1cf1641427
gallium: remove unneeded st->bitmap_texcoord_bias
2008-04-25 16:12:11 -06:00
Brian Paul
332b77b852
gallium: use simple color pass-through fragment shader if textures don't exist
...
If we run out of texture memory we may not have the texture needed by the
fragment shader. If this happens, plug in a color passthrough shader.
So instead of crashing, we just don't see the texture.
GL_OUT_OF_MEMORY is raised, of course.
2008-04-25 15:24:07 -06:00
Brian Paul
4c50969334
gallium: added null ptr check
2008-04-25 15:24:07 -06:00
Brian Paul
9b44f5a755
gallium: added a null ptr check
2008-04-25 15:24:07 -06:00
Brian Paul
1437b41d90
gallium: fix typo s/_mesa_unmap_drapix_pbo/_mesa_unmap_drawpix_pbo/
2008-04-25 14:18:09 -06:00
Brian Paul
149a4175fa
gallium: consolidate quad drawing code
2008-04-25 14:18:09 -06:00
Brian Paul
b6d8b21cc8
gallium: remove unused st_draw_vertices()
2008-04-25 14:18:09 -06:00
Brian Paul
7dcbbdf353
gallium: use util_draw_vertex_buffer() instead of st_draw_vertices()
2008-04-25 14:18:09 -06:00
José Fonseca
1e71283cce
scons: Silent MSVC CRT security warnings.
2008-04-26 01:55:43 +09:00
Brian Paul
3faea292e5
gallium: fix the compressed texture hack in st_texture_image_copy()
...
Actually, the hack is still there and needs to be revisited, but I get a bit
further with compressed textures now.
2008-04-25 10:34:42 -06:00
José Fonseca
658f5e7213
scons: A few fixes for building mesa on windows.
2008-04-26 01:14:52 +09:00
Keith Whitwell
1aedbf9efe
draw: emit extra flags whenever pipeline is active
...
The assert was in fact over-sensitive, but emitting the extra flags
is pretty trivial & we may as well just do it whenever we know the
pipeline is running.
2008-04-25 16:16:14 +01:00
Michel Dänzer
3c0dc8242b
gallium: Use util_blit_pixels() for glCopyTexSubImage when appropriate.
2008-04-25 15:01:09 +01:00
Michel Dänzer
96cfd804f6
gallium: Add draw_pt_varray.c to scons build.
2008-04-25 14:57:50 +01:00
Keith Whitwell
2325d19597
tgsi: fix compile when HIGH_PRECISION not defined
2008-04-25 14:20:26 +01:00
Keith Whitwell
14cfcb1820
draw: no need to special-case elts/get_elts for varray frontend
2008-04-25 14:20:25 +01:00
Keith Whitwell
4e46e6f52b
draw: remove unused vars
2008-04-25 14:20:25 +01:00
Zack Rusin
992d0b997f
frontend for rendering without elts
2008-04-25 14:20:25 +01:00
José Fonseca
a7ce6d3992
scons: More windows userspace fixes.
2008-04-25 19:56:44 +09:00
Michel Dänzer
d7b523b46b
gallium: Tell the driver the texture is updated when we finish rendering to it.
2008-04-25 10:34:20 +01:00
José Fonseca
b06cd4debf
gallium: Windows user mode portability fixes.
2008-04-25 18:19:51 +09:00
José Fonseca
dacfef1589
gallium: New configuration header.
...
To abstract all those weird #ifdef (__???__) checks.
It should typically be the first included header.
2008-04-25 18:18:48 +09:00
José Fonseca
35460fc91c
scons: Teach scons about user-land windows.
...
Actually, more like get rid of all our hacks when compiling for
user-land windows.
Only MSVC is supported atm though.
2008-04-25 18:16:25 +09:00
Brian Paul
b4c7a48d5c
gallium: fix an edgeflags crash
2008-04-24 16:40:08 -06:00
Keith Whitwell
2926e59e4a
draw: remove old assignment of edgeflag value
2008-04-24 23:31:35 +01:00
Brian Paul
ef683014dd
gallium: initial edgeflags code
2008-04-24 16:01:18 -06:00
Brian Paul
9816531862
gallium: plug in softpipe_set_edgeflags() function
2008-04-24 15:59:08 -06:00
Brian Paul
909894e34c
gallium: comments
2008-04-24 15:58:46 -06:00
Keith Whitwell
da8312a1cf
draw: default edgeflag should be one
2008-04-24 21:14:23 +01:00
Brian Paul
bceebffc17
gallium: disable the bitmap/texcoord bias
...
Doesn't seem to be needed after fixing the float->int conversion problem.
2008-04-24 13:44:40 -06:00
Brian Paul
72c8d2f244
mesa: adjust glBitmap coords by a small epsilon
...
Fixes problem with bitmaps jumping around by one pixel depending on window
size. The rasterpos is often X.9999 instead of X+1.
Run progs/redbook/drawf and resize window to check.
2008-04-24 13:36:26 -06:00
Brian Paul
a770d40c3d
gallium: use cso_destroy_vertex/fragment_shader() functions
...
Also, rearrange the st_destroy_context() code a bit to prevent some
invalid/NULL ptr derefs during tear-down.
2008-04-24 12:15:05 -06:00
Brian Paul
386102c62a
gallium: make cso_release_all() public
2008-04-24 12:15:05 -06:00
Brian Paul
a41804909d
gallium: minor clean-ups, comments
2008-04-24 12:15:05 -06:00
Brian Paul
ac79532a15
gallium: tweak the new shader delete funcs
2008-04-24 12:15:05 -06:00
Brian Paul
f2c3125716
gallium: added cso_delete_vertex_fragment_shader() functions
...
The state tracker now uses these functions to free shaders, rather than
the pipe->delete_vs/fs-state() functions. Before, we could get in a situation
where we free() a shader and happen to alloc() a new one at the same address.
The cso_set_vertex/fragment_shader() function would no-op the state change
since the pointers were the same. This led to problems elsewhere, of course.
The new delete functions null-out the CSO's current shader pointers.
2008-04-24 12:15:05 -06:00
Michel Dänzer
35dc003c6a
gallium: Make sure the size of non-existent storage components is set to 0.
...
Before adding support for formats with unused storage components, the size of
components swizzled to 0 or 1 was ignored, so this didn't matter.
2008-04-24 18:42:35 +01:00
Jakob Bornecrantz
cefa367b5d
i915: Fix for wrong texture in texobj with VBUF
2008-04-24 17:10:11 +02:00
Michal Krol
d712eea074
translate: Actually return a value from translate_cache_create().
2008-04-24 14:05:39 +02:00
Keith Whitwell
63e6e33db6
trivial: simple edgeflag test
2008-04-24 12:39:09 +01:00
Keith Whitwell
f93332da56
draw: handle edgeflags and reset-line-stipple again
2008-04-24 12:39:09 +01:00
Keith Whitwell
dddedd915a
xlib: only shortcircuit makecurrent if NO_RAST set, otherwise window size updates fail
2008-04-24 12:39:08 +01:00
Michel Dänzer
7333578d2a
gallium: Initial support for pixel formats with unused storage components.
...
Also clarify that RGB formats with no (used) alpha component are treated as
having alpha = 1.0.
2008-04-24 10:18:34 +01:00
Brian Paul
bb4f8ae1f9
gallium: reorder code to fix a recursive flush
2008-04-23 18:09:20 -06:00
Brian Paul
14d1ca8d86
gallium: fix issues in recursive flushing
...
When flushing/rendering, some stages (like AA line/point) need to set
pipe/driver state. Those driver functions often call draw_flush().
That leads to recursion.
Use new draw->suspend_flush flag to explicitly prevent that in the key places.
Remove the draw->vcache_flushing field.
Reuse draw->flushing as a debug/assertion var.
2008-04-23 18:08:20 -06:00
Brian Paul
8437f5c763
gallium: fix comments
2008-04-23 17:41:30 -06:00
Brian Paul
bff371c431
gallium: fix comments, whitespace changes
2008-04-23 17:40:39 -06:00
Patrice Mandin
7342688286
nv30: add stuff to init swtnl
2008-04-23 22:38:49 +02:00
Brian Paul
3f6242d3e4
gallium: passthrough tri, not point
2008-04-23 12:13:12 -06:00
Zack Rusin
95f8f8863a
Add translate cache to fetch_emit stage and add out of memory
...
checks to code creating the cache.
2008-04-23 14:07:53 -04:00
Zack Rusin
5fcd84ab39
Create a sharable translate_cache and use it.
2008-04-23 14:01:08 -04:00
Brian Paul
ba47aabc98
gallium: fix potential divide by zero in fog computation
...
It's legal for Fog.Start == Fog.End and conformance testing does so.
2008-04-23 11:38:41 -06:00
Brian Paul
5d873c8718
gallium: additional debug code
2008-04-23 11:38:41 -06:00
Brian Paul
809bc8f9ad
gallium: move logicop test outside of loop
2008-04-23 11:38:40 -06:00
Brian Paul
2221cb9f74
gallium: fix broken PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE
2008-04-23 11:38:40 -06:00
Brian Paul
76d39f0c19
gallium: more vertex debug code
2008-04-23 11:38:40 -06:00
Zack Rusin
e1180c2d69
fix the simple hash finding function and use it
2008-04-23 13:32:41 -04:00
José Fonseca
4f93a3a680
gallium: Fix texture refcount leak.
2008-04-24 02:13:41 +09:00
José Fonseca
a75a3df851
pipebuffer: New function to flush the buffer cache.
2008-04-24 02:13:41 +09:00
José Fonseca
53cf833af9
gallium: Add extern "C" to the headers.
2008-04-24 02:13:41 +09:00
Brian Paul
333976c90a
gallium: fix broken hashing for vertex translation
...
It seems we get hash collisions fairly easily and the code as it was didn't
deal with that properly.
I think we need a simpler hashing interface...
2008-04-23 10:29:52 -06:00
Keith Whitwell
43be7a4819
draw: remove stupid debug (Keith)
2008-04-23 13:56:05 +01:00
Keith Whitwell
d6a965972b
draw: add missing break (Jakob)
2008-04-23 13:51:50 +01:00
Keith Whitwell
1e3087cd03
mesa: add dedicated point-wide-smooth test, restore original tri.c as tri-orig.c
2008-04-23 13:10:13 +01:00
Jakob Bornecrantz
b0a58d5266
i915: Real fix for weird fence leak. Thanks Thomas
2008-04-23 11:56:35 +02:00
Ben Skeggs
a326595899
nouveau: fix build
2008-04-23 12:41:42 +10:00
Ben Skeggs
104ff59585
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
2008-04-23 12:39:38 +10:00
Ben Skeggs
6fc530ccda
fix non-i386 builds
2008-04-23 12:38:37 +10:00
Brian Paul
72fd5b9c5a
gallium: added a flushing_vcache flag, test in draw_do_flush()
...
Fixes broken polygon stipple, aaline, aapoint stages
2008-04-22 19:11:59 -06:00
Brian Paul
91e37b7140
gallium: fix bad logic in bind_pstip_fragment_shader(): use &&, not ||
2008-04-22 19:10:52 -06:00
Brian Paul
33f3938d2d
gallium: fix some bitmap frag shader issues
...
If texturing happens to be enabled when glBitmap() is called, need to be
careful about choosing a sampler unit, etc.
2008-04-22 18:43:05 -06:00
Brian Paul
1977fbff60
gallium: don't set buffer status to undefined in display_front_buffer()
2008-04-22 18:43:05 -06:00
Zack Rusin
36feb5eacf
In case the 'func' is deleting the state move the iterator before
...
calling it.
2008-04-22 18:32:36 -04:00
Zack Rusin
d8f2e400cf
Fix a crash. Rasterizer can be null
2008-04-22 18:32:36 -04:00
Zack Rusin
f088b53769
Cache translate's structs for emits and fetches.
...
Results in a fair speed improvement.
2008-04-22 18:32:36 -04:00
Zack Rusin
500c41b8ba
Fix reporting of clipped vertices.
2008-04-22 18:32:36 -04:00
Brian Paul
22cbf6a704
gallium: setup an identity viewport
...
This fixes broken blits.
2008-04-22 16:29:48 -06:00
Brian Paul
0939a986a8
gallium: update comment about bypass clipping/viewport
2008-04-22 16:25:55 -06:00
Brian Paul
aaa43218f3
gallium: setup an identity viewport
2008-04-22 16:22:21 -06:00
Brian Paul
465bc9473a
gallium: move the vertex print/debug code
2008-04-22 16:15:49 -06:00
Brian Paul
8f4f89c043
gallium: remove assertions
...
It's possible the current vs/fs is null when cso_save_vertex/fragment_shader()
is called.
2008-04-22 14:44:07 -06:00
Brian Paul
b456f1374f
gallium: st_translate_fragment_program() is void now
...
The return value was never used.
2008-04-22 14:44:07 -06:00
Jakob Bornecrantz
6b4798b906
i915: Fixed weird fence leak when I915_VBUF=true
2008-04-22 22:23:22 +02:00
Keith Whitwell
4ebede8c7f
Revert "softpipe: squash warning"
...
This reverts commit 1f0f029ba6 .
Which broke the debug build.
2008-04-22 21:17:21 +01:00
Keith Whitwell
0588858702
draw: allow drivers to query pipeline state more easily
...
Also, provide a separate flag to say whether the driver can handle
clipping/rhw tasks, in addition to the API flag which indicates they
have already been done.
2008-04-22 20:50:20 +01:00
Keith Whitwell
1f0f029ba6
softpipe: squash warning
2008-04-22 20:32:22 +01:00
Keith Whitwell
88f8eed3c4
cso: fix vs/fs confusion
2008-04-22 15:26:38 +01:00
Keith Whitwell
f9b1d47d65
softpipe: do something sensible on an error path, squash warning
2008-04-22 15:15:57 +01:00
Michel Dänzer
fd4acd6fda
gallium: How about restoring shaders instead of saving them again...
2008-04-22 14:22:11 +01:00
Michel Dänzer
57b85e197b
gallium: Don't link x86sse.c into libmesa.a.
...
Otherwise we get a symbol clash with the copy in src/gallium/util .
2008-04-22 12:18:31 +01:00
José Fonseca
b4b3a73bdf
pipebuffer: Temporarily allow simultaneous CPU writes.
...
Also, fast path for re-fencing the same buffer multiple times with the same fence.
2008-04-22 19:47:12 +09:00
Keith Whitwell
57987ea673
draw: disable broken edgeflag code - didn't work & was killing performance
2008-04-22 11:26:07 +01:00
Keith Whitwell
6a9f6625b3
xlib: shortcircuit no-op makecurrent
2008-04-22 11:15:51 +01:00
Keith Whitwell
d07ed9216c
xlib: implement SP_NO_RAST env var
2008-04-22 11:02:24 +01:00
Keith Whitwell
a5b87f249e
softpipe: implement SP_NO_RAST env var
2008-04-22 11:02:24 +01:00
Keith Whitwell
09b6686158
softpipe: make NUM_ENTRIES 32 so that div/mods are easier
2008-04-22 11:02:24 +01:00
Michal Krol
83fec372b4
cso: Fix build on Win32.
2008-04-22 11:26:26 +02:00
Zack Rusin
ed187d39a6
make the api consistent (all set functions return pipe_error status)
2008-04-21 16:40:27 -04:00
Zack Rusin
0879237725
handle some of the possible allocation failures within the hash itself
2008-04-21 16:10:55 -04:00
Zack Rusin
9fe6392901
initial stab at error handling in cso
2008-04-21 16:10:03 -04:00
Keith Whitwell
9a0e6860d3
cso: disable not-really-working cso_set_*_shader() funcs
2008-04-21 21:05:11 +01:00
Keith Whitwell
e406ad5912
draw: squash a couple of memory leaks
2008-04-21 21:01:38 +01:00
Keith Whitwell
01dfa6cde1
use cso fs/vs handle functions
2008-04-21 20:52:54 +01:00
Keith Whitwell
1dc5e56f3e
cso: provide functions to bind fs/vs handles directly
2008-04-21 20:52:54 +01:00
Keith Whitwell
c2afa182f3
mesa: remove st_cache.c
2008-04-21 20:52:53 +01:00
Zack Rusin
fb1c09305e
Use llvm 2.3 (2.2 won't work because of a lot of problems, e.g.
...
lack of constant vectors handling in execution engine)
2008-04-21 15:18:13 -04:00
Keith Whitwell
a945420ae6
rtasm: debug some missing funcs
2008-04-21 19:48:21 +01:00
Keith Whitwell
73706deef5
rtasm: quieten sse_enabled debug
2008-04-21 19:48:08 +01:00
Keith Whitwell
73c2711bb1
rtasm: clean up debug dumping a little
2008-04-21 19:43:53 +01:00
Keith Whitwell
785831fc6f
cso: propogate one easy error - many more
2008-04-21 19:12:08 +01:00
Keith Whitwell
d3db46eb82
translate: fail on x86 rtasm fail
2008-04-21 19:12:08 +01:00
Keith Whitwell
b17e123a8f
rtasm: propogate errors in x86 emit
2008-04-21 19:12:08 +01:00
Michel Dänzer
65efe807b9
gallium: Use CSO cache for shaders.
2008-04-21 17:51:39 +01:00
Zack Rusin
0824fb1d6a
actually write the results
2008-04-21 12:42:37 -04:00
Keith Whitwell
30b4dc2909
draw: more propogation -- pstipple stage.
2008-04-21 17:17:27 +01:00
Keith Whitwell
0d4ece4c5a
draw: propogate lots of errors
2008-04-21 17:03:37 +01:00
Keith Whitwell
0cd90a917d
draw: propogate errors out of aapoint stage
2008-04-21 16:45:41 +01:00
Keith Whitwell
69ecc2a577
draw: propogate errors out of aaline stage
2008-04-21 16:38:09 +01:00
Keith Whitwell
a918a9c744
draw: consolidate all the passthrough line/tri/point funcs
2008-04-21 16:16:16 +01:00
José Fonseca
d3045ebb06
gallium: Hash the fragment shader tokens, instead of pipe_shader_state.
...
PS: pipe_shader_state should probably go away now that it is reduced to a single pointer.
2008-04-22 00:16:04 +09:00
José Fonseca
e29583afcb
gallium: Include dependent header.
2008-04-22 00:14:08 +09:00
José Fonseca
13d8b1b211
gallium: Set all state via cso_context in blit/gen_mipmap utils.
...
cso_restore_* functions are implemented on top of cso_set_*, therefore
they require full knowledge of the current pipe state to work correctly.
Directly calling pipe's set_*_state functions will lead to undefined state.
Also save and restore shaders.
2008-04-21 22:26:33 +09:00
José Fonseca
08717d9461
gallium: Do not mistake pipe state objects for state tracker state objects.
2008-04-21 22:23:31 +09:00
Keith Whitwell
76a3590046
util: work around freaky win32 math.h
2008-04-21 14:19:15 +01:00
Keith Whitwell
615cdd3a53
tgsi: use new float math funcs, drop local disassembly code
2008-04-21 13:14:30 +01:00
Keith Whitwell
f30f320612
util: add wrappers for float math functions on windows
2008-04-21 13:14:30 +01:00
Keith Whitwell
b6c9d2ef2c
rtasm: add dump facility for x86 (from tgsi_sse2.c)
2008-04-21 13:14:30 +01:00
Zack Rusin
201ac414d4
make llvm draw paths compile with the latest changes
...
switch the method of distribution of builtins (to get rid of the
llvm2cpp dependency)
2008-04-21 00:26:18 -04:00
José Fonseca
40e0439db4
gallium: Centralize SSE usage logic.
2008-04-21 13:02:59 +09:00
Peter Winters
b20acef906
nv10: enable viewport clipping
2008-04-20 22:48:50 +02:00
Peter Winters
e7bdf047f2
nv10: fix random stuff
2008-04-20 16:07:04 +02:00
José Fonseca
29858e1b55
gallium: Refcount textures.
...
Pipe driver does refcount textures. If cso_context does not, dangling
pointers appear.
2008-04-20 14:41:29 +09:00
Keith Whitwell
68a7cb21fa
draw: rearrange debug code
2008-04-19 20:20:40 +01:00
Keith Whitwell
d0a4bf08b1
translate: fix several bugs
...
- specify cdecl calling convention on WIN32
- fix load bgra8 function
- fix previous don't crash fix.
2008-04-19 20:18:40 +01:00
Keith Whitwell
bfd179776f
draw: add missing translate->set_buffer for fetch emit path
2008-04-19 18:41:53 +01:00
Keith Whitwell
b1158a5e00
translate: don't crash on failure to create sse version
2008-04-19 18:27:30 +01:00
Keith Whitwell
af523a5bd7
rtasm: include yet another i386 define varient
2008-04-19 18:27:29 +01:00
Keith Whitwell
d3cb62b8b3
draw: fix scons build
2008-04-19 18:27:29 +01:00
Keith Whitwell
7d72607e14
draw: move incoming vertex state into draw->pt
...
This state is effectively private to the vertex processing part
of the draw module.
2008-04-19 17:27:52 +01:00
Keith Whitwell
dcf6f776ce
draw: make draw_reset_vertex_ids private to the draw_pipe_* code
2008-04-19 17:16:41 +01:00
Keith Whitwell
2dae208fb1
draw: make room for extra_vs_outputs
2008-04-19 17:16:23 +01:00
Keith Whitwell
e7bac42766
draw: put pipeline flushing behind a new interface
2008-04-19 16:43:15 +01:00
Keith Whitwell
bee1d31641
draw: move pt_pipeline code to draw_pipe.c
...
This is now the drawing interface to the pipeline. No more
calling into pipeline.first->tri(), etc.
2008-04-19 16:39:43 +01:00
Keith Whitwell
c898eae272
draw: always emit header in draw_pt_fetch.c
2008-04-19 15:35:22 +01:00
Keith Whitwell
507fbe2d32
draw: move some pipeline-specific code & state to draw_pipe.[ch]
2008-04-19 15:29:27 +01:00
Keith Whitwell
0959f909ba
draw: remove dead file pipe_wide_prims.c
2008-04-19 13:30:19 +01:00
Keith Whitwell
1246d06313
draw: remove named clipmask flags, tidy up pt middle ends
2008-04-19 13:20:26 +01:00
Keith Whitwell
882e5d84dc
draw: remove dead code
2008-04-19 13:12:42 +01:00
Keith Whitwell
26831bdac5
draw: rename pipeline files to draw_pipe_*
2008-04-19 00:45:05 +01:00
Keith Whitwell
43452886e2
cell: don't need to trim prims
2008-04-19 00:44:09 +01:00
Keith Whitwell
c717f1fbe2
softpipe: don't need to trim prims
2008-04-19 00:43:58 +01:00
Keith Whitwell
1b411f8943
draw: sort makefile sources
2008-04-19 00:39:38 +01:00
Keith Whitwell
6c38c600ff
draw: rename draw_vertex_shader.c -> draw_vs.c
2008-04-19 00:37:51 +01:00
Keith Whitwell
6494946db6
draw: remove draw_debug.c
2008-04-19 00:36:35 +01:00
Keith Whitwell
6d9132de04
draw: make draw_pt_fetch_emit use translate facility
2008-04-19 00:31:06 +01:00
Keith Whitwell
251ebcc175
draw: remove more dead data structures
2008-04-19 00:29:25 +01:00
Keith Whitwell
6094e79f4e
draw: remove dead data structures
2008-04-19 00:27:12 +01:00
Keith Whitwell
415e8e039b
draw: remove draw_vertex_fetch.c
2008-04-18 20:46:06 +01:00
Keith Whitwell
709e33cf0b
draw: remove old draw_vertex_shader_queue_flush function
2008-04-18 20:44:13 +01:00
Keith Whitwell
dd903d83b3
draw: remove old vertex_shader->run() functions
2008-04-18 20:41:39 +01:00
Keith Whitwell
6689182642
draw: remove draw_vertex_cache.c
2008-04-18 20:39:13 +01:00
Keith Whitwell
b11d89dc6d
draw: remove draw_prim.c
2008-04-18 20:36:38 +01:00
Keith Whitwell
a41c05b20a
draw: switch over to draw_pt paths, will remove old code shortly
2008-04-18 20:11:16 +01:00
Keith Whitwell
cb9f0a5896
draw: remove draw_vf code, use translate instead
2008-04-18 20:05:36 +01:00
Keith Whitwell
7b34a43d1a
translate: missing file
2008-04-18 18:52:03 +01:00
Brian Paul
39c06c4336
gallium: get rid of unnecessary surface mapping
2008-04-18 11:46:00 -06:00
Brian Paul
e430d885e0
gallium: a few comments
2008-04-18 11:46:00 -06:00
Brian Paul
19218e2195
gallium: implement recip sqrt() with C code for now.
...
Some conformance lighting tests fail with the SSE rsqrt instruction.
2008-04-18 11:46:00 -06:00
Keith Whitwell
26c27f6636
draw: remove fetch_pipeline middle end -- just use the general path
2008-04-18 18:42:41 +01:00
Keith Whitwell
7400bc4b6f
translate: add sse version based on old draw_vf_sse.c
2008-04-18 18:32:37 +01:00
Keith Whitwell
363f7abf20
rtasm: add x86_imul
2008-04-18 18:32:37 +01:00
Keith Whitwell
c5f0158a91
tgsi: add const qualifier to tokens on sse emit
2008-04-18 18:32:37 +01:00
Keith Whitwell
f631bebe1a
softpipe: fix const-related compiler warnings
2008-04-18 18:32:37 +01:00
Keith Whitwell
59ba8ea00b
gallium: reorder libs so that translate can see rtasm
2008-04-18 18:32:37 +01:00
Keith Whitwell
5b97c762ed
rtasm: add a couple more insns, clean up x86_mul
2008-04-18 18:32:36 +01:00
Michel Dänzer
073d9a28c2
gallium: Always pass colour clear value to driver as A8R8G8B8.
2008-04-18 13:38:06 +01:00
José Fonseca
da9079b936
gallium: Add missing files to scons.
2008-04-18 20:59:28 +09:00
Keith Whitwell
a773f06e96
draw: split off all the extra functionality in the vertex shader
...
This will at least allow us to make the initial gains to get decent
vertex performance much more quickly & with higher confidence of getting
it right.
At some later point can look again at code-generating all the
fetch/cliptest/viewport extras in the same block as the vertex shader.
For now, just need to get some decent baseline performance.
2008-04-18 10:48:54 +01:00
Brian Paul
01b6354e72
gallium: tweak x/ybias values
2008-04-17 15:26:37 -06:00
Brian Paul
5af9a690b2
gallium: add missing pipe_surface_unmap() call
2008-04-17 13:21:26 -06:00
Brian Paul
211170c192
gallium: plug in a select_destroy() function (fixes segfault on exit)
2008-04-17 11:31:14 -06:00
Brian Paul
ce454d2192
gallium: assert that we're not deleting the currently bound shader
2008-04-17 11:13:49 -06:00
Brian Paul
f2b3f6cbdf
gallium: reorder some of the destroy context code
2008-04-17 11:13:49 -06:00
Michel Dänzer
4dcb09d489
gallium: Add new file to scons build.
2008-04-17 17:53:33 +01:00
Keith Whitwell
c503e55d74
draw: move hw vertex emit to a new module
2008-04-17 14:43:40 +01:00
Keith Whitwell
fe8af14124
draw: don't always run pipeline if clipping
2008-04-17 14:42:05 +01:00
Keith Whitwell
280bcff1fa
draw: add vertex shader run_linear function
2008-04-17 14:23:13 +01:00
Keith Whitwell
938ec19210
tsgi: make Consts const
2008-04-17 14:23:13 +01:00
Keith Whitwell
49becd2d7c
draw: add comment
2008-04-17 14:23:13 +01:00
Keith Whitwell
c96d565643
draw: keep record of number of active vertex buffers
2008-04-17 14:23:13 +01:00
Keith Whitwell
8abfcea690
draw: remove misleading comments
2008-04-17 14:23:13 +01:00
Brian Paul
4b822a1016
gallium: implement RGBA pixel maps in the pixel transfer fragment program
2008-04-16 16:53:44 -06:00
Brian Paul
52544aa23b
gallium: added util_pack_color_ub()
2008-04-16 16:53:44 -06:00
Brian Paul
dc5a853c85
gallium: make choose_format() non-static: st_choose_format()
2008-04-16 16:53:43 -06:00
Brian Paul
e38f677e8f
gallium: finish-up and fix support for GL_COLOR matrix on pixel xfer path
2008-04-16 16:53:43 -06:00
Brian Paul
302daeb2ec
mesa: added internal post color matrix scale/bias vars
2008-04-16 16:53:43 -06:00
José Fonseca
3a765bbe00
gallium: Use debug_get_bool_option for controlling assert failure behaviour.
...
Add
GALLIUM_ABORT_ON_ASSERT=no
to C:\gallium.cfg instead.
2008-04-17 00:20:09 +09:00
Keith Whitwell
3be453bf7f
draw: allow pt paths to run without a vbuf render stage
2008-04-16 12:55:47 +01:00
Keith Whitwell
d8c3891718
draw: remove vbuf non-vf debug path, fix some failure modes in draw_vbuf_create()
2008-04-16 12:31:19 +01:00
Keith Whitwell
8b607f42d0
softpipe: call setup_prepare earlier so that vertex info is correct when queried
2008-04-16 12:22:20 +01:00
Keith Whitwell
909e8ce543
draw: update debug code
2008-04-16 12:22:20 +01:00
Keith Whitwell
a8582efaca
draw: make pt run pipeline when need_pipeline is true, not just when clipped
2008-04-16 12:22:20 +01:00
José Fonseca
fd6acabd2f
gallium: Get the translate module to build on msvc.
...
Appearently MSVC c-preprocessor parses "255.0f" as two tokens:
"255.0" and "f", and performs variable substitution on "f".
2008-04-16 11:42:08 +09:00
José Fonseca
e2269e94c0
gallium: Build and link the translate module.
2008-04-16 11:39:22 +09:00
Keith Whitwell
a5a7dc24ba
gallium: Switch one vertex path over to new translate module
...
Will eventually do this for all instances where we are converting vertices
from one format to another.
2008-04-15 19:14:31 +01:00
Keith Whitwell
08861688d3
gallium: add translate directory
2008-04-15 15:07:50 +01:00
Keith Whitwell
8cac6f3fcf
draw: increment output vertex properly
2008-04-15 14:52:56 +01:00
Keith Whitwell
7eb6f130a1
draw: fix first glitch in vertex emit
2008-04-15 14:44:39 +01:00
Keith Whitwell
59f68f36c4
translate: typo in emit_B8G8R8A8_UNORM
2008-04-15 14:40:16 +01:00
Keith Whitwell
c81bbab6f6
gallium: add a generic vertex (or other) buffer translation module
2008-04-15 14:35:29 +01:00
Keith Whitwell
6a26a9c58c
draw: fetch_shade_pipeline needs to translate to hw vertex format (from get_vertex_info)
2008-04-15 14:30:06 +01:00
Jakob Bornecrantz
f2ee51e7d9
i915: Changed name to i915_dri.so
2008-04-15 12:08:36 +02:00
José Fonseca
a68f664124
gallium: Cache one line worth of debug output on windows.
...
The windbg connection seems synchronous, so this speeds up when printing
little text at a time (e.g., tgsi output).
2008-04-15 18:11:47 +09:00
José Fonseca
3c4f1ba5a2
gallium: Eliminate stdio file usage. Remove unused stuff.
2008-04-15 17:08:10 +09:00
José Fonseca
7619240cc0
gallium: Fix seg fault (James Vogt).
2008-04-15 15:58:14 +09:00
José Fonseca
95aeeb6d74
gallium: Several fixes to buffer caching.
2008-04-15 15:41:08 +09:00
José Fonseca
d005befcb9
gallium: Less confusing interface for timeouts.
2008-04-15 15:40:35 +09:00
José Fonseca
50bbbbe581
gallium: Remove middle of scope declarations.
2008-04-15 14:58:32 +09:00
José Fonseca
0b995b44e5
gallium: Fix mismatching prototypes.
2008-04-15 12:39:22 +09:00
José Fonseca
a175e15f20
gallium: Allow to use a single slab.
...
We often want to use a pool of equally sized buffers, so this makes the
slab suballocator a drop-in replacement.
2008-04-15 12:39:22 +09:00
Ben Skeggs
7d2085bd7d
nouveau: PIPE_ATTRIB_MAX -> PIPE_MAX_ATTRIBS
2008-04-15 13:25:28 +10:00
Ben Skeggs
276e177dfb
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-15 13:23:23 +10:00
Brian
d3878b070b
gallium: enable new quad output code, remove old code
2008-04-14 21:01:40 -06:00
Brian
90b9a11a6d
gallium: fix semantic indexes for outputs
2008-04-14 20:58:05 -06:00
Brian
e4b3c13d7a
gallium: fix multi drawbuffer fb state
2008-04-14 20:57:15 -06:00
Brian
b54225ccd6
gallium: set ctx->Const.MaxDrawBuffers
2008-04-14 20:56:08 -06:00
Brian
fdd794dcfa
gallium: fix PIPE_CAP_MAX_RENDER_TARGETS query
2008-04-14 20:55:14 -06:00
José Fonseca
01c7dd2629
gallium: Add draw_pt_fetch_shade_pipeline.c to scons build.
2008-04-15 10:38:05 +09:00
José Fonseca
5b8fa51847
gallium: Don't assume snprintf are always available.
2008-04-15 10:13:52 +09:00
José Fonseca
21ae3d2721
gallium: Serialize buffers writes.
...
Allow concurrent reads from buffers by the CPU/GPU, but serialize
all writes.
2008-04-15 10:13:52 +09:00
Brian Paul
5807c0242c
fix GL_ARB_texture_rectangle breakage
2008-04-14 14:38:11 -06:00
David Flynn
78852986e6
mesa: define #extension GL_ARB_texture_rectangle
2008-04-14 12:56:10 -06:00
Brian Paul
f58ab8e75c
gallium: take reduced prim, fill modes into account when culling
2008-04-14 10:57:40 -06:00
Zack Rusin
983b6a73e1
use the new macro
2008-04-14 12:32:25 -04:00
Zack Rusin
2ba6e1fa71
silence some warnings
2008-04-14 12:29:23 -04:00
Zack Rusin
e330919785
pass vertex size to shaders so that callee can decide on the size
...
of the vertices and not always have to use the maximum vertex
allocation size for them
2008-04-14 12:27:24 -04:00
Keith Whitwell
871d39ec8c
softpipe: calculate determinant for all triangles, don't rely on draw module to do it
2008-04-14 16:18:00 +01:00
Keith Whitwell
8cbda9f108
draw: remove dead code
2008-04-14 16:15:39 +01:00
Jakob Bornecrantz
ca750dd045
Removed intel_ioctl it wasn't needed
2008-04-14 17:02:02 +02:00
Keith Whitwell
36bacf97a6
draw: always malloc verts for fetch_shade_pipeline
2008-04-14 12:46:57 +01:00
Keith Whitwell
a82e4996a1
draw: flush pipeline before trying to allocate more hw vertices
2008-04-14 12:37:19 +01:00
Keith Whitwell
e106b2d3d6
draw: move vertex header init out of fetch_shade_pipeline.c
2008-04-14 12:27:25 +01:00
Keith Whitwell
caf293343f
draw: hide passthrough shading paths behind an environment variable
2008-04-14 12:08:46 +01:00
Keith Whitwell
8e7326832a
softpipe: do our own culling, don't rely on the draw module.
...
May not always happen due to passthrough modes, etc.
2008-04-14 11:32:50 +01:00
Zack Rusin
0c1cb54923
Implement fetch/shade/pipeline or emit vertex passthrough.
2008-04-14 11:05:37 +01:00
Zack Rusin
3f7a3dd58c
Make shaders operate on a block of memory instead of arrays of vertex_header's
2008-04-14 11:00:35 +01:00
Zack Rusin
808f968f3a
return true if one of the vertices has been clipped
2008-04-14 11:00:35 +01:00
Zack Rusin
aadbb1d7fb
pass arbitrary number of vertices to the shader execution cycle
2008-04-14 11:00:35 +01:00
Zack Rusin
4f550ab821
introduce a define to maxout the processed vertices
2008-04-14 11:00:26 +01:00
José Fonseca
84994693f5
gallium: Add u_time.c
2008-04-13 18:52:54 +09:00
José Fonseca
fb2b5f7a4a
gallium: Buffer cache.
2008-04-13 15:10:18 +09:00
José Fonseca
21c302b0ec
gallium: Initial port of Thomas slab suballocator to pipebuffer.
...
Not tested yet -- just compiles.
This includes only the slab algorithm. Fencing is already
implemented in pb_bufmgr_fence and time-based caching will be commited in a
separate module shortly.
2008-04-13 15:10:17 +09:00
José Fonseca
cd59312406
gallium: OS independent time-manipulation functions.
2008-04-13 15:10:17 +09:00
Michal Krol
45cc4f546e
tgsi: Fix source register short dump code.
2008-04-12 23:00:35 +02:00
Patrice Mandin
7f811f2c42
nv30: Update miptree stuff
2008-04-12 22:16:42 +02:00
Brian
2ebc99fcbc
gallium: move duplicated compute_clipmask() code to draw_vs.h
2008-04-12 11:03:56 -06:00
Jakob Bornecrantz
5dcfc1f1b6
Fixed memory leak
2008-04-12 14:34:59 +02:00
Patrice Mandin
186277ee92
nv30: Move some structures and functions from context to screen
2008-04-11 23:39:29 +02:00
Brian Paul
593cf5a6b5
gallium: merge the tgsi_emit_sse2() and tgsi_emit_sse2_fs() functions.
...
The two functions were mostly the same. We can look at the shader header
info to determine if it's a vertex or fragment shader.
2008-04-11 15:27:00 -06:00
Brian Paul
7c2416f06e
gallium: handle TGSI immediates in SSE code for vertex shaders
2008-04-11 15:02:21 -06:00
Brian Paul
e3cf0cd6a9
gallium: implement immediates (aka literals) for SSE fragment shaders
2008-04-11 14:19:32 -06:00
Brian Paul
097301395d
gallium: comments
2008-04-11 14:19:31 -06:00
Brian Paul
9e8a85ef67
gallium: fix SCS codegen (sin scalar src comes from X, not Y)
2008-04-11 14:19:31 -06:00
Keith Whitwell
1690051521
mesa: fix broken x86_call()
2008-04-11 14:19:31 -06:00
Keith Whitwell
4d184cc331
gallium: fix broken x86_call()
2008-04-11 14:19:31 -06:00
Patrice Mandin
4c498c1b0c
nv30: Do flip
2008-04-11 21:37:41 +02:00
Patrice Mandin
b1de9c948f
nv30: Set pipe status on clear
2008-04-11 21:37:28 +02:00
Michel Dänzer
02250c855f
gallium: Flush render cache at the beginning of fallback_copy_texsubimage().
...
It may get stale bits otherwise.
2008-04-11 17:45:41 +01:00
Brian Paul
d758479b9f
mesa: Fix glBegin-time test for invalid programs/shaders.
...
Cherry-picked from master.
2008-04-11 10:14:17 -06:00
Brian Paul
6d0f9d5a01
mesa: new Z-compositing test (glDrawPixels(GL_DEPTH) + stencil)
2008-04-11 09:21:37 -06:00
Brian Paul
e1c3560152
add missing glViewport calls
...
cherry-picked from master
2008-04-11 09:01:04 -06:00
Michal Krol
f41cc50ef0
tgsi: Dump processor type and version as a single token.
2008-04-11 11:50:09 +02:00
Michal Krol
2483062f10
tgsi: Dump semantics before interpolator.
2008-04-11 11:50:08 +02:00
José Fonseca
03a3373bdf
gallium: Thread condition variables.
2008-04-11 12:18:06 +09:00
Brian Paul
544c236db1
mesa: add a new test for glDrawPixels(GL_DEPTH_COMPONENT)
2008-04-10 18:33:53 -06:00
Brian Paul
87b0b8e7bc
gallium: flags param to surface_alloc_storage() is unused and deprecated
2008-04-10 18:33:53 -06:00
José Fonseca
bc56e87ce1
gallium: Attribute realloc leaks to the first malloc call.
2008-04-11 09:32:26 +09:00
Keith Whitwell
c95dcc4962
remove usage of vertex_header
2008-04-10 14:35:47 -04:00
Brian Paul
7a8ad75c89
gallium: fix readback of z16 values
2008-04-10 10:30:46 -06:00
Brian Paul
311e402684
gallium: more elaborate tracking of front color buffer state
...
This fixes the case where the app calls SwapBuffers then calls glReadPixels
to read the front color buffer. We now keep track of when the front buffer
is a _logically_ copy of the back buffer (after SwapBuffers) and read from
the back color buffer instead of the front.
2008-04-09 18:39:51 -06:00
Brian Paul
54d7c399a8
gallium: more flush/finish changes
...
New, separate is_front_buffer_dirty() function.
2008-04-09 16:59:14 -06:00
Brian Paul
4ecbd5a70f
gallium: reorder funcs
2008-04-09 16:32:46 -06:00
Brian Paul
aade2f41b0
gallium: call_flush_front_buffer() from st_glFinish()
2008-04-09 16:32:22 -06:00
Brian Paul
574f964667
gallium: fold st_gl_flush() into st_glFlush()
2008-04-09 16:30:28 -06:00
Brian Paul
9c86c0e88b
gallium: refactor code, new flush_front_buffer() function
2008-04-09 16:26:56 -06:00
Brian Paul
a52faa9325
gallium: remove unneeded st->haveFramebufferSurfaces field.
2008-04-09 16:09:46 -06:00
Brian Paul
f7e475280a
gallium: fix bug in PIPE_BLENDFACTOR_INV_DST_ALPHA case
2008-04-09 14:20:43 -06:00
Ben Skeggs
bdfcce4792
nv40: use vb/ve counts rather than shader inputs for related loops
2008-04-09 14:02:55 +10:00
Brian
da8934034b
gallium: re-order, clean-up PIPE_MAX_* definitions
2008-04-08 21:43:36 -06:00
Ben Skeggs
2a8de8ff94
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-09 13:42:55 +10:00
Brian
be37e8350f
gallium: remove obsolete/unused PIPE_ATTRIB_MAX
2008-04-08 21:38:44 -06:00
Brian
7e57a9e8bb
cell: keep track of num_vertex_attribs/buffers for shorter loops
2008-04-08 21:20:10 -06:00
Brian
1f888abf16
i915: keep track of num_vertex_attribs/buffers for shorter loops
2008-04-08 21:20:10 -06:00
Brian
28cf8c8fdc
gallium: keep track of num_vertex_attribs/buffers for shorter loops
2008-04-08 21:20:10 -06:00
Jakob Bornecrantz
bd56b21adf
i915: Added debug counter to bufmgr
2008-04-08 18:40:36 +02:00
Jakob Bornecrantz
1d43a8b255
i915: Fixed fence related problems
2008-04-08 17:24:33 +02:00
Jakob Bornecrantz
2dd6022e65
i915: Fixed fence leak in intel_swapbuffers.c
2008-04-08 15:01:16 +02:00
José Fonseca
4382b0c9cb
gallium: Fix overzealous assert.
2008-04-08 20:42:24 +09:00
Michel Dänzer
f97c56e057
gallium: Fix up scons build.
2008-04-08 10:53:37 +01:00
Jakob Bornecrantz
caa5b1736d
Added fence counter to fence manager
2008-04-08 11:48:44 +02:00
Jakob Bornecrantz
4c0f724323
Fixed user_buffer memory leak
2008-04-08 11:26:52 +02:00
Brian
17f6409903
gallium: get rid of bufloop quad stage
2008-04-07 22:00:41 -06:00
Brian
c7daa68ca3
gallium: begin reworking quad stages for multiple color outputs
2008-04-07 21:59:12 -06:00
José Fonseca
4e2127b0e5
gallium: Allow to debug memory leaks in nested scopes.
2008-04-08 12:04:03 +09:00
Brian Paul
985134211d
gallium: check ctx->DrawBuffer before flushing bitmap cache.
...
During context unbind, we may not have a draw buffer.
This fixes demos/tunnel2.c
2008-04-07 16:45:17 -06:00
Brian Paul
d28a2004b8
gallium: fix the texture case in default_deep_rgba_format()
...
Fixes glean pixelFormat test
2008-04-07 15:53:49 -06:00
Brian Paul
2b8b2420d4
gallium: slightly improved accum clear/mad operations
...
Instead of get/put_tile(), map the buffer and operate on values directly.
2008-04-07 15:05:28 -06:00
Brian Paul
0dd596fbc7
gallium: accum buffer fixes
...
If the driver can't create a PIPE_FORMAT_R16G16B16A16_SNORM surface, create
an accum surface using a shallower format and taller height. Since only the
accum buffer code accesses the surface the actual format doesn't really
matter, just that there's enough memory.
2008-04-07 14:53:49 -06:00
Brian Paul
29b65a709c
gallium: remove stray comment
2008-04-07 14:17:32 -06:00
Brian Paul
2b2d0e0584
gallium: clean-up in st_renderbuffer_alloc_storage()
2008-04-07 13:50:02 -06:00
Jakob Bornecrantz
d5d93a3158
i915: Pulled in changes from i915tex
2008-04-07 19:40:43 +02:00
Jakob Bornecrantz
d945e8ddd7
mesa: Pulled in glthread from i915tex
2008-04-07 19:40:01 +02:00
Jakob Bornecrantz
24fc93ebdc
gallium: Stop warnings
2008-04-07 19:39:28 +02:00
Brian
42a9218daa
mesa: call _mesa_remove_varying_reads() after compiling vertex shaders
2008-04-07 11:23:44 -06:00
Brian
48a25bdd36
mesa: new _mesa_remove_varying_reads() function
...
We'll apply this function to GLSL vertex programs. In GLSL it's legal to
read and write varying (output) vars in a vertex shader. But reading from
an output register isn't supported by all hardware. This routine examines
the vertex program for that condition and rewrites it to use temporary
registers where needed.
2008-04-07 11:23:44 -06:00
Brian
5d1e73028a
mesa: added _mesa_insert_instructions()
...
Also, use new _mesa_free_instructions() in a few places.
2008-04-07 11:23:43 -06:00
Brian
f3bd7bf5c9
mesa: added _mesa_free_instructions()
2008-04-07 11:23:43 -06:00
Ben Skeggs
2655f69012
nv40: implement user clip planes
...
It turns out the user planes handed to the driver are already in clip space.
Hence, we no longer need to transform incoming vertices before computing the
clip distance, and no longer need to change the interface provided by
gallium. Yay :)
The clip state change handling could be better, but this works.
2008-04-07 21:43:29 +10:00
Keith Whitwell
a8a5376406
draw: strip edgeflags out of fetch-emit path
2008-04-07 12:28:31 +01:00
Keith Whitwell
5c19e47362
draw: fix edgeflag handling on the pt paths
...
Encode edgeflags (and reset_stipple info) into the top two bits of the
fetch elements. This info could be moved elsewhere, but for now we
can live with a 1<<30 maximum element size...
Also use the primitive decomposition code from draw_prim.c verbatim, as
it includes all this stuff and is known to work.
2008-04-06 14:31:41 +01:00
Michal Krol
a8ca549553
draw: Use debug_printf().
2008-04-05 10:22:47 +02:00
José Fonseca
fdff063343
gallium: Keep fenced buffers list ordered.
...
This allows to keep the list small without the overhead of full walks.
2008-04-05 13:45:41 +09:00
José Fonseca
f1efef809c
gallium: Fix typo.
2008-04-05 13:45:40 +09:00
José Fonseca
c1d26d3dcc
gallium: Use the custom snprintf implementation everywhere (for Win32).
...
Because winddk's implemenation does not handle floats.
2008-04-05 13:45:40 +09:00
Brian
bc029247d9
mesa: no longer combine vertex/fragment shader parameters/uniforms
...
GLSL Vertex and fragment shaders now have independent parameter buffers.
A new gl_uniform_list is used to keep track of program uniforms and where
each uniform is located in each shader's parameter buffer.
This makes better use of the space in each buffer and simplifies shader linking.
2008-04-04 18:59:21 -06:00
Brian
b8cc9e88e0
mesa: new functions for managing list/index of uniforms
2008-04-04 18:57:40 -06:00
Brian
8a8e7b22c0
mesa: test code to exercise more GLSL functions
2008-04-04 18:56:22 -06:00
Brian
f7f4b81ad8
mesa: added more ext funcs (from Mesa/master)
2008-04-04 18:55:48 -06:00
Brian
b53d6ae4be
gallium: always pass size=4 to make_immediate()
...
Mesa always packs 4 immediates into each parameter/const buffer slot.
I think we were just getting lucky with this as it was.
2008-04-04 18:28:14 -06:00
Brian
74a6a46b74
gallium: adjust the code in update_textures() to look more like update_samplers()
2008-04-04 16:45:05 -06:00
Brian
fe1c9c0585
mesa: add missing glPush/PopMatrix() calls
2008-04-04 16:45:05 -06:00
Brian
1e4cd24e9c
mesa: add missing glPush/PopMatrix() calls
2008-04-04 16:45:05 -06:00
Roland Scheidegger
f32c512774
gallium: state tracker fixes for compressed textures
2008-04-04 21:10:15 +02:00
Brian Paul
ac2ca39f8f
gallium: add new call to st_flush_bitmap_cache() to fix recent regression
2008-04-04 12:24:25 -06:00
Brian Paul
5ffc5cce15
gallium: new debug code, disabled
2008-04-04 12:24:01 -06:00
Brian Paul
72f2c55069
gallium: make sure to set the SamplersUsed field for bitmap/drawpixels shaders
...
Also, make sure that field is copied/updated in the program clone and combine functions.
Without this we weren't getting SAMP declarations in the TGSI shaders.
2008-04-04 11:20:44 -06:00
Keith Whitwell
84501e68f6
gallium: Handle client-supplied edgeflags.
...
Also, implement support in the draw module. We were hardwiring these
to one for quite a long time...
Currently using a draw_set_edgeflags() function, may be better to push
the argument into the draw_arrays() function. TBD.
2008-04-04 17:05:27 +01:00
Michel Dänzer
1d6877b326
gallium: Revert st_gl_flush() changes from when the **fence argument was added.
...
As st_gl_flush() isn't used by st_finish() anymore, it doesn't have to make
sure pipe->flush() always gets called.
2008-04-04 16:27:45 +01:00
Michel Dänzer
7b5303adbf
gallium: Call st_flush() instead of st_gl_flush() in st_finish().
...
This is enough for the current purpose of st_finish(), which is to wait for
things to settle down before context teardown.
2008-04-04 16:17:33 +01:00
Keith Whitwell
0b20d1b9b5
draw: move code to run pipeline from pt to new file
...
Add facility for draw_vbuf.c to reset these vertex ids on flushes.
Pre-initialize vertex ids correctly.
2008-04-04 13:19:26 +01:00
Brian
9edac96d69
Alias glStencilOpSeparateATI with glStencilOpSeparate.
2008-04-04 12:44:14 +02:00
Brian
cdbfae9bef
test glStencilFuncSeparateATI()
2008-04-04 12:44:14 +02:00
Brian
102f2ef4fc
Finish up ATI_separate_stencil
...
Add entrypoints to glapi XML file and regenerate files.
Implement glStencilOpSeparateATI().
Consolidate some code in stencil.c
2008-04-04 12:44:14 +02:00
Roland Scheidegger
04097f5583
add missing _mesa_StencilFuncSeparateATI function
2008-04-04 12:44:13 +02:00
Roland Scheidegger
cf9b07ea34
gallium: fix two-side stencil handling
...
Previously all drivers were in twosided mode since they checked for
stencil.enable[1] flag which was a copy of stencil.enable[0]. Note that drivers
should not reference stencil[1] state (other than the enable) if twosided
stenciling is disabled (for now the stencil state is still copied but for
instance clear_with_quads won't provide useful values in there).
Also, use _TestTwoSide instead of TestTwoSide since results would be
bogus otherwise if using APIs with implicit two side stencil enable
(i.e. core ogl 2.0).
2008-04-04 12:44:13 +02:00
Ben Skeggs
2946a5a012
nv40: kill some warnings
2008-04-04 20:32:06 +10:00
Ben Skeggs
e902d9091c
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-04 20:30:29 +10:00
Keith Whitwell
7a7bce7b24
gallium: make msvc less unhappy
2008-04-04 11:13:10 +01:00
Michel Dänzer
c07d3f6a9e
gallium: Always allocate new const buffers instead of modifying existing ones.
2008-04-04 09:06:13 +01:00
Ben Skeggs
bc67533f29
nouveau: create swizzled surface + scaled image objects
2008-04-04 16:18:58 +10:00
Ben Skeggs
a45a12e757
nv40: have test for hw idxbuf in single place
2008-04-04 13:02:37 +10:00
Ben Skeggs
fbb6cc7842
nouveau: in some cases don't create the buffer in local mem initially.
2008-04-04 12:55:57 +10:00
Brian
a7504ad587
cell: added some comments/ideas about better texture sampling
2008-04-03 19:43:10 -06:00
Brian
217d379407
cell: minor texture improvements
...
Precompute tiles_per_row. Use ushort multiplies in a few places. New comments.
2008-04-03 19:43:10 -06:00
Ben Skeggs
0b57662fa6
nv40: remove redundant state_emit() calls
2008-04-04 11:17:28 +10:00
Ben Skeggs
6fbc50e013
nv40: static attribs -> stateobj
2008-04-04 11:17:28 +10:00
Ben Skeggs
7e9b83ac0a
nv40: convert the inline idxbuf paths also
2008-04-04 11:17:27 +10:00
Ben Skeggs
73322bba5c
nv40: need to resubmit buffers if pushbuf gets flushed during draw
2008-04-04 11:17:27 +10:00
Brian
1307eebfa0
gallium: test if PIPE_FORMAT_YCBCR[_REV] is supported and enable GL_MESA_ycbcr_texture
...
Update texture format selection code too.
2008-04-03 16:37:30 -06:00
Brian
766f3a545e
gallium: implement ycbcr->rgba tile conversion
2008-04-03 16:36:07 -06:00
Brian
124e1345c9
gallium: set rasterizer.gl_rasterization_rules = 1 in a few more places
2008-04-03 13:16:37 -06:00
Brian Paul
ce5c867cbb
gallium: streamline viewport/raster/shader state for clearing with quads
...
Move init of these items to new st_init_clear().
2008-04-03 12:54:32 -06:00
Brian Paul
e8823bb7df
gallium: include st_cb_bitmap.h to silence warning
2008-04-03 12:52:55 -06:00
Brian Paul
c4f8c8b304
gallium: remove the temporary/test TEST_DRAW_PASSTHROUGH code
2008-04-03 12:44:58 -06:00
Brian Paul
4f67a3f7d3
gallium: use identity viewport fix broken clear_with_quad() path
...
Since bypass_clipping is set and we're specifying quad vertexes in window
coords, setup identity viewport.
2008-04-03 12:42:26 -06:00
Brian Paul
0bc2e2c9cd
gallium: call st_flush_bitmap_cache()
2008-04-03 12:01:53 -06:00
Brian Paul
f07fe3c728
gallium: set gl_rasterization_rules
2008-04-03 12:01:17 -06:00
Michel Dänzer
333df9656a
gallium: Only build softpipe driver by default for xlib winsys with scons.
2008-04-03 13:19:38 +01:00
Keith Whitwell
d2cb4ba0bb
draw: add passthrough path to the pipeline
...
This handles the case where bypass_vs is set, but vertices need to go
through the pipeline for some reason - eg unfilled polygon mode.
Demonstrates how to drive the pipeline from inside one of these things.
2008-04-03 12:21:30 +01:00
Stephane Marchesin
8ed894bd17
nv10: emit dummy zeta size when no zbuffer is used.
2008-04-03 04:20:22 +02:00
Stephane Marchesin
7f21b63a98
nv10: fix more vertex stuff
2008-04-03 04:07:16 +02:00
Stephane Marchesin
d3340cda9c
don't push "pouets"
2008-04-02 18:28:44 +02:00
Stephane Marchesin
fb19b3393f
nv10: fix some more state, work on the vertex emission code.
2008-04-02 18:26:49 +02:00
Stephane Marchesin
8f26e975ca
nv10: set rasterizer state.
2008-04-02 15:09:32 +02:00
Keith Whitwell
add46fbc8c
draw: add missing break statement
2008-04-02 12:05:55 +01:00
Keith Whitwell
ae3c91e98c
draw: Set the backend prim in the pt 'prepare' operation
...
Leaving it until 'run' is bad as the primitive is pretty much state
for some drivers and so needs to get set early. In some drivers
this is used to determine things like vertex format, etc -- by the
time we get to 'run', it's too late to change this.
2008-04-02 12:02:32 +01:00
Keith Whitwell
8e33194837
gallium: add a flag to turn on gl rasterization rules
...
Use this to set up hardware rasterization (if your hardware can
do it) or otherwise turn on various tweaks in the draw module.
Currently only hooked up to point biasing code.
2008-04-02 11:38:33 +01:00
Keith Whitwell
bc739440c2
gallium: add temporary facility for rasterization-time clamping of point sizes
2008-04-02 10:44:04 +01:00
Ben Skeggs
81f34e222a
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-02 13:29:17 +10:00
Stephane Marchesin
901700888e
Merge branch 'gallium-0.1' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/mesa into gallium-0.1
2008-04-02 05:10:52 +02:00
Stephane Marchesin
b1a361ba7a
nv10: fix stuff and things.
2008-04-02 05:10:18 +02:00
Ben Skeggs
ae87909d0d
nv40: only update draw module state when using swtnl
2008-04-02 13:04:06 +10:00
Ben Skeggs
bdf5b23bfd
nv40: shorten zsa state lines
2008-04-02 12:54:37 +10:00
Brian
7f40115a52
mesa: added a cast to avoid int overflow, plus rename texels->pixels
2008-04-01 16:20:29 -06:00
Brian
792d524aed
mesa: measure fill rate for drawing a large quad with basic shading/texture modes
2008-04-01 16:07:09 -06:00
Brian
bccd3f138c
cell: more multi-texture fixes (mostly working now)
2008-04-01 15:42:42 -06:00
Brian
8bef18f47b
mesa: destroy window upon exit
2008-04-01 14:56:10 -06:00
Brian
9d1444092f
cell: turn off some debug output
2008-04-01 14:55:31 -06:00
Brian
9e7b730eb2
cell: pass tex unit to get_texel()
2008-04-01 14:52:25 -06:00
Brian
2d02ee8509
cell: fix bug in texture tiling function (non-square textures work now)
2008-04-01 14:52:04 -06:00
Brian
e7b23d36df
cell: checkpoint: more multi-texture work
2008-04-01 11:35:53 -06:00
Brian
c14da8f524
cell: assert num samplers/textures <= CELL_MAX_SAMPLERS
2008-04-01 11:30:17 -06:00
Brian
6ddd2df1ae
cell: return CELL_MAX_SAMPLERS to indicate number of texture units
2008-04-01 11:28:27 -06:00
Brian
9d287a1841
gallium: init ctx->Const.MaxTextureUnits
2008-04-01 11:28:01 -06:00
Brian
f8c09464f8
cell: enable #define CACHE_STATS to print a cache report upon exit
2008-04-01 11:05:32 -06:00
Ben Skeggs
f3a62372bf
handle IsPositionInvariant flag
2008-04-01 08:59:41 -06:00
Ben Skeggs
71d7aec2b3
nouveau: winsys printf disappeared :)
2008-04-02 00:40:18 +10:00
Ben Skeggs
ea990867a8
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-04-02 00:37:12 +10:00
Keith Whitwell
8f8b95ae58
draw: remove dead code
2008-04-01 15:19:30 +01:00
Keith Whitwell
edfa8201a5
draw: more flatshade_first changes
...
- Reduce the number of changes to the normal vertex ordering
- Assume that the hardware knows how to do this in the standard case.
- Add support to the passthrough vcache path.
2008-04-01 14:51:25 +01:00
Keith Whitwell
caa44763f7
draw: respect flatshade_first in flatshade stage
2008-04-01 14:51:25 +01:00
Keith Whitwell
52f40dcc46
draw: associate rhw divide with clipping not viewport flag
2008-04-01 14:51:24 +01:00
Keith Whitwell
4b1377b240
draw: flush between pt/non-pt modes
2008-04-01 14:51:24 +01:00
Michel Dänzer
cc85573a9f
gallium: Fencing fix.
...
Make sure the struct pipe_fence_handle* we point st_flush() to is initialized
to NULL, so winsys->fence_reference() doesn't try to unreference a random
struct pipe_fence_handle* pointer.
2008-04-01 13:05:24 +01:00
Michel Dänzer
2df9941368
scons: Fix test for building dri/intel winsys.
2008-04-01 13:05:09 +01:00
Brian
d83e0c45be
cell: update some of the CAP, texformat queries
2008-03-31 21:16:48 -06:00
Brian
e6c981f22c
cell: more work for multi-texture support
2008-03-31 21:16:48 -06:00
Brian
5553a3b675
cell: set cell->num_textures in cell_set_sampler_textures()
2008-03-31 21:16:48 -06:00
José Fonseca
686a6c7468
gallium: Do not assume that buffers are freed in the same order they are fenced.
...
Also free buffers as soon as possible.
This short term fix corrects the fenced list behavior but it will impact on performance.
The long term fix is probably replace the linked list (legacy from the bufpool code) by
a binary tree.
2008-04-01 10:46:04 +09:00
Brian
14452aee73
cell: initial work to support multi-texture
2008-03-31 17:38:21 -06:00
Brian
84c2821d2a
cell: added const qualifier
2008-03-31 16:54:31 -06:00
Brian
58b6690cf8
cell: updated comments: s/test/SPE/
2008-03-31 16:44:56 -06:00
Brian
ab8bcc4ec6
cell: implement logicop/output for PIPE_FORMAT_B8G8R8A8_UNORM
...
Remote display to my usual terminal shows the right colors again.
Not 100% sure about the shuffle control words, but they seem to work.
2008-03-31 16:36:25 -06:00
José Fonseca
8a81429fa8
gallium: Compute YCBCR bit depth.
2008-04-01 07:22:10 +09:00
Brian
6b0be38a6c
gallium: used inverted bitmap texture to simplify the fragment shader.
...
"Off" bits get stored as texel=0xff and "on" bits get stored as texel=0x0.
Then use KIL -tmp to kill the off bits and keep the on bits.
This shortens the fragment program by two instructions.
2008-03-31 15:12:14 -06:00
Brian
23b03c536d
gallium: updated comment for bypass_vs
2008-03-31 15:12:01 -06:00
Markus Amsler
9136747a2b
fix parsing bug involving comments at the end of ARB v/f programs
2008-03-31 14:58:11 -06:00
Brian
ddc0f91bfc
gallium: use cso_save/restore_sampler_textures() functions
2008-03-31 14:38:27 -06:00
Brian
7139b8ef78
gallium: draw_passthrough.c is obsolete - removed
2008-03-31 14:20:16 -06:00
Brian
6a382250a1
gallium: set the bypass_vs flag now
...
The glBitmap vertex shader is a no-op, but we still have to specify it in
order to convey the number of inputs/outputs.
2008-03-31 14:18:36 -06:00
Brian
594dab4769
gallium: move the test for bypass_vs into the vs_XXX_run() functions
...
Also:
1. Added an identity_viewport flag to skip viewport transformation when it
has no effect. Might also add an explicit bypass_viewport flag someday.
2. Separate the code for computing clip codes and doing the viewport transform.
Predicate them separately.
Note: even if bypass_vs is set, we still look at the shader to determine the
number of inputs and outputs.
2008-03-31 14:14:30 -06:00
Brian
9cbd840043
gallium: draw_passthrough.c is not used anymore
2008-03-31 14:13:09 -06:00
Brian
499d8aaa47
gallium: draw_passthrough.c is not used anymore
2008-03-31 14:06:42 -06:00
Brian
e66cb602b7
gallium: turn on clipping for bitmaps
...
Bitmaps can extend beyond window edges so we need to clip.
Also, move some state atom vars to st_context to be a bit more efficient.
2008-03-31 12:18:20 -06:00
José Fonseca
baab98a637
gallium: Eliminate p_winsys::printf
...
Not convenient and almost not used at all. Better replacements in p_debug.h
2008-03-31 17:28:33 +09:00
Ben Skeggs
e616d3f3e2
nv40: fix slight thinko
2008-03-31 09:37:57 +10:00
Ben Skeggs
4ad9dd6179
nouveau: update object header
2008-03-31 09:29:22 +10:00
Ben Skeggs
169faae6db
nv40: support vp clip distance regs, unused currently.
2008-03-31 09:26:07 +10:00
Michal Krol
63950b11b6
draw: Do not run full pipeline when flatshade_first for point primitives.
2008-03-30 23:21:20 +02:00
Michal Krol
fc98880144
draw: Fix bypass_vs semantic misuse.
2008-03-30 22:48:49 +02:00
Ben Skeggs
6806519a0b
nv40: track current scissor enable/disable state
...
Not sure how this was forgotten :) Anyhow, fixes gearbox/bzflag/xmoto,
probably other things that use scissored clears / hit the nasty
clear-with-quad path.
2008-03-31 06:39:03 +10:00
Patrice Mandin
7b389f8d2f
nv30: use FREE macro
2008-03-30 21:53:31 +02:00
Ben Skeggs
833b1fb152
nv40: mark fp dirty even when only consts updated
...
Fixes arbfplight "sticking".
2008-03-31 05:13:06 +10:00
Ben Skeggs
bbefb541ad
nouveau: adapt to recent gallium changes
2008-03-30 20:40:27 +10:00
Ben Skeggs
03c60e0fb6
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-30 19:58:03 +10:00
Ben Skeggs
68395f6726
nv40: vp 1/0/- swz
2008-03-30 19:57:20 +10:00
Ben Skeggs
3017999d9b
nv40: vp const/immd fix
2008-03-30 19:57:18 +10:00
Brian Paul
a52c0416d1
gallium: Set vertex state/buffers en-mass.
2008-03-29 14:41:03 +01:00
José Fonseca
f10016b9a0
gallium: Fix some MSVC warnings.
2008-03-29 11:32:29 +09:00
Brian
737e34aee5
gallium: begin some bounding box code for bitmap cache
2008-03-28 18:41:10 -06:00
Brian
f6908a766d
gallium: added an (int) cast in setup_bitmap_vertex_data() to fix a signed/unsigned arithmetic problem
...
Negative values became very large uints.
2008-03-28 18:18:55 -06:00
Brian
cbfe6ee5d5
gallium: Fix computation of Z values when not using early Z.
...
This fixes the missing bitmaps in the engine and fogcoord demos.
2008-03-28 15:22:34 -06:00
Brian
5a460c7391
gallium: don't call st_flush_bitmap_cache() if the only change is _NEW_PACKUNPACK state
2008-03-28 15:17:50 -06:00
Brian
7292db2138
gallium: disable a debug hack
2008-03-28 14:56:05 -06:00
Brian
c62b197b52
gallium: implement a glBitmap cache
...
The bitmap cache attempts to accumulate a series of glBitmap calls in a
buffer to effectively render a whole bunch of bitmaps at once.
The cache can be disabled, if needed, by setting UseBitmapCache=GL_FALSE.
2008-03-28 14:53:47 -06:00
Brian Paul
13041da714
mesa: fix texture/renderbuffer mix-up in test_attachment_completeness()
2008-03-28 13:10:16 -06:00
Brian Paul
de3634fca8
gallium: re-work texture format selection code
...
Use same code for choosing texture format and renderbuffer format.
2008-03-28 13:09:19 -06:00
Roland Scheidegger
5615ab78b0
gallium: remove redundant compare bit in sampler state
2008-03-28 15:43:00 +01:00
Michal Krol
4e7bcaa4c2
gallium: Bump PIPE_MAX_SAMPLERS to 16.
...
We need it to fulfil D3D minimum requirements.
2008-03-28 12:31:35 +01:00
Brian
5935b16ff5
If visual is 32bpp, set visual->alphaBits = 8.
...
This works since we always use XImages for color buffers. It wouldn't always
work for Windows/Pixmaps.
2008-03-27 21:11:45 -06:00
Brian
39038c1169
gallium: replace PIPE_ATTRIB_MAX with PIPE_MAX_ATTRIBS
...
The later follows the naming scheme of other limits.
Keep the old definition until all possible usage is updated.
2008-03-27 17:41:55 -06:00
Brian Paul
37da2d6851
gallium: updated/improved comments, minor re-formatting
2008-03-27 17:18:25 -06:00
Brian
bdf279b555
consolidate some parsing functions that were pretty much identical for vertex/fragment programs
...
cherry-picked from master
2008-03-27 16:19:46 -06:00
Brian
5052dabb44
mesa: misc sync-up with master
2008-03-27 16:05:40 -06:00
Brian
d46ac956db
raise GL_INVALID_OPERATION if glProgramString compilation fails
...
cherry-picked from master
2008-03-27 16:04:20 -06:00
Brian
4adee848a6
Fix the compile of disabled DEBUG_PARSING code.
...
cherry-picked from master
2008-03-27 15:54:44 -06:00
Brian
a072094bf0
make sure state token values are fully initialized
...
cherry-picked from master
2008-03-27 15:52:00 -06:00
Brian
50a20d4729
added program_error2() function for better error reporting
...
cherry-picked from master
2008-03-27 15:51:07 -06:00
Brian
7b91d87540
Fix state.texgen parsing error (bug 12313).
...
Replace *(*inst++) with *(*inst)++ in a few places.
Cherry-picked from master.
2008-03-27 15:48:54 -06:00
Brian
6f8286163c
gallium: Update calls to the simple shader functions
2008-03-27 15:43:32 -06:00
Brian
dccbfd8bf0
gallium: return pipe_shader_state from the simple shader functions
...
Allows us to fix a mem leak (tokens array).
2008-03-27 15:43:32 -06:00
Brian
89222ee49d
gallium: fix Element() macro redefinition warning
2008-03-27 15:43:32 -06:00
Brian
ba49fa39f3
gallium: fix incorrect types for shaders
2008-03-27 15:43:32 -06:00
Brian
df1744c043
gallium: remove temporary static var
2008-03-27 15:43:32 -06:00
Brian
d355eee5ca
gallium: silence unused var warning
2008-03-27 15:27:31 -06:00
Brian
132df5ebce
cell: include cell_state_per_fragment.h to silence warning
2008-03-27 15:27:14 -06:00
Brian
8b8a947111
cell: added (uint64_t) cast to silence warning
2008-03-27 15:26:54 -06:00
Brian
979358c471
cell: fix unclosed comment
2008-03-27 15:26:22 -06:00
Ian Romanick
70659e8ec8
xlib: Fix build error from recent fence changes
2008-03-26 10:52:08 -07:00
Ian Romanick
92126cea84
cell: Implement code-gen for logic op
...
This also implements code-gen for the float-to-packed color
conversion. It's currently hardcoded for A8R8G8B8, but that can
easily be fixed as soon as other color depths are supported by the
Cell driver.
2008-03-26 10:47:17 -07:00
Brian Paul
1ecb2e4a7a
gallium: need to call st_validate_state() in Bitmap()
2008-03-26 09:02:54 -06:00
Brian Paul
8cb85807d3
gallium: as for aapoints, make the extra texcoord per-shader state
2008-03-26 08:21:17 -06:00
Michel Dänzer
4abe1eb980
gallium: Change pipe->flush() interface to optionally return a fence.
...
The cell driver still uses an internal CELL_FLUSH_WAIT flag, in the long run
proper fencing should be implemented for it.
2008-03-26 09:36:40 +00:00
Brian
e55dccd0bf
gallium: the generic attrib we use for computing coverage is per-shader
...
Fixes a very tricky conformance failure.
2008-03-25 19:21:36 -06:00
Brian
9f7cd571e0
gallium: added fragment emit/write debug counters
2008-03-25 19:21:36 -06:00
Ian Romanick
542e3464a4
cell: Enable MIT-SHM on Cell.
2008-03-25 18:15:58 -07:00
Ian Romanick
b09de96a17
xlib: Add support for MIT-SHM in xlib winsys driver
...
Gives about a 3% performance increase in gears on x86-64 (non-tiled)
and about 10% performance increase in gears on Cell (tiled). I
actually expected more of a boost. :(
2008-03-25 18:15:58 -07:00
Ian Romanick
84d8030735
cell: Float convert-to and convert-from instructions use different shift bias
2008-03-25 18:15:58 -07:00
Michal Krol
e1543fa55c
draw: Take flatshade_first rasterizer bit into account.
2008-03-25 23:51:52 +01:00
Michal Krol
dc9757e1a8
gallium: Introduce flatshade_first field to rasterizer_state.
...
This bit tells us which vertex of the primitive is used to
propagate color for the remaining vertices if flatshade mode.
2008-03-25 23:51:51 +01:00
Brian Paul
7f56c8ea5f
gallium: disable the selection/feedback draw module's options for wide lines, points, etc.
...
Disable paths that would convert points/lines to tris as that upsets selection,
feedback, rastpos.
2008-03-25 14:12:55 -06:00
Brian Paul
070a744622
gallium: added some debug code (disable)
2008-03-25 12:30:05 -06:00
Brian Paul
cf7daba791
mesa: fix some issues in _mesa_combine_programs()
...
Use a temporay register to connect outputs of first program to inputs of
second program.
Also, fix bug in replace_registers(): didn't search/replace DstReg.
2008-03-25 12:30:05 -06:00
Keith Whitwell
05a4ecdec2
draw: vertex fetch can be validated too early leading to an assertion... disable
2008-03-25 18:15:58 +00:00
Keith Whitwell
cbec008491
draw: don't use fetch_and_store for bypass_vs mode, it's not quite right
2008-03-25 18:09:53 +00:00
Brian Paul
c0ef166474
mesa: append fog instructions after parsing if a fog option is set
...
Drivers don't have to worry about it then.
2008-03-25 11:47:35 -06:00
Brian Paul
bedb93e989
mesa: when negating scalar src args, use NEGATE_XYZW, not NEGATE_X
...
This makes things easier on the back-end when generating GPU code.
2008-03-25 11:47:35 -06:00
José Fonseca
331a56136e
Fix typo
2008-03-25 17:47:39 +00:00
Keith Whitwell
4505acf3b2
draw: take primitive into account when deciding if the pipeline is active
2008-03-25 15:22:32 +00:00
José Fonseca
aacfc326cc
gallium: Use debug_get_option for GETENV
2008-03-25 11:37:54 +00:00
José Fonseca
6fa0bd0671
gallium: Fix default option on Windows.
2008-03-25 11:37:24 +00:00
Brian Paul
d453042bc6
gallium: don't enable stencil test if no stencil buffer.
...
Also, if not doing two-sided stencil, set back-face state = front-face state.
2008-03-24 19:59:59 -06:00
Ben Skeggs
ce64778ed1
nv40: respect do_flip in surface_copy()
2008-03-25 12:58:57 +11:00
Brian
6579440ea9
gallium: be smarter about picking the sampler unit for pstipple, aaalines
...
Also, if the app really uses all available sampler/texture units, don't just
die. Just use the last sampler for the pstipple or aaline texture.
2008-03-24 19:36:44 -06:00
Ben Skeggs
9e1f7b2c57
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-25 12:14:49 +11:00
Ben Skeggs
601b018a9a
nouveau: refcount buffers on validate list.
2008-03-25 12:12:26 +11:00
Brian
4654803e25
gallium: fix a few bugs, warnings in the p_debug code
...
added missing _ to a _debug_printf() call.
2008-03-24 18:49:56 -06:00
Brian
d6af8fc51d
gallium: move sampler_unit field to pstip_fragment_shader since it's per-shader
...
Also, fix another texture refcounting bug.
2008-03-24 18:34:03 -06:00
Brian
e27127a61c
gallium: save/restore samplers in draw_textured_quad()
2008-03-24 18:34:03 -06:00
Brian Paul
f654ab40d6
mesa: call glutDestroyWindow (help find mem leaks)
2008-03-24 17:21:18 -06:00
Brian Paul
45cc35e776
gallium: fix a few texture border/mipmap glitches found w/ conform
2008-03-24 17:21:18 -06:00
Brian Paul
762e96c804
gallium: check SamplersUsed to determine if texture needed, as in st_atom_sampler.c
...
Otherwise, we were sometimes setting texture state but not the corresponding
sampler state.
2008-03-24 17:21:18 -06:00
Brian
ae146e4bc8
gallium: make a copy of the vertex shader's token array.
...
This solves problems when the state tracker frees the token array when the
draw module still needs it.
2008-03-24 16:35:25 -06:00
Brian
7f43029377
gallium: use pipe_texture_reference() in a few places (fixes refcounting bugs)
2008-03-24 16:35:25 -06:00
Brian
648e26aa95
gallium: added tgsi_num_tokens() function to return number of tokens in token array.
...
Maybe move to a different file someday.
2008-03-24 16:35:24 -06:00
José Fonseca
e8c6ea4f60
gallium: Simple cross platform get-opt system.
...
Uses getenv on Linux, and a memory mapped text file on Windows.
It supports boolean options, flags, and plain strings.
2008-03-24 22:31:36 +00:00
José Fonseca
dd51365acd
gallium: cleanup p_debug
...
Now debug_printf is disabled on release builds. Use debug_error or
_debug_printf to output messages on release versions.
2008-03-24 22:31:36 +00:00
Brian
d83e75c759
gallium: move filter assignment out of loop
2008-03-24 12:51:50 -06:00
Brian
4e398df682
gallium: fix REALLOC() to copy smaller of old/new sizes
2008-03-24 12:51:18 -06:00
José Fonseca
48726e129a
gallium: Protect operator precedence in macro.
2008-03-24 18:25:59 +00:00
Brian Paul
22a3d02254
gallium: free bitmap fragment shaders, misc clean-up
2008-03-24 11:56:05 -06:00
Brian Paul
d246274b9c
gallium: add missing cso_save_samplers() call
2008-03-24 11:56:05 -06:00
Michal Krol
bf8de6d4dc
gallium: Remove util_gen_mipmap_filter().
2008-03-24 16:50:39 +01:00
Brian
110b63d00f
gallium: pass the filter mode to util_gen_mipmap().
...
Remove util_gen_mipmap_filter() when no longer used.
2008-03-24 08:53:16 -06:00
Michal Krol
c8c373514a
gallium: tweak coords in u_gen_mipmap code
2008-03-24 08:09:34 -06:00
Keith Whitwell
e0a9ce10f4
draw: pre-declare referenced structs
2008-03-24 10:53:26 +00:00
Keith Whitwell
f4588c1752
Revert "draw: Fix #include order to fix Linux build."
...
This reverts commit a6d17bf671 .
2008-03-24 10:52:20 +00:00
Michel Dänzer
a6d17bf671
draw: Fix #include order to fix Linux build.
2008-03-24 09:56:12 +00:00
Ben Skeggs
5ce37d42b3
nv40: maintain pipe_surface status field
2008-03-24 13:45:38 +11:00
Ben Skeggs
799d3bce06
nv40: respect rasterizer cso bypass_clipping flag
2008-03-24 13:41:40 +11:00
Ben Skeggs
46a7f297a1
nouveau: fix infinite wait on space for userbuf.
...
A recent commit removed a bug which essentially caused a sync after each
use of a user buffer. In fixing it, the scratch area can now become
fragmented under some circumstances leading to nouveau_bo_tmp() waiting
forever for a large enough block of free space.
This fixes ppracer, gl-117 and probably a heap of other apps.
2008-03-24 13:06:29 +11:00
Keith Whitwell
3b217c7fa7
draw: check need_pipeline() in passthrough
2008-03-23 21:55:19 +00:00
Keith Whitwell
3e9b1bc100
draw: tweak the definition of draw_need_pipeline, fix minor bug
2008-03-23 21:54:44 +00:00
Keith Whitwell
e6ea786c00
draw: fix crlf
2008-03-23 21:31:52 +00:00
Keith Whitwell
743e990831
draw: rename emit functions to match pipe_format names
2008-03-23 21:31:52 +00:00
Keith Whitwell
899fcde366
draw: restructure fetch/emit as a pair of function calls
2008-03-23 21:31:52 +00:00
Michal Krol
6edaef5318
gallium: Add util_gen_mipmap_filter().
...
We need a way to specify the type of minification filter
used to downsample mipmap levels.
The old util_gen_mipmap() retains its behaviour and uses
LINEAR filter.
2008-03-23 20:40:56 +01:00
José Fonseca
38dc0f809d
gallium: Fix memory leak.
...
pipe cso's were being destroyed, but the hash elements themselves not.
proper fix is IMHO add a destructor callback to cso_hash.
2008-03-23 19:38:11 +00:00
José Fonseca
48ef11d308
gallium: Remove the debug_mask_* stuff.
...
Overcomplex and not much different from using a global variable...
2008-03-23 18:57:35 +00:00
José Fonseca
d09b92d7e4
gallium: Fix typo.
2008-03-23 18:52:37 +00:00
José Fonseca
732422f670
gallium: Memory debugging utilities.
...
There are no known tools for windows kernel memory debugging, so this is a
simple set of malloc etc wrappers.
Enabled by default on win32 debug builds
2008-03-23 18:38:31 +00:00
José Fonseca
312cbc5a5c
gallium: wrap decls in extern "C"
2008-03-23 18:38:31 +00:00
Keith Whitwell
301b187ca9
draw: fix some unsigned vs ushort confusion
...
Middle-end elements are ushort, but prior to that have to treat all
elements as unsigned to avoid wrapping and/or overruns.
2008-03-23 18:21:00 +00:00
Keith Whitwell
f40357e25c
gallium: beginnings of draw module vertex rework
...
Trying to put a structure in place that we can actually optimize.
Initially just implementing a passthrough mode, this will fairly soon
replace all the vertex_cache/prim_queue/shader_queue stuff that's so
hard to understand...
Split the vertex processing into a couple of distinct stages:
- Frontend
- Prepares two lists of elements (fetch and draw) to be processed
by the next stage. This stage doesn't fetch or draw vertices, but
makes the decision which to draw. Multiple implementations of this
will implement different strategies, currently just a vcache
implementation.
- MiddleEnd
- Takes the list of fetch elements, fetches them, runs the vertex
shader, cliptest, viewport transform on them to produce a
linear array of vertex_header vertices.
- Passes that list of vertices, plus the draw_elements (which index
into that list) onto the backend
- Backend
- Either the existing primitive/clipping pipeline, or the vbuf_render
hardware backend provided by the driver.
Currently, the middle-end is the old passthrough code, and it build hardware
vertices, not vertex_header vertices as above. It may be that passthrough
is a special case in this respect.
2008-03-23 17:36:49 +00:00
Ben Skeggs
17491ea27f
nv40: vp reg changes similar to recent fp changes
2008-03-23 19:08:59 +11:00
Ben Skeggs
e1ad8c232b
nv40: fix fp depth write
2008-03-23 18:20:04 +11:00
Ben Skeggs
4dfcf91296
nv40: remove some badness from fp temp/result allocation
...
Should hopefully be OK now (on the fragprog size) for MRT. The hack from
a commit 01cb2cd93e is no longer needed.
2008-03-23 18:15:41 +11:00
Ben Skeggs
3158035154
nv40: catch fp extra-const cases where both const and immd have same idx
2008-03-23 16:32:00 +11:00
Ben Skeggs
ba223e91df
nv40: fp: fix multiple refs to a single const withing an instruction
2008-03-23 16:26:42 +11:00
Ben Skeggs
01cb2cd93e
nv40: workaround fp result.data[0] clobberage
...
Temporary, the fp reg handling will get reworked at some point in the near
future. But before that, there's a few bugs to find.
2008-03-23 16:11:03 +11:00
Ben Skeggs
62a8e7685f
nv40: add dxtn formats (disabled)
2008-03-23 14:29:35 +11:00
Ben Skeggs
dcf04ee23c
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-23 14:18:06 +11:00
Brian
a35c1ca3ad
gallium: fix a few more shader-related mem leaks
2008-03-22 10:29:30 -06:00
Brian
f8acc3965e
use ctx->Driver.DeleteProgram() in a few more places
2008-03-22 10:27:55 -06:00
Brian
dae7993afc
gallium: free samplers, textures in destroy()
2008-03-22 09:42:59 -06:00
Brian
2f8f6c2918
gallium: remove temporary _screen suffix from function names
2008-03-22 09:15:23 -06:00
Brian
0b60ade834
gallium: fix a few mem leaks when deleting programs
2008-03-22 09:12:52 -06:00
Brian
28b3b07895
gallium: fix mem leak (fee pstipple stage)
2008-03-22 09:12:27 -06:00
Brian
f73cfd9e5c
delete default programs with ctx->Driver.DeleteProgram()
2008-03-22 09:12:02 -06:00
José Fonseca
4e977fb35b
gallium: Remove pedantic asserts.
...
Move these to a higher level instead.
2008-03-22 10:59:52 +00:00
Ian Romanick
47531442e9
cell: Generate blend / depth test code when state atom is created
...
Code generation should be performed when the device-specific state
atom is created, not when it is bound.
2008-03-21 15:57:01 -07:00
Ian Romanick
600499cf88
cell: Change code-gen for CONST_COLOR blend factor
...
Previously the constant color blend factor was compiled into the
generated code. This meant that the code had to be regenerated each
time the constant color was changed. This doesn't fit with the model
used in Gallium.
As-is, the code could be better. The constant color is loaded for
every quad processed, even if it is not used. Also, if a lot of (1-x)
blend factors are used, 1.0 will be loaded and reloaded into registers
many times.
2008-03-21 15:57:01 -07:00
Ian Romanick
f140062b72
Tabs to spaces
2008-03-21 15:57:01 -07:00
Ian Romanick
2902c164a2
cell: Remove unnecessary default_blend work-around
...
I suspect that there was some other bug in the blend code-gen that
made this work-around necessary.
2008-03-21 15:57:01 -07:00
Brian
fb1f4e207d
gallium: fix const buffer update bug
...
If only glUniform is called between two renderings, the const buffers weren't
getting updated. Need to set the _NEW_PROGRAM flag in st_upload_constants()
as that's the dirty flag set by glUniform.
Fixes glean tapi2 test.
2008-03-21 15:54:27 -06:00
Brian
a39091bc5b
Refactor PBO validate/map code.
...
We always need to do PBO validation, so do that in core Mesa before calling driv
er routine.
cherry-picked from Mesa/master.
2008-03-21 14:20:07 -06:00
Brian Paul
f1626f0bfd
gallium: implement PBO operations for glDraw/ReadPixels and glBitmap
...
At this time there are no optimizations for directly blitting between
buffer objects and surfaces (always go through mappings).
glean pbo test passes now
2008-03-21 13:44:27 -06:00
Brian Paul
ff938bf059
add a number of PBO validate/map/unmap functions
...
Helper functions for (some) drivers, including swrast.
cherry-picked from Mesa/master
2008-03-21 13:43:07 -06:00
Brian
c80a380ebb
Fix some PBO breakage.
...
In _mesa_Bitmap, can't early return if bitmap ptr is NULL, it may be an offset
into a PBO. Similarly for _mesa_GetTexImage.
2008-03-21 12:32:48 -06:00
Brian
b70a6babfb
i915: added to-do note about setting the max_lod register to get proper min/mag filter selection
2008-03-21 11:10:42 -06:00
Brian Paul
74525d474c
mesa: minor code re-org
2008-03-21 11:06:52 -06:00
Brian Paul
3600e7402c
gallium: use is_format_supported(PIPE_FORMAT_DXT5_RGBA) to check if s3tc is supported
...
The PIPE_CAP_S3TC token will be deprecated.
2008-03-21 11:06:52 -06:00
Brian Paul
4394736252
gallium: added DXT formats (preliminary, will probably change)
2008-03-21 11:06:52 -06:00
Brian Paul
13540d38d9
gallium: use is_format_supported() to determine if GL_EXT_texture_sRGB is supported
2008-03-21 11:06:52 -06:00
Brian Paul
419248b528
gallium: document is_format_supported()'s type param
2008-03-21 11:06:52 -06:00
Brian Paul
a472e3558e
gallium: PIPE_FORMAT_TYPE_ comments
2008-03-21 11:06:52 -06:00
Brian Paul
ad62644290
gallium: added sRGB formats
2008-03-21 11:06:51 -06:00
Brian Paul
403c7ba91a
gallium: additional comments, fix typos, etc
2008-03-21 11:06:51 -06:00
Ben Skeggs
75b85fd33a
nv40: fix bug in query code
2008-03-21 23:24:16 +11:00
Michel Dänzer
23c98f618b
gallium: Update scons build for state tracker files added/removed.
2008-03-21 12:14:06 +00:00
Ben Skeggs
3be8785e08
nv40: add 16-bit SSCALED vb formats
2008-03-21 23:09:01 +11:00
Ben Skeggs
3a0dd2e6d1
nv40: ensure vb relocs don't end up on list for swtnl
...
Avoids bo code bailing out because of mapped buffers being validated.
2008-03-21 23:03:25 +11:00
Ben Skeggs
19b57690ad
nv40: call semi-magic 0x1d88 method
2008-03-21 22:28:18 +11:00
Ben Skeggs
308d7b1711
nv40: swtnl fallback on unsupported array format
2008-03-21 22:09:29 +11:00
Ben Skeggs
0c91f5991d
nv40: oops
2008-03-21 22:02:49 +11:00
Ben Skeggs
46b8dd9c16
nv40: s/free/FREE/
2008-03-21 22:01:22 +11:00
Ben Skeggs
3216287139
nv40: align each level to 64 pixels
2008-03-21 21:58:17 +11:00
Ben Skeggs
ebde8d3a12
nv40: use num_cbufs
2008-03-21 21:18:16 +11:00
Ben Skeggs
1a4dcde808
nouveau: do a retry if initial buffer alloc fails
2008-03-21 18:28:07 +11:00
Ben Skeggs
83e94189c4
nouveau: use saved fence pointer, not head of unsignalled list
...
It's possible for the unsignalled list head to change during fence_flush.
Fixes valgrind complaint exposed by a previous commit.
2008-03-21 18:17:12 +11:00
Ben Skeggs
735ecf5de8
nouveau: potentially delay buffer destruction
...
Rather than spinning waiting for the GPU to finish with the buffer,
add a callback on the buffer's fence object instead. Gives a sizable
performance increase in OA.
2008-03-21 17:40:01 +11:00
Ben Skeggs
5d2577e576
nouveau: try combining prev and next resources on free
...
Fixes some cases where we end up with a list of many unused chunks that are
too small to be useful.
2008-03-21 17:38:24 +11:00
Ben Skeggs
95e8cad9a3
nv40: use new pipe_framebuffer width/height fields
2008-03-21 12:57:05 +11:00
Ben Skeggs
85108e5f8f
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-21 12:54:34 +11:00
Ian Romanick
cab68957c7
cell: Fix several bugs in blend code-gen
...
- Alpha factor set to a _COLOR mode was mishandled
- Cases when either dst factor or src factor was ZERO were mishandled
- MIN and MAX cases were backwards
- Case when blend was disabled was mishandled
- Incorrect comments about number of instructions generated
The tests blendminmax and blendsquare run correctly.
2008-03-20 18:17:48 -07:00
Ian Romanick
4b9520fc05
cell: Call the correct function to generate blending code
...
Cut-and-paste for the lose. :(
2008-03-20 17:37:26 -07:00
Ian Romanick
df1d6e2410
cell: Fix bus error when there is no depth buffer
2008-03-20 17:37:26 -07:00
Ian Romanick
2b21bde3b1
cell: Use code-gen for alpha blend
...
So far this is only tested when GL_BLEND is disabled.
2008-03-20 17:37:26 -07:00
Brian Paul
3b3774b122
gallium: catch some out of memory conditions in the texture image code.
...
st_finalize_texture()'s return code now indicates success/fail instead of
presence of texture border (which we discard earlier).
2008-03-20 17:08:07 -06:00
Brian
0565e6888a
gallium: set fb.width/height
2008-03-20 15:22:20 -06:00
Brian
00cf178d93
gallium: enable vp input semantic info
2008-03-20 15:21:55 -06:00
Brian
09f67990ab
gallium: use new framebuffer width, height fields
2008-03-20 15:04:08 -06:00
Brian
2fb30b77ad
cell: use pipe_framebuffer_state.width, height
2008-03-20 15:04:08 -06:00
Brian
3a4ece89a7
gallium: assign framebuffer width, height
2008-03-20 15:04:08 -06:00
Brian
f3d23aa787
gallium: unused var silence warning
2008-03-20 15:04:08 -06:00
Brian
80567f9c9f
gallium: added width, height to pipe_framebuffer_state
2008-03-20 15:04:08 -06:00
Brian
f6cd3778c5
gallium: glBitmap code now separe from glDraw/CopyPixels code
...
Also, glBitmap now re-uses the vertex buffer to avoid frequent allocations/
deallocations. And, use u_simple_shaders utility code.
2008-03-20 15:04:08 -06:00
Brian
3ece9ace54
gallium: glBitmap code now separated from glDraw/CopyPixels code
2008-03-20 15:04:08 -06:00
Brian
b028d32af4
gallium: create one vertex buffer and re-use
2008-03-20 15:04:08 -06:00
Brian
18be9a588a
gallium: use sizeof(vertex buffer)
2008-03-20 15:04:08 -06:00
Brian
3aa8c660ff
gallium: Y-invert blit depending on framebuffer orientation
2008-03-20 15:04:08 -06:00
Brian
c2044eaca9
gallium: in clear_with_quad() check fb orientation, invert Y if needed
2008-03-20 15:04:08 -06:00
José Fonseca
9fa88fb3c5
gallium: Give some chance for the table to actually grow.
2008-03-20 20:40:50 +00:00
Michal Krol
400b12b4ce
gallium: Fix build on Windows.
2008-03-20 20:34:03 +01:00
Michal Krol
482f499525
gallium: Fix build on Windows.
2008-03-20 20:28:06 +01:00
Keith Whitwell
f259ea0347
gallium: remove unused local var
2008-03-20 19:25:44 +00:00
Brian
e1406c8d23
gallium: create one vertex buffer and re-use, also enable bypass_clipping
...
Quad clears should be a little more efficient now.
2008-03-20 10:46:44 -06:00
Brian
309d6e52c5
gallium: create vertex buffer once and re-use.
2008-03-20 10:44:51 -06:00
Brian
8c71406c74
gallium: added util_draw_vertex_buffer()
2008-03-20 10:44:27 -06:00
Brian
8dd90ee19d
gallium: temporarily disable the memcmp() in cso_set_framebuffer()
...
The memcmp() fails to detect buffer size changes...
2008-03-20 09:15:24 -06:00
Brian
85e4ec6d11
gallium: use the utility pasthrough shaders
...
This avoids the Mesa->TGSI translation step.
2008-03-20 09:13:51 -06:00
Brian
6a9a3afcf9
gallium: added util_make_fragment_passthrough_shader()
2008-03-20 09:11:27 -06:00
Ben Skeggs
1d9049c4df
nouveau: match gallium API changes
2008-03-21 00:18:18 +11:00
Ben Skeggs
c7e9cb1093
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-21 00:11:25 +11:00
Keith Whitwell
a88202d3b0
gallium: add debug facility to dump random blobs as hex
2008-03-20 13:10:32 +00:00
Brian Paul
122ed506f4
gallium: added fb_width/height fields to softpipe context
...
These are convenience fields. Otherwise, we have to check cbuf[0] or zsbuf
in various places.
2008-03-19 18:10:09 -06:00
Brian Paul
ba31cf6855
better text labels
2008-03-19 17:15:14 -06:00
Brian Paul
4984487bc3
gallium: add face, dirtyLevels params to pipe->texture_update()
...
This provides better information about which images in texture object have changed.
Also, call texture_update() from more places previously missed.
2008-03-19 17:15:14 -06:00
Brian Paul
11c34dc644
gallium: need to set/save framebuffer state in st_context since we use it elsewhere
2008-03-19 17:15:14 -06:00
Brian Paul
b45669283f
gallium: fix bug in cso_single_sampler_done() in computation of nr_samplers
...
Need to find highest used sampler so search from end toward beginning.
2008-03-19 17:15:14 -06:00
José Fonseca
df5ba799fa
gallium: Fix broken logic.
2008-03-19 20:46:08 +00:00
Keith Whitwell
b4f03d0c98
gallium: explict float casts
2008-03-19 17:35:42 +00:00
Brian
7d95efde0a
gallium: implement CSO save/restore functions for use by meta operations (blit, gen-mipmaps, quad-clear, etc)
...
Also, additional cso_set_*() functions for viewport, framebuffer, blend color,
etc. state.
2008-03-19 11:14:18 -06:00
Brian
1213c72573
gallium: remove old commented-out code
2008-03-19 11:14:18 -06:00
Brian
4b39ba7216
gallium: set tc->surface_map = NULL after unmapping
2008-03-19 11:14:18 -06:00
José Fonseca
e08501b457
gallium: Add generic enum and flags dumping utility functions.
2008-03-19 16:42:19 +00:00
Ben Skeggs
62767cf2dd
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-19 22:51:17 +11:00
Ben Skeggs
176df85568
nv40: "implement" noise opcodes in fragprog
...
For the moment, we do what NVIDIA does and return 0 unconditionally. This
isn't correct, but it's an implementation at least.
2008-03-19 22:50:42 +11:00
Ben Skeggs
9575e35807
nouveau: pass nvws to nvws->push_* functions, rather than nouveau_channel*
2008-03-19 22:50:42 +11:00
Alan Hourihane
ec890533c2
set outputs_safe to 0 as it's possible for the code generation
...
to slip over the allocated memory for the vb.
2008-03-19 00:18:37 +00:00
Alan Hourihane
6a8bbdba18
remove redundant init
2008-03-19 00:18:37 +00:00
Brian
9f50a6a24c
gallium: added braces to silence warning
2008-03-18 17:19:57 -06:00
Brian
0df877a0ee
gallium: plug in and init GL_EXT_framebuffer_blit function/extension
2008-03-18 17:18:11 -06:00
Brian
ecb873b2b5
gallium: added st_cb_blit.c
2008-03-18 17:18:11 -06:00
Brian
d946b55543
gallium: s/copy_pixels_state/blit_state
2008-03-18 17:18:11 -06:00
Brian
e5b19a0f83
gallium: added cso_unset_*() functions
...
If we go behind the CSO context's back and set pipe state directly we
need to invalidate the CSO's 'current' pointers.
This will be revisited...
2008-03-18 17:18:11 -06:00
Brian
84836ffce1
gallium: glFramebufferBlitEXT() implementation
2008-03-18 17:18:11 -06:00
Brian
320da13c87
gallium: fix typos
2008-03-18 17:18:11 -06:00
Brian
0abe462128
gallium: new pixel blit code
...
Copy rectangular region from one surface to another w/ scaling.
Disables most fragment operations.
2008-03-18 17:18:11 -06:00
Brian
18f9fa9e71
gallium: protect against multi-#include
2008-03-18 17:18:10 -06:00
Brian
8de9503d5d
added u_simple_shaders.c
2008-03-18 17:18:10 -06:00
Brian
e5a20499d8
gallium: make the gen_mipmap_state struct private
2008-03-18 17:18:10 -06:00
Brian
4bd2b74441
gallium: use new simple shader utility routines
2008-03-18 17:18:10 -06:00
Brian
31970c4633
gallium: utilities for creating simple vertex/fragment shaders
2008-03-18 17:18:10 -06:00
Brian
bab9209e12
gallium: restore additional state after clearing with quad
2008-03-18 17:18:10 -06:00
Ian Romanick
fe40dae02d
cell: Fix various stencil test code-gen bugs
2008-03-18 16:00:49 -07:00
Ian Romanick
fa69a6e1bb
cell: Correctly load stencil for PIPE_FORMAT_S8Z24_UNORM
2008-03-18 16:00:49 -07:00
Patrice Mandin
75e714d476
nv30: disable emit texture image in state_emit, already done in fragtex
2008-03-18 21:50:01 +01:00
Keith Whitwell
35a1ec53a7
gallium: make REALLOC a bit more like realloc
2008-03-18 19:17:26 +00:00
Ian Romanick
17b234ae33
cell: Fix depth read / write for s8z24.
...
Stencil is still broken.
2008-03-18 11:47:37 -07:00
Ian Romanick
f3e686d24a
cell: Fix added whitespace errors.
2008-03-18 10:29:14 -07:00
Ian Romanick
5fdaebc51c
cell: Minor changes to make stencil not crash
...
I'm not sure these are quite correct. The reflect demo doesn't assert
anymore, but it doesn't produce correct results either. SPE-based
vertex shader code needs to be disabled for relfect to run.
2008-03-18 10:28:39 -07:00
Ian Romanick
f432ac5a11
cell: Move and (conditionally) silence debug code
2008-03-18 10:28:39 -07:00
José Fonseca
527e30c53b
d3d: Allow to iterate over the handle table.
2008-03-18 17:20:56 +00:00
José Fonseca
d26139d6a1
d3d: Add function to walk through all items in the hash table.
2008-03-18 17:20:56 +00:00
José Fonseca
56ac9eb1f6
gallium: Don't be pedantic about removing non exiting items from the table.
2008-03-18 17:20:56 +00:00
José Fonseca
d1ca951cc4
gallium: Convenience debug_warning function.
2008-03-18 17:20:56 +00:00
Brian
e8f8b12bb9
gallium: fix a mix-up in the uint[1] do_row() case
2008-03-18 09:28:04 -06:00
Brian
f1cfb1e367
gallium: use new color packing utility functions
2008-03-18 09:24:01 -06:00
Brian
544c27bcef
gallium: utility for packing color, z values according to pipe_format
2008-03-18 09:24:01 -06:00
Michal Krol
b2b905b04c
gallium: Silencium warnings on Windows.
2008-03-18 15:59:55 +01:00
Patrice Mandin
e4b5008de4
nv30: hmm, no buffer for texture
2008-03-18 13:34:26 +01:00
Patrice Mandin
a514aeb778
nv30: update miptree stuff for texturing
2008-03-18 13:20:59 +01:00
Brian
de779c8d31
gallium: initial gen mipmap s/w fallback code
2008-03-17 17:45:00 -06:00
Ian Romanick
9f93e67019
cell: Don't segfault when unbinding alpha / stencil / depth test state
2008-03-17 16:09:28 -07:00
Ian Romanick
9f106a8683
cell: Don't free NULL code pointers
2008-03-17 16:07:54 -07:00
Ian Romanick
1936e4bdfd
cell: Initial code-gen for alpha / stencil / depth testing
...
Alpha test is currently broken because all per-fragment testing occurs
before alpha is calculated.
Stencil test is currently broken because the Z-clear code asserts if
there is a stencil buffer.
2008-03-17 15:47:45 -07:00
Ian Romanick
0c715de39f
cell: Fix simple register allocator
...
THere are 64-bits in a uint64_t, not 128. Duh.
2008-03-17 15:47:45 -07:00
Brian Paul
5456f4f210
mesa: new mipmap generation, lod bias demo
...
Show each of the mipmap levels side-by-side.
Press 's' to toggle quad scaling to see mipmap level at actual size.
2008-03-17 16:03:06 -06:00
Brian
088c6404fc
gallium: use new gallium utility code for generating mipmaps
2008-03-17 15:48:13 -06:00
Brian
11d723cda6
gallium: added new u_draw_quad.c and u_gen_mipmap.c files.
2008-03-17 15:39:19 -06:00
Brian
f1b42595d0
gallium: new mipmap generation code
...
Based on code from Mesa's state tracker.
Still need to implement fallbacks for those texture formats which can't
generally be rendered to.
2008-03-17 15:38:14 -06:00
Brian
e3a747f1fe
gallium: new util_draw_texquad() function.
2008-03-17 15:37:42 -06:00
Brian Paul
22b9cc3f5f
gallium: set min_mip_filter = PIPE_TEX_MIPFILTER_NEAREST
...
Plus, comments, clean-ups.
2008-03-17 12:38:24 -06:00
Patrice Mandin
3394ba65b1
nv30: another 2 rt, and set viewport tx origin, so we render at the proper place \o/
2008-03-17 19:03:38 +01:00
Patrice Mandin
a33da10b6c
nv30: only 2 render targets
2008-03-17 18:13:40 +01:00
Brian Paul
a2ab6930df
gallium: in gen_mipmap, also set sampler lod_bias and do a flush() after rendering each level
2008-03-17 09:42:08 -06:00
Markus Amsler
f3c490634f
only set InputsRead bit if input is really used
2008-03-17 08:35:37 -06:00
Ben Skeggs
6b32699001
nv40: a few more fp opcodes
2008-03-17 23:05:46 +11:00
Keith Whitwell
9425a702be
gallium: improvements, or extensions at least, to the passthrough path
...
Passthrough is actually more tricky than you'd think...
2008-03-17 10:10:45 +00:00
Ben Skeggs
f93386de0f
nouveau: create fence object when allocating pushbuf, instead of submit
2008-03-17 14:45:19 +11:00
Ben Skeggs
767cd2ed6e
nv40: workaround main swtnl breakage
...
Not sure where the real bug is here yet, but for now this gives us correct
rendering in far more cases than previously.
2008-03-17 13:53:44 +11:00
Stephane Marchesin
5c15b1276e
nv10: fixes.
2008-03-17 03:32:07 +01:00
Stephane Marchesin
b2f01b0777
nouveau: latest header.
2008-03-17 03:14:11 +01:00
Brian
49a687882a
gallium: finish remaining prim types for sp_vbuf_draw_arrays()
...
Not totally tested, but easily fixed if glitches are found.
2008-03-16 10:33:59 -06:00
Ben Skeggs
e1cf3f00e5
nv40: simple swtnl path (half broken, but getting there)
2008-03-16 18:13:34 +11:00
Ben Skeggs
7d2c63e909
nv10: fix build after merge
2008-03-16 12:55:13 +11:00
Ben Skeggs
c4354f8460
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-16 12:49:46 +11:00
Patrice Mandin
5e17088ee3
cso_context_destroy calls bind_state functions with NULL parameter
2008-03-15 16:45:49 +01:00
Stephane Marchesin
d493203045
nv10.
2008-03-15 05:37:57 +01:00
Stephane Marchesin
509044609d
nouveau: latest header.
2008-03-15 04:43:12 +01:00
Stephane Marchesin
9a3320e079
nv30: only 2 RTs.
2008-03-15 04:42:48 +01:00
José Fonseca
cb98f71d42
gallium: Ensure we don't add null objects to the table, as they mark empty handles.
2008-03-15 01:35:18 +00:00
Brian Paul
c2bf23b837
mesa: clamp point size in vertex program when computing attenuated size
2008-03-14 17:47:11 -06:00
Brian Paul
cbf42c45a1
gallium: if point size not computed per vertex, apply size clamp immediately.
...
Fixes glean pointAtten failure.
2008-03-14 17:45:27 -06:00
Brian
5a09ad8248
gallium: add explicit control for point sprites (convert points to textured quads)
...
New draw_enable_point_sprites() function.
Fixes spriteblast.c demo
2008-03-14 16:13:35 -06:00
Brian
344356a0ed
gallium: remove DOS carriage returns
2008-03-14 16:01:24 -06:00
Brian
08e341e5dc
gallium: remove DOS carriage returns
2008-03-14 16:01:23 -06:00
Michal Krol
f23207ca57
tgsi: Use debug_printf().
2008-03-14 21:44:06 +01:00
Michal Krol
2b8f31a6da
scons: Remove second occurence of draw_passthrough.c.
2008-03-14 21:40:32 +01:00
Brian Paul
a9aef5fccd
mesa: init tmpNode to zeros
2008-03-14 14:14:13 -06:00
Brian Paul
7dc449d406
mesa: fix emit_clamp() so that we don't use an output register as temporary
...
IR_CLAMP is decomposed into OPCODE_MIN+OPCODE_MAX. Allocate a temporary
register for the intermediate value so we don't inadvertantly use an output
register (which are write-only on some GPUs).
2008-03-14 13:50:01 -06:00
Brian Paul
14150bc856
mesa: call glColorMask(1,1,1,1) before glClear()
...
Without this, second and subsequent redraws rendered incorrectly.
Plus comments.
2008-03-14 11:35:57 -06:00
Brian Paul
9de9e1fe8c
gallium: print warning rather than assert(0) for LOG/EXP opcodes
...
Glean vertProg1 runs all the way through, rather than aborting.
2008-03-14 11:24:28 -06:00
Brian
3088eb5949
gallium: added some debug code (disabled)
2008-03-14 10:23:56 -06:00
Brian
027433176c
i915: check for NULL const buffer ptr
2008-03-14 10:23:56 -06:00
Brian
a254d0c368
gallium: added dummy install target
2008-03-14 10:23:56 -06:00
Brian
c45a525cdc
mesa: revert fast-track glColor and similar calls when not immediate mode rendering
...
Revert commit d08cd68d3f
This change caused some glean tests to fail. The alpha value of colors was
always 1.0 instead of the value from glColor4fv(). The mesa color array
found in st_draw() has size=3 instead of size=4.
2008-03-14 10:23:56 -06:00
Brian
ee55eaa609
gallium: in st_program_string_notify() free shader tokens.
...
When the shader instructions change, free the TGSI tokens. This signals the
state tracker to recompile the shader. Fixes a regression caused by recent
shader/state-tracker changes.
2008-03-14 10:23:56 -06:00
Keith Whitwell
e4cdce43ce
gallium: fix some compiler warnings
2008-03-14 08:42:45 +00:00
Keith Whitwell
d34bc880a4
tgsi: add debug_printf version of tgsi_dump
2008-03-14 08:42:08 +00:00
Brian
78302c7ca3
gallium: need to all draw_flush() in softpipe_unmap_constant_buffers()
...
Otherwise, we won't have our constants when we run the fragment shader.
Fixes crash in glsl tests when SP_VBUF=1.
2008-03-13 18:19:47 -06:00
Brian
34be396950
gallium: fix EMIT_HEADER case in draw_vf_set_vertex_info()
2008-03-13 17:39:30 -06:00
Brian
d088d640fc
gallium: plug in vertex passthrough code
...
Based on a patch from Zack.
Basically, implement a new draw_arrays function that copies the incoming
user-vertices to the hardware vertex buffer, doing format/type conversion
as needed.
The vertex fetch/store code is totally temporary for now.
2008-03-13 17:10:28 -06:00
Brian
5bae5871f0
gallium: for TEST_DRAW_PASSTHROUGH, pass inClipCoords=FALSE to st_draw_vertices()
...
When pass-through mode is fully supported we'll clean this up more.
2008-03-13 17:06:13 -06:00
Brian
ce49c4c24b
gallium: fix bug in draw_num_vs_outputs()
2008-03-13 17:04:56 -06:00
Brian
cf106789ab
gallium: added EMIT_HEADER case
2008-03-13 17:04:04 -06:00
Brian
269fbeb545
gallium: in softpipe_get_vertex_info() generate a vbuf vertex_info with real attribs
...
Can't use the EMIT_ALL shortcut/optimization anymore because of passthrough mode.
2008-03-13 16:57:57 -06:00
Brian
13334c8dd2
gallium: added EMIT_HEADER case in emit_vertex()
2008-03-13 16:57:37 -06:00
Brian
b9518a4e39
gallium: added new EMIT_HEADER token
...
Used to emit the struct vertex_header info for softpipe.
Before we were using the EMIT_ALL token but that's insufficient for the
draw pass-through mode. EMIT_ALL might get removed soon...
2008-03-13 16:55:48 -06:00
Brian
7d5e38a55a
gallium: plug in new sp_vbuf_draw_arrays() function
...
Will be used for pass-through mode.
Also, call draw_set_render() to register the vbuf stage. Should probably
rename that function to something like draw_set_vbuf_stage().
2008-03-13 16:53:44 -06:00
Brian
3e625ce18e
gallium: add some temporary code for testing draw module vertex passthrough
...
Set TEST_DRAW_PASSTHROUGH=1, run progs/trivial/clear-scissor
2008-03-13 15:08:18 -06:00
Brian
69c39b9ae2
gallium: set surface status to CLEAR or DEFINED in clearing/drawing code.
...
Otherwise, we were never setting these flags. This confused the state tracker.
Fixes progs/demos/texenv.c, probably others.
2008-03-13 15:08:18 -06:00
Zack Rusin
a889928d85
add a way of removing an exact iterator from the hash
2008-03-13 16:41:37 -04:00
Brian
3faf6230ff
gallium: added draw_need_pipeline() predicate function
...
To test if we need any pipeline stage, or whether we can go into passthrough mode.
2008-03-13 14:34:35 -06:00
Brian
8b8c9acdb7
gallium: added draw_enable_line_stipple() function
...
Allows drivers that implement line stipple to turn off this drawing stage.
2008-03-13 14:33:57 -06:00
Brian
b6ed165748
gallium: added bypass_vs flag to rasterizer state (may be temporary)
2008-03-13 14:32:20 -06:00
Ian Romanick
3115e8c968
cell: Fix to work with commit fa9e7e9a8d
2008-03-13 13:10:16 -07:00
Brian Paul
b12a28db96
gallium: remove dead code related to shader semantic input/output info
2008-03-13 14:05:30 -06:00
Brian Paul
7ffbaebce1
gallium: fix bug in stip_first_tri()
...
Need to compute num_samplers after binding/creating the fragment shader.
2008-03-13 13:22:51 -06:00
Brian Paul
cb294542bc
gallium: remove a debug printf
2008-03-13 13:22:51 -06:00
Ian Romanick
6472138045
Replicate TXP changes in the SPU version of TGSI exec
...
Replicate changes from commit ba75e82b6e
in spu_exec.c
2008-03-13 11:21:14 -07:00
Brian Paul
fa9e7e9a8d
gallium: remove semantic info from pipe_shader_state
...
Brian's patch to clean up the shader interfaces.
2008-03-13 18:10:26 +00:00
Keith Whitwell
b0d5519b44
gallium: make the windows config function more readable with 80-ish columns
2008-03-13 18:10:26 +00:00
Michal Krol
bcb454e7a6
tgsi: Drop pre-ps_2_0 opcodes.
2008-03-13 18:12:36 +01:00
Michal Krol
78ddfbd130
tgsi: Remove OPCODE_TEXCOORD, OPCODE_TEXCRD aliases.
2008-03-13 13:00:44 +01:00
José Fonseca
42f2868416
gallium: General purpose hash table, which is actually just a convenient frontend to cso_hash.
2008-03-13 10:23:02 +00:00
José Fonseca
734ccee565
gallium: Standardize most important error codes.
2008-03-13 10:23:02 +00:00
José Fonseca
e584eb888f
gallium: Add a bit of documentation to cso_hash.
2008-03-13 10:23:02 +00:00
José Fonseca
8506e41dc0
gallium: Fix debug_mask_vprintf's example.
2008-03-13 10:23:02 +00:00
José Fonseca
192d1cbbdf
gallium: Add a new handle_table_set that accepts an arbitrary handle.
2008-03-13 10:23:02 +00:00
Keith Whitwell
92523ad0fd
mesa: fix (harmless?) assignment in assert
2008-03-13 10:14:21 +00:00
Keith Whitwell
ddb4e5cbac
tgsi: replace erroneous use of FETCH with emit_tempf
2008-03-13 10:02:38 +00:00
Keith Whitwell
5ba2f0a507
tgsi: bump MAX_SRC_REGS to 4, for TXD
2008-03-13 10:02:38 +00:00
Ben Skeggs
1cec61e441
nouveau: NV9X is basically a G80, fix issue with NV6X being detected as G80.
2008-03-13 18:08:22 +11:00
Zack Rusin
cac037d36d
add code handling dependencies between generated code
2008-03-12 22:57:52 -04:00
Ben Skeggs
9a4938d703
nouveau: match interface changes
2008-03-13 13:39:16 +11:00
Ben Skeggs
03ec663758
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
2008-03-13 13:39:05 +11:00
Zack Rusin
2366bb1baf
Add some basic documentation for gallivm code
2008-03-12 22:06:51 -04:00
Zack Rusin
a1d5672865
document hash collision resolutions
2008-03-12 21:49:06 -04:00
Brian
329c543134
gallium: fix polygon stipple
...
Was broken by commit 4528287e04 (bind all
samplers/texures at once).
2008-03-12 19:29:30 -06:00
Brian
d91e62e9c6
gallium: in clear_stencil_buffer() check surface format to determine stencil clear value
...
... as we do for the Z and Z+stencil cases
2008-03-12 18:24:46 -06:00
Stephane Marchesin
bd4fe0e87c
nouveau: update to latest nouveau_class.h
2008-03-13 00:44:25 +01:00
Brian
2109ba4c5d
i915: handle NULL object in i915_bind_rasterizer_state()
2008-03-12 16:56:12 -06:00
Brian
d1284d3be2
mesa: set SamplersUsed bitmask when parsing ARB fragment programs
2008-03-12 15:34:24 -06:00
Brian
0dd79011b9
gallium: pass NULL to cso_single_sampler() when the sampler isn't used.
...
This fixes an AA line crash/regression.
The aaline stage needs to find a free/unused sampler to do its thing.
2008-03-12 14:20:54 -06:00
Brian
51809bc1bc
remove reference to obsolete ExtDivide
2008-03-12 13:22:58 -06:00
Brian
a2b917c1cd
gallium: use TXP rather than ExtDivide flag
2008-03-12 13:21:41 -06:00
Brian
12ab5f9701
gallium: change draw_vertex_shader->state from pointer to struct
...
We were sometimes keeping a pointer to a stack-allocated object.
Now make a copy of the pipe_shader_state object.
This should fix some seemingly random memory errors/crashes.
2008-03-12 13:20:29 -06:00
Patrice Mandin
3b2a9b01a0
nv30: debug dumps vp constants
2008-03-12 19:06:29 +01:00
Stephane Marchesin
830b4709f0
nouveau: update to latest reg header.
2008-03-12 18:43:29 +01:00
Stephane Marchesin
6bd5e5ce00
nv30: line up the miptree creation to latest changes.
2008-03-12 18:40:37 +01:00
Michal Krol
ba75e82b6e
tgsi: Remove ExtDivide field from existence. Implement OPCODE_TXP.
2008-03-12 16:41:25 +01:00
Michal Krol
e5b1a53c9f
tgsi: Dump TXP opcode.
2008-03-12 16:26:08 +01:00
José Fonseca
8901a46a74
gallium: Generic handle table.
2008-03-12 15:02:50 +00:00
José Fonseca
a2ea51ed82
gallium: Change assert behavior on runtime (Mark Mueller).
2008-03-12 15:02:50 +00:00
Michal Krol
70ae7f09c7
tgsi: Introduce OPCODE_TXP. Depricate ExdDivide field.
2008-03-12 14:55:18 +01:00
José Fonseca
4f17bd270e
scons: Faithfully mimic every WINDDK builtin compiler/linker option.
2008-03-12 13:34:30 +00:00
Keith Whitwell
8fd633b5cf
gallium: reduce signed/unsigned warnings
2008-03-12 10:43:53 +00:00
Keith Whitwell
98ae83d5cc
gallium: Add TEX_FILTER_ANISO img filter
...
Hardware almost universally expects us to set a special filtering mode
when anisotropic filtering is enabled, as opposed to varying a max-aniso
values. Do this once in the state tracker & simplify the driver code.
2008-03-12 10:42:49 +00:00
Michal Krol
feb02084a8
tgsi: Dump source register divide component.
2008-03-12 11:37:12 +01:00
Brian
221adbd601
cell: check for NULL shader pointer in cell_bind_vs_state()
2008-03-11 20:03:37 -06:00
Brian
7aa34eb40c
gallium: dummy install target
2008-03-11 19:02:51 -06:00
Brian
339e7ec680
gallium: rework CSO-related code in state tracker
...
Use the code in cso_context.c rather than st_cache.c.
Basically, binding of state objects now goes through the CSO module.
But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're
not cached by the CSO module at this time.
Also, update softpipe driver to handle NULL state objects in various places.
This happens during context destruction. May need to update other drivers...
2008-03-11 18:55:58 -06:00
José Fonseca
21ff003061
gallium: Silence MSVC warnings.
2008-03-12 00:27:52 +00:00
José Fonseca
45c5989511
gallium: Conditional debugging output.
...
Generalize the conditional debugging output code found trhought the gallium
drivers.
2008-03-12 00:27:52 +00:00
Michal Krol
130b315454
tgsi: Map OPCODE_TEXKILL to OPCODE_KILP.
2008-03-11 23:22:34 +01:00
Brian
34a0ac7f2b
gallium: fix some cso_state_callback cast warnings
2008-03-11 15:01:52 -06:00
Brian
30fab81de8
gallium: fix fs/vs typo in cso_set_vertex_shader()
2008-03-11 14:31:17 -06:00
Patrice Mandin
169912b71a
nv30: silence some warnings
2008-03-11 19:58:16 +01:00
Ben Skeggs
cd9ed05aec
nv50: start on fb state
2008-03-12 04:50:53 +11:00
Ben Skeggs
cd85dc1e5d
nv50: rasterizer stateobj
2008-03-12 04:29:58 +11:00
Ben Skeggs
2fee5f7648
nv50: scissor/viewport/blend colour/stipple
2008-03-12 03:54:53 +11:00
Ben Skeggs
06bd7d78b9
nv50: depth_stencil_alpha stateobj
2008-03-12 03:41:05 +11:00
Ben Skeggs
9911ca2226
nv50: ouch, next_subchannel++ :)
2008-03-12 03:21:48 +11:00
Ben Skeggs
9c29512154
nv50: crappy state validate/emit function
...
Just for testing stateobjs to make sure they don't hang the engine.
2008-03-12 02:59:42 +11:00
Ben Skeggs
3250bacd24
nv50: create blend stateobj
2008-03-12 02:56:10 +11:00
Ben Skeggs
b2e48f8484
nv50: convert to hwctx-in-screen as nv40 is
2008-03-12 02:39:13 +11:00
Ben Skeggs
1fb3c94f03
nv50: some forgotten changes
2008-03-12 02:20:40 +11:00
Keith Whitwell
5038c20795
draw: don't free our copy of the render stage -- just borrowing it from vbuf stage
2008-03-11 14:23:08 +00:00
Keith Whitwell
ff3c7a3243
gallium: missing file
2008-03-11 08:43:18 +00:00
Zack Rusin
be9a245738
fix double deletion
...
plus, if the current hash is bigger than max size make sure
we delete enough from it
2008-03-10 22:12:32 -04:00
Zack Rusin
d9d2ca7a07
fix compilation
2008-03-10 22:12:32 -04:00
Brian
c813b545ab
fix Height2/Depth2 init problem when using texture borders
2008-03-10 18:08:14 -06:00
Brian
7585b4ceb8
gallium: disable an unneeded assertion (hit with texwrap.c)
2008-03-10 18:08:14 -06:00
Ian Romanick
b1525662b3
Move SPE register allocator to rtasm code
...
Move the register allocator to a common location. There is more code
on the way that will make use of this interface.
2008-03-10 17:00:44 -07:00
Keith Whitwell
297b3be25a
draw: placeholder/prototype code for a passthrough draw path
2008-03-10 23:31:50 +00:00
Keith Whitwell
d08cd68d3f
mesa: fast-track glColor and similar calls when not immediate mode rendering
...
Often these are mixed in with draw arrays calls, etc. Try not to get
the whole immediate rendering state machine going when we receive one
of these on their own.
2008-03-10 23:31:50 +00:00
Keith Whitwell
7375369fb3
gallium: fix compiler warning
2008-03-10 23:31:50 +00:00
Keith Whitwell
3f5b9f4ba4
gallium: use the same bypass_clipping logic on all vs paths
2008-03-10 23:31:50 +00:00
Keith Whitwell
6d5ee6d9a4
gallium: enable bug workaround in draw_vertex_cache_invalidate
2008-03-10 23:31:50 +00:00
Brian
d5692cb349
gallium: new surface/context tracker (sct) module
...
Will be used for tracking the surfaces and textures which are bound/used by
contexts.
2008-03-10 17:22:18 -06:00
Brian
5b82d551b7
cell: sync up with sampler/texture state-setting changes
2008-03-10 16:43:36 -06:00
José Fonseca
3102268154
gallium: Use hardcoded breakpoints on x86 targets.
2008-03-10 21:18:00 +00:00
José Fonseca
34497eabc8
Some notes about debugging
2008-03-10 21:15:31 +00:00
José Fonseca
01bd21eef8
gallium: Import Dennis Smit cpu detection code.
...
It still needs a slight code massasing to integrate with the rest of
gallium (namely mapping the OS_* ARCH_* defines), but I'm commiting anyway
so that it is available to be used when somebody needs it.
2008-03-10 16:45:19 +00:00
José Fonseca
b721bc8792
gallium: WinCE portability fixes.
2008-03-10 14:00:13 +00:00
Ben Skeggs
ae0e047ba4
nv30: put the card into vtxprog mode + small cleanups/fixes
2008-03-10 14:28:13 +11:00
Keith Whitwell
b041dbe901
gallium: avoid deleting currently-bound CSO's on cache destruction
2008-03-09 20:23:05 +00:00
Keith Whitwell
aff4cf19a7
draw: cope with binding NULL vertex shader (on context delete, for instance)
2008-03-09 20:23:05 +00:00
Keith Whitwell
d8d6569e28
cso: fix line endings
2008-03-09 20:23:04 +00:00
Keith Whitwell
ac87bc1835
cso: Use MALLOC
2008-03-09 20:23:04 +00:00
Keith Whitwell
5d802d8c84
cso: add a higher-level interface which does all pipe interactions to set a given state
2008-03-09 20:23:04 +00:00
Keith Whitwell
99691f38c2
gallium: add some commonly implemented bits of hw state
2008-03-09 20:23:03 +00:00
José Fonseca
5d1fc69041
scons: Ensure the paths to the WINDDK's executables are found before the MSVC ones.
2008-03-09 20:14:31 +00:00
José Fonseca
fc96aec9b7
gallium: Document debug_printf usage.
2008-03-08 17:36:19 +00:00
Ben Skeggs
66ba021e9f
nouveau: another "argh gallium fscks with assert" fix
2008-03-07 22:48:26 +11:00
Michal Krol
8143adafdd
gallium: Surround externs with extern "C".
2008-03-06 19:57:41 +01:00
Ben Skeggs
82f22d9e14
nv30: a couple of vtxprog fixes
2008-03-06 11:52:25 +11:00
Keith Whitwell
4528287e04
gallium: michel's patch to rework texture/sampler binding interface
...
Bind all the samplers/textures at once rather than piecemeal.
This is easier for drivers to understand.
2008-03-05 10:56:49 +01:00
José Fonseca
b1922de9f3
gallium: Use custom vsnprintf in WINDDK.
...
EngDebugPrint does not handle float point arguments, so we need to use
our own vsnprintf implementation.
2008-03-05 11:39:11 +01:00
José Fonseca
5aa108214a
scons: Preliminary code for quieting command lines.
2008-03-05 11:39:11 +01:00
Keith Whitwell
19cc2e3631
draw: dont' compute clipmask or apply viewport when not clipping (rename bypass_clipping to coords_in_window_space?
2008-03-04 18:51:50 +01:00
Michel Dänzer
e2a91c294e
gallium: Add missing file for scons build.
2008-03-04 18:32:43 +01:00
Michel Dänzer
5b9b5c850f
gallium: Fix scons condition for building the xlib winsys.
2008-03-04 18:32:16 +01:00
Michel Dänzer
1cd2623a53
gallium: Make scons build gallivm before other auxiliary modules.
...
This ensures that the gallivm symbols referenced by the draw module are
resolved properly.
2008-03-04 18:30:12 +01:00
Michel Dänzer
72c9d4a660
gallium: Only use C++ compiler for linking when using LLVM.
...
Otherwise, the shared objects needlessly link against the C++ runtime
environment.
2008-03-04 18:28:23 +01:00
José Fonseca
9a76798112
scons: Force C++ linkage.
...
We have some C++ code (LLVM), which must be linked with g++ on certain
platforms. SCons tries to guess when to use g++ by looking to the source files,
but this fails, if the C++ code is not list in the command line, but inside in
the library.
2008-03-04 12:40:18 +01:00
José Fonseca
13174c195e
scons: Make command line arguments effective again.
2008-03-03 18:54:45 +01:00
Keith Whitwell
689e1c5d50
win32: don't prepend all debug with gallium3d
2008-03-03 17:50:10 +01:00
Keith Whitwell
800d13df72
draw: add fetch for bgra ubyte surfaces
2008-03-03 17:50:09 +01:00
Keith Whitwell
9506ac8235
gallium: remove obsolete comment
2008-03-03 17:50:09 +01:00
Keith Whitwell
f4e91c3432
gallium: document user_buffer_create a little
2008-03-03 17:50:09 +01:00
Ben Skeggs
1de15ad83e
nv40: re-do vtxbuf format code
2008-03-03 00:01:44 +11:00
Ben Skeggs
57b8711aeb
nv40: nuke debug
2008-03-02 16:48:15 +11:00
Ben Skeggs
a5966c8b28
nouveau: silence some warnings
2008-03-02 16:39:24 +11:00
Ben Skeggs
578b5cd9a0
nouveau: fix potential crash
2008-03-02 16:35:47 +11:00
Ben Skeggs
a414173105
Merge remote branch 'nouveau/gallium-0.1' into nouveau-gallium-0.1
2008-03-02 15:42:53 +11:00
Ben Skeggs
59d4b7cc62
nv40: fix segv when app "skips" texture units.
2008-03-02 15:28:24 +11:00
Ben Skeggs
b560ed2444
nouveau: enable multi-context/single-channel support for nv40
2008-03-02 15:02:25 +11:00
Ben Skeggs
0a12e4587c
nouveau: turn pushbuf macros into inline functions
2008-03-02 14:09:57 +11:00
Zack Rusin
a9c40f833e
refactor code calling builtins and implement dp4
2008-03-01 15:28:00 -05:00
Zack Rusin
17f543fc45
make the first builtin work (dp3)
2008-03-01 15:28:00 -05:00
Zack Rusin
e884c7ed9a
start implementing start of bultins
2008-03-01 15:28:00 -05:00
Ben Skeggs
132def0c41
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
2008-03-02 02:35:17 +11:00
Brian Paul
07d6347e8a
gallium: change st->state.sampler_texture[] to store pipe_texture pointers
...
This is a better fix for the previous check-in.
Fixes texadd.c conform test, and probably other bugs.
2008-02-29 16:16:16 -07:00
Brian Paul
c8bca8d8a9
gallium: fix update_textures() bug in pipe_texture binding logic
...
The 'st' pointer might not have changed, but st->pt might have. The dirtyData flag
will indicate when that's happened, so check it.
2008-02-29 15:38:43 -07:00
Brian Paul
5240cebb23
gallium: fix line emit order for unfilled tris
...
A tri drawn with GL_LINE_LOOP and GL_POLYGON w/ fillmode=GL_LINE should produce
the same results when line stipple is enabled. Results are correct now.
2008-02-29 13:04:53 -07:00
Brian Paul
6da943d204
gallium: point rast coord tweak
2008-02-29 13:04:53 -07:00
Brian Paul
b8ee90e05a
gallium: need precalc_flat=1 for wide lines
2008-02-29 13:04:52 -07:00
Michal Krol
4d22330837
scons: List sp_screen.c.
2008-02-29 20:18:45 +01:00
Brian Paul
2a121e8e22
gallium: tweak coords for wide lines
2008-02-29 11:37:12 -07:00
Brian Paul
0b47eb4808
gallium: fix glCopyPixels(GL_DEPTH) when Z format conversion is needed
2008-02-29 11:10:20 -07:00
Brian Paul
a41b77f4fe
gallium: added pipe_get/put_tile_z() functions
2008-02-29 11:10:20 -07:00
Brian
78220aea86
gallium: remove the ugly pipe->draw stage lookup code in aaline/point/pstipple stages
...
Added a void *draw ptr to pipe_context. Probably look for a better solution someday.
2008-02-29 10:08:16 -07:00
Ben Skeggs
17f6db9d01
nv40: move "channel context" stuff into nv40_screen
2008-02-29 23:08:01 +11:00
Ben Skeggs
baaae562f0
nouveau: hand nouveau_winsys in with pipe_screen init
2008-02-29 22:54:40 +11:00
Ben Skeggs
84cc07dc89
nouveau: implement pipe_screen
...
Untested on NV3x/NV5x. Quite possibly broken.
2008-02-29 15:03:57 +11:00
Ben Skeggs
8c77e6f674
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
2008-02-29 13:24:31 +11:00
Brian
ebe3b34ad2
cell: convert all points/lines to tris for the time being
...
Allows more programs to look correct. We'll want native points/lines someday.
2008-02-28 18:02:05 -07:00
Brian
6144c2bd65
cell: remove obsolete texture field
2008-02-28 17:57:54 -07:00
Brian
370eca12ad
Added calibrate_rast.c program
...
Measures rasterization of points/lines/tris and suggests fixes/biases when
something doesn't meet spec.
2008-02-28 17:55:26 -07:00
Brian Paul
b233b1e2dc
gallium: new wide point/line stages (missed in prev commit)
2008-02-28 17:54:42 -07:00
Brian Paul
a1a1395488
gallium: split draw_wide_prim stage into separate point/line stages.
...
This fixes a validation/code-path problem. Enabling the stage for the sake
of wide points also inadvertantly caused wide lines to be converted to tris
when we actually want them passed through, such as for the AA line stage.
This is just cleaner now.
Also, replace draw_convert_wide_lines() with draw_wide_line_threshold() as
was done for points. Allows for 1-pixel lines to be converted too if needed.
2008-02-28 17:49:22 -07:00
Brian Paul
70126588cf
gallium: fix surface/texture format conversion in st_CopyPixels
...
If the src buffer's format isn't supported as a texture format, find a different
texture format.
2008-02-28 11:36:54 -07:00
Brian Paul
01e53be2b8
gallium: added a texture format sanity check/assertion in st_texture_create()
...
make sure the tex format is actually supported by the driver.
2008-02-28 11:36:54 -07:00
Brian Paul
476cc931f2
galliums: s/uint/enum pipe_format/
2008-02-28 11:36:54 -07:00
Brian Paul
9a264a056a
gallium: in GL_SELECT mode, update hitflag in rasterpos
2008-02-28 11:36:54 -07:00
José Fonseca
e280bd50cc
gallium: Fix MSVC warnings.
2008-02-28 21:25:54 +09:00
Michel Dänzer
626b8d177b
Make sure struct pipe_screen is declared.
2008-02-28 09:07:38 +00:00
Keith Whitwell
10d83df3a9
gallium: State tracker cleanups wrt clears.
2008-02-28 09:07:03 +00:00
José Fonseca
2573f0e5d6
Convert crlf->lf line endings.
...
Windows/DOS users should enable core.autocrlf from now on.
2008-02-28 15:53:13 +09:00
José Fonseca
2d8d472426
Disable autocrlf on Visual Studio project files.
2008-02-28 15:52:30 +09:00
José Fonseca
5c0a089a5d
gallium: Remove extra level of indirecttion.
2008-02-28 13:52:30 +09:00
José Fonseca
510bc3535c
gallium: Fix sign/unsign comparison.
2008-02-28 13:06:52 +09:00
Jose Fonseca
be2c419111
gallium: Convert CRLF -> LF.
...
DOS/Windows users should not commit text files with CRLF line endings
but use instead
git config --global core.autocrlf true
2008-02-28 12:57:18 +09:00
Brian
d8bf051c8b
gallium: remove unneeded pipe ptr from pipe_texture
2008-02-27 18:49:35 -07:00
Brian
1774b177b8
gallium: added draw_num_vs_outputs() to query number of post-transform vertex attribs
2008-02-27 18:46:54 -07:00
Brian
627efcaa80
gallium/i965: remove more dependencies on pipe_shader_state semantic info
2008-02-27 17:21:29 -07:00
Brian
46da2f42a8
gallium/i965: added const to silence warning
2008-02-27 17:21:01 -07:00
José Fonseca
308f11f991
scons: Build mesa source with c99.
2008-02-28 08:18:32 +09:00
Brian
d612b6fa9b
cell: fix minor get_tex_surface() breakage
2008-02-27 16:17:15 -07:00
Brian
dacf91fe58
gallium/i965: remove brw_shader_info struct
...
The info it contained is now found in tgsi_shader_info.
Added a few assertions to catch potential misunderstandings about register
counts vs. highest register index used.
2008-02-27 16:22:08 -07:00
Brian
f504d87240
gallium/i965: silence warnings
2008-02-27 16:11:26 -07:00
Brian
7ba1afb033
gallium/i965: added const to silence warnings
2008-02-27 16:11:14 -07:00
Brian
bad54d0b4d
gallium/i965: remove UsesDepth, UsesKill - use tgsi_shader_info instead
2008-02-27 16:09:17 -07:00
Brian
ea7e86dd4d
gallium/i965: remove dependencies on pipe_shader_state's semantic info
...
The brw_shader_info struct is rendundant and could be removed...
2008-02-27 16:05:16 -07:00
Brian
6b9a7eb460
gallium: remove dependencies on pipe_shader_state's semantic info
2008-02-27 16:03:40 -07:00
Brian
cddeca51ad
gallium: remove dependencies on pipe_shader_state's semantic info
...
Use tgsi_scan_shader() to populate a tgsi_shader_info struct and use that instead.
2008-02-27 16:02:58 -07:00
Brian
7df26d76d2
gallium: include p_util.h
2008-02-27 16:01:35 -07:00
Brian
679b6cf0a0
gallium: include p_compiler.h instead of p_util.h
2008-02-27 16:00:04 -07:00
Brian
681b78fc60
gallium: remove unnecessary assignment
2008-02-27 15:48:00 -07:00
Brian
3197ad5a56
gallium: added file_max[] array to tgsi_shader_info
...
Records the highest index of a declared register.
2008-02-27 15:47:24 -07:00
Brian
0e1e1f12f4
gallium/i915: remove unneeded assignment
2008-02-27 15:45:41 -07:00
Brian
80a9b5e1d9
gallium: remove unnecessary tgsi_interp_coef decl
2008-02-27 15:11:57 -07:00
Brian
c66ec5c7a2
gallium: remove uses_kill field from softpipe_shader
2008-02-27 15:11:57 -07:00
Brian
fb40c5a9c7
gallium: added uses_kill field to tgsi_shader_info
2008-02-27 15:11:57 -07:00
Ian Romanick
1c50ea2cd9
cell: Use unified data cache for textures too
2008-02-27 13:41:09 -08:00
Brian
cc5ffd7622
gallium: remove obsolete *_strings.c files
2008-02-27 14:28:17 -07:00
Brian
6f715dcc21
gallium: remove pipe_context->texture_create/release/get_tex_surface()
...
These functions are now per-screen, not per-context.
2008-02-27 14:21:12 -07:00
Brian
364f8cad0f
gallium: move is_format_supported() to pipe_screen struct
2008-02-27 13:58:06 -07:00
Brian
8383f798b4
gallium: start removing pipe_context->get_name/vendor/param/paramf
...
These are now per-screen functions, not per-context.
State tracker updated, code in drivers and p_context.h disabled.
2008-02-27 11:24:35 -07:00
Brian
03b5267f52
gallium/i965: implement pipe_screen for i965 driver (untested)
2008-02-27 10:17:57 -07:00
Brian
17188e4d5a
gallium/i915: hook up screen->get_param()
2008-02-27 10:15:37 -07:00
Brian
f04736c8be
Cell: implement pipe_screen for cell driver
2008-02-27 09:55:17 -07:00
Brian
4f36cf5858
gallium: implement pipe_screen for softpipe driver
2008-02-27 09:47:46 -07:00
Brian
ef6c82b0c1
gallium/i915: remove some redundant code
2008-02-27 09:46:10 -07:00
Brian
31358282d4
gallium: better debug messages
2008-02-27 09:15:15 -07:00
Brian
e8c0162fa0
gallium: softpipe_init_texture_funcs(), make texture func static
2008-02-27 08:58:12 -07:00
Jerome Glisse
8d94dabad8
mesa: set input read only on success
2008-02-27 08:43:45 -07:00
José Fonseca
7a678556d4
scons: Place the .sconsign file on the builddir too.
...
To avoid issues with different scons versions building the same source file
2008-02-27 20:13:16 +09:00
José Fonseca
e49905b57c
mesa: Add copyright headers.
2008-02-27 19:33:57 +09:00
José Fonseca
d6229d7f1f
gallium: Make headers C++ friendly.
2008-02-27 18:39:57 +09:00
José Fonseca
9409043c58
scons: Move common code to a separate file.
2008-02-27 17:36:28 +09:00
José Fonseca
67099cd7b9
scons: Autodetect the default machine.
2008-02-27 16:53:52 +09:00
José Fonseca
9a8a5d7c2f
gallium: Replace // comments.
2008-02-27 16:42:15 +09:00
José Fonseca
94c73d1bb9
gallium: Remove // comments.
2008-02-27 16:23:50 +09:00
José Fonseca
6ac148824d
scons: Fix winddk.py's decription and copyright.
2008-02-27 16:05:57 +09:00
José Fonseca
f81b7a6285
gallium: update for new i915_screen.c file; fix some warnings.
2008-02-27 15:59:09 +09:00
José Fonseca
8902ce06e8
gallium: Use stricter types.
...
VC++ won't silently convert a pointer to a function with typed pointer
arguments to one with void pointer arguments.
2008-02-27 15:24:54 +09:00
Brian
9404712257
cell: insert a (disabled) call to spe_cpu_info_get()
...
Found on the Cell devel forum, but doesn't appear to be available in SDK 2.1.
2008-02-26 20:13:36 -07:00
Brian
aa59a937cc
gallium: introduce 'pipe_screen' for context-independent functions
...
This will allow creating textures before a rendering context exists, for example.
Only implemented in i915 driver for now. i915pipe->texture_create() just
dispatches through to the i915screen->texture_create() to avoid state tracker
changes for now.
2008-02-26 20:15:14 -07:00
Brian
dc2b6e2c33
gallium: use pipe_texture_reference() instead of pipe->texture_release()
2008-02-26 19:35:08 -07:00
Brian
4da19dbcaa
gallium: remove pipe parameter from pipe_texture_reference()
...
Added pipe field to pipe_texture (temporary, see comments).
First step toward context-less texture creation...
2008-02-26 19:31:22 -07:00
José Fonseca
a6044bdf74
Revert "scons: Prefer MSVS 2003 (patch by Mark Mueller)."
...
This reverts commit 19f6e1a975 .
2008-02-27 09:10:14 +09:00
Brian
d5ab6507f7
gallium: #includes to silence warnings
2008-02-26 14:34:19 -07:00
Brian
d4a4bed663
gallium: updated prototype (missed in prev commit)
2008-02-26 14:32:57 -07:00
Brian
5e29aab175
gallium: replace draw_convert_wide_points() with draw_wide_point_threshold()
...
Specifying a threshold size is a bit more flexible, and allows the option
of converting even 1-pixel points to triangles (set threshold=0).
Also, remove 0.25 pixel bias in wide_point().
2008-02-26 14:32:57 -07:00
Brian
b93cf55f4e
gallium: fix zero-sized viewport bug
...
If st_create_framebuffer() is called with width=0, height=0 and the program
never called glViewport, the viewport wasn't properly initalized. This fixes
that.
2008-02-26 14:32:57 -07:00
Brian
80efc5feb0
gallium: fix off by one rasterpos bug
2008-02-26 14:32:57 -07:00
Michal Krol
36aa9cf781
gallium: Print texture target for short dumps.
2008-02-26 22:10:52 +01:00
Ian Romanick
75dac3959f
cell: Multiple rendering contexts don't work yet
...
Log a message and forcibly exit. This prevents silly fools from
thinking there's a bug...instead of just an unimplemented feature. :)
2008-02-26 11:19:14 -08:00
Michel Dänzer
dbf12dcdb7
intel_winsys: Fix build failure due to DEBUG_IOCTL being undefined.
...
Include pipe/p_debug.h to consistently enable or disable the debugging code.
2008-02-26 18:48:13 +00:00
Brian
4901410293
gallium/i915: Use tgsi_scan_shader() to collect shader info
...
No longer use semantic info in pipe_shader_state.
Also, remove redundant semantic info from i915_fp_compile struct.
2008-02-26 10:47:42 -07:00
Brian
33d213b677
gallium: remove unused var
2008-02-26 10:44:44 -07:00
Brian
f74279002a
gallium: added tgsi_shader_field to sp_fragment_shader
...
Use the shader semantic info from there, instead of from pipe_shader_state.
Carry this idea to draw module and other drivers...
2008-02-26 10:13:39 -07:00
Brian
1410b7bb50
gallium: collect more shader info in tgsi_scan_shader()
...
Now getting input/output semantic info so we can eventually remove those
fields from pipe_shader_state.
2008-02-26 10:12:17 -07:00
Brian
ecd50ef58b
gallium: remove input_map[] from pipe_shader_state
2008-02-26 08:43:07 -07:00
Brian
232a41e19f
gallium: disable debug code
2008-02-26 08:41:42 -07:00
José Fonseca
19f6e1a975
scons: Prefer MSVS 2003 (patch by Mark Mueller).
2008-02-26 23:59:53 +09:00
José Fonseca
6d336588ed
scons: Properly generate PDB files on MSVC.
2008-02-26 23:06:09 +09:00
José Fonseca
bb68acbf8d
gallium: Add missing copyright headers.
2008-02-26 23:06:09 +09:00
Ben Skeggs
68ef528862
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
2008-02-27 00:34:31 +11:00
Michal Krol
ad6bb870de
gallium: Fix build on Windows.
2008-02-26 11:49:25 +01:00
Zack Rusin
7838aaffdb
implement cache limits for cso
...
by default set to 4096, which might be on the large side
2008-02-26 01:51:46 -05:00
Zack Rusin
e798510569
add an explicit callback decleration and use it to silence warnings
2008-02-26 01:51:46 -05:00
Zack Rusin
bf1c2f3602
hide cso cache definition and add some initial code for size limiting
...
the caches
2008-02-26 01:51:46 -05:00
Zack Rusin
6abb82da7e
implement deleting of driver side cached state in cso's
2008-02-26 01:51:46 -05:00
Brian
08a5f49644
gallium: rewrite AA point fragment shader to use a CMP instruction instead of IF/ELSE/ENDIF
...
Allows the shader to work on i915 hardware.
2008-02-25 18:56:36 -07:00
Brian
ba376b3314
gallium/i915: plug in aapoint draw stage
2008-02-25 18:56:36 -07:00
Brian
f43c44b5c9
gallium/i915: Fix emit_hw_vertex(): need to use vinfo->src_index[]
2008-02-25 18:56:36 -07:00
Brian
7ed9beef5f
gallium/i915: remove debug code
2008-02-25 18:56:36 -07:00
Brian
0235b32521
gallium/i915: fix i915_emit_texld() to handle swizzled texcoords
...
Allocate a temporary register, insert MOV instruction, etc.
2008-02-25 18:56:36 -07:00
Ian Romanick
2fc9d0ffac
cell: Additional changes to match changes in draw/draw_vertex_shader.c
2008-02-25 16:18:08 -08:00
Ian Romanick
2efa7e9489
cell: Fix off-by-one error in spu_dcache_fetch_unaligned
...
This time the off-by-one error caused an extra qword to be fetched
under certain circumstances when the source ea was not qword aligned.
2008-02-25 16:18:08 -08:00
Ian Romanick
a63fd641a0
cell: Trivial compiler warning clean-ups.
2008-02-25 16:18:08 -08:00
Ian Romanick
fb68daceec
Cell: Remove unnecessary include files
2008-02-25 16:18:08 -08:00
Ian Romanick
7976a084e7
Cell: Use multiple DMA tags for the dcache.
2008-02-25 16:18:08 -08:00
Brian
b02fc94834
gallium/i915: compute vertex size _after_ state validation in emit_prim().
...
Fixes crash when drawing aa lines.
2008-02-25 17:01:20 -07:00
Brian
bc3f2c908e
Added line smooth test
2008-02-25 16:26:37 -07:00
Brian
09ba1dd4cc
gallium: clamp line width when creating raster state object
2008-02-25 16:25:24 -07:00
Brian
99047e0968
gallium/i915: plug in aaline draw stage
2008-02-25 16:24:47 -07:00
Brian
92650aeadd
gallium/i915: make sure state is up to date in i915_vbuf_render_get_vertex_info(), also disable bogus assertion
2008-02-25 16:22:58 -07:00
Brian
f41e957557
gallium/i915: need to recompute vertex info if vertex shader changes
2008-02-25 16:20:04 -07:00
Brian
b53110c789
gallium/i915: call draw_flush() in i915_flush()
2008-02-25 16:16:07 -07:00
Brian
cc0cf1154b
gallium: fix bad ptr assignment
2008-02-25 15:34:46 -07:00
Brian
846b7fbc6c
gallium/i915: use draw_find_vs_output() directly, fix broken fogcoords.
...
We now produce the correct 915 vertex layout regardless of the order in
which fragment shader inputs are declared.
2008-02-25 14:48:31 -07:00
Brian
c037b4d45a
softpipe: use draw_find_vs_output() directly
2008-02-25 14:47:13 -07:00
Brian
d6c7f7e314
gallium: modify draw_find_vs_output() to search vertex shader outputs
...
This simplifies drivers using the draw module and removes the last dependency
on vertex-shader "internals". Since the draw module is producing the
post-transformed vertices, it makes sense to ask it where specific vertex
attributes are located.
This could also simplify some things in the state tracker code for selection,
feedback, rasterpos...
2008-02-25 14:46:42 -07:00
Brian
ea02342c11
gallium/i915: Use hardware rendering, unless INTEL_SP env var is set
2008-02-25 11:21:03 -07:00
Brian
20839b37ed
gallium/i915: added SGT/SLE opcodes
2008-02-25 11:13:58 -07:00
José Fonseca
e4e3008923
Make the pipe headers C++ friendly.
2008-02-25 20:05:41 +09:00
José Fonseca
c8b069cc1e
Get more debugging info out of MSVC.
2008-02-25 17:55:45 +09:00
José Fonseca
2d38d1b300
Remove files of unsupported build systems.
2008-02-25 17:11:28 +09:00
José Fonseca
9bcc8ad0ca
Update git ignores.
2008-02-25 17:05:15 +09:00
José Fonseca
2a0675eb75
Replace standand library functions by portable ones.
2008-02-25 16:39:39 +09:00
José Fonseca
b75706764b
Add Zack's comments about CSOs.
2008-02-25 15:18:33 +09:00
José Fonseca
efd336887f
Cleanup scons files.
2008-02-25 14:46:53 +09:00
Ben Skeggs
026e2fd3c6
nv40: remove pipe_state struct now.
2008-02-25 13:33:08 +11:00
Ben Skeggs
4058a90127
nv40: construct vbo state the same way as the rest
2008-02-25 13:30:24 +11:00
Ben Skeggs
14de997d5d
nv40: dump meaningful names for surface formats
2008-02-25 12:26:48 +11:00
José Fonseca
2bebeef81b
Update some msvc compiler flags.
2008-02-24 17:58:18 +09:00
José Fonseca
fdcb9260ee
Add new files.
2008-02-24 17:58:05 +09:00
José Fonseca
e70a431c3d
A few more tweaks to get correct WINDDK compilation.
2008-02-24 16:43:07 +09:00
José Fonseca
7aadb475e5
gallium: Fix MSVC warnings.
2008-02-24 10:37:31 +09:00
Brian
012391357f
gallium: disable early Z test if fragment shader contains KIL instruction.
...
Use tgsi_scan_shader() to determine if the fragment shader uses KIL or
writes fragment.z
2008-02-23 16:17:17 -07:00
Brian
35ca45daba
gallium: added TGSI_FILE_COUNT
2008-02-23 16:15:54 -07:00
Brian
1d77d6caf6
gallium: added new tgsi_scan.c / tgsi_scan_shader() function
...
Used to get information about registers, instructions used in a shader.
2008-02-23 16:15:29 -07:00
José Fonseca
e9bb63c8e2
gallium: MSVC fixes.
2008-02-24 02:23:12 +09:00
José Fonseca
58a3d7dfd9
Revamp scons usage.
2008-02-23 19:49:08 +09:00
José Fonseca
e8de5c70e3
Bring in several forgotten MSVC fixes.
2008-02-23 14:14:54 +09:00
José Fonseca
bed547cb82
Fix typo.
2008-02-23 14:14:20 +09:00
Brian
aec315f05f
gallium: fix a state validation bug found w/ pointblast.c
2008-02-22 18:34:31 -07:00
Brian
e9276efafe
gallium: fix bug in which wide point stage overrode the aapoint stage
...
Also, simplify the logic a bit.
2008-02-22 17:22:54 -07:00
Brian
c74900ee5d
gallium/i915: overhaul of fragment shader compilation, constant/immediate allocation
...
Before, fragment shaders were translated to i915 hw code at bind time, rather
than create time. Now there's an i915_fragment_shader struct with the expected
contents that's created by i915_create_fs_state(). Translation to i915 code
takes place there too.
Immediates are handled correctly now. During program translation we keep
track of which constant buffer slots are free (i.e. not referenced by the
shader). Then the TGSI immediates and ancillary immediates (introduced for
SIN/COS/etc) are put into those free slots.
When it's time to upload the constant buffer, use the fp->constant_flags[]
array to determine if we should grab an immediate from the shader, or a
user-defined parameter from the gallium constant buffer.
2008-02-22 16:48:05 -07:00
Patrice Mandin
d8a9d850b9
nv30: init zeta to NULL, use color pitch if no zeta
2008-02-22 22:21:15 +01:00
Brian
8cd7c1d03c
i915: include stdio.h
2008-02-22 14:07:33 -07:00
Brian
24f3d7de29
i915: include p_debug.h (resolves undefined assert())
2008-02-22 14:07:12 -07:00
Patrice Mandin
0a5ed0667e
nv30: wrong number of parameters
2008-02-22 17:18:27 +01:00
Brian
12c14c31b7
gallium: fix brokenb build
2008-02-22 08:56:55 -07:00
Brian
0bb53709e8
cell: added function prototypes to silence warnings
2008-02-22 08:52:57 -07:00
Brian
b4d050ffcc
cell: fix build: s/dest/vertex/
2008-02-22 08:52:57 -07:00
José Fonseca
f1bef2cba2
gallium: Countour MSVC's pickyness for structures returned by value.
2008-02-23 00:51:48 +09:00
José Fonseca
901b03e84d
gallium: Wrap decls in extern "C".
2008-02-23 00:51:37 +09:00
José Fonseca
6c597238b2
gallium: Add cso convenience routine (from Keith's patch).
2008-02-23 00:51:33 +09:00
José Fonseca
2cf860b866
gallium: MSVC fixes.
2008-02-23 00:51:29 +09:00
Michal Krol
e0de82fbcb
gallium: Fix build on Windows.
2008-02-23 00:51:19 +09:00
Michal Krol
57060bc1fa
gallium: Silence compiler warnings on Windows.
2008-02-23 00:51:15 +09:00
Michal Krol
69a7c9739b
gallium: Silence compiler warnings on Windows.
2008-02-23 00:51:12 +09:00
Michal Krol
6f238275c7
gallium: Define intptr_t for Windows platform.
2008-02-23 00:51:06 +09:00
Michal Krol
8828dd1443
gallium: Move align_pointer() to p_pointer.h.
2008-02-23 00:50:59 +09:00
Michal Krol
f44b30f1eb
gallium: New file.
2008-02-23 00:50:55 +09:00
José Fonseca
26c57d1630
Avoid building problematic module/drivers on windows.
2008-02-23 00:47:28 +09:00
José Fonseca
16245d9b38
Don't parse mesa's rtasm asm module.
2008-02-23 00:47:27 +09:00
Ben Skeggs
7b938431d0
nv40: stateobj start out with 0 refcount
2008-02-22 14:46:48 +11:00
Ben Skeggs
c2e36bdd1a
nv40: move hw_dirty
2008-02-22 13:55:18 +11:00
Ben Skeggs
5b2ff28a2f
nv40: rework fragment texture state
2008-02-22 13:32:51 +11:00
Ben Skeggs
73e0e567de
nouveau: fix build
2008-02-22 12:36:48 +11:00
Ben Skeggs
f7922db610
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
...
Conflicts:
src/gallium/drivers/Makefile
2008-02-22 12:25:15 +11:00
Brian
446bfc32a8
gallium: new draw stage for polygon stipple.
...
For hardware without native polygon stipple. Create a 32x32 alpha texture
that encodes the stipple pattern. Modify the user's fragment program to
sample the texture (with gl_FragCoord) and kill the fragment according to
the texel value.
Temporarily enabled in softpipe driver, replacing the sp_quad_stipple.c step.
2008-02-21 16:56:32 -07:00
Brian
eb4dc2dd5e
gallium: new AA point drawing stage
...
AA points are drawn by converting the point to a quad, then modifying the
user's fragment shader to compute a coverage value. The final fragment
color's alpha is modulated by the coverage value. Fragments outside the
point's radius are killed.
2008-02-21 16:18:05 -07:00
Brian
a93d8bfaf2
gallium: fill in some blend/rasterizer template fields to make sure they're all valid, even if not relevant
2008-02-21 12:33:30 -07:00
Brian
d4d2e36a42
gallium: comments, white-space clean-up
2008-02-21 12:33:30 -07:00
Keith Whitwell
20fbcbf580
[PATCH] softpipe: unbreak sp_setup_pos_vector on non-x86 systems
2008-02-21 19:17:27 +00:00
Keith Whitwell
4339744c16
[PATCH] gallium: include p_compiler.h for boolean defn
2008-02-21 19:17:27 +00:00
Keith Whitwell
30479ef110
draw: vertex cache rework
...
Take a baby step to straightening out vertex paths.
2008-02-21 19:17:27 +00:00
Keith Whitwell
1eaf7b775b
tgsi: print debug messages on failure to codegenerate
2008-02-21 19:17:27 +00:00
Ian Romanick
de5c64e0af
Cell: Remove erroneous ALIGN16_ATTRIB attributes
...
If a structure is marked as being aligned the SPE compiler performs
extra optimizations (sadly, only -O2 is used) when reading the
structure. Since most of the structures sent in batch buffers are
only 8-byte aligned, this resulted in mysterous bugs with -O2.
2008-02-21 10:43:46 -08:00
Ian Romanick
6dd47c264a
Cell: Add spu_dcache.c to Makefile.
...
This was erroneously missing in previous commits.
2008-02-21 10:43:45 -08:00
Ian Romanick
e78fc9f2f4
Cell: Initial scalar implementation of spu_dcache_mark_dirty
2008-02-21 10:43:45 -08:00
Ian Romanick
2d1f086c12
Cell: Fix off-by-one error in spu_dcache_fetch_unaligned
...
An off-by-one error caused an extra qword to be fetched under certain
alignment / size combinations.
2008-02-21 10:43:45 -08:00
Ian Romanick
7c74037852
Cell: Initial pass at unified data cache
2008-02-21 10:43:45 -08:00
Brian
8be9bc08e1
gallium: include p_inlines.h
2008-02-20 18:00:03 -07:00
Brian
d3b7d26b0b
gallium: s/pipe_reference_texture/pipe_texture_reference/
2008-02-20 17:57:40 -07:00
Brian
228f6b9788
gallium: re-fix some msvc warnings
2008-02-20 15:32:41 -07:00
Brian
e523ef7204
cell: use pipe_texture_reference()
2008-02-20 15:14:14 -07:00
Brian
25ea1901b4
gallium: replace some ordinary assignments with pipe_reference_texture()
...
This fixes at least one instance of dereferencing an invalid texture pointer.
2008-02-20 15:09:44 -07:00
Brian
fce61f341f
gallium: fix bad ptr comparison
2008-02-20 15:09:44 -07:00
Brian
fd4bdd020a
cell: rename cell_state_fs.c -> cell_state_shader.c
2008-02-20 14:32:43 -07:00
Brian
6468347375
cell: init shader-related functions in cell_init_shader_functions()
2008-02-20 14:30:50 -07:00
Brian
9e57e70b42
cell: #includes to silence warnings
2008-02-20 14:27:08 -07:00
Brian
f6e1654e22
cell: plug in cell_set_sampler_texture
2008-02-20 14:25:07 -07:00
Brian
acd2253ae8
Remove obsolete files replaced by cell_pipe_state.c
2008-02-20 14:24:46 -07:00
Brian
9171e63f41
cell: put most simple state-setter functions in new cell_pipe_state.c file
...
Also, re-org of texture/surface functions.
2008-02-20 14:21:45 -07:00
Brian
4eae65c8e0
gallium: re-org of i965 texture/surface code, functions
2008-02-20 14:04:05 -07:00
Brian
882a4b5054
gallium: minor re-org of 915 surface/texture code
2008-02-20 14:00:42 -07:00
Brian
d5640a2dbd
gallium: new pipe->texture_update() function
...
Called whenever texture data is changed (glTexImage, glTexSubImage,
glCopyTexSubImage, etc).
2008-02-20 13:24:52 -07:00
Brian
1d45787d4a
gallium: mark texture object data dirty in do_copy_texsubimage()
2008-02-20 13:12:36 -07:00
Brian
3ccbaa977f
gallium: re-enable GenerateMipmap calls
2008-02-20 13:11:51 -07:00
Brian
52e4c8d702
Test calling glTexSubImage2D mid-way through a frame.
2008-02-20 11:58:33 -07:00
Brian
58edb0683d
gallium: state tracker didn't always notify drivers of texobj data changes
...
Calling glTexSubImage() or glTexImage() to replace texture data didn't
reliably cause pipe->set_sampler_texture() to get called so drivers didn't
always get notified of new texture data.
The st_texture_object->pt pointer doesn't always indicate changed data so
added a dirtyData field.
2008-02-20 11:20:25 -07:00
Brian
22a0b85eae
gallium: use pipe_texture_reference() in sp_tile_cache_set_texture()
2008-02-20 11:15:59 -07:00
Ben Skeggs
759fa5fcc8
nv40: fb state
2008-02-20 17:22:40 +11:00
Ben Skeggs
9cd10d7618
nv40: almost there..
2008-02-20 17:14:41 +11:00
Ben Skeggs
46c3d0918d
nv40: keep track of generated context state vs current channel state
2008-02-20 16:21:28 +11:00
Brian
49c3f3b537
gallium: general clean-up of xlib winsys Makefile
2008-02-19 16:51:19 -07:00
Brian
75a4524f2c
gallium: initialize the killmask register to zero before running shader
...
This fixes mysterious missing fragments when running with SSE.
2008-02-19 16:28:25 -07:00
Brian
4ec46e4869
gallium: add some casts to prevent likely msvc warnings
2008-02-19 14:58:23 -07:00
Brian
a2c06c5b5c
gallium: don't hard-code attrib slot=0 in setup_fragcoord_coeff()
2008-02-19 14:56:01 -07:00
Brian
b1c8fa5b60
gallium: implement correct sampling for RECT targets / unnormalized texcoords
2008-02-19 14:55:18 -07:00
Brian
3e329ea7e4
gallium: updated cell build
...
Building on Ian's Cell build fix.
Put libcell.a in the gallium/drivers/cell/ directory.
General Makefile clean-up, simplification, updated comments.
2008-02-19 11:14:54 -07:00
Ian Romanick
d119931002
Cell: Add missing "gallium/winsys" to SRC_DIRS to fix build.
2008-02-19 09:43:47 -08:00
Ian Romanick
66be2810c3
Cell: emit vertex shaders and uniforms more intelligently
2008-02-19 08:41:04 -08:00
Ian Romanick
4362c6e59d
Cell: trivial clean-ups
2008-02-19 08:41:04 -08:00
José Fonseca
5480a6bc13
Fix windows build.
2008-02-19 18:57:25 +09:00
José Fonseca
b62f0ddd09
Portability fixes.
...
Eliminate C99/C++ constructs.
(We should actually disable gcc C99 syntax options if we are serious about
portability.)
2008-02-19 18:56:55 +09:00
José Fonseca
d710a7cfb2
Windows (DDK) compilation support.
...
It also works when cross compiling with Wine.
2008-02-19 18:53:16 +09:00
José Fonseca
b9da3791c9
Remove src/mesa and src/mesa/main from gallium source include paths.
2008-02-19 15:07:53 +09:00
José Fonseca
5d78212d75
Bring in ppc spe rtasm into gallium's rtasm module.
...
Moving files since these are not being used outside gallium.
2008-02-19 14:06:11 +09:00
José Fonseca
b0eef0dc25
Add run-time cpu capabilities detection stubs.
2008-02-19 14:06:11 +09:00
José Fonseca
90b2beb661
Simplify makefile boilerplate code.
...
Don't define ASM_SOURCES variable globally -- reserve that variable to be defined
locally by makefiles, together with C_SOURCES and CPP_SOURCES.
2008-02-19 14:06:11 +09:00
José Fonseca
f430d95a36
Use gallium's rtasm module.
2008-02-19 14:01:49 +09:00
José Fonseca
17158c2f00
Move mm.c code into util module.
...
Using the u_ prefix to distingish the c source files that support gallium
interfaces and those that have really no relation with gallium itself.
2008-02-19 14:01:49 +09:00
José Fonseca
d2f6c9ab10
Add copyright headers to all rtasm source files.
2008-02-19 14:01:49 +09:00
José Fonseca
39ea030842
Rename rtasm files.
2008-02-19 14:01:49 +09:00
José Fonseca
df8ab3140c
Bring rtasm from mesa to gallium.
2008-02-19 14:01:49 +09:00
José Fonseca
e773a813cf
Initial scons support to build gallivm.
...
Not yet complete.
2008-02-19 14:01:49 +09:00
José Fonseca
e279b1c57a
More llvm -> gallivm.
...
Forgot this one on the last commit.
2008-02-19 14:01:49 +09:00
Brian
6c7f663cb9
gallium: move draw_set_viewport_state() call, plus code clean-up, remove obsolete comments
2008-02-18 18:39:55 -07:00
Brian
ae9931dad2
gallium: call draw_flush() for scissor/stipple state changes
2008-02-18 18:36:20 -07:00
Brian
478c14453b
gallium: remove the prototype/unused wide_line_aa() function
2008-02-18 16:50:07 -07:00
Brian
aceeb80d4f
gallium: antialiased line drawing
...
New draw/prim stage: draw_aaline. When installed, lines are replaced by
textured quads to do antialiasing. The current user-defined fragment shader
is modified to do a texture fetch and modulate fragment alpha.
2008-02-18 16:19:05 -07:00
José Fonseca
0448dbd64a
Update for llvm -> gallivm rename.
2008-02-18 12:33:34 +00:00
José Fonseca
3f3b09d6d8
Rename llvm -> gallivm.
...
Following the directory == library name policy simplifies the build system.
2008-02-18 20:05:06 +09:00
José Fonseca
687a8b96ef
Standardize on using the pipe/ include prefix.
2008-02-18 20:02:42 +09:00
José Fonseca
33ceb6716a
Update scons build for new code layout.
2008-02-18 10:52:44 +00:00
José Fonseca
9df478d2f8
Add an "all" target alias for "default" target.
...
"all" is more commonly expected, expecially by many IDEs.
2008-02-18 16:47:35 +09:00
Ben Skeggs
c0f9cab905
nouveau: cleanups + fixes
2008-02-18 18:23:12 +11:00
José Fonseca
1f2d011786
Build glx/x11.
2008-02-18 15:45:29 +09:00
José Fonseca
8450b14676
Cleanup depend files.
2008-02-18 15:37:52 +09:00
Ben Skeggs
9a5dd26fe2
nv40: and vertprog..
2008-02-18 17:36:24 +11:00
Ben Skeggs
4a9cb97bbf
nv40: get fragprog onto new state mechanism
2008-02-18 17:07:59 +11:00
José Fonseca
39fe5851a5
Actually use GALLIUM_DRIVER_DIRS.
2008-02-18 15:07:17 +09:00
Ben Skeggs
56045da083
nv40: move some things around
2008-02-18 16:38:27 +11:00
Ben Skeggs
112ba3355a
nv40: until gallium is fixed we'll need a fallback for user clip planes
2008-02-18 16:26:33 +11:00
José Fonseca
bfd5916eaf
Code reorganization: split gallium and mesa makefiles.
...
In other words, don't build src/gallium source code from within src/mesa/Makefile.
Also, allow to customize which gallium auxiliary dirs, driver driver, winsys
dirs get built from the config/* files.
2008-02-18 14:25:04 +09:00
Ben Skeggs
f911235f64
nouveau: header update
2008-02-18 15:32:42 +11:00
Ben Skeggs
037570fa5a
nv40: obey polygon offset state
...
Almost sure this isn't entirely correct. However, I'm not sure what
gallium expects yet, and this fixes some bugs, so it'll do for now.
2008-02-18 15:29:02 +11:00
Ben Skeggs
12e0aa7b1d
nv40: similar changes to polygon stipple as were done for scissor
2008-02-18 14:12:58 +11:00
José Fonseca
56bf73b1fb
Update doxygen configuration file for new tree layout.
2008-02-18 12:08:35 +09:00
Ben Skeggs
5e091b573a
nv40: ensure scissor gets disabled where necessary
...
Fixes progs/demos/lodbias.
Makes a complete mess of things, but now there's a motivation to finish
this off :)
2008-02-18 12:46:25 +11:00
Ben Skeggs
9a6c39bd2e
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
2008-02-18 12:45:56 +11:00
Zack Rusin
4a79156812
fix the build
2008-02-17 09:43:02 -05:00
Brian
0c6bbd41bd
gallium: add missing mip level clamp
2008-02-16 13:55:47 -07:00
Brian
3b2a291888
gallium: tweak texture filter min/mag thresholds
2008-02-16 13:50:31 -07:00
Brian
08c9534107
gallium: implement min vs. mag filter determination for non-mipmapped textures
...
Fixes tests/minmag.c
2008-02-16 10:05:24 -07:00
Brian
f9973b1c3d
Added minmag.c test
...
Test that different minification and magnification filters are chosen for the
non-mipmapped texture case.
2008-02-16 10:05:24 -07:00
Ben Skeggs
c303cf15dc
nouveau: fix potential userbuf crash.
2008-02-16 17:51:44 +11:00
Ben Skeggs
26add9288c
nouveau: match gallium code reorginisation.
...
That was... fun..
2008-02-16 17:23:12 +11:00
Ben Skeggs
87e3301533
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
...
Conflicts:
configs/linux-dri
src/mesa/pipe/Makefile
2008-02-16 16:30:22 +11:00
Ben Skeggs
49405c43f2
Merge branch 'nouveau-gallium-0.1' into darktama-gallium-0.1
...
Conflicts:
src/mesa/pipe/nouveau/nouveau_stateobj.h
src/mesa/pipe/nv40/nv40_context.c
src/mesa/pipe/nv40/nv40_miptree.c
2008-02-16 16:20:40 +11:00
Stephane Marchesin
4d9c19d2f7
nv30: fixes.
2008-02-16 03:04:28 +01:00
Stephane Marchesin
4032ff3889
nv30: fixes.
2008-02-16 02:54:22 +01:00
Ian Romanick
3320b1874e
Cell: Enable code gen for SPE attribute fetch
...
Doubles are still unsupported.
2008-02-15 11:03:54 -08:00
Ian Romanick
71071b7a9e
Cell: Add missing back-slash in linux-cell config file
2008-02-15 10:36:48 -08:00
Ian Romanick
eb3f7aa6f8
Cell: Add INCLUDE_DIRS to SPU_CFLAGS to fix build.
2008-02-15 10:33:12 -08:00
Ian Romanick
b08d3fa249
Make this file build on non-SSE builds (e.g., Cell)
2008-02-15 10:00:31 -08:00
Ian Romanick
397b81bd1c
Move cell_vertex_fetch.c for recent code reorg.
2008-02-15 09:43:13 -08:00
Ian Romanick
55e64b63ad
Initial version of code gen for attribute fetch
2008-02-15 09:40:44 -08:00
Ian Romanick
2cc0c3b997
Correct the convert to and from float instructions
2008-02-15 09:40:44 -08:00
Ben Skeggs
6e3e5ba3bb
nv40: over-zealous s/
2008-02-16 02:42:06 +11:00
Ben Skeggs
e82eabaf5e
nv40: fix non-debug builds + start on obeying portability guidelines.
2008-02-16 02:31:52 +11:00
Keith Whitwell
c179bc9901
tgsi: pass through failure to sse-codegenerate for fragment programs too.
...
In particular, will fallback to interpreted execution for shaders with
TEX instructions.
2008-02-15 13:39:24 +00:00
Keith Whitwell
b29d8d2729
draw: subclass vertex shaders according to execution method
...
Create new files for shaders compiled/executed with llvm, sse, exec
respectively
2008-02-15 13:37:01 +00:00
Keith Whitwell
e822e09b89
softpipe: rename some functions to disambiguate
2008-02-15 13:35:46 +00:00
Keith Whitwell
30d0bacf7a
Merge commit 'origin/gallium-0.1' into gallium-0.1
2008-02-15 11:18:04 +00:00
Keith Whitwell
6ac2c1cc0c
Merge commit 'origin/gallium-0.1' into gallium-0.1
...
Conflicts:
src/gallium/drivers/softpipe/sp_quad_fs.c
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/softpipe/sp_state_fs.c
2008-02-15 11:15:47 +00:00
José Fonseca
66f22aa3bf
Code reorganization: s/aux/auxiliary/ -- update build.
2008-02-15 20:11:40 +09:00
José Fonseca
92fcbf6e7b
Code reorganization: s/aux/auxiliary/.
...
"aux" is a reserved name on Windows (X_X)
2008-02-15 20:07:18 +09:00
Keith Whitwell
c04a7f8929
gallium: reorganize fragment shader execution, unbreak sse
...
This is probably going to get further reworked in the near future.
Right now there's a new interface wrapped around each shader execution
mode - exec, sse2, llvm. The llvm code was disabled already and has
just been moved as-is to a new file, whereas the sse2 and exec code is
actually enabled.
The way the interfaces has turned out suggests to me that the correct
approach is to actually have each shader include a pointer to a quad stage
which will do a better job of encapsulating the execution environment than
what I have here -- that's a second step however.
2008-02-15 09:31:22 +00:00
Keith Whitwell
fa9c160389
tgsi: disable dummy sse2 texture code
2008-02-15 08:56:04 +00:00
José Fonseca
6d3831b11d
Code reorganization: placeholder for state-trackers.
...
This is meant for temporarily holding state-trackers,
until they eventually find their way out of gallium tree.
2008-02-15 17:52:14 +09:00
José Fonseca
6acd63a498
Code reorganization: update build.
...
Update the Makefiles and includes for the new paths.
Note that there hasn't been no separation of the Makefiles yet, and make is
jumping all over the place. That will be taken care shortly. But for now, make
should work. It was tested with linux and linux-dri. Linux-cell and linux-llvm
might require some minor tweaks.
2008-02-15 17:50:12 +09:00
José Fonseca
b642730be9
Code reorganization: move files into their places.
...
This is in a separate commit to ensure renames are properly preserved.
2008-02-15 17:45:40 +09:00
Zack Rusin
4593be34b2
vastly simplify indexing
2008-02-15 01:17:17 -05:00
Zack Rusin
cf51d5c421
redo indirection
...
make all load's respect indirection
2008-02-15 01:17:17 -05:00
Zack Rusin
f70cc89dbc
redo the way immediates are handled
...
implement madd
start implementing arl
2008-02-15 01:17:17 -05:00
Zack Rusin
ae3375987f
rename 'argument' to 'load' because that's what it does
2008-02-15 01:17:17 -05:00
Zack Rusin
d0364584be
implement swizzling on writes
2008-02-15 01:17:16 -05:00
Zack Rusin
13d9e616f6
a call was missed during the last rename
2008-02-15 01:14:59 -05:00
Stephane Marchesin
0a653bef05
nouveau: more nv30 fixes, still doesn't work as well as before.
2008-02-15 04:23:46 +01:00
Stephane Marchesin
01fccea190
nouveau: nv30 fixes.
2008-02-15 03:48:47 +01:00
Ben Skeggs
86bba42023
nv30: more interface updates
2008-02-15 13:55:55 +11:00
Ben Skeggs
8d13f55d2c
nv30: fix build
2008-02-15 13:54:07 +11:00
Ben Skeggs
4c239ec2d7
nv40: always copy 4 float immediates for now.
2008-02-15 13:51:12 +11:00
Ben Skeggs
f33fa253c6
nv40: attempt at obeying sampler min_lod/max_lod/lod_bias
2008-02-15 13:51:12 +11:00
Ben Skeggs
7bd15fd271
nv40: remove use of pt->first_level
2008-02-15 13:51:12 +11:00
Brian
67a483909f
gallium: initial code for wide/AA line drawing
2008-02-15 13:51:12 +11:00
Brian
4ac85794b1
gallium: fix/finish glReadPixels(GL_DEPTH_COMPONENT).
...
This fixes demos/reflect ('d' key) and tests/zreaddraw.c
2008-02-15 13:51:12 +11:00
Brian
b487e4b4fb
gallium: clamp min_lod so it's never negative
2008-02-15 13:51:12 +11:00
Brian
2ef9df660c
Fix broken test.
...
As-is, if the texture was too large for the target, an assertion would fail.
Now check proxy texture first and if it works, then test non-proxy target.
2008-02-15 13:51:12 +11:00
Brian
dee8e268f7
gallium: remove dead code
2008-02-15 13:51:11 +11:00
Brian
c0a22da157
gallium: added null ptr check
2008-02-15 13:51:11 +11:00
Brian
bbdbdaddb0
gallium: rename st_fragment_program's fs field to cso to match st_vertex_program
2008-02-15 13:51:11 +11:00
Brian
aa31fe3b54
gallium: move gen-mipmap global/static vars into st_context
...
This fixes potential problems with multi-context programs.
2008-02-15 13:51:11 +11:00
Brian
7057a031f1
Set Min/MaxLod with glTexParameterf, not glTexParameteri
2008-02-15 13:51:11 +11:00
Brian
5b80529b60
press 0,1,2,etc keys for specific bias values
2008-02-15 13:51:11 +11:00
Brian
7eb2cd3427
tweak incr/decrements amounts for keyboard options
2008-02-15 13:51:11 +11:00
Brian
7d99bac7d6
gallium: remove unused first_level param from st_texture_create()
2008-02-15 13:51:11 +11:00
Brian
09e23e077b
gallium: clean-up, simplification of mipmapped textures
...
Remove pipe_texture->first_level (always implicitly zero). This means there's
never any unused mipmap levels at the top.
In the state tracker, we no longer re-layout mipmapped textures if the
MinLod/MaxLod texture parameters change. It's up to the driver to obey the
pipe_sampler->min/max_lod clamps.
2008-02-15 13:51:11 +11:00
Ben Skeggs
5d1af60edb
nv40: fix inline u08/u16 indices
2008-02-15 13:51:11 +11:00
Brian
3812bba839
gallium: take pitch/stride into account in mipmap generation
2008-02-15 13:51:11 +11:00
Brian
48c4a1ed12
gallium: comments about mipmap gen
2008-02-15 13:51:11 +11:00
Brian
a705e157f2
code refactoring, new next_mipmap_level_size() function
2008-02-15 13:51:11 +11:00
Brian
995924d566
gallium: implement software fallback for mipmap generation
...
This is used when we can't render to the surface type of the texture (such
as luminance/alpha).
2008-02-15 13:51:11 +11:00
Brian
59f0ce86b8
gallium: strip borders from textures passed to st_TexImage.
...
Manipulate the unpack params to skip the border. Gallium drivers won't support
texture borders.
2008-02-15 13:51:11 +11:00
Brian
ba499584d6
gallium: use _mesa_tex_target_to_face()
2008-02-15 13:51:10 +11:00
Brian
939aa5d3bd
added _mesa_tex_target_to_face()
2008-02-15 13:51:10 +11:00
Brian
23e6d1aebc
gallium: update comment about buffer map flags
2008-02-15 13:51:10 +11:00
Brian
1c7d7da30c
gallium: fix fragment/vertex typo
2008-02-15 13:51:10 +11:00
Brian
b81ef1c429
refactor code, export _mesa_generate_mipmap_level()
2008-02-15 13:51:10 +11:00
Brian
a217d0c7d0
move _mesa_format_to_type_and_comps() to texformat.c
2008-02-15 13:51:10 +11:00
Brian
708a022959
reorder cases in do_row()
2008-02-15 13:51:10 +11:00
Brian
4bf4f6e029
re-indent do_row()
2008-02-15 13:51:10 +11:00
Brian
9b3b230bf6
checkpoint- consolidation in do_row()
2008-02-15 13:51:10 +11:00
Brian
f554db1893
checkpoint- remove dependencies on gl_texture_format to make code re-usable by state tracker
2008-02-15 13:51:10 +11:00
Zack Rusin
a8637fb991
remove seperate llvm vs entry points
...
they're not necessary anymore. we use the same paths
as sse and tgsi code
2008-02-15 13:51:10 +11:00
Zack Rusin
7429555849
start genering soa type code in llvm paths
2008-02-15 13:51:09 +11:00
Zack Rusin
6f04f0f8aa
disable llvm for fragment shaders for now
2008-02-15 13:51:09 +11:00
Zack Rusin
8f15140943
rewrite the way cpu engine is handled
2008-02-15 13:51:09 +11:00
Zack Rusin
716206c190
rewrite the way we handle ir in llvm code
...
introduce intermediate step gallivm_ir before compiling it
down to the final llvm ir.
2008-02-15 13:51:09 +11:00
Zack Rusin
474f1a1d56
add a stub of a lowering pass
2008-02-15 13:51:09 +11:00
Ben Skeggs
ce358b879c
nouveau: memory leak
2008-02-15 13:51:09 +11:00
Ben Skeggs
ae78e6b549
nv40: prep for multiple pipe contexts on a single hw channel
2008-02-15 13:51:08 +11:00
Ben Skeggs
fc38b21d2a
nouveau: interface updates
2008-02-15 13:50:33 +11:00
Ben Skeggs
6aad1d9bbc
nv40: delay all state emit until before draw
2008-02-15 13:50:33 +11:00
Brian
fc65fb54ee
gallium: include st_cb_drawpixels.h
2008-02-15 13:50:33 +11:00
Brian
fa0a651a3e
fix comment typos
2008-02-15 13:50:33 +11:00
Brian
44bb16c4d4
gallium: initial implemenation of auto mipmap generation in state tracker
...
Use hardware rendering to compute/render mipmap levels.
The fallback path (which will be used for non-renderable texture formats)
isn't working yet.
2008-02-15 13:50:33 +11:00
Brian
d68ea8114a
gallium: added inClipCoords param to st_draw_vertices() to indicate coord system of vertices
...
Also, export st_make_passthrough_vertex_shader() from st_cb_drawpixels.c
2008-02-15 13:50:33 +11:00
Brian
184054fea1
gallium: added draw_flush() call in softpipe_bind_sampler_state()
2008-02-15 13:50:33 +11:00
Brian
76dc41765f
Remove unused texunit parameter to ctx->Driver.GenerateMipmap()
2008-02-15 13:50:33 +11:00
Jerome Glisse
e770d6adeb
intel_winsys: remove leftover code
2008-02-15 13:50:33 +11:00
Jerome Glisse
1e2f5fb05a
failover: several fixes to failover pipe module
2008-02-15 13:50:33 +11:00
Michel Dänzer
99c3c2d038
tgsi: Fall back to interpreter instead of assert(0) on unimplemented SSE code.
2008-02-15 13:50:32 +11:00
Michel Dänzer
f41a4ee11a
pipebuffer: Fix reversed assertion.
2008-02-15 13:50:32 +11:00
José Fonseca
87c8a1ba36
gallium: Conditionally use posix libraries/includes.
2008-02-15 13:50:32 +11:00
Brian
1d05c41c5b
Cell: silence unused var warnings
2008-02-15 13:50:32 +11:00
Brian
0af89a60b4
gallium: #include p_debug.h since we use assert
2008-02-15 13:50:32 +11:00
Brian
8ce9d29df9
Cell: use mem_dup()
2008-02-15 13:50:32 +11:00
Brian
2a3b31c1c4
gallium: use mem_dup()
2008-02-15 13:50:32 +11:00
Brian
67155e8edf
gallium: added mem_dup()
2008-02-15 13:50:32 +11:00
Brian
64ca0678ee
gallium: change pipe->texture_create() to operate like the CSO functions
...
Now, pass in a template object and return a new object.
2008-02-15 13:50:32 +11:00
Brian
20f16a6ae4
clean-ups in guess_and_alloc_texture()
2008-02-15 13:50:32 +11:00
Brian
30c9e12f8d
plug in ctx->Driver.GenerateMipmap function
2008-02-15 13:50:32 +11:00
Brian
08ffa00d15
Added ctx->Driver.GenerateMipmap() driver hook
2008-02-15 13:50:32 +11:00
Brian
20aa31a244
clean-ups
2008-02-15 13:50:32 +11:00
Brian
1ad145a950
added comment
2008-02-15 13:50:32 +11:00
Brian
e232b3ffc1
comments, clean-ups, consts
2008-02-15 13:50:32 +11:00
Brian
35caa43e68
clean-up
2008-02-15 13:50:31 +11:00
Brian
61e59234d0
gallium: add bitmap/drawpixels texcoord bias support
...
The state tracker will call pipe->get_paramf(PIPE_CAP_BITMAP_TEXCOORD_BIAS)
to get a bias factor for adjusting the texcoords used in bitmap/drawpixels.
This allows us to compensate for small differences in rasterization from
one device to another.
2008-02-15 13:50:31 +11:00
José Fonseca
bf3101afdc
gallium: Bring latest fixes.
2008-02-15 13:50:31 +11:00
José Fonseca
560416b263
gallium: Use p_debug.h instead of non-portable stdio.h/assert.h functions.
2008-02-15 13:50:31 +11:00
José Fonseca
7ff0b6782a
gallium: Add forgotten return type.
2008-02-15 13:50:31 +11:00
José Fonseca
d432583d69
gallium: Update scons instructions. Propagate user environment.
2008-02-15 13:50:31 +11:00
José Fonseca
25c29080f7
gallium: Cross-platform debugging helpers.
2008-02-15 13:50:31 +11:00
José Fonseca
152ea0b424
gallium: Portability guidelines.
2008-02-15 13:50:31 +11:00
Brian
d154f6a24b
Cell: remove accidentally added OPT_FLAGS lines
2008-02-15 13:50:31 +11:00
Brian
14f1f2523b
Cell: SIMD-ize tri_linear_coeff(), use vector float for vertex attributes in struct vertex_header
2008-02-15 13:50:31 +11:00
Brian
df2ab198eb
Cell: re-enable inlined vertex buffers
...
Vertex data must be on a 16-byte address/offset so SIMD operations will work
properly in the SPU code.
2008-02-15 13:50:31 +11:00
Brian
2ec5ae5e50
Cell: remove dummy fields, update/add some comments
2008-02-15 13:50:31 +11:00
Brian
48aad03939
Cell: added cell_batch_alloc_aligned()
2008-02-15 13:50:31 +11:00
Ian Romanick
ac07631d85
Use _transpose_matrix4x4 from Cell SDK instead of my own version
2008-02-15 13:50:31 +11:00
Ian Romanick
76702d5fcd
Add some debug messages
2008-02-15 13:50:30 +11:00
Ian Romanick
f33c8119ab
More semi-trivial vectorization in the shader VM
2008-02-15 13:50:30 +11:00
Ian Romanick
40147bd835
Vectorize vertex puller
2008-02-15 13:50:30 +11:00
Ian Romanick
d8642b8309
Vectorize all micro ops
...
Fold single instruction micro ops inline. Remove unused micro ops.
2008-02-15 13:50:30 +11:00
Ben Skeggs
e9147bfab4
nv40: cleanup state handling a bit
2008-02-15 13:50:30 +11:00
Michal Krol
7a1b2f4078
gallium: Use align_free to free aligned memory.
2008-02-15 13:50:30 +11:00
Brian
535abe4037
Cell: fix some alignment issues by aligning commands to 8-byte boundaries
...
Contributed by Ian Romanick.
Also, temporarily disable inlined vertex buffers. They need to be 16-byte
aligned...
2008-02-15 13:50:30 +11:00
Brian
6a3f1ea91d
Cell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0
2008-02-15 13:50:30 +11:00
Brian
f603652c30
Cell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0
2008-02-15 13:50:30 +11:00
Brian
4540e01978
Cell: move float4 typedef (temporary datatype)
2008-02-15 13:50:30 +11:00
Brian
d17e336259
Cell: fix small sampling error in sample_texture_bilinear()
2008-02-15 13:50:30 +11:00
Brian
790eec9666
Cell: texture sampler functions always return vector float now
...
Texture colors look the same now, regardless of X display/pixel format
2008-02-15 13:50:30 +11:00
Brian
71e6cd0b66
Cell: added spu_unpack_A8R8G8B8()
2008-02-15 13:50:30 +11:00
Brian
2f8268aa02
Cell: fix typo
2008-02-15 13:50:30 +11:00
Brian
21461014b2
Cell: some basic blending code
2008-02-15 13:50:30 +11:00
Brian
b4f5575add
Cell: replace float 4 with vector float in eval_coeff()
2008-02-15 13:50:29 +11:00
Brian
ab9b705c67
Cell: emit blend state to SPUs
2008-02-15 13:50:29 +11:00
Brian
4080fef473
Cell: choose bilinear vs. nearest filtering according to sampler state
2008-02-15 13:50:29 +11:00
Brian
1bd182889b
Cell: improved bilinear filtering
...
avoid calling get_tex_tile() if all texels are in same tile
2008-02-15 13:50:29 +11:00
Brian
e3ff185eae
Cell: implement basic bilinear texture sampler
2008-02-15 13:50:29 +11:00
Brian
382651a4fa
Cell: added spu_unpack_color(), spu_pack_R8G8B8A8()
2008-02-15 13:50:29 +11:00
Brian
09edd2e29e
Cell: SIMD-ize more of texture sampling
2008-02-15 13:50:29 +11:00
Brian
f94e0396ed
Cell: checkpoint: start to SIMD-ize texture sampling
2008-02-15 13:50:29 +11:00
Brian
d83dedc937
Cell: move tile clear code to flush_spans()
2008-02-15 13:50:29 +11:00
Brian
a0c35df4a0
Cell: clamp txmax, tymax in tile_bounding_box()
...
Also, added some debug printfs
2008-02-15 13:50:29 +11:00
Brian
4605b7df0a
Cell: insert some draw_flush() calls
2008-02-15 13:50:29 +11:00
Ben Skeggs
b111d266a0
nv40: the 0x4497 version of curie doesn't support index buffers.
2008-02-15 13:50:29 +11:00
Ben Skeggs
705022f98c
nouveau: avoid relocations where possible.
...
Potential relocations are emitted as NOPs where they're needed. In the
event a buffer moves, the pushbuf code will emit the relevant state
changes into the NOPs.
Just a start, more work is needed to get this looking how I want it to.
2008-02-15 13:50:29 +11:00
Ben Skeggs
8bbedc3f4b
nouveau: implement a bo_set_status()
2008-02-15 13:50:28 +11:00
Brian
6522a0531f
Cell: comment about emit_quad() mask
2008-02-15 13:50:28 +11:00
Brian
c90a2dcc29
Cell: move some tile get/clear code
...
Also, we weren't marking the ztile as dirty after ztesting, fixes gears glitches.
2008-02-15 13:50:28 +11:00
Brian
ae620d5c36
Cell: use global color_shuffle to remove a switch stmnt
2008-02-15 13:50:28 +11:00
Brian
de5d995201
Cell: New color packing functions (A8R8G8B8 and B8G8R8A8)
2008-02-15 13:50:28 +11:00
Brian
245c6a4cd5
Cell: rename/move global vars
...
Put tile-related globals into spu_global struct.
Rename c/ztile fields to be more consistant.
2008-02-15 13:50:28 +11:00
Brian
4fa69471c4
Cell: deprecate some use of struct cell_command - it should go away completely
...
Also, remove ALIGN16_ATTRIB from structs that no longer need it.
2008-02-15 13:50:28 +11:00
Brian
b25f1244ab
Cell: remove commands from top-level while loop which should only appear in batch buffers
2008-02-15 13:50:28 +11:00
Brian
1b6b5db4e2
Cell: move ztest before color interp/packing
2008-02-15 13:50:28 +11:00
Brian
a3d5d7067e
Cell: rename fields of the tile_t union
2008-02-15 13:50:28 +11:00
Brian
7a0099b9f3
Cell: implement Z16 and Z32 testing with SIMD instructions.
2008-02-15 13:50:28 +11:00
Brian
4f7dcb0e04
Cell: store current tile status in cur_tile_status_c/z, add TILE_STATUS_GETTING
2008-02-15 13:50:28 +11:00
Ian Romanick
0c0c62dd2a
Fix using "ccache ppu-gcc" for CC and fix parallel builds
...
CC wasn't quoted in a couple places in src/mesa/Makefile. Also, the
OSMesa link was missing a dependency.
2008-02-15 13:50:28 +11:00
Brian
41d1179fa6
fix typo
2008-02-15 13:50:28 +11:00
Brian
9aa37ad540
gallium: fix problem in which texcoords and varying vars got mapped to the same slot
...
This fixes the glsl/bump.c and glsl/texdemo1.c programs
2008-02-15 13:50:28 +11:00
Brian
a4c7c8a6ee
Fix problem in mapping vertex program outputs (found with "spring" game engine)
...
If the vertex program writes to an output that's not consumed by the
fragment program, map the vp output to an unused slot.
2008-02-15 13:50:28 +11:00
Brian
26fff001e7
gallium: comments about fragment Z computation
2008-02-15 13:50:27 +11:00
Brian
5ee218a021
gallium: Fix z clear bug when TILE_CLEAR_OPTIMIZATION==0
2008-02-15 13:50:27 +11:00
Brian
6c59de9a7b
gallium: fix get/put typo regression
...
This came from commit f3aa4de034 on 1/22/08.
Fixes strange Z buffer glitches seen in progs/glsl/texdemo1.c
2008-02-15 13:50:27 +11:00
Brian
7978c749fb
Cell: SIMD-ize const_coeff()
2008-02-15 13:50:27 +11:00
Brian
4d3f3f749f
Cell: set GALLIUM_CELL_VS env var to enable SPU-based vertex transformation
2008-02-15 13:50:27 +11:00
Keith Whitwell
c7403b1847
tgsi: Use ESI instead of EBX as temp reg on non-win32
2008-02-15 13:50:27 +11:00
José Fonseca
526bed2b95
gallium: Portability fixes.
2008-02-15 13:50:27 +11:00
José Fonseca
e11bfc9907
gallium: Make the build output dir depend on the configuration.
...
The build output dirs mimics the old config names:
build/linux
build/linux-dri
build/linux-dri-x86
build/linux-dri-x86-debug
...
2008-02-15 13:50:27 +11:00
José Fonseca
c285e06e93
gallium: Add SCons as alternative build system for Gallium.
2008-02-15 13:50:27 +11:00
Ian Romanick
2029ee48b1
I don't know why using uint64_t for "base" doesn't work. Ugh.
2008-02-15 13:50:27 +11:00
Ian Romanick
bcaf0dd8d2
Use SPUs for vertex shader processing
2008-02-15 13:50:27 +11:00
Ian Romanick
87cc80297c
Add driver_private field for drivers that hook shader_queue_flush.
2008-02-15 13:50:27 +11:00
Ian Romanick
524f99a4ab
Numerous small fixed to PPU-SPU vertex shader protocol
2008-02-15 13:50:27 +11:00
Ian Romanick
42db571598
cell_array_info should not be 16-byte aligned
...
Forcing cell_array_info to be 16-byte aligned makes it more difficult
to stuff that state in batch commands.
2008-02-15 13:50:27 +11:00
Ian Romanick
738a4292b1
Correctly read / write vertex header from / to main memory
2008-02-15 13:50:27 +11:00
Ian Romanick
6996b6c055
Handle CELL_CMD_VS_EXECUTE *only* outside batch commands.
2008-02-15 13:50:27 +11:00
Ian Romanick
fea350d911
Set machine->Processor
...
The default value is 0, which is TGSI_PROCESSOR_FRAGMENT...not correct
for a vertex shader!
2008-02-15 13:50:27 +11:00
Ian Romanick
dcfe7e1dca
Elts are always ints, pass vOut pointers in-line in command
2008-02-15 13:50:26 +11:00
Ian Romanick
bbbd5c166a
Implement micro_pow and micro_sqrt
...
Unimplemented micro ops get assertions for now.
2008-02-15 13:50:26 +11:00
Ian Romanick
805aacfe60
Fix size calculation in attribute fetch.
2008-02-15 13:50:26 +11:00
Ian Romanick
ea1d5c43b2
Fetch uniforms from main memory.
2008-02-15 13:50:26 +11:00
Ian Romanick
c1ffb57cdf
Missing amperstand in previous commit. Oops.
2008-02-15 13:50:26 +11:00
Ian Romanick
7abddcf123
Pass ptr to local memory copy instead of main memory to exec_instruction
...
This was essentially a cut-and-paste bug when the instruction fetcher
was added. Also, the test for TGSI_PROCESSOR_FRAGMENT was moved
outside the loop for exec_declaration.
2008-02-15 13:50:26 +11:00
Ian Romanick
d798e7e268
Provide mechanism to hook in custom vertex shader cache flush function
2008-02-15 13:50:26 +11:00
Ian Romanick
fc4620554a
Implement vertex fetch / vertex shader output write-back
2008-02-15 13:50:26 +11:00
Ian Romanick
5028f0fcac
Initial pass at instruction / declaration fetch
2008-02-15 13:50:26 +11:00
Ian Romanick
98eecdb486
Initial pass at vertex shader on SPU using TGSI VM
...
All of the code is wired in on the SPU side, but it is not called from
the PPU yet. Instruction / declaration fetch still needs to be
implemented in spu_exec.c.
2008-02-15 13:50:26 +11:00
Brian
3e4306c594
Cell: prototype SIMD code for z testing
2008-02-15 13:50:26 +11:00
Brian
1af8e381af
Cell: start to SIMD-ize triangle attribute interpolation
...
Using the spu_add(), etc intrinsics.
About a 15% speed-up with some tests.
2008-02-15 13:50:26 +11:00
Brian
0b762d6543
Cell: fold setup_tri() into tri_draw()
2008-02-15 13:50:26 +11:00
Brian
ecb0013e2f
Cell: make 'setup' a regular var instead of passing around a pointer everywhere
...
We'll never have more than one of these objects.
Avoiding pointer deref improves performance a bit.
2008-02-15 13:50:26 +11:00
Brian
ab5e8b33cb
Cell: minor code refactoring, movement
2008-02-15 13:50:25 +11:00
Brian
69099004e6
Cell: check tile status before wait_on_mask()
2008-02-15 13:50:25 +11:00
Brian
ae69496596
Cell: make wait_on_mask() static/inlined
2008-02-15 13:50:25 +11:00
Brian
92d71f0730
Cell: move CELL_MAX_SPUS
2008-02-15 13:50:25 +11:00
José Fonseca
ee41d7afc9
gallium: Teach draw_vf about draw vertices.
...
This reduces the emit overhead, which is significant since we're
emiting one vertex at a time.
2008-02-15 13:50:25 +11:00
José Fonseca
cdb48e20d6
gallium: Remove draw_vertex_fetch::lookup.
...
It is not being used, and would be dangerous to use given the possibility of constants.
2008-02-15 13:50:25 +11:00
Michal Krol
fc36399f23
gallium: Fix build on WinXP.
2008-02-15 13:50:25 +11:00
Ben Skeggs
a5273f0fac
nouveau: 0xdeadc0de
2008-02-15 13:50:25 +11:00
Brian
2b47b5b413
Cell: use _pack_rgba8() from pack_rgba8.h to do float[4]->uint color conversion
...
texcyl.c is twice as fast now in non-texture mode
2008-02-15 13:50:25 +11:00
Keith Whitwell
b63f994ec7
gallium: weaken assert slightly
2008-02-15 13:50:25 +11:00
Keith Whitwell
d7d3c75236
gallium: streamline various unfilled & stippled paths
2008-02-15 13:50:25 +11:00
Keith Whitwell
88469bf544
gallium: don't rely on assert(0) for error handling - may be disabled
2008-02-15 13:50:25 +11:00
José Fonseca
2da0724e99
gallium: Emit point size as a constant.
2008-02-15 13:50:24 +11:00
José Fonseca
c74f4a10f9
gallium: Emit constants.
2008-02-15 13:50:24 +11:00
José Fonseca
8a88f5e40f
gallium: Allow draw_vf usage to be controlled at runtime.
2008-02-15 13:50:24 +11:00
José Fonseca
7710b36d28
gallium: Add extern keyword to global.
2008-02-15 13:50:24 +11:00
Brian
1c65928d84
Cell: add OPT_FLAGS var
2008-02-15 13:50:24 +11:00
Brian
e308dc4465
Cell: move cmd_render() into new spu_render.c file
2008-02-15 13:50:24 +11:00
Brian
c474e0d6ed
Cell: add a few null texture tests
2008-02-15 13:50:24 +11:00
Brian
7012dd9b76
Cell: compute min index referenced in draw command, use it to reduce size of vertex data payload
2008-02-15 13:50:24 +11:00
Brian
5f54cfaba1
Cell: minor optimization for flat shading
2008-02-15 13:50:24 +11:00
Brian
948dc8ad24
Cell: basic texture mapping
...
Texture images are tiled in PPU code. SPUs use a texture cache for getting
texels from textures.
This is very rough code, but demos/texcyl.c works.
2008-02-15 13:50:24 +11:00
Brian
2f868411a2
Cell: initial texture cache/sampling code
2008-02-15 13:50:24 +11:00
Brian
7c596b8011
Cell: emit state in cell_clear_surface() if dirty.
...
Without this a program that does nothing but glClear() doesn't work. We need
the framebuffer state.
2008-02-15 13:50:24 +11:00
Brian
deaa895fe2
Cell: re-enable bounding boxes
...
The geometry bounding box is used to restrict rasterization to just those
tiles that are relevant.
Note another dummy field had to be added to the cell_command_render struct.
Apparently, every 4th word in a struct is susceptible to corruption in some
circumstances. Might be a compiler bug.
2008-02-15 13:50:24 +11:00
José Fonseca
d6667171dc
gallium: Use GALLIUM_ prefix for env vars.
2008-02-15 13:50:24 +11:00
José Fonseca
d5dd52aea8
gallium: Use CALLOC for pb_buffer to ensure that all fields of pipe_buffer are initiallized.
2008-02-15 13:50:23 +11:00
José Fonseca
5ec70aa03b
gallium: Remove direct dependencies to mesa internals.
...
_mesa_exec_free is still being called. More invasive refactoring is necessary to clean it out.
2008-02-15 13:50:23 +11:00
Keith Whitwell
eb08501403
gallium: remove dead vars, code
2008-02-15 13:50:23 +11:00
Keith Whitwell
3c9e26e0fa
gallium: fix typos in hardwired fetch path
2008-02-15 13:50:23 +11:00
Brian
0abef84995
push out far clip plane to 200
2008-02-15 13:50:23 +11:00
Brian
ab36a9346c
Added d/D keys to change viewing distance, 'a' to toggle animation
2008-02-15 13:50:23 +11:00
Brian
5b4d14bf1c
Cell: additional assertions
2008-02-15 13:50:23 +11:00
Brian
ca85eed771
Cell: make sure state commands aren't split across batches
2008-02-15 13:50:23 +11:00
Brian
1cbe803922
Cell: remove unneeded flush(), dead code
2008-02-15 13:50:23 +11:00
Brian
c4ef36dec0
Cell: clean-up of render path
...
Finally removed a number of unneeded flush commands. Vertex buffers are
allocated from the general buffer pool, freed by SPUs when done.
Still an occasional failed assertion (invalid batch buffer command)...
2008-02-15 13:50:23 +11:00
Brian
9abbaacea6
Cell: checkpoint commit: always inline prim indexes into batch buffer
...
Also, explicit release-vertex-buffer command.
Lots of debug/stale code still in place...
2008-02-15 13:50:23 +11:00
Brian
4f0906a18a
Cell: If flushing for swapbuffers, wait for frame completion
2008-02-15 13:50:23 +11:00
Brian
87c8f9c583
Cell: additional debug code, misc clean-up
2008-02-15 13:50:23 +11:00
Brian
5c7c0675a7
Cell: generalize the batch buffer code for vertex buffers...
2008-02-15 13:50:23 +11:00
Brian
72b671bd39
gallium: check if surface has defined status in check_clear_depth_with_quad()
...
This was part of Keith's patch from Friday.
2008-02-15 13:50:23 +11:00
Keith Whitwell
af2ccd4c0c
gallium: handle flatshading explicitly in clipper stage
...
We can do a better job in the clip stage than just relying on the
brute-force approach of copying colors to all incoming vertices applied
in the flatshade stage.
At very least, it is only necessary to do this in the clipper when a
primitive is actually being clipped.
2008-02-15 13:50:23 +11:00
Keith Whitwell
bb37e7f591
gallium: add a couple of hardwired vertex fetch functions
2008-02-15 13:50:22 +11:00
Keith Whitwell
f7e64c323f
gallium: only call vertex/prim queue flush when there is something to flush
2008-02-15 13:50:22 +11:00
Keith Whitwell
85d7e7ceee
gallium: explictly cast double to float in vertex fetch
2008-02-15 13:50:22 +11:00
Keith Whitwell
01ab6472cc
gallium: fill in missing formats for vertex_fetch
2008-02-15 13:50:22 +11:00
Keith Whitwell
25d2ffc669
gallium: remove dead code from draw_vf*
2008-02-15 13:50:22 +11:00
José Fonseca
169a74196f
First stab at hooking draw_vbuf & vf.
...
Emit disabled for now. Tested with softpipe. Only one vertex at a time for now (slow).
2008-02-15 13:50:22 +11:00
José Fonseca
a7872d4c41
Clone vf module.
2008-02-15 13:50:22 +11:00
Michal Krol
19780237ff
gallium: Fix memory leak.
2008-02-15 11:30:51 +09:00
Michal Krol
742c5d3e1b
gallium: Fix memory leak.
2008-02-15 11:30:49 +09:00
Michal Krol
6a7820d31f
gallium: Use align_free() to free aligned memories.
2008-02-15 11:30:06 +09:00
Michal Krol
d3cd39493c
gallium: Fix build on Windows.
2008-02-15 11:29:58 +09:00
Michal Krol
3f1b712d0a
gallium: Use MALLOC().
2008-02-15 11:22:07 +09:00
José Fonseca
d8ae972fd0
gallium: Fix MSVC compiler warnings.
2008-02-15 11:22:07 +09:00
Brian
663f4aaae6
gallium: remove some debug assertions in vertex format validation
...
If a fragment shader references an input for which there's no vertex
shader output (ex: texcoord3), use vertex output 0 by default.
Basically, the attribute's value will be undefined. The shader writer
should never rely on undefined fragment shader inputs anyway.
2008-02-14 19:18:09 -07:00
Brian
3d81a956b9
gallium: rearrange vertex info/layout validation
...
Delay validation until someone really needs the vertex layout (vbuf alloc
vertex buffer or point/line/tri setup/rendering).
This will allow the vertex size to change depending on whether we're
drawing points, lines or triangles.
2008-02-14 18:59:25 -07:00
Brian
1b6540b4b1
gallium: include draw_context.h to silence warning
2008-02-14 18:59:24 -07:00
Brian
d2b14311d9
gallium: minor function renaming
2008-02-14 18:59:24 -07:00
Brian
4c1403f667
gallium: new tgsi_transform_shader() function
...
Used to apply transformations to TGSI shaders, such as register search and
replace.
2008-02-14 18:59:24 -07:00
Brian
ca2f2c7664
gallium: new pgon-mode.c test
...
A two-triangle strip is drawn such that the first tri is front-facing and
the second tri is back-facing. Use different front/back polygon modes.
2008-02-14 18:59:24 -07:00
Brian
5e345a653b
gallium: call draw_flush() in softpipe_flush()
...
Without this, we might not get any rendering at SwapBuffers time when using the vbuf path.
2008-02-14 18:59:24 -07:00
Brian
7a3e59d236
gallium: fix some "instruction"/"declaration" mix-ups in tgsi_exec_prepare().
2008-02-14 18:59:24 -07:00
Brian
59cc1f4e62
gallium: replace "interpolate" terminology with "eval" to better reflect what's being done.
2008-02-14 18:59:24 -07:00
Brian
4f32c53237
gallium: changes to polygon mode weren't detected in draw_unfilled stage.
...
Need to reset stage->tri = unfilled_first_try in unfilled_flush() so that the
front/back state is picked up.
2008-02-14 18:59:24 -07:00
Brian
b08102a8f3
gallium: rename draw_free_tmps->draw_free_temp_verts, draw_alloc_tmps->draw_alloc_temp_verts
2008-02-14 18:59:24 -07:00
Brian
e9c6c31651
galllium: comments, minor clean-ups
2008-02-14 18:59:24 -07:00
Ian Romanick
bbd7aabe2b
More name typeo fixes.
2008-02-14 17:42:34 -08:00
Stephane Marchesin
903521a6c0
nouveau: oops and make nouveau winsys build by default
2008-02-15 02:41:34 +01:00
Stephane Marchesin
583f424d61
nouveau: add nv30.
2008-02-15 02:36:28 +01:00
Stephane Marchesin
e538dc52c1
nouveau: hook in nv30.
2008-02-15 02:26:03 +01:00
Stephane Marchesin
e713cb26c9
nouveau: Update to latest header.
2008-02-15 02:26:03 +01:00
Stephane Marchesin
73b3a29b16
Hook nv30 into the build.
2008-02-15 02:26:03 +01:00
Ian Romanick
d4d9943b01
s/spu_/spe_/g Ugh.
2008-02-14 17:06:13 -08:00
Ian Romanick
18fd3b7571
Cell: pass pointers to stored memory values
...
Several routines use shuffle patterns that are stored in memory. For
code gen, it is difficult to directly access the data segments. The
routines have been modified to be passed a pointer to a global table
of shuffle patterns.
This *should* be the last change to this file before switching over to
code gen.
2008-02-14 16:53:05 -08:00
Ian Romanick
f1257fd794
Cell: Fix unintended breakage from commit 1d62a057bc
2008-02-14 11:55:19 -08:00
Ian Romanick
77a1488620
Real-time assembler for Cell SPE.
2008-02-14 10:08:48 -08:00
Ian Romanick
dd07e154d2
Fetch routines convert and transpose all 4 vertices at once.
2008-02-14 10:08:48 -08:00
Ian Romanick
125451b9f0
Remove open-coded fetch functions
2008-02-14 10:08:48 -08:00
Ian Romanick
ca1a2da645
Initial pass at vertex cache, more vertex fetch changes
...
This is just another step towards dynamic generate of vertex fetch code.
2008-02-14 10:08:48 -08:00
Ian Romanick
c290367985
Vectorize a couple fetch functions
...
These C-coded vectorized functions are expected to be short lived.
They're basically a proof-of-concept for dynamically generated fetch
routines.
2008-02-14 10:08:48 -08:00
Michel Dänzer
0230c56ed0
intel_winsys: Call st_notify_swapbuffers_complete() after buffer swap.
2008-02-14 17:42:52 +00:00
Keith Whitwell
cf5ef20f43
gallium: Cleanups related to clears.
2008-02-14 16:53:51 +00:00
Keith Whitwell
18e94e15c0
gallium: Minor cleanups to bitfield sizes, etc.
2008-02-14 13:36:21 +00:00
Keith Whitwell
f3f7ff2573
tgsi: partially unbreak sse fragment shaders. more to do.
2008-02-14 12:14:46 +00:00
Maarten Maathuis
2effa9b36c
nv40: Avoid a nasty array overflow leading to a corrupt memory pointer.
2008-02-13 22:57:09 +01:00
Keith Whitwell
a856b399e6
x86: fix assignment in assert typo
2008-02-13 18:29:29 +00:00
Zack Rusin
2e75f39bc4
make swizzling on incoming arguments work
2008-02-13 09:26:56 -05:00
Zack Rusin
12d5b078e8
get rid of the terrible auto-generated entry point
...
it's not used anymore.
2008-02-13 08:46:05 -05:00
Zack Rusin
7e51d2a998
implement immediates and make them work
2008-02-13 08:33:16 -05:00
Zack Rusin
c107d57210
try to load the consts correctly
2008-02-13 08:33:16 -05:00
Keith Whitwell
66640c4b58
x86: remove debug
2008-02-13 12:37:42 +00:00
Keith Whitwell
8162d317d2
x86: emit absolute calls, as reallocating exec mem breaks relative ones
2008-02-13 12:36:32 +00:00
Keith Whitwell
a3534a27bf
tgsi: fail gracefully when sse code can't emit shader
2008-02-13 12:36:32 +00:00
Keith Whitwell
6046c54cc4
x86: reallocate exec mem when we run out
2008-02-13 12:36:32 +00:00
Keith Whitwell
7f342a20d2
tgsi: include more of the register info in debug dumps
2008-02-13 12:36:32 +00:00
Michel Dänzer
e922adbe1d
gallium: pipe->surface_copy can flip the contents vertically when necessary.
...
Fixes gears being upside down on the box in demos/gearbox.
2008-02-13 11:39:58 +00:00
Zack Rusin
4bb1a14d90
handle temporaries in llvm code generated paths
2008-02-13 04:38:10 -05:00
Zack Rusin
e179d5bdd1
implement add
2008-02-13 04:37:40 -05:00
Ben Skeggs
263de4b814
nv40: attempt at obeying sampler min_lod/max_lod/lod_bias
2008-02-13 19:33:41 +11:00
Zack Rusin
135d2329de
implement mul
2008-02-13 03:18:37 -05:00
Zack Rusin
4c8456264c
get mov working
2008-02-13 00:48:08 -05:00
Zack Rusin
53c2963b84
fix fetching input elements and generate a ret on end
2008-02-13 00:36:31 -05:00
Zack Rusin
9b6532f01b
add functiontype for the llvm native vs entry point
2008-02-13 00:21:24 -05:00
Zack Rusin
8b054cd6eb
disable llvm code in fs
2008-02-13 00:21:03 -05:00
Zack Rusin
3c3c1ff5cd
stop generate llvm entry points
...
entrypoints are useless because we use the same paths as all other
code. also simplify llvm swizzling code
2008-02-12 23:11:05 -05:00
Zack Rusin
cad7bc74d6
llvm ir code to fetch the elements
2008-02-12 23:11:05 -05:00
Ben Skeggs
6be095ae15
nv40: remove use of pt->first_level
2008-02-13 14:27:32 +11:00
Ben Skeggs
b397a2bb20
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2008-02-13 14:21:23 +11:00
Brian
e20e89e482
gallium: initial code for wide/AA line drawing
2008-02-12 19:14:58 -07:00
Brian
9af687c530
gallium: fix/finish glReadPixels(GL_DEPTH_COMPONENT).
...
This fixes demos/reflect ('d' key) and tests/zreaddraw.c
2008-02-12 17:44:57 -07:00
Brian
48e223a0db
gallium: clamp min_lod so it's never negative
2008-02-12 17:07:27 -07:00
Brian
be54b492d9
Fix broken test.
...
As-is, if the texture was too large for the target, an assertion would fail.
Now check proxy texture first and if it works, then test non-proxy target.
2008-02-12 16:57:00 -07:00
Brian
508b73289d
gallium: remove dead code
2008-02-12 16:38:56 -07:00
Brian
a34b43b3f4
gallium: added null ptr check
2008-02-12 16:37:49 -07:00
Brian
9677336845
gallium: rename st_fragment_program's fs field to cso to match st_vertex_program
2008-02-12 16:10:11 -07:00
Brian
6d53b8f423
gallium: move gen-mipmap global/static vars into st_context
...
This fixes potential problems with multi-context programs.
2008-02-12 16:06:51 -07:00
Brian
cf94941122
Set Min/MaxLod with glTexParameterf, not glTexParameteri
2008-02-12 15:54:15 -07:00
Brian
4697cee78b
press 0,1,2,etc keys for specific bias values
2008-02-12 15:01:44 -07:00
Brian
74c32ee6aa
tweak incr/decrements amounts for keyboard options
2008-02-12 15:01:32 -07:00
Brian
1d62a057bc
gallium: remove unused first_level param from st_texture_create()
2008-02-12 14:55:51 -07:00
Brian
4da1cdf78f
gallium: clean-up, simplification of mipmapped textures
...
Remove pipe_texture->first_level (always implicitly zero). This means there's
never any unused mipmap levels at the top.
In the state tracker, we no longer re-layout mipmapped textures if the
MinLod/MaxLod texture parameters change. It's up to the driver to obey the
pipe_sampler->min/max_lod clamps.
2008-02-12 14:53:25 -07:00
Ben Skeggs
5ba3dbe2cc
nv40: fix inline u08/u16 indices
2008-02-12 15:13:37 +11:00
Brian
b61b1a295b
gallium: take pitch/stride into account in mipmap generation
2008-02-11 10:59:40 -07:00
Brian
3d0fd8a6cf
gallium: comments about mipmap gen
2008-02-11 09:50:21 -07:00
Brian
c22d9152e3
code refactoring, new next_mipmap_level_size() function
2008-02-11 09:46:50 -07:00
Brian
e4026167d7
gallium: implement software fallback for mipmap generation
...
This is used when we can't render to the surface type of the texture (such
as luminance/alpha).
2008-02-11 09:46:50 -07:00
Brian
212b27d33f
gallium: strip borders from textures passed to st_TexImage.
...
Manipulate the unpack params to skip the border. Gallium drivers won't support
texture borders.
2008-02-11 09:46:50 -07:00
Brian
cfe9e66f2b
gallium: use _mesa_tex_target_to_face()
2008-02-11 09:46:50 -07:00
Brian
b52ce6341f
added _mesa_tex_target_to_face()
2008-02-11 09:46:49 -07:00
Brian
789f2f15e8
gallium: update comment about buffer map flags
2008-02-11 09:46:49 -07:00
Brian
2e4077db16
gallium: fix fragment/vertex typo
2008-02-11 09:46:49 -07:00
Brian
3bae27fcc5
refactor code, export _mesa_generate_mipmap_level()
2008-02-11 09:46:49 -07:00
Brian
42eac65da4
move _mesa_format_to_type_and_comps() to texformat.c
2008-02-11 09:46:49 -07:00
Brian
9ddb7d794b
reorder cases in do_row()
2008-02-11 09:46:49 -07:00
Brian
30dff589a4
re-indent do_row()
2008-02-11 09:46:49 -07:00
Brian
ed6e72e855
checkpoint- consolidation in do_row()
2008-02-11 09:46:49 -07:00
Brian
aa9d9d9c40
checkpoint- remove dependencies on gl_texture_format to make code re-usable by state tracker
2008-02-11 09:46:49 -07:00
Zack Rusin
084e6c92e0
remove seperate llvm vs entry points
...
they're not necessary anymore. we use the same paths
as sse and tgsi code
2008-02-11 10:47:28 -05:00
Zack Rusin
e761161d01
start genering soa type code in llvm paths
2008-02-11 09:43:59 -05:00
Zack Rusin
1712a5380a
disable llvm for fragment shaders for now
2008-02-10 23:07:18 -05:00
Zack Rusin
137edf7533
rewrite the way cpu engine is handled
2008-02-10 23:07:18 -05:00
Zack Rusin
7d69090e27
rewrite the way we handle ir in llvm code
...
introduce intermediate step gallivm_ir before compiling it
down to the final llvm ir.
2008-02-10 23:07:18 -05:00
Zack Rusin
f625c6d1d0
add a stub of a lowering pass
2008-02-10 23:07:17 -05:00
Ben Skeggs
af344660d7
nouveau: memory leak
2008-02-10 15:19:18 +11:00
Ben Skeggs
0ac4e8cd49
nv40: prep for multiple pipe contexts on a single hw channel
2008-02-10 15:16:50 +11:00
Ben Skeggs
8973ca12a5
nouveau: interface updates
2008-02-09 16:33:32 +11:00
Ben Skeggs
fb2760c5a6
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2008-02-09 16:15:14 +11:00
Ben Skeggs
ae905056d4
nv40: delay all state emit until before draw
2008-02-09 14:08:54 +11:00
Brian
479b5e9b5d
gallium: include st_cb_drawpixels.h
2008-02-08 15:13:49 -07:00
Brian
9f9c3b752a
fix comment typos
2008-02-08 15:13:49 -07:00
Brian
62abcb9aac
gallium: initial implemenation of auto mipmap generation in state tracker
...
Use hardware rendering to compute/render mipmap levels.
The fallback path (which will be used for non-renderable texture formats)
isn't working yet.
2008-02-08 15:13:49 -07:00
Brian
0b64ee6960
gallium: added inClipCoords param to st_draw_vertices() to indicate coord system of vertices
...
Also, export st_make_passthrough_vertex_shader() from st_cb_drawpixels.c
2008-02-08 15:13:48 -07:00
Brian
864abce57d
gallium: added draw_flush() call in softpipe_bind_sampler_state()
2008-02-08 15:13:48 -07:00
Brian
c3395f4473
Remove unused texunit parameter to ctx->Driver.GenerateMipmap()
2008-02-08 15:13:48 -07:00
Jerome Glisse
21e9396e65
intel_winsys: remove leftover code
2008-02-08 18:47:25 +01:00
Jerome Glisse
2b6a31bfda
failover: several fixes to failover pipe module
2008-02-08 18:25:49 +01:00
Michel Dänzer
909c703bfb
tgsi: Fall back to interpreter instead of assert(0) on unimplemented SSE code.
2008-02-07 19:45:24 +00:00
Michel Dänzer
28ecb986d9
pipebuffer: Fix reversed assertion.
2008-02-07 19:43:34 +00:00
José Fonseca
0013796948
gallium: Conditionally use posix libraries/includes.
2008-02-07 19:59:37 +09:00
Brian
c4e0d725dc
Cell: silence unused var warnings
2008-02-06 09:48:56 -07:00
Brian
2ed6604f50
gallium: #include p_debug.h since we use assert
2008-02-06 09:48:37 -07:00
Brian
c0235d0a24
Cell: use mem_dup()
2008-02-06 09:35:39 -07:00
Brian
f12d641ab2
gallium: use mem_dup()
2008-02-06 09:35:39 -07:00
Brian
c8af89cf72
gallium: added mem_dup()
2008-02-06 09:35:39 -07:00
Brian
31c98eafb0
gallium: change pipe->texture_create() to operate like the CSO functions
...
Now, pass in a template object and return a new object.
2008-02-06 09:35:39 -07:00
Brian
f52f5136e6
clean-ups in guess_and_alloc_texture()
2008-02-06 09:35:39 -07:00
Brian
2440ff74d6
plug in ctx->Driver.GenerateMipmap function
2008-02-06 09:35:39 -07:00
Brian
4c2f3dbca9
Added ctx->Driver.GenerateMipmap() driver hook
2008-02-06 09:35:39 -07:00
Brian
afc5498337
clean-ups
2008-02-06 09:35:39 -07:00
Brian
105b3596be
added comment
2008-02-06 09:35:39 -07:00
Brian
a4fbf09673
comments, clean-ups, consts
2008-02-06 09:35:39 -07:00
Brian
71984d76aa
clean-up
2008-02-06 09:35:38 -07:00
Brian
4650b35846
gallium: add bitmap/drawpixels texcoord bias support
...
The state tracker will call pipe->get_paramf(PIPE_CAP_BITMAP_TEXCOORD_BIAS)
to get a bias factor for adjusting the texcoords used in bitmap/drawpixels.
This allows us to compensate for small differences in rasterization from
one device to another.
2008-02-06 09:35:38 -07:00
José Fonseca
af6b12cc76
gallium: Bring latest fixes.
2008-02-07 01:07:49 +09:00
José Fonseca
9791d7f64c
gallium: Use p_debug.h instead of non-portable stdio.h/assert.h functions.
2008-02-06 14:37:49 +09:00
José Fonseca
78bce9c2dc
gallium: Add forgotten return type.
2008-02-06 14:37:24 +09:00
José Fonseca
81b6a801f7
gallium: Update scons instructions. Propagate user environment.
2008-02-06 14:36:50 +09:00
José Fonseca
a31d289de6
gallium: Cross-platform debugging helpers.
2008-02-06 13:27:49 +09:00
José Fonseca
5e2d0517b1
gallium: Portability guidelines.
2008-02-06 12:56:35 +09:00
Brian
e39fccc34c
Cell: remove accidentally added OPT_FLAGS lines
2008-02-05 15:12:18 -07:00
Brian
1730f7bad4
Cell: SIMD-ize tri_linear_coeff(), use vector float for vertex attributes in struct vertex_header
2008-02-05 15:08:06 -07:00
Brian
4da82fd5c5
Cell: re-enable inlined vertex buffers
...
Vertex data must be on a 16-byte address/offset so SIMD operations will work
properly in the SPU code.
2008-02-05 15:08:06 -07:00
Brian
2174890ed0
Cell: remove dummy fields, update/add some comments
2008-02-05 15:08:06 -07:00
Brian
b0974420f4
Cell: added cell_batch_alloc_aligned()
2008-02-05 15:08:06 -07:00
Ian Romanick
c9f98142b6
Use _transpose_matrix4x4 from Cell SDK instead of my own version
2008-02-05 09:44:33 -08:00
Ian Romanick
45f4125fa8
Add some debug messages
2008-02-05 09:44:33 -08:00
Ian Romanick
e8a80c8627
More semi-trivial vectorization in the shader VM
2008-02-05 09:44:33 -08:00
Ian Romanick
490a7b1c73
Vectorize vertex puller
2008-02-05 09:44:33 -08:00
Ian Romanick
8fc2355949
Vectorize all micro ops
...
Fold single instruction micro ops inline. Remove unused micro ops.
2008-02-05 09:44:33 -08:00
Ben Skeggs
9bd17ea3a3
nv40: cleanup state handling a bit
2008-02-06 02:25:14 +11:00
Michal Krol
45b18c51c0
gallium: Use align_free to free aligned memory.
2008-02-05 07:50:56 -07:00
Brian
5db1593c78
Cell: fix some alignment issues by aligning commands to 8-byte boundaries
...
Contributed by Ian Romanick.
Also, temporarily disable inlined vertex buffers. They need to be 16-byte
aligned...
2008-02-04 18:05:37 -07:00
Brian
684d320ea2
Cell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0
2008-02-04 18:03:05 -07:00
Brian
7cbe5cf212
Cell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0
2008-02-04 18:02:21 -07:00
Brian
93d061b217
Cell: move float4 typedef (temporary datatype)
2008-02-04 16:48:36 -07:00
Brian
1a75464cdc
Cell: fix small sampling error in sample_texture_bilinear()
2008-02-04 16:48:00 -07:00
Brian
efa8e03a6f
Cell: texture sampler functions always return vector float now
...
Texture colors look the same now, regardless of X display/pixel format
2008-02-04 16:06:51 -07:00
Brian
5068b573c4
Cell: added spu_unpack_A8R8G8B8()
2008-02-04 16:05:13 -07:00
Brian
76c1a10eb1
Cell: fix typo
2008-02-04 16:04:50 -07:00
Brian
bc1ad6bcbd
Cell: some basic blending code
2008-02-04 15:17:50 -07:00
Brian
168247d1ca
Cell: replace float 4 with vector float in eval_coeff()
2008-02-04 15:10:35 -07:00
Brian
7a1d01f2a0
Cell: emit blend state to SPUs
2008-02-04 15:06:10 -07:00
Brian
8f924e4df0
Cell: choose bilinear vs. nearest filtering according to sampler state
2008-02-04 13:23:07 -07:00
Brian
ca1d2fc5f6
Cell: improved bilinear filtering
...
avoid calling get_tex_tile() if all texels are in same tile
2008-02-04 13:16:10 -07:00
Brian
0a45f75948
Cell: implement basic bilinear texture sampler
2008-02-04 12:50:42 -07:00
Brian
9a5074217f
Cell: added spu_unpack_color(), spu_pack_R8G8B8A8()
2008-02-04 12:50:16 -07:00
Brian
703a869155
Cell: SIMD-ize more of texture sampling
2008-02-04 11:02:47 -07:00
Brian
18105195a8
Cell: checkpoint: start to SIMD-ize texture sampling
2008-02-04 09:54:21 -07:00
Stephane Marchesin
f71400876b
nouveau: update to latest header.
2008-02-04 17:31:45 +01:00
Brian
e967a5c746
Cell: move tile clear code to flush_spans()
2008-02-04 08:53:18 -07:00
Brian
6023311c7c
Cell: clamp txmax, tymax in tile_bounding_box()
...
Also, added some debug printfs
2008-02-04 08:46:44 -07:00
Brian
69cc19751d
Cell: insert some draw_flush() calls
2008-02-04 08:45:33 -07:00
Stephane Marchesin
5351e7270f
Add NV63.
2008-02-03 23:08:06 +01:00
Ben Skeggs
63923b8c95
nv40: the 0x4497 version of curie doesn't support index buffers.
2008-02-04 01:37:07 +11:00
Ben Skeggs
f87a8cace2
nouveau: avoid relocations where possible.
...
Potential relocations are emitted as NOPs where they're needed. In the
event a buffer moves, the pushbuf code will emit the relevant state
changes into the NOPs.
Just a start, more work is needed to get this looking how I want it to.
2008-02-03 12:08:49 +11:00
Ben Skeggs
edbeec2b91
nouveau: implement a bo_set_status()
2008-02-02 14:22:24 +11:00
Brian
aa761b1605
Cell: comment about emit_quad() mask
2008-02-01 16:54:46 -07:00
Brian
44d3269356
Cell: move some tile get/clear code
...
Also, we weren't marking the ztile as dirty after ztesting, fixes gears glitches.
2008-02-01 16:42:09 -07:00
Brian
8bd566a9cb
Cell: use global color_shuffle to remove a switch stmnt
2008-02-01 16:25:42 -07:00
Brian
d7c2eb0df4
Cell: New color packing functions (A8R8G8B8 and B8G8R8A8)
2008-02-01 15:45:02 -07:00
Brian
42201d7574
Cell: rename/move global vars
...
Put tile-related globals into spu_global struct.
Rename c/ztile fields to be more consistant.
2008-02-01 15:33:53 -07:00
Brian
17305489f0
Cell: deprecate some use of struct cell_command - it should go away completely
...
Also, remove ALIGN16_ATTRIB from structs that no longer need it.
2008-02-01 15:24:00 -07:00
Brian
b1a472bfb7
Cell: remove commands from top-level while loop which should only appear in batch buffers
2008-02-01 15:20:07 -07:00
Brian
0e9a370ae2
Cell: move ztest before color interp/packing
2008-02-01 14:04:56 -07:00
Brian
c392cc8f1b
Cell: rename fields of the tile_t union
2008-02-01 14:04:55 -07:00
Brian
59be082909
Cell: implement Z16 and Z32 testing with SIMD instructions.
2008-02-01 14:04:55 -07:00
Brian
b108bea6b4
Cell: store current tile status in cur_tile_status_c/z, add TILE_STATUS_GETTING
2008-02-01 14:04:55 -07:00
Ian Romanick
20df285b14
Fix using "ccache ppu-gcc" for CC and fix parallel builds
...
CC wasn't quoted in a couple places in src/mesa/Makefile. Also, the
OSMesa link was missing a dependency.
2008-01-31 17:22:07 -08:00
Brian
635341ec5b
fix typo
2008-01-31 17:05:43 -07:00
Brian
633e1133ae
gallium: fix problem in which texcoords and varying vars got mapped to the same slot
...
This fixes the glsl/bump.c and glsl/texdemo1.c programs
2008-01-31 14:35:25 -07:00
Brian
86787043fa
Fix problem in mapping vertex program outputs (found with "spring" game engine)
...
If the vertex program writes to an output that's not consumed by the
fragment program, map the vp output to an unused slot.
2008-01-31 14:05:04 -07:00
Brian
acb81374c1
gallium: comments about fragment Z computation
2008-01-31 13:41:14 -07:00
Brian
9536314a6c
gallium: Fix z clear bug when TILE_CLEAR_OPTIMIZATION==0
2008-01-31 13:41:14 -07:00
Brian
c36cdc6156
gallium: fix get/put typo regression
...
This came from commit f3aa4de034 on 1/22/08.
Fixes strange Z buffer glitches seen in progs/glsl/texdemo1.c
2008-01-31 13:41:14 -07:00
Brian
cd53eb0db1
Cell: SIMD-ize const_coeff()
2008-01-31 08:21:38 -07:00
Brian
256486829f
Cell: set GALLIUM_CELL_VS env var to enable SPU-based vertex transformation
2008-01-31 08:12:47 -07:00
Keith Whitwell
e82c9b867c
tgsi: Use ESI instead of EBX as temp reg on non-win32
2008-01-31 11:57:49 +00:00
José Fonseca
50d5f304ad
gallium: Portability fixes.
2008-01-31 18:25:05 +09:00
José Fonseca
f4192cb4ca
gallium: Make the build output dir depend on the configuration.
...
The build output dirs mimics the old config names:
build/linux
build/linux-dri
build/linux-dri-x86
build/linux-dri-x86-debug
...
2008-01-31 14:22:21 +09:00
José Fonseca
c42e6254cf
gallium: Add SCons as alternative build system for Gallium.
2008-01-31 14:22:21 +09:00
Ian Romanick
62d11b98c4
I don't know why using uint64_t for "base" doesn't work. Ugh.
2008-01-30 20:14:52 -08:00
Ian Romanick
5a6fd93930
Use SPUs for vertex shader processing
2008-01-30 20:14:52 -08:00
Ian Romanick
a89ee8a96d
Add driver_private field for drivers that hook shader_queue_flush.
2008-01-30 20:14:52 -08:00
Ian Romanick
9ad986b887
Numerous small fixed to PPU-SPU vertex shader protocol
2008-01-30 20:14:52 -08:00
Ian Romanick
de949a471e
cell_array_info should not be 16-byte aligned
...
Forcing cell_array_info to be 16-byte aligned makes it more difficult
to stuff that state in batch commands.
2008-01-30 20:14:52 -08:00
Ian Romanick
10270fbe2d
Correctly read / write vertex header from / to main memory
2008-01-30 20:14:52 -08:00
Ian Romanick
193491cbd3
Handle CELL_CMD_VS_EXECUTE *only* outside batch commands.
2008-01-30 20:14:52 -08:00
Ian Romanick
fb348c2cb1
Set machine->Processor
...
The default value is 0, which is TGSI_PROCESSOR_FRAGMENT...not correct
for a vertex shader!
2008-01-30 20:14:52 -08:00
Ian Romanick
137cb72284
Elts are always ints, pass vOut pointers in-line in command
2008-01-30 20:14:51 -08:00
Ian Romanick
3349861146
Implement micro_pow and micro_sqrt
...
Unimplemented micro ops get assertions for now.
2008-01-30 20:14:51 -08:00
Ian Romanick
7b27d9fd66
Fix size calculation in attribute fetch.
2008-01-30 20:14:51 -08:00
Ian Romanick
708d699e0c
Fetch uniforms from main memory.
2008-01-30 20:14:51 -08:00
Ian Romanick
a0a707342a
Missing amperstand in previous commit. Oops.
2008-01-30 20:14:51 -08:00
Ian Romanick
fcf9441773
Pass ptr to local memory copy instead of main memory to exec_instruction
...
This was essentially a cut-and-paste bug when the instruction fetcher
was added. Also, the test for TGSI_PROCESSOR_FRAGMENT was moved
outside the loop for exec_declaration.
2008-01-30 20:14:51 -08:00
Ian Romanick
3d13605ee5
Provide mechanism to hook in custom vertex shader cache flush function
2008-01-30 20:14:51 -08:00
Ian Romanick
13eec10688
Implement vertex fetch / vertex shader output write-back
2008-01-30 20:14:51 -08:00
Ian Romanick
33cac48241
Initial pass at instruction / declaration fetch
2008-01-30 20:14:51 -08:00
Ian Romanick
524bba17a7
Initial pass at vertex shader on SPU using TGSI VM
...
All of the code is wired in on the SPU side, but it is not called from
the PPU yet. Instruction / declaration fetch still needs to be
implemented in spu_exec.c.
2008-01-30 20:14:51 -08:00
Brian
8fb73a5993
Cell: prototype SIMD code for z testing
2008-01-30 20:40:26 -07:00
Brian
24f0e54c1b
Cell: start to SIMD-ize triangle attribute interpolation
...
Using the spu_add(), etc intrinsics.
About a 15% speed-up with some tests.
2008-01-30 15:26:51 -07:00
Brian
7b149449df
Cell: fold setup_tri() into tri_draw()
2008-01-30 12:13:04 -07:00
Brian
022bf6dfa1
Cell: make 'setup' a regular var instead of passing around a pointer everywhere
...
We'll never have more than one of these objects.
Avoiding pointer deref improves performance a bit.
2008-01-30 12:08:23 -07:00
Brian
dcf41a0eed
Cell: minor code refactoring, movement
2008-01-30 11:56:41 -07:00
Brian
0d3f60ec64
Cell: check tile status before wait_on_mask()
2008-01-30 11:56:14 -07:00
Brian
41bdf4cf4c
Cell: make wait_on_mask() static/inlined
2008-01-30 11:49:51 -07:00
Brian
da6eac242d
Cell: move CELL_MAX_SPUS
2008-01-30 11:49:26 -07:00
José Fonseca
eb0e0d38ea
gallium: Teach draw_vf about draw vertices.
...
This reduces the emit overhead, which is significant since we're
emiting one vertex at a time.
2008-01-30 16:47:33 +09:00
José Fonseca
ed0327980a
gallium: Remove draw_vertex_fetch::lookup.
...
It is not being used, and would be dangerous to use given the possibility of constants.
2008-01-30 16:00:07 +09:00
Michal Krol
17ef840af4
gallium: Fix build on WinXP.
2008-01-30 16:00:00 +09:00
Ben Skeggs
1bcd6b8ff9
nouveau: 0xdeadc0de
2008-01-30 15:34:11 +11:00
Brian
7f2713a29f
Cell: use _pack_rgba8() from pack_rgba8.h to do float[4]->uint color conversion
...
texcyl.c is twice as fast now in non-texture mode
2008-01-29 11:23:44 -07:00
Keith Whitwell
1aaed38568
gallium: weaken assert slightly
2008-01-29 15:17:56 +00:00
Ben Skeggs
ae7dcae81b
nouveau: support nv67
2008-01-30 00:05:59 +11:00
Keith Whitwell
c81848210e
gallium: streamline various unfilled & stippled paths
2008-01-29 12:38:34 +00:00
Keith Whitwell
c185c55aec
gallium: don't rely on assert(0) for error handling - may be disabled
2008-01-29 12:38:34 +00:00
José Fonseca
f94425b316
gallium: Emit point size as a constant.
2008-01-29 20:47:30 +09:00
José Fonseca
5022344c65
gallium: Emit constants.
2008-01-29 20:46:48 +09:00
José Fonseca
6f75de06ff
gallium: Allow draw_vf usage to be controlled at runtime.
2008-01-29 18:01:40 +09:00
José Fonseca
3d3f7cf06e
gallium: Add extern keyword to global.
2008-01-29 18:01:40 +09:00
Brian
59e7bfd5ac
Cell: add OPT_FLAGS var
2008-01-28 18:18:46 -07:00
Brian
64935c8751
Cell: move cmd_render() into new spu_render.c file
2008-01-28 18:18:46 -07:00
Brian
4bede9219b
Cell: add a few null texture tests
2008-01-28 18:18:46 -07:00
Brian
e2406b4788
Cell: compute min index referenced in draw command, use it to reduce size of vertex data payload
2008-01-28 18:18:46 -07:00
Brian
25105276b3
Cell: minor optimization for flat shading
2008-01-28 18:18:46 -07:00
Brian
425f270fcb
Cell: basic texture mapping
...
Texture images are tiled in PPU code. SPUs use a texture cache for getting
texels from textures.
This is very rough code, but demos/texcyl.c works.
2008-01-28 18:18:46 -07:00
Brian
c2372cc748
Cell: initial texture cache/sampling code
2008-01-28 18:18:46 -07:00
Brian
41899c70a7
Cell: emit state in cell_clear_surface() if dirty.
...
Without this a program that does nothing but glClear() doesn't work. We need
the framebuffer state.
2008-01-28 18:18:46 -07:00
Brian
043fc00a60
Cell: re-enable bounding boxes
...
The geometry bounding box is used to restrict rasterization to just those
tiles that are relevant.
Note another dummy field had to be added to the cell_command_render struct.
Apparently, every 4th word in a struct is susceptible to corruption in some
circumstances. Might be a compiler bug.
2008-01-28 18:18:46 -07:00
José Fonseca
1cc0b0dda7
gallium: Use GALLIUM_ prefix for env vars.
2008-01-29 09:42:03 +09:00
José Fonseca
93d727eea7
gallium: Use CALLOC for pb_buffer to ensure that all fields of pipe_buffer are initiallized.
2008-01-29 09:41:21 +09:00
José Fonseca
f3d0882c02
gallium: Remove direct dependencies to mesa internals.
...
_mesa_exec_free is still being called. More invasive refactoring is necessary to clean it out.
2008-01-29 09:34:09 +09:00
Keith Whitwell
1e2d6b1b82
gallium: remove dead vars, code
2008-01-28 20:58:26 +00:00
Keith Whitwell
c50ba44095
gallium: fix typos in hardwired fetch path
2008-01-28 20:58:26 +00:00
Brian
bd299093ec
push out far clip plane to 200
2008-01-28 12:42:37 -07:00
Brian
ba083bae69
Added d/D keys to change viewing distance, 'a' to toggle animation
2008-01-28 12:37:35 -07:00
Brian
3d1b0f4c57
Cell: additional assertions
2008-01-28 11:31:58 -07:00
Brian
a8590e097e
Cell: make sure state commands aren't split across batches
2008-01-28 11:31:58 -07:00
Brian
3f8a8eada6
Cell: remove unneeded flush(), dead code
2008-01-28 11:31:58 -07:00
Brian
5b5ec94663
Cell: clean-up of render path
...
Finally removed a number of unneeded flush commands. Vertex buffers are
allocated from the general buffer pool, freed by SPUs when done.
Still an occasional failed assertion (invalid batch buffer command)...
2008-01-28 11:31:57 -07:00
Brian
7024019d4e
Cell: checkpoint commit: always inline prim indexes into batch buffer
...
Also, explicit release-vertex-buffer command.
Lots of debug/stale code still in place...
2008-01-28 11:31:57 -07:00
Brian
200dcb4760
Cell: If flushing for swapbuffers, wait for frame completion
2008-01-28 11:31:57 -07:00
Brian
aaea9a121b
Cell: additional debug code, misc clean-up
2008-01-28 11:31:57 -07:00
Brian
2194675196
Cell: generalize the batch buffer code for vertex buffers...
2008-01-28 11:31:57 -07:00
Brian
16ed55c641
gallium: check if surface has defined status in check_clear_depth_with_quad()
...
This was part of Keith's patch from Friday.
2008-01-28 09:23:50 -07:00
Keith Whitwell
82d9063708
gallium: handle flatshading explicitly in clipper stage
...
We can do a better job in the clip stage than just relying on the
brute-force approach of copying colors to all incoming vertices applied
in the flatshade stage.
At very least, it is only necessary to do this in the clipper when a
primitive is actually being clipped.
2008-01-28 15:50:02 +00:00
Keith Whitwell
88858e0468
gallium: add a couple of hardwired vertex fetch functions
2008-01-28 12:40:29 +00:00
Keith Whitwell
99f2976511
gallium: only call vertex/prim queue flush when there is something to flush
2008-01-28 11:12:11 +00:00
Keith Whitwell
a46181044f
gallium: explictly cast double to float in vertex fetch
2008-01-28 10:48:22 +00:00
Keith Whitwell
4141ebdf59
gallium: fill in missing formats for vertex_fetch
2008-01-28 10:46:52 +00:00
Keith Whitwell
5abc8d9e23
gallium: remove dead code from draw_vf*
2008-01-28 10:14:13 +00:00
José Fonseca
09059259be
First stab at hooking draw_vbuf & vf.
...
Emit disabled for now. Tested with softpipe. Only one vertex at a time for now (slow).
2008-01-28 18:46:21 +09:00
Ben Skeggs
d342a6eecc
nouveau: ddx versioning changed to match nouveau.ko versioning
2008-01-28 18:40:11 +11:00
Ben Skeggs
faa05d41c5
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2008-01-28 18:34:21 +11:00
Ben Skeggs
3e39bc3d87
nouveau: quicky-port to gallium changes
2008-01-28 18:32:46 +11:00
José Fonseca
19caf4e4f0
Clone vf module.
2008-01-28 15:48:51 +09:00
José Fonseca
c3f10aef38
Simplify prototypes of draw_vbuf's internal functions.
2008-01-28 15:00:08 +09:00
José Fonseca
3b93c74a8d
Cache the vinfo in vbuf_stage.
2008-01-28 14:51:14 +09:00
José Fonseca
dac124081d
Do refcounting trhoughout all buffer objects, since it is now a base requirement.
2008-01-27 19:22:25 +09:00
José Fonseca
e6c8278c04
Fullfill pipe_winsys->user_buffer_create. Aggregate winsys functions.
2008-01-27 19:20:48 +09:00
Brian
87a8a339d7
Cell: added support for inlined vertex buffers.
...
Small prims are now self-contained in batch buffers when space allows.
2008-01-26 19:38:16 -07:00
Brian
419a5cca34
Cell: added ROUNUP4
2008-01-26 19:31:20 -07:00
Ben Skeggs
a556034514
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2008-01-27 12:35:33 +11:00
Brian
1bab5bd24e
Cell: added support for inlined indexes
...
If there's room in the batch buffer after the rendering command to accomodate
the indexes, put them there rather than in a separate buffer.
2008-01-26 18:30:44 -07:00
Brian
8dc5972908
Cell: added cell_batch_free_space()
2008-01-26 18:27:37 -07:00
Brian
651e8e9a73
gallium: disable unnecessary point/line/tri re-validation in vbuf_flush_indices()
2008-01-26 16:46:52 -07:00
Brian
b717de3238
Cell: remove some old tile code
2008-01-26 16:06:26 -07:00
Brian
ffeae75031
gallium: s/GLuint/unsigned/ to work with gallium when THREADS not defined
2008-01-26 16:05:35 -07:00
Brian
9ef61b9808
gallium: fix a few segfaults/assertions that can happen during context init
2008-01-26 16:04:47 -07:00
Brian
856db7dee6
Cell: fix a recursive flushing bug
2008-01-26 14:15:53 -07:00
Brian
d4bd6ca816
Cell: add check to catch recursive batch flushing
2008-01-26 14:15:53 -07:00
Brian
7f4bec264e
Cell: move ASSERT macro into common.h
2008-01-26 14:15:53 -07:00
José Fonseca
65df024146
gallium: Aggregate all buffer allocation info into a single struct. Obey requested alignment.
2008-01-26 11:46:49 +09:00
José Fonseca
ca01ed45e8
gallium: Make mm buffer manager more portable.
2008-01-26 11:11:08 +09:00
José Fonseca
0afe449bfc
gallium: Remove unneeded headers.
2008-01-26 11:06:23 +09:00
Keith Whitwell
8ee1452e18
gallium: fix linux build
2008-01-26 11:06:01 +09:00
Michal Krol
9387784fbf
gallium: Fix build on Windows.
2008-01-26 11:05:42 +09:00
Michal Krol
0fe428f1df
d3d: Fix build on Windows.
2008-01-26 11:05:24 +09:00
Michal Krol
b8dc2956df
gallium: Fix build on WinXP.
2008-01-26 11:00:49 +09:00
José Fonseca
1d6c98651f
gallium: Use directory name in include.
2008-01-26 10:52:21 +09:00
Michal Krol
6c3d12e374
gallium: Fix build for WinXP.
2008-01-26 10:52:01 +09:00
José Fonseca
7411a84c2b
gallium: Define MALLOC_STRUCT.
2008-01-26 10:35:09 +09:00
Michal Krol
9cbff50cb8
gallium: Fix build on Windows.
2008-01-26 10:33:32 +09:00
Michal Krol
337ebdd8f9
gallium: Fix build on Windows.
2008-01-26 10:33:26 +09:00
Keith Whitwell
027983f585
gallium: restructure vertex fetch code slightly
2008-01-26 10:33:18 +09:00
José Fonseca
c3e4e9260d
gallium: Fix MSVC float/double conversion warning.
2008-01-26 10:33:02 +09:00
José Fonseca
2bca9f6457
gallium: Complete integer types.
2008-01-26 10:32:59 +09:00
Keith Whitwell
f3aa4de034
gallium: minor cleanups to pipe interface
...
- Remove put/get tile, just have users call put_tile_raw, etc directly.
- Remove surface_data call, just map it locally.
2008-01-26 10:32:13 +09:00
Keith Whitwell
1e9e4341e0
gallium: add PIPE_FLUSH_SWAPBUFFERS flag
2008-01-26 10:30:40 +09:00
Keith Whitwell
6d2d41294c
gallium: add notify_swapbuffers_complete, use it to set surfaces to undefined state
2008-01-26 10:30:35 +09:00
Keith Whitwell
596a92ee75
gallium: specialize glFlush vs other flush semantics
2008-01-26 10:30:31 +09:00
Keith Whitwell
a97b3f64b3
gallium: remove makefile whitespace
2008-01-26 10:29:47 +09:00
Brian
0b958e3b7c
Cell: updates to match pipe_buffer changes
2008-01-25 17:34:22 -07:00
Brian
b5618330c6
Cell: typedefs need semicolons, Ian :)
2008-01-25 17:34:04 -07:00
Brian
4d534124e7
Cell: emit framebuffer state like other state
...
Plus misc clean-up. Window resize sometimes works now.
2008-01-25 17:25:56 -07:00
Brian
42d38ac02f
gallium: replace loop w/ memset in draw_vertex_cache_invalidate()
2008-01-25 17:22:56 -07:00
Brian
1603a33fb2
gallium: better flush logic in draw module
...
This is the other half of Keith's draw/flush patch.
There are now 5 flush flags to control what's flushed (post-xform vertex
cache, prim cache, vbuf, etc).
The gears slow-down in this part of the patch was due to the cull stage not
getting invoked. It was unconditional before, but is now gated by 'need_det'.
But it also needs to be gated by draw->rasterizer->cull_mode. Gears uses
back-face culling.
2008-01-25 17:22:56 -07:00
Brian
0bfd085e28
gallium: replace prim pipeline begin/end() functions with flush()
...
This is basically half of Keith's draw/flush patch.
The stage->point/line/tri() functions are now self-validating, the validator
functions are installed by the flush() function.
There were excessive calls to validate_pipeline(), however. This was caused
by draw_prim_queue_flush() keeping a local 'first' variable that always pointed
to the validate functions. Replaced 'first' with 'draw->pipeline.first'.
Performance in gears is up just slightly with this patch.
2008-01-25 17:22:56 -07:00
Ian Romanick
bd8bf60b6f
Work around parameter differences for main in different SDK versions
2008-01-25 14:47:20 -08:00
Keith Whitwell
1e0d30a515
gallium: rename pipe_buffer_handle to pipe_buffer, rework pipebuffer/ code
...
Provide an actual definition of the pipe_buffer struct, containing
the parameters used to create the buffer, and its refcount.
Shift refcounting buffers out of the winsys interface, similar to
surfaces & textures.
Rework pipebuffer/ to reflect the fact these changes, and also Michel's
reworking of the buffer interface.
2008-01-25 20:53:31 +00:00
Michel Dänzer
756d52ec12
gallium: Simplify winsys buffer interface.
...
The properties of a buffer represented by struct pipe_buffer_handle are now
basically constant over its lifetime. The state tracker gets to deal with any
more complex buffer semantics it may need to provide.
2008-01-25 17:01:01 +01:00
Keith Whitwell
7a207682aa
965: add asserts to catch batch overrun
2008-01-25 15:50:05 +00:00
Keith Whitwell
59d66bf9df
965: cope better with range decls for temps, immediates, etc
2008-01-25 15:50:05 +00:00
Brian
c344bda34d
gallium: include p_state.h, replace PIPE_MAX_SHADER_OUTPUTS with PIPE_MAX_SHADER_INPUTS
2008-01-25 08:20:10 -07:00
Brian
235da629dc
Cell: propogate vertex info to SPUs, use it for attrib interpolation
2008-01-25 08:20:10 -07:00
Brian
4c4f691069
Cell: batch_buffer_size should be uint, not ubyte
2008-01-25 08:20:09 -07:00
Brian
78bff07f73
Cell: new ROUNDUP16() macro
2008-01-25 08:20:09 -07:00
Brian
a148cc51fb
gallium: optimizations to flatshade, two-side prim stages
2008-01-25 08:15:50 -07:00
Brian
48355538a6
gallium: added rastpos_destroy()
2008-01-25 08:15:50 -07:00
Brian
547e52f4a0
Cell: insert dummy field into cell_command_render struct to work around apparent compiler bug
...
Without this dummy field, it seems the SPU code in cmd_render() gets a bogus
value when dereferencing render->num_indices, sometimes.
This showed up as missing tries in gears.c in the first frame rendered.
Using spu-gcc version 4.1.1, Cell SDK 2.1
2008-01-24 18:20:07 -07:00
Brian
7d0421d6cd
Cell: s/-W/-Wall/ in linux-cell
2008-01-24 17:04:54 -07:00
Brian
fa82d86368
Cell: send actual vertex size in the render command
2008-01-24 16:47:23 -07:00
Brian
0673c571c7
Cell: rewrite compute_vertex_layout()
2008-01-24 16:41:03 -07:00
Brian
95ff06d610
Cell: fix asst. warnings
2008-01-24 16:39:34 -07:00
Brian
c753e7adde
gallium: added rastpos_destroy()
2008-01-24 16:05:33 -07:00
Brian
6c29be9f41
i915: add case for TGSI_FILE_IMMEDIATE to avoid error, but still needs proper handling...
2008-01-24 09:59:39 -07:00
Brian
47b3afc53f
Cell: use Cell driver by default if linux-cell is built
...
To disable the Cell driver and use softpipe instead, export GALLIUM_NOCELL=1
2008-01-24 09:18:43 -07:00
Zack Rusin
6e2c3b3a49
disable usage of llvm in fragment shaders
...
it produces wrong results because it hasn't been adjusted to some
new changes and it will just be in the way while changing llvm
code to a different vector layout
2008-01-24 08:29:19 -05:00
Zack Rusin
bac991d645
change the name of the shaders to reflect what they do.
...
remove stale code and do some general cleanups.
2008-01-24 07:49:36 -05:00
Brian
11349b6a5f
Cell: s/FORMAT/EMIT/
2008-01-23 23:33:35 -07:00
Brian
2549d79ae5
gallium: rename FORMAT_x to EMIT_x and use EMIT_ALL to emit whole vertex as-is in vbuf code
2008-01-23 23:27:31 -07:00
Brian
6000dcc973
gallium: improved vertex layout and interpolant setup in softpipe
2008-01-23 23:08:59 -07:00
Ian Romanick
dc1abc3932
Specify linker instead of letting mklib use gcc
...
This is the final bit required to get Cell builds on x86 working.
Without this, mklib tries to link using the x86 gcc instead of
ppu32-gcc.
2008-01-23 15:25:52 -08:00
Ian Romanick
b3492a2052
Use HOST_CC for programs that will run on the build host
2008-01-23 15:25:52 -08:00
Ian Romanick
ffcb4d8498
Use EXTRA_LIB_PATH with *_LIB_DEPS
...
Make sure EXTRA_LIB_PATH is used with all the LIB_DEPS. Re-order some
of the options and tweak the whitespace to make the various LIB_DEPS
more readable. This makes building for Cell on x86 a bit easier and
doesn't seem to effect other builds.
2008-01-23 15:25:52 -08:00
Ian Romanick
eb4a7382dc
Remove unnecessary paths
...
Removing the paths on certain commands (e.g., ppu32-gcc) and removing
-I/usr/include makes it possible to build for Cell on both PowerPC and
x86 hosts.
2008-01-23 15:25:52 -08:00
Brian
f5d2c1eef9
Cell: remove old test code
2008-01-23 16:19:40 -07:00
Brian
f19b2d7221
Cell: asst. updates to sync up with today's earlier gallium changes
2008-01-23 16:17:49 -07:00
Brian
8de2331e43
gallium: remove support for separate depth/stencil buffers. Always combined now.
2008-01-23 15:45:52 -07:00
Brian
1cf3c77e08
gallium: in sp_tile_cache_clear() mark all cache slots as empty/free. Fixes progs/redbook/stencil.c
2008-01-23 15:39:34 -07:00
Brian
336e2cb9ec
gallium: rework compute_vertex_layout() to intelligently map vs outputs to fs inputs
...
Some follow-on simplification in prim setup is possible...
2008-01-23 14:23:49 -07:00
Brian
2d37e78e63
gallium: restore/rewrite vbuf code for softpipe
...
Now based on the draw_vbuf code, instead being a custom one-off.
Disabled by default, enable with SP_VBUF env var.
2008-01-23 13:17:50 -07:00
Brian
cd3643698e
gallium: overhaul usage of vertex_info in draw module.
...
Remove all dependencies on vertex_info, except for draw_vbuf.
Drawing stages now strictly operate on post-transformed vertices and don't
know anything about hw vertices.
Use vertex program output info for two-side/flat/etc stages.
Temporarily disable vbuf module in softpipe driver.
2008-01-23 12:48:41 -07:00
Brian
b3f081999f
gallium: s/INTERP_NONE/INTERP_LINEAR/ to fix assertion with progs/samples/select.c
2008-01-23 09:27:39 -07:00
Brian
2444f6c6a4
gallium: fix computation of raster.point_size_per_vertex flag
2008-01-23 08:24:30 -07:00
Brian
46a787ad97
gallium: multiply vertex point size by 0.5
2008-01-23 08:24:08 -07:00
Ben Skeggs
9043323f14
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2008-01-23 15:27:00 +11:00
Brian
286380020b
gallium: use temp reg for storing color to avoid reading 'result.color'
2008-01-22 20:52:48 -07:00
Brian
59e8f3e5e9
gallium: Don't allocate a vertex buffer until after setting the prim type.
...
The vertex size may depend on whether we're drawing points, lines or triangles.
2008-01-22 16:37:19 -07:00
José Fonseca
52264ec53d
added stipple_destroy()
2008-01-22 16:35:50 -07:00
Brian
f1fb69a6e5
gallium: Added FORMAT_1F_PSIZE to insert constant point size into vertices
...
Also, added draw_convert_wide_points/lines() so a driver can tell the draw
module whether to convert wide points/lines into triangles, or just pass
them through.
2008-01-22 10:17:28 -07:00
Brian
7049ff53f6
gallium: silence warnings
2008-01-21 21:19:24 -07:00
Brian
cfeda4165b
Cell: initial support for sampler state
2008-01-21 21:17:21 -07:00
Brian
0c085717cb
Cell: s/cell_init_surface_funcs/cell_init_surface_functions/
2008-01-21 21:17:21 -07:00
Brian
13189412d9
Cell: Added cell_surface.[ch] files
2008-01-21 21:17:21 -07:00
Brian
a1799ecd82
gallium: remove unneeded protos, #includes, etc
2008-01-21 21:17:21 -07:00
Brian
b91de8a6e7
gallium: include sp_headers.h
2008-01-21 21:17:21 -07:00
Brian
8538da0d7a
Cell: renamed cell_surface.[ch] to cell_clear.[ch]
2008-01-21 21:17:21 -07:00
Brian
c27c352984
Cell: rename cell_surface.[ch] cell_clear.[ch]
2008-01-21 21:17:21 -07:00
Brian
1811965091
Cell: Add initial texture functions
2008-01-21 21:17:21 -07:00
Brian
fd9c03fc42
Cell: add cell_set_sampler_texture()
2008-01-21 21:17:21 -07:00
Brian
4211d2d461
gallium: move softpipe_get_tex_surface() prototype
2008-01-21 21:17:20 -07:00
Brian
c14773b06b
gallium: add license comment
2008-01-21 21:17:20 -07:00
Brian
e2612f4aa0
gallium: move softpipe_get_tex_surface() into sp_texture.c
2008-01-21 21:17:20 -07:00
Brian
5a57ffafd6
Cell: added asmfiles rule
2008-01-21 21:17:20 -07:00
Brian
be92796eb9
gallium: prototype draw_linestipple.c replaced by draw_stipple.c
2008-01-21 15:29:54 -07:00
Brian
ea3a2b4402
gallium: remove per-fragment line stipple code
2008-01-21 14:10:16 -07:00
Brian
329a8479b6
gallium: new 'draw' stage for line stipple
...
Stippled lines are converted into a series of shorter line segments
2008-01-21 14:08:20 -07:00
Brian
7f21d04a51
fix broken point rendering in sp_vbuf_render()
2008-01-21 11:37:58 -07:00
Brian
382b86e90f
gallium: add a src_index[] array to draw's vertex_info for mapping post-xform vertex attribs to hw vertex attribs
2008-01-21 11:16:22 -07:00
Brian
f4b89be701
Cell: use tile_t for color tile
2008-01-20 17:39:07 -07:00
Brian
f0be276c2e
Cell: clean-up/re-org tile code
...
Also, support 16 or 32-bit Z buffer at runtime.
2008-01-20 17:27:05 -07:00
Brian
661be1ae7b
Cell: use depth/stencil state to enable ztest
...
Move z-test code into do_depth_test().
Add ZSIZE symbol to support 2 or 4-byte Z values.
2008-01-20 15:00:18 -07:00
Brian
45b5d3b1fc
enable call to cell_emit_state()
2008-01-20 14:58:29 -07:00
Ben Skeggs
4481c6c0b3
nouveau: small oops
2008-01-20 23:20:42 +11:00
Ben Skeggs
b56b3035f1
nv40: clarify that tex code is fp-only, we'll do vertex textures eventually.
2008-01-20 11:13:08 +11:00
Ben Skeggs
df09ed9d1e
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2008-01-20 10:38:35 +11:00
Brian
a1f4a5e802
Cell: improve "finished copying batch buffer" signalling.
...
When the SPU is done copying a batch buffer to local store, use an mfc_put()
to write a "done" message back to the buffer status array in main memory.
We were previously using a mailbox message for synchronization.
2008-01-19 12:04:06 -07:00
Brian
06b019d16b
s/varible/variable/
2008-01-18 12:47:20 -07:00
Brian
7cbfe8c51d
set param type to PROGRAM_CONSTANT when parsing immediates
2008-01-18 12:45:55 -07:00
Brian
fdc8636bdc
use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating immediates/literals
2008-01-18 12:45:27 -07:00
Michel Dänzer
e44bdcf978
Unify copy_rect helpers.
...
Some of the copies were buggy.
2008-01-18 19:11:30 +01:00
José Fonseca
25e2b8d669
Revert "temporarily don't emit TGSI immediates, use the constant buffer"
...
This reverts commit 310e7ca44b .
2008-01-17 17:20:46 +09:00
José Fonseca
271f9dac79
Back-port miscellaneous fixes from internal branch (mostly portability fixes).
...
These are changes that are in our internal branch, but somehow were skipped
so far. It was done using visual comparison of the branches --
it is likely that changes are being carried on the wrong way
2008-01-17 13:39:14 +09:00
José Fonseca
b016f0adba
gallium: Pass PIPE_BUFFER_USAGE_PIXEL to buffer_data.
2008-01-17 13:37:17 +09:00
José Fonseca
c04f417492
gallium: Handle TGSI_OPCODE_END on sse2.
2008-01-17 12:25:26 +09:00
Brian
310e7ca44b
temporarily don't emit TGSI immediates, use the constant buffer
...
This allows a few more programs to run and not crash.
Need to get constant buffer uploads working...
2008-01-17 12:24:22 +09:00
José Fonseca
bf3bdb3b42
gallium: Fix cut-n-paste error.
2008-01-17 12:09:40 +09:00
José Fonseca
3eaf882a66
gallium: Alternative mm_bufmgr_create_from_buffer constructor for mm pool managers.
2008-01-17 12:09:37 +09:00
José Fonseca
39b8303d4a
gallium: Detect if a null buffer is passed.
2008-01-17 12:09:29 +09:00
Keith Whitwell
af51d188c3
gallium: fix warning
2008-01-17 12:07:37 +09:00
Keith Whitwell
7771519862
gallium: fix warning
2008-01-17 12:06:28 +09:00
Keith Whitwell
66719dc63a
gallium: hardwire reset_temps functionality
2008-01-17 12:06:16 +09:00
Keith Whitwell
83417a8b37
gallium: whitespace changes
2008-01-17 12:06:05 +09:00
José Fonseca
e122a8fa18
gallium: Ignore generated files.
2008-01-17 12:05:37 +09:00
Brian
5ea37f591a
use NEGATE_X/Y/Z/W tokens
2008-01-16 16:43:50 -07:00
Brian
846969917e
clean-up swizzle fields in fog code, fix NegateBase
2008-01-16 16:43:36 -07:00
Brian
bdc3825461
Fix broken fog.
...
Note that fogcoord and front-facing attribs are in the same register, in the
X and Y channels, respectively.
2008-01-16 16:31:37 -07:00
Brian
ecc9cf43af
Fix incorrect [0,1] clamping in store_dest().
2008-01-16 16:29:36 -07:00
Brian
13bfa87b09
tweaks to quad drawing, set UsesKill in bitmap shader
2008-01-16 13:55:08 -07:00
Brian
27cff4402e
copy UsesKill state in _mesa_combine_programs()
2008-01-16 13:54:32 -07:00
Brian
d11fd189ff
vbuf updates/fixes (KeithW)
...
Plus, update i915 and Cell drivers for latest vbuf->draw() params.
2008-01-16 10:57:53 -07:00
Brian
0e6b78c7eb
s/DBG/DRAW_DBG
2008-01-16 10:57:10 -07:00
Brian
1b5f20c665
remove useless assertions
2008-01-16 10:56:38 -07:00
Brian
85cfe029b9
init front/back color attrib indexes to 0, not -1
2008-01-16 10:56:23 -07:00
Brian
dd235ff1db
Fix a two-sided lighting bug (fixes samples/wave.c)
2008-01-16 08:30:00 -07:00
Ben Skeggs
0feec292dd
nouveau: remove assertions from PIPE_ -> GL_
...
It seems we need to keep some sane defaults around for a bit, at least until
the pipe drivers learn to avoid translating things like alpha_src_factor when
blend_enable is false.
2008-01-16 13:50:00 +11:00
Ben Skeggs
e0e9326bda
nv40: stronger type safety
2008-01-16 13:45:31 +11:00
Ben Skeggs
bc1ca3793d
nouveau: don't use GL headers at all
2008-01-16 13:37:13 +11:00
Ben Skeggs
545471018e
nouveau: gallium changes..
2008-01-16 13:18:46 +11:00
Ben Skeggs
3119e9a14b
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
...
Conflicts:
src/mesa/pipe/Makefile
2008-01-16 13:14:19 +11:00
Brian
587e2becc2
typedef uintptr_t for non-HAVE_POSIX_MEMALIGN build
2008-01-15 18:32:51 -07:00
Brian
62ef6376be
Don't include stdint.h or inttypes. Use the uint64 typedef instead of uint64_t.
2008-01-15 18:27:14 -07:00
Brian
5a185ca09a
replace _mesa_printf() with fprintf()
2008-01-15 18:26:21 -07:00
Brian
0cec2e18d5
remove redundant llvm subdir
2008-01-15 18:22:35 -07:00
Brian
14a1e5908d
include pipe/draw/draw_context.h
2008-01-15 18:22:23 -07:00
Brian
dd5a8d234b
Add surface status/clear_value fields, PIPE_SURFACE_STATUS_x tokens
2008-01-15 14:18:17 -07:00
Brian
d280206c7f
free stvp->draw_shader
2008-01-14 19:18:35 -07:00
Brian
ac95fee4ff
Fix problems with vertex shaders and the private draw module.
...
The CSO returned by pipe->create_vs_state() can't be passed to the
private draw module. That was causing glRasterPos to blow up.
Add a 'draw_shader' field to st_vertex_program for use with the private
draw module.
Change st_context->state.vs type from cso_vertex_shader to st_vertex_program.
2008-01-14 19:13:34 -07:00
Brian
b4e4fafb41
disable debug printf
2008-01-14 19:13:34 -07:00
Brian
f20cb1d81b
Cell: after sending a batch, wait for a DMA completion signal.
...
This fixes sporadic rendering glitches.
Using a mailbox msg for now, until spe_mfcio_tag_status_read() or similar
is found to work.
2008-01-14 16:39:26 -07:00
Brian
c28b112ce3
clamp colors during float->int conversion
2008-01-14 16:37:13 -07:00
Brian
eff70f67c5
Cell: update surface map code to match recent changes in pipe_surface struct
2008-01-14 11:11:08 -07:00
Michel Dänzer
2014e0bacb
Remove pipe->get/put_tile_rgba.
...
pipe_get/put_tile_rgba() now use pipe->get/put_tile internally.
Also simplify the <format>_get/put_tile_rgba() helper functions and clean up
some inconsitencies in them.
2008-01-14 18:12:58 +01:00
Michel Dänzer
c76efb96b4
Remove mapping fields from struct pipe_surface.
...
It's now the responsibility of surface users to keep track of their mappings.
2008-01-14 18:12:58 +01:00
Brian
a511200e5f
Cell: remove fb parameter to get/put_tile()
2008-01-12 16:58:50 -07:00
Brian
8b1bfd1d27
Cell: disable cell_emit_state() for now
2008-01-12 16:57:55 -07:00
Brian
d53e1c255a
Cell: collect vars in a spu_global struct
2008-01-12 12:53:49 -07:00
Brian
dae719a681
Cell: first state object (depth/stencil/alpha) emitted to SPUs
2008-01-12 12:39:26 -07:00
Brian
68f5a6f743
Cell: whitespace/cleanup
2008-01-12 11:41:23 -07:00
Brian
2e469775b3
Cell: prefix SPU files with spu_
2008-01-12 10:33:50 -07:00
Brian
a9a8467472
Cell: prefix SPU sources with spu_
2008-01-12 10:33:24 -07:00
Brian
07276d676c
Cell: sketch out needed rasterizer state
2008-01-12 10:06:27 -07:00
Brian
1c22b59559
s/int/uint/ to silence warnings
2008-01-11 16:32:20 -07:00
Brian
50eb29ed94
whitespace, comment changes
2008-01-11 16:31:58 -07:00
Brian
8dd678208e
Cell: basic batch buffer working
2008-01-11 16:08:53 -07:00
Brian
08c2571fb4
Cell: initial work for a hw-like batch buffer system
2008-01-11 12:04:55 -07:00
Brian
7db94ba031
Cell: remove obsolete cell_prim_buffer struct and code
2008-01-11 11:35:03 -07:00
Brian
6b5d674f91
Cell: debug code, comments
2008-01-11 11:31:03 -07:00
Brian
21b282e934
vbuf_flush_vertices() instead of vbuf_flush_indices() in vbuf_end()
2008-01-11 11:30:02 -07:00
Brian
f313a1ece2
Cell: reformattting
2008-01-11 11:27:24 -07:00
Brian
d4c806302e
s/int/uint/ to silence warning
2008-01-11 11:27:09 -07:00
Brian
45230b4e08
Fix malloc size buf, silence signed/unsigned comparision warning
2008-01-11 10:10:45 -07:00
Brian
1217d5cca3
Cell: Remove the pre-vbuf rendering code
2008-01-11 08:14:42 -07:00
Brian
299dffce4f
Cell: wait_on_mask_all()
2008-01-10 21:59:15 -07:00
Brian
aee5f471ce
Cell: remove unneeded #includes
2008-01-10 21:53:38 -07:00
Brian
71caa922e0
Cell: compute bounding box in cell_vbuf_draw()
2008-01-10 21:50:55 -07:00
Brian
ea190f4b41
Cell: remove unused color field
2008-01-10 21:50:31 -07:00
Brian
6059ecaabe
Cell: remove unused code
2008-01-10 21:37:55 -07:00
Brian
c56b20971b
Cell: make vertex_header and prim_header types private to tri.c
2008-01-10 21:35:13 -07:00
Brian
44f4b9b9ea
Cell: avoid copying vertex data
2008-01-10 21:22:03 -07:00
Brian
02f6f9f8d4
Cell: move tile-related code into new tile.[ch] files.
2008-01-10 17:30:51 -07:00
Brian
6c11485405
Cell: use new ASSERT macro instead of standard assert
...
The later doesn't seem to work properly in SPU code.
2008-01-10 17:14:06 -07:00
Brian
b324722542
Cell: enable vbuf path by default
2008-01-10 17:03:21 -07:00
Brian
152f1d84d4
Cell: checkpoint: draw_vbuf code in place and works, but not enabled by default yet.
2008-01-10 17:01:52 -07:00
Brian
cac8892ddb
Additional parameters to vbuf_render->draw()
...
Pass complete information about vertex/index buffer location, size, etc.
2008-01-10 17:01:11 -07:00
Brian
763e30748e
Cell: initial implementation of vbuf code.
...
The draw module's vbuf stage builds buffers of post-transformed vertices
and issues draw-elements calls to render them. We'll pass the vertex and
index buffers to the SPUs...
2008-01-10 15:14:58 -07:00
Brian
2da5afbd3f
Cell: call draw_compute_vertex_size()
2008-01-10 15:13:14 -07:00
Brian
cd89fe2d39
Cell: s/free/align_free/
2008-01-10 11:26:20 -07:00
Brian
d07b86dedf
Cell: clean-up cell_spu_exit() code
2008-01-10 11:26:20 -07:00
Brian
e6b33b6f35
bump CELL_MAX_VERTS to 240
2008-01-10 11:26:20 -07:00
Brian
3d9c84c1b8
comment about vertex data in emit_vertex()
2008-01-10 11:25:25 -07:00
Brian
fd8b5ede95
clean-up comments, code
2008-01-10 11:25:25 -07:00
Michel Dänzer
ede7b00b59
softpipe: Simplify texture memory layout.
2008-01-10 10:06:00 +01:00
Michel Dänzer
51ea675745
Add glapi/ path for inclusion of glapioffsets.h.
...
Not sure why this is only needed now...
2008-01-10 10:06:00 +01:00
Brian
d23869a88a
Cell: initial implementation of tile status optimizations
...
Tiles are marked as CLEAR, DEFINED or DIRTY to avoid making unnecessary
get_tile() and put_tile() calls.
2008-01-09 17:50:37 -07:00
Brian
18b0f34521
Cell: start using DMA tags in a more sensible way, move waits() later when possible.
2008-01-09 17:50:37 -07:00
Brian
c7a22c3979
move cliprect bounds, do trivial rejection triangle clipping
2008-01-09 17:50:37 -07:00
Brian
d48c6e7b21
Cell: remove some debug printfs, predicate others with Debug boolean
2008-01-09 17:50:37 -07:00
Brian
abee68a722
Cell: implemement basic Z testing
...
Also, improve some surface clearing code
2008-01-09 17:50:37 -07:00
Jerome Glisse
934468296c
softpipe: map only once in softpipe_map_surfaces
...
softpipe_map_surfaces get call several time but softpipe_unmap_surfaces
get call only once. So to make sure stuff are properly unmap when
softpipe_unmap_surfaces get call we map surfaces only one time in
softpipe_map_surfaces.
2008-01-10 01:14:07 +01:00
Ben Skeggs
9de335f580
nouveau: object header update
2008-01-08 02:28:43 +11:00
Ben Skeggs
a50f224f41
nv40: use a more "normal" 2x8bit format, the other is likely a HILO format.
2008-01-07 04:36:22 +11:00
Ben Skeggs
9bac4c7268
nouveau: share pushbuf interface code between pipe drivers
2008-01-07 01:02:30 +11:00
Ben Skeggs
37e9587178
nv40: do nothing for set_clip_state()
...
There's no way possible for us to support clip planes with the current
interfaces anyway.
2008-01-06 22:14:22 +11:00
Ben Skeggs
df34b6b2bc
nv40: bind textures based on fragprog usage.
2008-01-06 21:52:24 +11:00
Michel Dänzer
1c5f27a18b
gallium: Make texture target an enum for better debuggability.
...
Also make enum pipe_format used in a couple more places.
2008-01-04 18:21:45 +01:00
Zack Rusin
6f01290431
llvm: if llvm is enabled don't even try to use sse for vs
2008-01-04 10:01:32 -05:00
Zack Rusin
9789c301b4
llvm: we need custom rules so had to redo the build a little bit
...
also don't use sse when llvm is enabled
2008-01-04 09:27:42 -05:00
Zack Rusin
3385f3d250
llvm: update llvm sources the latest svn
2008-01-04 08:32:20 -05:00
Keith Whitwell
b1e67c5d84
965: fix various refcount issues
2008-01-04 01:20:41 +00:00
Keith Whitwell
f54012650e
965: use correct offset for constants vs immediates
2008-01-04 01:20:41 +00:00
Keith Whitwell
65426b144e
965: always perform SF parameter setup for position
...
Match behaviour of DRI driver. Fix fragment shader to find the other
parameters one slot further on. Will need more work to cope with FP's
that actually reference position.
2008-01-04 01:20:41 +00:00
Keith Whitwell
25c9728644
965: scan fs inputs to work out interpolation in setup program
2008-01-04 01:20:41 +00:00
Brian
4e62fbbfc5
clean-ups, silence warnings
2008-01-03 15:09:30 -07:00
Brian
2b40838972
rename vars, clean-up formatting
2008-01-03 15:05:51 -07:00
Brian
aa7f233367
replace void * with struct draw_vertex_shader opaque type
2008-01-03 15:03:52 -07:00
Brian
1613c49c98
Cell: added -Wmissing-prototypes to SPU_CFLAGS
2008-01-03 09:57:12 -07:00
Brian
5e00ae3fea
Cell: initial work for getting/putting Z tiles
2008-01-03 09:56:48 -07:00
Brian
3ffef8de82
disable bbox code until glitches are fixed
2008-01-03 09:40:32 -07:00
Brian
4ff6367295
Cell: improve surface state code to replace some temporary code.
2008-01-03 09:40:02 -07:00
Brian
9b598df95e
asst changes in bbox code, dma tags, etc
2008-01-03 08:58:51 -07:00
Brian
bb55835fc0
insert a temporary flush to fix missing triangles artifact
2008-01-03 08:58:01 -07:00
Brian
5cd96f7684
pass surface format in cell_command_framebuffer struct
2008-01-03 07:49:59 -07:00
Brian
7aee3eff18
better debug code
2008-01-03 07:49:13 -07:00
Brian
f6b7e2d3bf
make use of prim bounds box info
2008-01-02 19:31:36 -07:00
Brian
54090bd841
only fetch as much vertex data as needed
2008-01-02 19:05:34 -07:00
Brian
d55c4ec9d2
remove previous triangle test code
2008-01-02 18:58:44 -07:00
Brian
de9f8e8b71
Cell: basic triangle rendering works.
...
The cell "render_stage" (last in the "draw" pipeline) emits vertices into
a buffer which is pulled by the SPUs in response to a "RENDER" command.
This is pretty much temporary/scaffold code for now.
2008-01-02 18:53:33 -07:00
Ben Skeggs
732540f997
nv40: some cleanups
2008-01-02 23:44:24 +11:00
Ben Skeggs
720fd7b5e9
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2008-01-02 23:02:35 +11:00
Brian
da92ac01e8
Plug in more infrastructure for actual rendering.
...
Track vertex/fragment shader state.
Plug in pipe->draw_arrays(), pipe->draw_elements().
Plug render stage (a stub) into end of 'draw' pipeline.
Specify a hard-coded vertex format for now.
2008-01-01 15:21:50 -07:00
Brian
57a711f727
hack/fix pack_color() for correct ps3 format
2008-01-01 15:21:50 -07:00
Brian
52659e3c23
Clean-up, re-org some vertex/fragment shader state code.
2008-01-01 15:18:04 -07:00
Brian
292bbd4a72
move SP_NEW_ #defines into sp_state.h
2008-01-01 15:18:04 -07:00
Brian
520a455f55
fix vbo display list memleak upon context destruction
2008-01-01 10:21:21 -07:00
Brian
678db26b9d
unref buffer after drawing, fixes rastpos mem leak
2008-01-01 10:21:21 -07:00
Brian
c37d2c9325
fix single-sided stencil test bug
2008-01-01 10:21:21 -07:00
Brian
6656864135
fix leak, fix refcount error
2008-01-01 10:21:21 -07:00
Brian
6883e02a5c
fix a mem leak, document another existing leak
2008-01-01 10:21:21 -07:00
Brian
4fabee9d4d
unref const buffers during context destroy
2008-01-01 10:21:21 -07:00
Brian
6128c93865
unref const buffers during context destroy
2008-01-01 10:21:21 -07:00
Brian
1631a9513d
free program caches
2008-01-01 10:21:21 -07:00
Brian
f44e2f14d2
fix mem leaks
2008-01-01 10:21:21 -07:00
Brian
573b4414b9
fix mem leak (free key)
2008-01-01 10:21:21 -07:00
Brian
171a9674c4
free surface caches in softpipe_destroy()
2008-01-01 10:21:21 -07:00
Brian
aec6009ece
fix a memleak
2008-01-01 10:21:21 -07:00
Brian
57a5421d65
free tgsi machine state
2008-01-01 10:21:21 -07:00
Brian
f6136f993a
free tgsi machine state
2008-01-01 10:21:21 -07:00
Brian
eba2e044a0
added tgsi_exec_machine_free_data()
2008-01-01 10:21:20 -07:00
Brian
552907d8a4
free Default1D/2DArray objects
2008-01-01 10:21:20 -07:00
Ben Skeggs
92ee96d83d
nv40: s/READ/WRITE/
2007-12-30 15:24:16 +11:00
Ben Skeggs
6af6bb6817
nouveau: header update
2007-12-30 01:17:47 +11:00
Ben Skeggs
24cfb7d2e2
nv40: untested fragprog mods for big-endian chips
2007-12-30 01:03:24 +11:00
Ben Skeggs
09612416d7
nouveau: typo fix
2007-12-30 00:37:58 +11:00
Ben Skeggs
8ed3a69fc8
nouveau: remove legacy stuff
2007-12-27 09:09:11 +11:00
Ben Skeggs
dc6d73e1a4
nouveau: track last validated offsets, so we know when relocs can be avoided.
2007-12-27 06:22:28 +11:00
Ben Skeggs
3b8efe1dfe
nouveau: allow unfenced read of buffers in a few situations
2007-12-27 06:10:49 +11:00
Ben Skeggs
a794fcfbdb
nouveau: remove fence_del(), _ref() can be used for the same purpose.
2007-12-27 06:02:01 +11:00
Ben Skeggs
f33467d72a
nouveau: header update
2007-12-26 00:56:00 +11:00
Ben Skeggs
e32e0e2b8e
nv40: use index buffers rather than inline indices.
...
We probably want to use inline indices in some situations still, but this
commit's primary purpose is to workaround some mis-rendering caused by a
more complicated problem that'll get fixed eventually.
2007-12-26 00:37:21 +11:00
Zack Rusin
f9e0e2b3ef
i965: a little better way of handling immediates
2007-12-24 07:57:34 -05:00
Ben Skeggs
d732728590
nouveau: pushbuf code, now with 50% less suck!
...
Far more efficient, if not a bit more complicated. Hopefully not too
buggy still.
This commit will potentially expose some unrelated bugs, fixes for them
will follow "real soon now".
2007-12-24 19:28:36 +11:00
Ben Skeggs
f9cfc32376
nv40: ensure all required buffers are accounted for during state validation
2007-12-24 18:53:41 +11:00
Ben Skeggs
5fcffcd312
nouveau: speed up user buffers.
...
Try and fit user buffers into a small GART scratch area at validate time,
instead of going to a lot of effort to fit these (mostly) use-once-and-discard
objects into VRAM.
2007-12-23 17:06:18 +11:00
Ben Skeggs
7372a596a9
nv40: seems we have stencil faces around the wrong way.
2007-12-23 16:19:25 +11:00
Ben Skeggs
74757eb970
nouveau: don't wait when deleting fences unless needed
2007-12-23 16:18:00 +11:00
Ben Skeggs
fa605cf661
nouveau: some cleanups
2007-12-23 16:17:22 +11:00
Ben Skeggs
b4b002661e
nouveau: match gallium changes
2007-12-23 16:05:02 +11:00
Ben Skeggs
6c14cf5834
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-12-23 16:01:59 +11:00
Zack Rusin
4fa7afabc9
i965: very crude and hacky way of handling immediates
2007-12-20 12:54:23 -05:00
Keith Whitwell
a85535b7cb
gallium: make state tracker explictly ask for rendercache flushes
2007-12-20 13:47:46 +00:00
Keith Whitwell
9e41d547db
965: respect pipe flush flags
...
Now we emit way too many flushes instead of none at all.
2007-12-20 13:47:11 +00:00
Keith Whitwell
21c67b70d4
gallium: translate ARB fp/vp immediates consistently to tgsi immediates
2007-12-20 13:20:27 +00:00
Zack Rusin
ebf78c0dcc
965: fix the constant buffers
2007-12-20 07:05:52 -05:00
Brian
e9207430ce
Add some prototype code for converting RET to END for main(). Disabled for now.
2007-12-19 14:06:22 -07:00
Brian
4a1776a763
temporarily defeat an assertion
2007-12-19 13:53:28 -07:00
Brian
c664302c3e
Fix problem with initial viewport/scissor size.
...
If an app never called glViewport, the viewport size was always 0 by 0 pixels.
Now pass initial size to st_create_framebuffer() and initialize the viewport
and scissor bounds in st_make_current().
This could also be fixed by ensuring the gl_framebuffers passed to
_mesa_make_current() were initialized to the right size. But that involves
allocating the renderbuffers/pipe_surfaces earlier and that runs into some
other issues ATM.
Also remove obsolete createRenderbuffers param to st_create_framebuffer().
2007-12-19 13:45:00 -07:00
Brian
1575763a6f
convert Mesa OPCODE_END to TGSI_OPCODE_END, not TGSI_OPCOD_RET
2007-12-19 13:16:36 -07:00
Brian
127ab73b38
remove obsolete TXP, add some sanity checks
2007-12-19 13:16:36 -07:00
Brian
cedf6892e7
special-case PSIZE too
2007-12-19 13:16:36 -07:00
Brian
dbf6eced87
move st_make_current() before buffer size check so renderbuffer alloc storage works
2007-12-19 13:16:36 -07:00
Brian
c61b32777b
new assertions
2007-12-19 13:16:36 -07:00
Keith Whitwell
d24a9b26fc
965: dump curbe contents to stderr
2007-12-19 19:05:19 +00:00
Keith Whitwell
5ff69cfd68
965: handle BRW_CONSTANT_BUFFER data type
2007-12-19 19:04:35 +00:00
Zack Rusin
a65f39f918
consts
2007-12-19 18:49:46 +00:00
Keith Whitwell
dc461d8c87
965: count grf allocation correctly for wm prog, first aub triangle
2007-12-19 15:48:53 +00:00
Keith Whitwell
86ddaa9d0e
965: hardwire correct behaviour for vp-tri setup (for now...)
2007-12-19 15:16:25 +00:00
Keith Whitwell
ded6ce2bd5
vp-tri: match vertex/color data of other tests
2007-12-19 15:13:20 +00:00
Keith Whitwell
ae280f1ce9
965: align buffer allocations to 4k
2007-12-19 14:20:23 +00:00
Keith Whitwell
2c8e50c0cb
use a depth buffer temporarily
2007-12-19 13:13:53 +00:00
Keith Whitwell
65f67baa42
965: make sure stipple state gets uploaded
2007-12-19 13:13:53 +00:00
Keith Whitwell
2e3dfe97ee
965: allocate buffer space to hold batch commands
2007-12-19 13:13:53 +00:00
Zack Rusin
f13a200c83
actually set the max_index. useful in the driver
2007-12-19 07:50:29 -05:00
Keith Whitwell
f367c57802
965: fill unused surface pointers with zero
2007-12-19 12:23:30 +00:00
Zack Rusin
bc1fc7d673
i965: emit fb write on RET for now (until we get END back)
2007-12-19 07:11:16 -05:00
Keith Whitwell
a0ce71b51d
965: pitch is in bytes not pixels
2007-12-19 11:49:56 +00:00
Keith Whitwell
05ec043d1c
965: fix off-by-one in scissor rect
2007-12-19 11:37:16 +00:00
Keith Whitwell
2f53713beb
965: fix off-by-one in surface dimensions
2007-12-19 11:37:16 +00:00
Keith Whitwell
1f37b4d87e
965: respect surface width when dumping bitmap
2007-12-19 11:37:16 +00:00
Zack Rusin
38de4c5715
i965: actually detect whether a sampler is enabled/disabled
2007-12-19 06:24:16 -05:00
Keith Whitwell
aba4ee24cf
965: disable clipping more, and restore drawing rect packet
2007-12-19 11:10:35 +00:00
Keith Whitwell
e039824757
965: disable clipping for now
2007-12-19 11:10:35 +00:00
Keith Whitwell
94c2ab2895
965: fix vertex pointsize state, match default cull mode
2007-12-19 11:10:35 +00:00
Keith Whitwell
4fd2a2ac6f
965: fix colormask state
2007-12-19 11:10:35 +00:00
Keith Whitwell
9791c16b31
965: populate fp_input_count in setup key
2007-12-19 11:10:35 +00:00
Zack Rusin
93d90c6b57
i965: stuff the outputs into mrf registers when possible
2007-12-19 05:28:28 -05:00
Zack Rusin
4e1a445866
i965: be smarter about register allocation
2007-12-19 04:58:35 -05:00
Ben Skeggs
bf2410ca73
nouveau: nuke subchan auto-assign.
...
It's annoying for several reasons, especially in its current form. May
possibly be reincarnated later (DDX depends on it these days), but in
not quite the same way.
2007-12-19 19:40:38 +11:00
Ben Skeggs
d67c2c1cd5
nouveau: remove sync hack, gallium got sort-of fixed.
2007-12-19 13:36:20 +11:00
Ben Skeggs
3e1e40ee79
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-12-19 13:21:41 +11:00
Brian
d0a63de378
turn off TGSI_DEBUG
2007-12-18 16:01:53 -07:00
Brian
52da6b559a
fix bug on GL_VERTEX_PROGRAM_TWO_SIDE path
2007-12-18 16:01:53 -07:00
Brian
8c20747834
setup the frontface register (fog.y, ATM)
2007-12-18 16:01:53 -07:00
Brian
fb4eb8c91b
fix some semantic info mix-ups in calculate_vertex_layout()
2007-12-18 16:01:53 -07:00
Keith Whitwell
c31416971e
gallium: rationalize vertex_element state packet
...
Remove dst_offset (not used)
Add nr_components, which could be calculated from format, but would be
too much effort.
Update i965 driver to cope.
2007-12-18 17:25:33 +00:00
Keith Whitwell
208b2ad8ab
gallium: give userbuffers some storage in the aub buffer pool
2007-12-18 16:57:17 +00:00
Keith Whitwell
9d4ab42f4b
vbo: unmap and remap immediate vbo before/after each draw.
...
Also use BufferData(NULL) to get fresh storage and avoid synchronous
operation where we would have to flush and wait for the fence after each
draw because of the map.
This will chew through a whole load of buffer space on small draws, so
it isn't a proper solution. Need to support a no-fence or append mapping
mode to do this right, or use user buffers.
2007-12-18 16:56:22 +00:00
Zack Rusin
7cef9237ae
i965: don't treat swz differently and upload vertex buffers
2007-12-18 09:59:54 -05:00
Brian
e2a669aed4
obsolete
2007-12-17 20:41:20 -07:00
Ben Skeggs
3af35c6dfa
nouveau: match latest gallium changes
2007-12-18 11:27:44 +11:00
Ben Skeggs
015871a075
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-12-18 11:02:46 +11:00
Brian
04a5a8b3bc
updates for depth/stencil/alpha state
2007-12-17 14:06:17 -07:00
Brian
8978627ad0
Emit declarations for constants (references to the const buffer)
2007-12-17 14:00:35 -07:00
Zack Rusin
aeb5362281
i965: index the destination offset with regards to the current index
2007-12-17 14:36:31 -05:00
Zack Rusin
531efbab75
i965: return false when the function fails, not succeeds
2007-12-17 14:05:46 -05:00
Zack Rusin
55c1894d0a
Add the new test program for fp's.
2007-12-17 13:23:47 -05:00
Keith Whitwell
bfe79babf9
gallium: incorporate alpha state into depth_stencil state object.
2007-12-17 16:14:29 +00:00
Ben Skeggs
c5ffd8e9af
nv40: fix valgrind complaints
2007-12-17 21:49:16 +11:00
Ben Skeggs
8043d2d261
nv40: clean state a bit
2007-12-17 21:45:13 +11:00
Keith Whitwell
556e247cee
965: remove dead state atom decls
2007-12-17 10:30:38 +00:00
Keith Whitwell
3be91c5a49
965: fix for non-indexed draw path
2007-12-17 10:30:38 +00:00
Keith Whitwell
95adfb9fec
965: fix/hack check for NULL texunit in state upload
2007-12-17 10:30:38 +00:00
Keith Whitwell
b52e4477f8
965: fix ExtDivide check
2007-12-17 10:30:38 +00:00
Keith Whitwell
ae858511d0
965: put brw_constant_buffer atom directly in update list
2007-12-17 10:30:38 +00:00
Brian
41b1aa5109
switch on cpp instead of format
2007-12-16 10:00:51 -07:00
Ben Skeggs
7dcef36f4c
nouveau: bump pushbuf size a little, so a "full" packet can fit
2007-12-17 00:46:30 +11:00
Ben Skeggs
66013a252f
nv40: colormask thinko
2007-12-17 00:11:41 +11:00
Ben Skeggs
f7e99bf22c
nv40: don't use vertex buffers for static vertices.
2007-12-16 23:45:30 +11:00
Ben Skeggs
4c2a3356cf
nouveau: some cleanups
2007-12-16 21:31:28 +11:00
Ben Skeggs
b337ecdd8e
nv40: fix culling
2007-12-16 20:44:44 +11:00
Ben Skeggs
19af6e9161
nv40: typo
2007-12-16 20:21:37 +11:00
Ben Skeggs
f287f687fe
nv40: fp support for TGSI_FILE_IMMEDIATE.
...
arbfslight works, nouveau's first GLSL prog :)
2007-12-16 19:28:05 +11:00
Ben Skeggs
505e50de10
nv40: grow fragprog as needed
2007-12-16 18:36:18 +11:00
Ben Skeggs
ab4c2e014d
nv40: destroy programs
2007-12-16 16:01:25 +11:00
Ben Skeggs
af0b4a50e5
nv40: make vbo state update static
2007-12-16 15:49:49 +11:00
Brian
47b5138d2d
rename some 'mesa' functions
2007-12-15 16:51:57 -07:00
Brian
263e8f0572
Use tile functions in new p_tile.[ch]
...
This removes quite a bit of code duplicated in the drivers.
2007-12-15 16:44:29 -07:00
Brian
bccc4c5c01
Re-usable tile get/put functions
2007-12-15 16:42:22 -07:00
Brian
de1201a0ba
don't allocate scratch tile in sp_tile_cache_flush_clear() to avoid stack overflow
2007-12-15 09:49:20 -07:00
Ben Skeggs
210bf673c2
nouveau: move extension stuff into nouveau_screen.c
2007-12-16 00:35:59 +11:00
Ben Skeggs
b5b9ac62e6
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-12-15 09:48:11 +11:00
Brian
017f862de1
Added origin_lower_left field to pipe_rasterizer_state
...
This controls whether the window origin is considered to be the lower-left
or upper-left corner.
This effects computation of gl_FragCoord and the application of polygon stipple.
2007-12-14 12:25:25 -07:00
Brian
f3b3ea9742
update_samplers() didn't respect the sampler->texunit mapping.
...
This fixes the glsl/texdemo1.c program.
2007-12-14 11:43:15 -07:00
Brian
fce4612f8a
set SamplerUnit[] entry in load_texture() just to be safe
2007-12-14 11:42:28 -07:00
Brian
814d4ff83a
emit tgsi declarations for texture samplers
2007-12-14 11:17:48 -07:00
Brian
1e3b07f363
set program->SamplersUsed bit when using a texture instruction
2007-12-14 11:16:49 -07:00
Brian
e785f190f0
Don't always declare frag shader INPUT[0] as fragment position.
...
We were doing this for the sake of softpipe and the tgsi intergrepter since
we always need the fragment position and W-coordinate information in order
to compute fragment interpolants.
But that's not appropriate for hardware drivers.
The tgsi interpreter now get x,y,w information from a separate tgsi_exec_vector
variable setup by softpipe.
The new pipe_shader_state->input_map[] defines how vert shader outputs map
to frag shader inputs. It may go away though, since one can also examine
the semantic label on frag shader input[0] to figure things out.
2007-12-14 11:00:46 -07:00
Brian
23e36c2dfb
update comment for TGSI_TOKEN_TYPE_IMMEDIATE case
2007-12-14 10:46:29 -07:00
Ben Skeggs
7f89c776e1
nv40: less dodgy vp const/insn handling
2007-12-15 03:49:35 +11:00
Brian
a2b4d4a8db
add missing code for PIPE_FORMAT_S8_UNORM renderbuffer
2007-12-13 18:26:48 -07:00
Brian
e2d7107cc2
remove unused var
2007-12-13 18:26:10 -07:00
Keith Whitwell
7a2d3ac5bc
965: get brw_wm_surface_state compiling again
2007-12-13 21:00:10 +00:00
Keith Whitwell
568fcf64c7
965: get fragment shader compiler compiling
...
Don't think that it will run though.
2007-12-13 20:39:31 +00:00
Zack Rusin
c605a55e9f
i965: make the wm_surface compile
2007-12-13 11:43:55 -05:00
Keith Whitwell
c4d71c719c
965: implement magic buffer offset callback
2007-12-13 16:39:49 +00:00
Keith Whitwell
a6ae4ea854
965: magic callback to get buffer offset
2007-12-13 16:36:07 +00:00
Brian
81c9058ea9
Add QuadX,Y fields to tgsi_exec_machine to pass quad's position to tgsi interpreter.
...
The tgsi linear/perspective attribute code now uses these values rather than
input[0]. Need to update SSE path to take quad x,y as function params.
Then, we can remove additional code.
2007-12-13 09:05:15 -07:00
Keith Whitwell
8cd608d5ba
965: missing code from last commit
2007-12-13 15:39:34 +00:00
Keith Whitwell
559750298a
965: remove dead code
2007-12-13 15:37:19 +00:00
Keith Whitwell
0c2e87d565
965: remove dead code
2007-12-13 15:37:19 +00:00
Keith Whitwell
19025605e9
965: remove dead code
2007-12-13 15:37:19 +00:00
Keith Whitwell
7abe2bfefa
965: remove dead code
2007-12-13 15:37:19 +00:00
Keith Whitwell
54f1ce3b27
965: remove reference to metaops
2007-12-13 15:37:19 +00:00
Keith Whitwell
1f1506ec94
965: use state atom array directly
2007-12-13 15:37:19 +00:00
Keith Whitwell
4844b9fb9d
965: calculate nr enabled vbos on the fly
2007-12-13 15:37:18 +00:00
Zack Rusin
da89104c57
Actually allocate the output registers.
...
In tgsi the output's will (hopefully) consecutive so this
check (besides not being currently implemented) is not
necessary.
2007-12-13 10:33:12 -05:00
Zack Rusin
6f111e9c81
Don't generate spurious vs, move the enable a bit to do that.
2007-12-13 10:31:39 -05:00
Ben Skeggs
868048fcc7
nv40: Do all fp setup in nv40_fragprog.c
2007-12-14 01:51:43 +11:00
Ben Skeggs
00f0f0d0a4
nouveau: mass renaming for consistency, no functional changes
2007-12-14 01:14:23 +11:00
Ben Skeggs
72d47f1949
nouveau: more adaption..
2007-12-13 11:55:35 +11:00
Ben Skeggs
f1c5415675
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-12-13 10:41:43 +11:00
Brian
417c295333
added r5g5b5_put_tile_rgba()
2007-12-12 16:30:49 -07:00
Brian
4416514aa8
Remove get/put_tile_rgba() functions.
...
Temporarily, use the functions from sp_rgba_tile.c
2007-12-12 16:05:38 -07:00
Brian
034476fc78
remove #include
2007-12-12 16:04:52 -07:00
Brian
a4ca2591f6
Move float/rgba tile get/put functions into new file.
...
This should be moved into a gallium util lib (location tbd) so it can also
be used by the state tracker.
Then, remove the pipe->get/put_tile_rgba() functions.
2007-12-12 16:00:11 -07:00
Brian
708251558c
PIPE_SCREEN_SURFACE no longer needed
2007-12-12 15:24:01 -07:00
Brian
20eae595fa
Re-org of st_create_framebuffer() and renderbuffer format selection.
...
st_create_framebuffer() now takes pipe_formats for the color, depth, stencil
buffers.
This avoids a round-about chain of calls to pipe->is_format_supported() for
window renderbuffers (their format never changes).
Renderbuffer format selection code in st_format.c is simpler now too.
2007-12-12 14:55:57 -07:00
Brian
a51d0e419a
move some code to avoid deref of NULL ptr
2007-12-12 14:45:22 -07:00
Keith Whitwell
06036bc8c4
965: remove complex compiler for simple fragment programs.
...
Keep the simple compiler for complex fragment programs...
2007-12-12 20:09:04 +00:00
Keith Whitwell
ea7c533d40
965: sketch changes to brw_wm_surface_state.c
2007-12-12 20:09:04 +00:00
Keith Whitwell
216de6ab5b
965: delete dead files
2007-12-12 20:09:04 +00:00
Keith Whitwell
5978289df1
965: delete dead files
2007-12-12 20:09:03 +00:00
Keith Whitwell
20e6a9b86d
965: delete dead files
2007-12-12 20:09:03 +00:00
Brian
69292a0067
remove old assertion
2007-12-12 13:08:00 -07:00
Brian
829099210b
add PIPE_FORMAT_R5G6B5_UNORM to list of supported screen surface types
2007-12-12 12:59:45 -07:00
Brian
b22287d097
update format param type
2007-12-12 12:59:19 -07:00
Brian
d7aa446369
Try PIPE_FORMAT_R5G6B5_UNORM for GL_RGB5 request.
2007-12-12 12:58:59 -07:00
Brian
77baacbab1
fix some mistakes in the _PIPE_FORMAT_x #defines
2007-12-12 12:58:04 -07:00
Zack Rusin
a308a3e3f8
i965: compile vertex shaders and emit hardware instructions
...
impossible to test because fragment shaders haven't been done yet
and it crahses in the fragment shading code. but given that i'm
infallible (and highly dillusional) i'm sure it's correct.
2007-12-12 12:26:33 -05:00
José Fonseca
eaa82d33bf
Add src/mesa to include path.
2007-12-12 16:04:58 +00:00
Ben Skeggs
1fb9736898
nouveau: take jumps into account properly when debugging pushbuf
2007-12-13 01:04:12 +11:00
Ben Skeggs
805c5993a3
nv40: Fix bug in vtxprog + a few tweaks
2007-12-12 23:37:52 +11:00
Ben Skeggs
9114324b0b
nv40: small bug
2007-12-12 23:31:16 +11:00
Zack Rusin
94e19777c9
i915tex: remove. it's deprecated and causes merge problems
...
we did some small changes in the beginning of the gallium3d
lifecycle in i915tex which is not in master anymore and just
causes problems when doing merges. getting rid of the headache
by just nuking it here
2007-12-12 05:48:10 -05:00
Ben Skeggs
79bca7dd88
nouveau: adapt
...
Some things that worked before are now broken, there's an "XXX:" around one
of the culprits in the GL state tracker so hopefully it'll get fixed soon!
2007-12-12 14:20:58 +11:00
Brian
1029c00a26
remove more -I paths
2007-12-11 19:17:31 -07:00
Brian
5dcc894ea2
prefix some #includes
2007-12-11 19:16:46 -07:00
Brian
6f467e5737
trim down #includes
2007-12-11 19:16:26 -07:00
Ben Skeggs
5891598012
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
...
Conflicts:
src/mesa/pipe/Makefile
2007-12-12 13:11:19 +11:00
Brian
68caa076a9
trim down -I options
2007-12-11 18:58:48 -07:00
Brian
3d9bdaa80b
include pipe/tgsi/exec/tgsi_sse2.h if needed. Silences warning.
2007-12-11 18:58:32 -07:00
Brian
b2ad30d571
Cell: draw smooth-shaded triangle
2007-12-11 18:26:52 -07:00
Brian
9828310a1b
Collect some global vars in a single struct.
2007-12-11 15:29:05 -07:00
Brian
fda387988c
Remove temporary cell_create_surface()
2007-12-11 13:55:37 -07:00
Brian
457a96e777
SPU function prototypes, etc.
2007-12-11 13:49:48 -07:00
Ian Romanick
9a0fe23d49
Port to libspe2
...
libspe is deprecated in Cell SDK 2.1, and it is removed in Cell SDK 3.0.
This patch ports the existing libspe-based code to libspe2. Some error
checking (eh-hem) would be nice.
2007-12-11 12:43:50 -08:00
Ian Romanick
bfb43e8e79
Remove '-include altivec.h'.
...
Including altivec.h caused problems in some places that use "pixel" as a
variable name.
2007-12-11 12:41:12 -08:00
José Fonseca
25e658a7cf
Mention 965 driver on main page.
2007-12-11 18:19:23 +00:00
José Fonseca
87e3566604
Write a nicer doxygen main page, based on the TG's Gallium3D technical overview pages.
2007-12-11 18:19:23 +00:00
José Fonseca
01434dd3bd
Cover LLVM code in doxygen output.
2007-12-11 18:19:23 +00:00
Michel Dänzer
f3789748d4
softpipe: Support for PIPE_FORMAT_A4R4G4B4_UNORM and PIPE_FORMAT_R5G6B5_UNORM.
...
The packedpixels test runs with the xlib winsys, though not all cases look
correct yet.
2007-12-11 19:10:56 +01:00
Michel Dänzer
88723b2fc8
Remove internal_format field from struct pipe_texture.
...
It's state tracker specific / not really necessary anyway.
2007-12-11 19:10:56 +01:00
Keith Whitwell
13699463a3
Rework gallium and mesa queries a little.
...
Add a 'CheckQuery()' driver callback to mesa to check query completion.
Make pipe_query an opaque type.
Rework softpipe queries, support overlapping occlusion queries.
2007-12-11 17:10:48 +00:00
Keith Whitwell
b247ab0363
965: remove duplicate brw_draw functions, make init a bit cleaner
2007-12-11 17:10:48 +00:00
Keith Whitwell
ecb5e14e86
gallium: remove clear values from depth, stencil state
2007-12-11 17:10:47 +00:00
Brian
4a4543f536
Fix align16() function to work with 32/64-bit pointers on big-endian.
2007-12-11 09:13:12 -07:00
Brian
23ca30e24b
change align_malloc() alignment to uint
2007-12-11 09:09:06 -07:00
Brian
5b8b542cb2
Move align_malloc(), align_free() to p_util.h
2007-12-11 09:00:01 -07:00
Brian
9f0e5642d8
use ALIGN16_ATTRIB from p_compiler.h
2007-12-11 09:00:01 -07:00
Brian
1bc303283e
Remove obsolete clear_color, tex sampler state
2007-12-11 09:00:01 -07:00
Brian
6465c78049
Remove obsolete clear_color, tex sampler state functions
2007-12-11 09:00:01 -07:00
Brian
f9562ff85d
add missing case statements for TGSI_TOKEN_TYPE_IMMEDIATE and assert(0)
...
We're hitting this with quite a few Mesa demos.
2007-12-11 08:18:47 -07:00
Zack Rusin
a0dacbf369
Adopt llvm to some of the latest changes.
2007-12-11 09:49:34 -05:00
Zack Rusin
63a9d835ce
Redo the fragment program examples to match vp's
...
we just load text files instead of compiling tons of small
binaries
2007-12-11 09:49:34 -05:00
Zack Rusin
025b140b2f
Add a simple fps counter to the example
2007-12-11 09:49:33 -05:00
Zack Rusin
6dc4e6ae15
Redo the way we pass arguments to the llvm.
...
simply pass aligned arrays, they should cast to vectors without
any problems. also remove unnecessary memset
2007-12-11 09:49:33 -05:00
Zack Rusin
9d6e6e86d9
number of outputs is nr_attribs - 2
2007-12-11 09:49:33 -05:00
Zack Rusin
1f30efb736
Implement kilp and make it work
2007-12-11 09:49:33 -05:00
Zack Rusin
8681deddd7
Rewrite argument passing to prepare for handling of the kil instruction.
...
Pass the inputs/outputs pointer in the structure instead of infinitely
expanding arguments to the functions.
2007-12-11 09:48:13 -05:00
Keith Whitwell
c3af68dc50
gallium: remove set_sampler_units interface
...
The effect of this mapping can be acheived by the state tracker and
setting up the pipe texture state pointers to incorporate its affects.
2007-12-11 14:39:37 +00:00
Keith Whitwell
94cadef31f
gallium: remove redundant clear_color state.
2007-12-11 13:19:33 +00:00
Keith Whitwell
48731280d0
gallium: Remove feedback interfaces from pipe driver.
...
Something similar will return when geometry shaders are added, but for now
this interface is not required.
2007-12-11 13:14:56 +00:00
Keith Whitwell
89afc929f4
gallium: remove dead pbo zcopy code
2007-12-11 13:14:56 +00:00
Zack Rusin
60b8900b13
Hmm, missed these two files. Sorry.
2007-12-11 07:44:07 -05:00
Zack Rusin
c474f1fb90
Port i965 driver to Gallium3D.
...
This is a squashed commit of i965 branch on
ssh://people.freedesktop.org/~zack/mesa
Because of the porting the branch often didn't compile so
squashing it makes more sense.
The port is still far from complete.
2007-12-11 07:39:06 -05:00
Ben Skeggs
e282d22d51
nv40: insanely stupid bug..
2007-12-11 19:06:00 +11:00
Ben Skeggs
c23d0f4c50
nv40: allow reading from fragprog result regs
2007-12-11 16:02:14 +11:00
Ben Skeggs
b34952c758
nv40: depth textures
2007-12-11 14:53:37 +11:00
Ben Skeggs
ce0e274c7c
nv40: some forgotten adaptions
2007-12-11 14:08:42 +11:00
José Fonseca
12363674e5
Add surface storage allocation function to winsys interface.
2007-12-11 01:14:38 +00:00
José Fonseca
609538f57c
Add inline funtion to comput format size based on code in st_format.c.
...
Including state_tracker/st_format.h from pipe drivers is not an option
since it uses GL* types and pipe/p_util.h will clash with main/imports.h.
2007-12-11 00:51:12 +00:00
Brian
7d1894c655
Cell: first triangle.
...
This is a feeble first step, but it works.
The cell_clear_surface() function has been hijacked to set up a "draw triangle"
command and send it to all the SPUs.
The Gallium softpipe triangle code was copied to the SPU module and modified.
Only the progs/trivial/clear.c program runs.
2007-12-10 17:32:43 -07:00
Brian
aef25b1994
set window size to 256x256
2007-12-10 17:32:43 -07:00
Brian
c9f9c50980
XXX comments about some hard-coded values that need to be fixed
2007-12-10 17:32:43 -07:00
Brian
5d41a71392
minor clean-ups, comments
2007-12-10 17:32:43 -07:00
Ben Skeggs
4bc3cfaaf0
nouveau: fix build
2007-12-11 10:04:39 +11:00
Ben Skeggs
fe9f4f49ef
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
...
Conflicts:
src/mesa/drivers/dri/Makefile.template
2007-12-11 10:01:59 +11:00
Keith Whitwell
0a79c65073
gallium: use hardcoded cliptest code for fixed planes
2007-12-10 22:38:44 +00:00
Keith Whitwell
f2feb2e4c7
gallium: disable assert(0) in xmesa_surface()
2007-12-10 22:27:04 +00:00
Keith Whitwell
7c306afdaa
gallium: remove unnecessary guards on qs->next
2007-12-10 22:02:10 +00:00
Brian
e53303ba3b
Cell driver state-setter functions, basic tile get/put, glClear.
...
The state setting code was mostly just copied from the softpipe driver.
The SPUs can now get/put framebuffer tiles from/to main memory and clear
them to a given color. Lots of debug code in effect.
Tiled framebuffer is displayed in X window via the xmwinsys layer.
To enable Cell driver, export GALLIUM_CELL=1
2007-12-10 14:25:30 -07:00
Brian
e248f94050
remove ~ backup files
2007-12-10 14:19:35 -07:00
Brian
36ef54deae
remove -Wall, add -DGALLIUM_CELL
2007-12-10 14:10:29 -07:00
Brian
4f58d9af9a
Add 'type' parameter to is_format_supported() to specify texture vs. drawing surface, etc.
...
Additional types may be added in the future.
2007-12-10 13:48:09 -07:00
Brian
f26936b352
disable assertion in sp_tile_cache_set_surface() for now
2007-12-10 13:45:24 -07:00
Brian
4ccd3124f6
implement i915_put_tile_rgba() - temporary code though
2007-12-10 13:42:34 -07:00
Brian
1b20b2d53b
don't use get/put_tile_rgba() for accum buffer accesses
2007-12-10 13:41:19 -07:00
Michel Dänzer
37484a3874
Fix up some confusion wrt winsys->buffer_create alignment / flags parameters.
...
intel_winsys works again.
2007-12-10 17:36:59 +01:00
Michel Dänzer
41ce1f8fb3
Link fewer common objects into Gallium winsys layers.
...
These are useless or even harmful due to referencing symbols no longer
available in the Gallium build.
2007-12-10 17:36:59 +01:00
Ben Skeggs
18fe9776b4
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-12-10 21:09:52 +11:00
Ben Skeggs
f7195b3232
Correct user VBO size.
2007-12-10 21:08:42 +11:00
Michel Dänzer
913703d4b8
Remove stray references to struct pipe_region.
2007-12-10 09:31:43 +01:00
Ben Skeggs
aab6f8f948
nv40: more flexible vbo format translation
2007-12-10 16:47:47 +11:00
Ben Skeggs
9d651164d8
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-12-10 16:30:24 +11:00
Brian
63e2ab83f6
use quadColor local var
2007-12-09 21:44:26 -07:00
Ben Skeggs
3b2598c70b
nouveau: fix elusive dma bug
...
In some situations WAIT_RING would get called while the GPU was processing
data from outside the "master" ring, which caused dma.free to be updated
incorrectly and much fun was had.
WAIT_RING will now wait until it reads GET values from within the main ring
buffer before calculating free space.
2007-12-10 15:17:20 +11:00
Brian
9884838273
Fix looping for multi-color buffer writing.
2007-12-09 21:10:39 -07:00
Brian
04e88f469c
added null ptr check in draw_destroy() for rasterizer stage
2007-12-09 20:45:20 -07:00
Ben Skeggs
7d8368790f
nouveau: add callbacks for signalled fences
2007-12-10 13:19:47 +11:00
Ben Skeggs
9ba3890c6f
nouveau: fix build
2007-12-10 12:13:00 +11:00
Ben Skeggs
5c1a5b5047
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
...
Conflicts:
src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
src/mesa/pipe/Makefile
src/mesa/pipe/draw/draw_vertex_fetch.c
src/mesa/pipe/i915simple/i915_texture.c
src/mesa/pipe/softpipe/sp_texture.c
src/mesa/pipe/xlib/xm_winsys.c
src/mesa/state_tracker/st_cb_fbo.c
2007-12-10 12:06:59 +11:00
José Fonseca
f8f9580a2a
Adapt for winsys interface changes.
2007-12-09 18:26:26 +00:00
Ben Skeggs
1a3987240a
nouveau: give resources a start property
2007-12-10 02:10:42 +11:00
José Fonseca
de7e51ff98
gallium: use SSE by default
2007-12-09 14:06:01 +00:00
Michal
6cdcebe801
Allow tgsi_dump print-out to stderr or a string buffer.
...
Handle source register complement modifier in exec and dump.
2007-12-09 14:06:01 +00:00
José Fonseca
273f6e7698
gallium: Remove buffer_unfence and buffer_finish.
...
These interfaces have been deemed useless by Keith.
2007-12-09 14:06:00 +00:00
Keith Whitwell
b1399a5dd2
gallium: more trivial tests
2007-12-09 14:06:00 +00:00
José Fonseca
b478362251
gallium: Reusable pipe buffer library.
...
This is an optional library that winsys drivers can use to simplify memory
management, and help meet the winsys interface requirements.
2007-12-09 14:06:00 +00:00
Keith Whitwell
708582f6d5
gallium: fix ordering of arguments to pack_ui32_float4
2007-12-09 14:05:12 +00:00
Keith Whitwell
56bc8d9199
gallium: remove unneeded depth buffer
2007-12-09 14:05:12 +00:00
Keith Whitwell
bbecce52f8
gallium: initialized draw element buffer to NULL
2007-12-09 14:05:12 +00:00
Keith Whitwell
da47ad07ef
gallium: add support for aliased 4ub format
2007-12-09 14:05:12 +00:00
Keith Whitwell
73a0594276
gallium: support the full range of possible vertex types
2007-12-09 14:03:34 +00:00
Michal
d754548406
gallium: add draw_stage::destroy().
2007-12-09 14:03:34 +00:00
José Fonseca
74fe189b2e
gallium: Comment on winsys's fence functions. Fix comment layout for doxygen.
2007-12-09 14:03:34 +00:00
keithw
6e876d1d32
temporary _mesa_printf symbol
2007-12-09 14:03:34 +00:00
keithw
e87efe7407
[pipe]: add Offset() util macro
2007-12-09 14:03:33 +00:00
José Fonseca
79ad82477a
Document return types.
2007-12-09 14:03:33 +00:00
keithw
cd1eefee84
add fence interfaces and buffer create flags to pipe_winsys
2007-12-09 14:03:33 +00:00
Ben Skeggs
88b56c4545
Merge branch 'nouveau-gallium-0.1' into darktama-gallium-0.1
2007-12-09 22:32:09 +11:00
Ben Skeggs
897c96aacc
nouveau: downgrade hacked syncs to hacked flushes
...
Unfortunately we still need to keep the forced flushes as mesa's vbo path
is still insane. But, at least this is a little less brutal. The bo code will
detect when it needs to do a sync.
2007-12-09 22:25:35 +11:00
Ben Skeggs
f58f4e0f0e
nouveau: relocs are per-pushbuf, not per-channel
2007-12-09 21:44:46 +11:00
Ben Skeggs
62bbf8db87
nouveau: use "indirect" push buffers
2007-12-09 20:38:08 +11:00
Ben Skeggs
b8965bee40
nouveau: adapt to gallium interface changes
2007-12-09 12:12:50 +11:00
Brian
274a3d9cb6
Try to reduce the frequency of calls to pipe->get_tex_surface()
...
Save the surface info in the tile cache and re-use whenever possible.
2007-12-09 12:05:28 +11:00
Brian
8c1c222b6d
shorten loops over color bufs
2007-12-09 12:05:28 +11:00
Brian
0ee512aaf0
code re-org in softpipe_clear()
2007-12-09 12:05:28 +11:00
Brian
92e7a02e5a
clean-ups
2007-12-09 12:05:27 +11:00
Brian
7c8cc71a28
Tile clearing optimizations.
...
Clear using int values rather than floats when possible. Better performance now.
2007-12-09 12:05:27 +11:00
Brian
77c7fd3cec
Disable, remove tnl module from the Gallium build since no longer used.
2007-12-09 12:05:27 +11:00
Brian
5e46b252b9
New vbo_set_draw_func() to keep vbo context opaque to state tracker and tnl module.
2007-12-09 12:05:27 +11:00
Brian
75ec482001
Disable swrast, swrast_setup and driverfuncs in the build.
...
The gallium/state tracker no longer uses them and this speeds up the build a bit.
2007-12-09 12:05:27 +11:00
Brian
2636ea5758
Move _mesa_init_glsl_driver_functions() into shader_api.c
...
This allows making a bunch of functions static, and removes a state
tracker dependency on driverfuncs.c
2007-12-09 12:05:27 +11:00
Brian
61d1972dd0
Define PIPE_FORMAT_ tokens as an enum set, rather than #defines.
...
This makes debugging a _lot_ easier.
In gdb, "print format" used to display 613570600, now you see PIPE_FORMAT_A8R8G8B8_UNORM.
2007-12-09 12:05:27 +11:00
Brian
144b70b0b5
include tgsi_dump.h
2007-12-09 12:05:27 +11:00
Brian
cfe0ebe1c0
Replace "duplicate" formats
2007-12-09 12:05:27 +11:00
Brian
2edf1b8e71
Get rid of "duplicate" formats.
...
For example, replace PIPE_FORMAT_U_A8_R8_G8_B8 with PIPE_FORMAT_A8R8G8B8_UNORM
2007-12-09 12:05:27 +11:00
Brian
382ced1600
Enable the tile clear "optimization"
...
Not really faster yet because we're using the float-valued put/get_tile()
functions so we're doing quite a bit of float/int conversion. That can
be fixed though...
2007-12-09 12:05:27 +11:00
Brian
7bbc3ef7ec
Make sp_tile_cache_flush_clear() static.
...
Also, misc clean-ups, comments.
2007-12-09 12:05:27 +11:00
Brian
7655486c88
Convert the clearValue back to floats for sp_tile_cache_clear()
...
It might be nice if sp->clear() took the color/value as floats...
2007-12-09 12:05:27 +11:00
Brian
dfc21b2efb
Some tile cache improvements, clean-ups.
...
Code for optimized clears (per-tile flag indicating clear status) in place
but not enabled yet.
2007-12-09 12:05:27 +11:00
Brian
f36258d7e1
don't dereference pt after realloc - fixes valgrind error
2007-12-09 12:05:27 +11:00
Brian
1eb78225c4
add some whitespace
2007-12-09 12:05:26 +11:00
Brian
0d74d51790
Move struct softpipe_texture definition into sp_texture.h
...
Also, added softpipe_texture() cast wrapper.
2007-12-09 12:05:26 +11:00
Brian
99823680a5
minor code movement
2007-12-09 12:05:26 +11:00
Brian
03dcde4caa
Add PIPE_FORMAT_U_B8_G8_R8_A8 in default_rgba_format().
...
Also, rewrite/simplify default_rgba_format() and default_depth_format().
2007-12-09 12:05:26 +11:00
Brian
f1285f238a
byteswapping fixes in choose_pixel_format()
2007-12-09 12:05:26 +11:00
Brian
5002d1eb88
remove stray ;
2007-12-09 12:05:26 +11:00
Brian
5f512d9423
Remove obsolete xlib driver files
2007-12-09 12:05:26 +11:00
Brian
2a9c33f9fe
Overhaul the Xlib winsys layer.
...
Front/back color buffers are now allocated with ordinary malloc() via the
winsys buffer functions.
To display surfaces in SwapBuffers() or flush_frontbuffer() we create an
XImage that wraps the surface, then use XPutImage to copy to the window.
Shared memory transport disabled for now.
2007-12-09 12:05:26 +11:00
Brian
6397bef076
added ST_SURFACE_DEPTH
2007-12-09 12:05:26 +11:00
Brian
a09224258a
move surface pitch calculation so it always gets updated
2007-12-09 12:05:26 +11:00
Brian
6cb181dc15
fix void pointer arithmetic warnings
2007-12-09 12:05:26 +11:00
Brian
a775689036
silence void ptr arithmetic warning
2007-12-09 12:05:26 +11:00
Michel Dänzer
0a44a3fa2f
Eliminate struct pipe_region.
...
Directly use struct pipe_buffer_handle for storage and struct pipe_surface for
(un)mapping.
2007-12-09 12:05:26 +11:00
Michel Dänzer
7f984e1d2a
Remove remnants of 'intel' from active state tracker code.
2007-12-09 12:05:26 +11:00
Michel Dänzer
b57632f04e
st_mesa_format_to_pipe_format: Handle MESA_FORMAT_ARGB4444.
2007-12-09 12:05:25 +11:00
Michel Dänzer
274603c5c9
Hide texture layout details from the state tracker.
...
pipe->get_tex_surface() has to be used for access to texture image data.
2007-12-09 12:05:25 +11:00
Brian
6f44a21348
Add dependency checking for Cell driver sources.
2007-12-09 12:05:25 +11:00
Brian
5cb7186730
silence warning
2007-12-09 12:05:25 +11:00
Brian
dc76fe436c
added PIPE_FORMAT_U_B8_G8_R8_A8 case in color_value()
2007-12-09 12:05:25 +11:00
Brian
64a1d5cbd1
Fix endianness bug in _mesa_texstore_argb8888()
...
On big-endian, storing in _mesa_texformat_argb8888 format produced wrong results.
Also, clean-up nearby code to match.
2007-12-09 12:05:25 +11:00
Brian
ecd0853a09
added B8G8R8A8 support and improved pixel format selection when doing remote display to X server of different endianness.
2007-12-09 12:05:25 +11:00
Brian
4f25c76735
added tile funcs for B8G8R8A8 format
2007-12-09 12:05:25 +11:00
Brian
7f9a64e247
added B8G8R8A8 format
2007-12-09 12:05:25 +11:00
Brian
264f64fd89
added -fPIC
2007-12-09 12:05:24 +11:00
Brian
0d2ba87b54
don't build libglw
2007-12-09 12:05:24 +11:00
Brian
1698cbde30
Initial Cell driver infrastructure.
...
No real code yet. Just stand-ins and make/build infrastructure.
2007-12-09 12:05:24 +11:00
Brian
e5d8ee205a
glut doesn't need -lXt
2007-12-09 12:04:36 +11:00
José Fonseca
c989209b6a
Cover state tracker and winsys driver. Tweak parameters.
2007-12-09 12:04:36 +11:00
Michel Dänzer
72513ae3a7
Move dimensions from struct pipe_region to struct pipe_surface.
2007-12-09 12:04:36 +11:00
Brian
f83d4e7bde
Try to reduce the frequency of calls to pipe->get_tex_surface()
...
Save the surface info in the tile cache and re-use whenever possible.
2007-12-07 21:21:58 -07:00
Brian
a110789f3e
shorten loops over color bufs
2007-12-07 20:58:01 -07:00
Brian
5d4b53b3af
code re-org in softpipe_clear()
2007-12-07 20:31:26 -07:00
Brian
d1d9156831
clean-ups
2007-12-07 20:24:24 -07:00
Brian
127a493fe2
Tile clearing optimizations.
...
Clear using int values rather than floats when possible. Better performance now.
2007-12-07 20:13:10 -07:00
Brian
51537e0b6e
Disable, remove tnl module from the Gallium build since no longer used.
2007-12-07 17:26:06 -07:00
Brian
c885775cae
New vbo_set_draw_func() to keep vbo context opaque to state tracker and tnl module.
2007-12-07 17:24:42 -07:00
Brian
40e9c57d31
Disable swrast, swrast_setup and driverfuncs in the build.
...
The gallium/state tracker no longer uses them and this speeds up the build a bit.
2007-12-07 17:14:02 -07:00
Brian
2d2bb35f96
Move _mesa_init_glsl_driver_functions() into shader_api.c
...
This allows making a bunch of functions static, and removes a state
tracker dependency on driverfuncs.c
2007-12-07 17:11:30 -07:00
Brian
54fc80ab31
Define PIPE_FORMAT_ tokens as an enum set, rather than #defines.
...
This makes debugging a _lot_ easier.
In gdb, "print format" used to display 613570600, now you see PIPE_FORMAT_A8R8G8B8_UNORM.
2007-12-07 16:46:30 -07:00
Brian
6070a0eb2b
include tgsi_dump.h
2007-12-07 16:22:39 -07:00
Brian
d3e05111c8
Replace "duplicate" formats
2007-12-07 16:15:14 -07:00
Brian
2067eed9d3
Get rid of "duplicate" formats.
...
For example, replace PIPE_FORMAT_U_A8_R8_G8_B8 with PIPE_FORMAT_A8R8G8B8_UNORM
2007-12-07 16:01:31 -07:00
Brian
099bf3ffe9
Enable the tile clear "optimization"
...
Not really faster yet because we're using the float-valued put/get_tile()
functions so we're doing quite a bit of float/int conversion. That can
be fixed though...
2007-12-07 15:47:39 -07:00
Brian
872caf6089
Make sp_tile_cache_flush_clear() static.
...
Also, misc clean-ups, comments.
2007-12-07 15:46:10 -07:00
Brian
c69c7a6054
Convert the clearValue back to floats for sp_tile_cache_clear()
...
It might be nice if sp->clear() took the color/value as floats...
2007-12-07 15:44:58 -07:00
Brian
57df347bb8
Some tile cache improvements, clean-ups.
...
Code for optimized clears (per-tile flag indicating clear status) in place
but not enabled yet.
2007-12-07 15:32:13 -07:00
Brian
dd87c43a44
don't dereference pt after realloc - fixes valgrind error
2007-12-07 13:19:00 -07:00
Brian
e6b5cf342e
add some whitespace
2007-12-07 13:08:28 -07:00
Brian
4c90dc7027
Move struct softpipe_texture definition into sp_texture.h
...
Also, added softpipe_texture() cast wrapper.
2007-12-07 10:21:56 -07:00
Brian
94a3cb078d
minor code movement
2007-12-07 10:18:34 -07:00
Brian
da3dfe58b2
Add PIPE_FORMAT_U_B8_G8_R8_A8 in default_rgba_format().
...
Also, rewrite/simplify default_rgba_format() and default_depth_format().
2007-12-07 08:28:59 -07:00
Brian
0d1669f530
byteswapping fixes in choose_pixel_format()
2007-12-07 08:24:56 -07:00
Brian
9772bb7f71
remove stray ;
2007-12-07 08:24:33 -07:00
Brian
e920f367ed
Remove obsolete xlib driver files
2007-12-07 07:58:31 -07:00
Brian
749d723287
Overhaul the Xlib winsys layer.
...
Front/back color buffers are now allocated with ordinary malloc() via the
winsys buffer functions.
To display surfaces in SwapBuffers() or flush_frontbuffer() we create an
XImage that wraps the surface, then use XPutImage to copy to the window.
Shared memory transport disabled for now.
2007-12-07 07:57:54 -07:00
Brian
f77ce9e4fa
added ST_SURFACE_DEPTH
2007-12-07 07:53:21 -07:00
Brian
ee6b39cfe6
move surface pitch calculation so it always gets updated
2007-12-07 07:53:06 -07:00
Brian
5823f99d0f
fix void pointer arithmetic warnings
2007-12-07 07:52:35 -07:00
Brian
b9300f16c4
silence void ptr arithmetic warning
2007-12-07 07:48:33 -07:00
Michel Dänzer
b859cdf6f1
Eliminate struct pipe_region.
...
Directly use struct pipe_buffer_handle for storage and struct pipe_surface for
(un)mapping.
2007-12-07 12:30:35 +01:00
Stephane Marchesin
fecb3ce586
Use write posting in the kickoff function too.
2007-12-07 02:31:40 +01:00
Michel Dänzer
987d59bb83
Remove remnants of 'intel' from active state tracker code.
2007-12-06 11:30:34 +01:00
Michel Dänzer
d492b388c9
st_mesa_format_to_pipe_format: Handle MESA_FORMAT_ARGB4444.
2007-12-06 11:25:40 +01:00
Michel Dänzer
753db0d840
Hide texture layout details from the state tracker.
...
pipe->get_tex_surface() has to be used for access to texture image data.
2007-12-06 11:18:11 +01:00
Brian
5935626818
Add dependency checking for Cell driver sources.
2007-12-05 14:57:19 -07:00
Brian
ce30f0550f
silence warning
2007-12-05 14:54:29 -07:00
Brian
146483d541
added PIPE_FORMAT_U_B8_G8_R8_A8 case in color_value()
2007-12-05 14:54:19 -07:00
Brian
3eadbe64bf
Fix endianness bug in _mesa_texstore_argb8888()
...
On big-endian, storing in _mesa_texformat_argb8888 format produced wrong results.
Also, clean-up nearby code to match.
2007-12-05 14:53:19 -07:00
Brian
9df0a6dd9c
added B8G8R8A8 support and improved pixel format selection when doing remote display to X server of different endianness.
2007-12-05 14:51:08 -07:00
Brian
04516cfcaf
added tile funcs for B8G8R8A8 format
2007-12-05 14:48:09 -07:00
Brian
fa3fc81f2c
added B8G8R8A8 format
2007-12-05 14:47:27 -07:00
Ben Skeggs
47b418b8fa
nv50: 3d driver skeleton
2007-12-05 14:01:01 +11:00
Ben Skeggs
97f8c39d91
nouveau: g8x winsys support, yay softpipe!
2007-12-05 11:57:50 +11:00
Brian
91692fce20
added -fPIC
2007-12-02 15:34:27 -07:00
Brian
c27082995d
don't build libglw
2007-12-02 15:34:14 -07:00
Brian
88b715b049
Initial Cell driver infrastructure.
...
No real code yet. Just stand-ins and make/build infrastructure.
2007-12-02 15:23:51 -07:00
Brian
233c374d02
glut doesn't need -lXt
2007-12-02 15:20:13 -07:00
José Fonseca
219dafa9b5
Cover state tracker and winsys driver. Tweak parameters.
2007-12-02 17:15:55 +00:00
Michel Dänzer
11a80160fd
Move dimensions from struct pipe_region to struct pipe_surface.
2007-11-29 16:41:39 +01:00
Ben Skeggs
042b7dfd0e
nv40: fix build after gallium changes
2007-11-25 13:05:56 +11:00
Ben Skeggs
2bd97ca942
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-11-25 13:00:15 +11:00
Ben Skeggs
2a2756a019
nv40: be more flexible with render target setup
2007-11-25 12:39:32 +11:00
Ben Skeggs
b8c5419faf
nv40: remove unused stuff
2007-11-25 12:06:42 +11:00
Ben Skeggs
25acd4eba0
nv40: point sprites
2007-11-25 12:02:12 +11:00
Ben Skeggs
8b1c8f5e75
nv40: fp arbitrary swizzling/negation
...
Pretty bad implementation, goal was to get glBitmap working.
2007-11-25 11:25:32 +11:00
Michal Krol
7043db677f
Cleanup PIPE_FORMAT names.
...
Add a function that builds a display name of a given format token.
2007-11-24 16:02:31 +00:00
Michal Krol
b3dee0185e
gallium: remove sp_headers.h references.
2007-11-23 13:48:12 +00:00
Michal Krol
abd5e8e41d
gallium: reorg tgsi directories.
2007-11-23 13:28:16 +00:00
Michal Krol
44519be0f5
gallium: back out winsys interface changes
2007-11-23 13:27:20 +00:00
Ben Skeggs
558f3abb49
nv40: support for keeping multiple vtxprogs on the hw at the same time.
2007-11-23 18:54:19 +11:00
José Fonseca
9924f208cf
Use the new vertex buffer draw stage.
2007-11-22 11:57:31 +00:00
José Fonseca
1a8daf0627
New vertex buffer stage.
2007-11-22 11:46:32 +00:00
José Fonseca
45f658f172
Fix build.
2007-11-22 11:44:13 +00:00
José Fonseca
369ff9786d
The right include was mtypes.h.
2007-11-22 11:44:00 +00:00
José Fonseca
c584142543
Fix build errors.
2007-11-22 11:43:58 +00:00
Michal
0e31e24659
Fix compatibility issues between gcc and msvc.
2007-11-22 11:43:04 +00:00
Michal
5961732c1b
Make it compile under Win32.
2007-11-22 11:18:02 +00:00
José Fonseca
4541ee5343
Remove fences from the i915simple winsys interface.
...
Fences will be part of the pipe winsys interface, so remove this to avoid
merge conflicts later on.
This reverts commit ca7f68a7cf .
This reverts commit dec60d33b2 .
This reverts commit 90dd0cb822 .
2007-11-22 10:56:09 +00:00
Brian
2112191d45
more simplification, clean-up in draw_set_vertex_info()
2007-11-21 16:03:16 -07:00
Brian
9f0b5bba70
Replace draw_set_vertex_attributes() with simpler draw_set_vertex_info().
...
Just pass in the vertex_info object and make a copy of it.
2007-11-21 16:00:57 -07:00
Brian
fbe68bf6b2
Simplify draw module's vertex_info.
...
No longer store the vertex header and clip pos info in the draw module's
vertex_info. The vertex_info just describes the data[] elements.
This simplifies the code in several places.
2007-11-21 15:40:20 -07:00
Ben Skeggs
dd1500b8b4
nouveau: wait for sync after m2mf also, to be thourough.
...
These will all go away at some point I promise, want to rule out sync issues
while I bash nv40 into shape.
2007-11-21 19:21:34 +11:00
Ben Skeggs
ff7edad077
nv40: Better teximage layout, probably not 100% correct still.
...
Gallium represents image layout by saying that each mipmap level has a number
of "face" images within it. However, nv40 represents them as "faces" that
have a number of mipmap levels. I'm not sure if the gallium representation
allows this, but I've made an attempt to match it as closely as possible.
CUBE/3D textures with mipmaps are probably broken, but untested currently.
2007-11-21 19:20:38 +11:00
Ben Skeggs
af1a388939
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
2007-11-21 15:38:28 +11:00
Brian
5a6017d496
add PIPE_FORMAT_Z24_S8 support to softpipe patsh
2007-11-20 08:36:06 -07:00
Brian
0191570f02
initial support for PIPE_FORMAT_Z24_S8
2007-11-20 08:30:10 -07:00
Ben Skeggs
0655cdcf48
nv40: force reupload of all consts on vtxprog change
2007-11-20 22:34:55 +11:00
Ben Skeggs
0d0349faff
nouveau: temporary workaround for dodgy buffer code
2007-11-20 22:09:56 +11:00
Ben Skeggs
b9b5f4b3c1
nv40: "rect" textures, anisotropic filtering
2007-11-20 21:13:33 +11:00
Ben Skeggs
30837fd24f
nv40: fix a couple of typos
2007-11-20 20:56:47 +11:00
Ben Skeggs
f01e305e98
nv40: use native Z24_S8 format for zeta buffer
2007-11-20 19:10:58 +11:00
Ben Skeggs
85d626508a
Add support for Z24_S8 to GL state tracker.
2007-11-20 19:09:47 +11:00
Ben Skeggs
04fcee96b1
nv40: track pipe const id
2007-11-20 19:08:33 +11:00
Ben Skeggs
b4c813313a
nv40: remove use of temps for KILP, implement KIL
2007-11-20 15:34:26 +11:00
Ben Skeggs
060127af38
nouveau: update to latest header
2007-11-20 13:22:11 +11:00
Brian
c4f9fbb57f
optimize earlyz_quad(), add comments, remove unneeded #includes
2007-11-19 18:16:07 -07:00
Brian
0204cbb4f1
optimize linear_interpolation(), perspective_interpolation() functions
2007-11-19 18:15:21 -07:00
Michal Krol
7f718f0476
Implement early depth test.
...
Early depth test is enabled when depth test is enabled and
alpha test is disabled and fragment shader does not write
depth.
The early-z is implemented by moving the depth test stage
just before the fragment shader stage and prepending it
with an earlyz stage, introduced with this commit.
The earlyz stage prepares the quad->outputs.depth for
the following depth test stage by interpolating Z position,
just as the fragment shader would do.
2007-11-18 18:20:20 +00:00
Ben Skeggs
c7c6253169
nouveau: m2mf fallback path for region copies.
2007-11-18 23:08:33 +11:00
Ben Skeggs
f940603037
nv40: fix thinko == fix 3d textures
2007-11-18 22:12:50 +11:00
Ben Skeggs
a1d622190f
nv40: support TXP again
2007-11-18 21:47:18 +11:00
Ben Skeggs
3ab26c864c
nv40: some very rough guesses for get_paramf()
2007-11-18 17:59:45 +11:00
Ben Skeggs
bc449c28c6
nouveau: oops, when'd that disappear..
2007-11-18 17:49:30 +11:00
Ben Skeggs
2f33b5b56e
nouveau: Very rough cut at gallium winsys + nv40 pipe driver.
2007-11-18 17:34:06 +11:00
José Fonseca
ca7f68a7cf
Fix typo
2007-11-17 15:39:36 +00:00
José Fonseca
dec60d33b2
Proper fence reference counting.
2007-11-17 15:39:36 +00:00
Brian
34a00276c7
more convenient debug code
2007-11-16 17:13:26 -07:00
Brian
aa880bdfa0
Reimplement glRasterPos using the private 'draw' module.
2007-11-16 17:13:01 -07:00
Brian
6a1154bab0
adjustments so st_feedback_draw_vbo() can be used for glRasterPos
2007-11-16 17:12:22 -07:00
Brian
95f066fc54
note problem with fragment coord Y orientation
2007-11-16 10:39:08 -07:00
Brian
f361edae5d
added a clip-bypass flag to rasterizer state
2007-11-16 09:31:25 -07:00
José Fonseca
90dd0cb822
Include fences in the i915simple winsys interface.
2007-11-15 17:07:50 +00:00
Brian
193c85ec7a
comments, assertions
2007-11-09 07:55:08 -07:00
Brian
50a56cd755
minor simplifcation in vertex_fetch()
2007-11-09 07:55:08 -07:00
Alan Hourihane
33cf20bb45
remove duplicate init func
2007-11-09 09:21:40 +00:00
Brian
6446986321
Reorganize user-space vertex fields in draw_context into 'user' group.
...
This sub-struct collects the incoming user-provided data/pointers in one place.
Ex: draw->mapped_vbuffer becomes draw->user.vbuffer, etc.
2007-11-08 17:07:12 -07:00
Brian
990fe4c0bf
remove unneeded #includes, added assertion in draw_compute_vertex_size()
2007-11-08 16:55:29 -07:00
Brian
ec0c5e59c2
Remove unneeded header, draw_prim.h
2007-11-08 16:37:25 -07:00
Brian
1574611faf
Fix minor logic error in get_queued_prim() which caused flushing when there was still room in the prim queue.
2007-11-08 16:36:00 -07:00
Brian
48863cdd0a
new comments
2007-11-08 16:32:24 -07:00
Brian
03f4a487dd
remove unneeded #includes
2007-11-08 16:26:55 -07:00
Brian
03484d0aae
comments, remove unneeded #includes
2007-11-08 16:25:17 -07:00
Brian
f66fed57e6
For TGSI_TEXTURE_2D/RECT, need to provide 3 coords (STP) in case shadow compare mode is enabled.
2007-11-08 15:02:42 -07:00
Brian
3d8c05f732
Implement shadow comparisons.
2007-11-08 15:01:13 -07:00
Brian
a7be1c5ac2
use pipe_surface_reference() in sp_tile_cache_set_surface()
2007-11-08 15:00:11 -07:00
Brian
c0b2714945
simplify depth_value(), return proper value for Z16 format
2007-11-08 14:40:29 -07:00
Brian
cee1d1328a
fix bad width/height code in softpipe_clear()
2007-11-08 13:17:43 -07:00
Brian
ae9fe0f981
Remove TGSI_OPCODE_TXP
...
Use TGSI_OPCODE_TEX with ExtDivide=TGSI_EXTSWIZZLE_W instead.
2007-11-08 11:44:12 -07:00
Brian
fa63d6d32c
check for divide by W flag when translating TGSI_OPCODE_TEX (fixes projected textures)
2007-11-08 11:39:42 -07:00
Brian
02f7f46fa1
new init_renderbuffer_bits() helper
2007-11-08 11:38:50 -07:00
Brian
89b7b187dd
tweak anisotropic filtering code
2007-11-08 10:10:35 -07:00
Brian
548eddc964
enable PIPE_CAP_TEXTURE_SHADOW_MAP (but not quite working yet)
2007-11-08 10:08:24 -07:00
Brian
dca71c40ea
remove translate_compare_func(), use i915_translate_compare_func()
2007-11-08 10:07:57 -07:00
Brian
8ce6d6b97e
move EXT_shadow_funcs assignment
2007-11-08 09:33:33 -07:00
Brian
a736670219
set sampler state for shadow test
2007-11-08 09:33:13 -07:00
Brian
b18763141d
Replace gl_stencil_func_to_sp() and gl_depth_func_to_sp() with st_compare_func_to_pipe()
2007-11-08 09:31:57 -07:00
Brian
2c11846268
Fix some issues hit when rendering to a depth-only renderbuffer (shadowtex).
...
Added 16bpp case to translate_depth_format().
Added framebuffer_size() to determine framebuffer size.
2007-11-08 09:16:14 -07:00
Brian
98c539d337
in check_end_texture_render(), test for presence of a renderbuffer and texobj
2007-11-08 09:14:43 -07:00
Brian
e2593bb163
remove unneeded #include
2007-11-08 08:52:36 -07:00
Brian
44254b9248
Added pipe->get_paramf() to query float limits.
...
So far max point size, line width, texture anistopy and lod bias.
2007-11-08 08:48:14 -07:00
Brian
95128c1d4c
check for fence==NULL in intel_batchbuffer_finish(), fixes glxinfo crash on exit
2007-11-08 08:48:14 -07:00
Michel Dänzer
3871d2882a
Rename struct field 'private' to 'priv'.
...
This broke the LLVM build because 'private' is a C++ keyword.
2007-11-08 13:10:18 +01:00
Brian
6400658d71
fix warning
2007-11-07 17:29:14 -07:00
Brian
74df1f4adb
update flush/fence comments for i915_flush()
2007-11-07 17:17:32 -07:00
Brian
3fe055ec92
Remove winsys->wait_idle(), subsumed by pipe->flush().
...
Connect intel_i915_batch_finish() into i915_winsys, just like intel_i915_batch_flush().
Call i915_winsys->batch_finish() in response to pipe->flush(PIPE_FLUSH_WAIT).
Now all the batchbuffer/fence code is in one place and a little cleaner.
2007-11-07 17:16:47 -07:00
Brian
ae44a81d1b
New PIPE_FLUSH_WAIT flag for pipe->flush().
...
The state tracker doesn't have to directly call winsys->wait_idle() anymore.
glFlush and glFinish both go through pipe->flush() now.
2007-11-07 16:59:37 -07:00
Brian
10c62bf068
Remove context dependencies in winsys layer.
...
The winsys object is now per-screen and shared by multiple contexts.
The regionPool is now part of the i915 winsys layer.
The winsys wait_idle() and flush_frontbuffer() funcs will get more attention...
2007-11-07 16:08:04 -07:00
Brian
03cfeb31af
enable GL_ARB/NV_point_sprite together
2007-11-07 16:08:04 -07:00
Brian
ed6e591270
cosmetic fix to driFenceFinish() call
2007-11-07 16:08:04 -07:00
Brian
51653cd551
replace magic number 3 with DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW in driFenceFinish() call
2007-11-07 16:08:04 -07:00
Brian
0852cf8611
just reorder a few members of pipe_winsys, update comments
2007-11-07 16:08:04 -07:00
Brian
c712d092a1
remove DriverCtx=intel assigment/hack
2007-11-07 16:08:04 -07:00
Brian
2611703b36
Pass winsys as a parameter to intel_create_i915simple(), intel_create_softpipe()
2007-11-07 16:08:04 -07:00
Brian
f40f45ceea
var renaming: s/sws/winsys/
2007-11-07 16:08:04 -07:00
Brian
237429aa3b
more dead code removal
2007-11-07 16:08:04 -07:00
Brian
7a9c129a0a
re-enable PIPE_FORMAT_U_Z32 support
2007-11-07 14:41:14 -07:00
Brian
fc6172bc9a
better depth buffer selection
2007-11-07 14:41:01 -07:00
Brian
187b631b6b
Float->uint conversion for PIPE_FORMAT_U_Z32 resulted in overflow in depth_value(). Special-case it.
2007-11-07 14:40:38 -07:00
Brian
7e884c6f86
disable/remove dead code
2007-11-07 09:54:02 -07:00
Brian
182e861eea
Disable the call to driBOReference() in i915_update_texture()
...
It doesn't seem to be needed and disabling it fixes a big memory leak with
some programs like xdemos/wincopy.c
2007-11-07 09:53:25 -07:00
Brian
5d9021554e
redo xm_surface_release() to match i915
2007-11-07 08:57:56 -07:00
Brian
c3e7bb4127
fix bad varname
2007-11-07 08:21:14 -07:00
Brian
601a9ea9a7
init glsl functions in st_init_driver_functions()
2007-11-07 08:20:00 -07:00
Brian
6c4447e6a8
fix typos, re-enable some extensions to get back to GL 2.1 level
2007-11-07 08:20:00 -07:00
Brian
7d1a04e499
Add winsys->surface_release() to complement winsys->surface_alloc().
...
pipe_surface now has a pointer to the winsys which create/owns the surface.
This allows clean surface deallocation w/out a rendering context.
2007-11-07 08:24:58 -07:00
José Fonseca
5223666165
Check the right ammount of free space in vertex buffer.
2007-11-07 13:41:21 +00:00
José Fonseca
3e22180fc8
Reset temporary vertices ids.
2007-11-07 13:41:09 +00:00
José Fonseca
c28fdf3096
Use a consistent number to identify undefined vertices.
2007-11-07 13:41:00 +00:00
José Fonseca
3922baede2
Reuse the vertex buffer until the vertex size changes.
2007-11-07 13:40:47 +00:00
José Fonseca
f39a520892
Track hardware vertex buffer state changes.
2007-11-07 13:40:35 +00:00
Brian
85c7683f1f
Improved logic for setting up depth/stencil buffers in st_create_framebuffer()
2007-11-06 17:34:32 -07:00
Brian
b0e7da86ab
restore dispatch/extension code (without, dynamic entrypoints aren't added)
2007-11-06 17:24:45 -07:00
Brian
a895910d88
disable PIPE_FORMAT_U_Z32, doesn't work ATM
2007-11-06 16:40:05 -07:00
Brian
2b0d1b6eda
Update xmesa_is_format_supported()
2007-11-06 15:22:56 -07:00
Brian
3470d819fd
realloc surface if format changes, remove dead code
2007-11-06 15:22:56 -07:00
Brian
a151ad21bb
rename xmesa_create_softpipe() xmesa_create_context()
2007-11-06 15:22:56 -07:00
Brian
54b43da7e9
rename xmesa_create_softpipe() xmesa_create_context()
2007-11-06 15:22:56 -07:00
Brian
5fb6ebf85d
disable finish_or_flush() for now
2007-11-06 15:22:56 -07:00
Brian
d35cb1a121
remove dead code in softpipe_is_format_supported()
2007-11-06 15:22:55 -07:00
Brian
db01ff6a19
document flags param to region_alloc()
2007-11-06 15:22:55 -07:00
Brian
37624458e4
remove more dependencies on Mesa types/functions
2007-11-06 15:27:14 -07:00
Brian
4cf56a4183
implement context sharing code
2007-11-06 15:27:14 -07:00
Brian
5e24e3c426
code clean-up
2007-11-06 15:27:14 -07:00
Brian
ea286d4df2
need to call pipe->flush() in finish_or_flush()
2007-11-06 13:58:25 -07:00
Brian
da3994988b
init luminance/intensity_bits to zero in st_get_format_info()
2007-11-06 13:53:32 -07:00
Brian
fa44b74f4e
define CLIP_TILE as in sp_surface.c
2007-11-06 13:52:57 -07:00
Brian
0862df2154
remove debug abort() call
2007-11-06 13:42:37 -07:00
Brian
2e784848e6
Call xmesa_init_driver_functions() to install xmesa_viewport() function.
...
Fixes failed assertion in glxgears.
2007-11-06 13:39:36 -07:00
José Fonseca
26eb608a35
Handle the corner case of 24bit depth buffer with 0bit stencil buffer.
2007-11-06 20:10:18 +00:00
Michel Dänzer
7b358e8ea9
Fix build error: dereferencing pointer to incomplete type
2007-11-06 19:00:23 +01:00
Brian
eef6783537
Remove use of Mesa/GL types/functions (s/GLuint/uint/ etc)
2007-11-06 10:10:50 -07:00
Brian
c80d17b68d
don't include mtypes.h
2007-11-06 10:07:31 -07:00
Brian
0800342296
Remove last of core Mesa dependencies in intel_swapbuffers.c
...
Use the "dummyContext" pointer (for now) instead of GET_CURRENT_CONTEXT().
2007-11-06 10:05:01 -07:00
Brian
e2feb80a90
Remove pipe->max_texture_size(), use get_param() instead.
...
Also, in st_init_limits(), clamp driver's values against Mesa's internal limits.
2007-11-06 09:41:45 -07:00
Brian
24ac9c30eb
check for __i386__ or __386__ instead of USE_X86_ASM
2007-11-06 08:53:25 -07:00
José Fonseca
a06dcfd75b
Allow custom pipe driver buffer usage flags.
2007-11-06 14:52:39 +00:00
José Fonseca
fa1a66d7fc
Supply buffer usage hints to winsys.
...
Winsys driver needs some hints in order to allocate the appropriate kind of
memory for the buffer.
2007-11-06 14:49:38 +00:00
Michel Dänzer
4f79dbd5aa
Convert format bitfields to shifts and masks.
...
The memory layout of bitfields depends on the ABI.
2007-11-06 10:17:59 +01:00
Michel Dänzer
0ab2c84ce9
Fix non-x86 build.
2007-11-06 10:16:34 +01:00
Brian
c6499a741c
Determine GL extensions/limits by making pipe queries.
...
The state tracker calls pipe->get_param() to determine the GL limits and
which OpenGL extensions are supported.
This is an initial implementation that'll probably change...
2007-11-05 18:04:30 -07:00
Brian
01e7165530
clean ups
2007-11-05 17:15:12 -07:00
Brian
d31d93f477
change includes, minor simplification in intelDisplaySurface()
2007-11-05 17:10:12 -07:00
Brian
cadaa4330e
include mtypes.h (temporary)
2007-11-05 16:45:49 -07:00
Brian
ced9c0f8c4
don't include mtypes.h in st_public.h
2007-11-05 16:38:07 -07:00
Brian
9b0f71e37f
move st_invalidate_state() prototype to st_context.h
2007-11-05 16:34:47 -07:00
Brian
91564eedcc
Remove some temporary state tracker context/framebuffer_create functions.
2007-11-05 16:15:43 -07:00
Brian
e39f1b4cbe
Update xlib driver to use newer state tracker context/framebuffer functions.
...
XMesaContext has an st_context * which contains a mesa context.
2007-11-05 15:59:55 -07:00
Brian
9a563d5e69
no-op glCopyPixels if width or height is zero
2007-11-05 15:42:55 -07:00
Brian
f4d51d8923
asst clean-ups
2007-11-05 13:37:12 -07:00
Brian
e4bad27099
remove some GL types, mesa includes
2007-11-05 13:18:47 -07:00
Brian
3f80be3cb5
move intel_context_mesa() into intel_swapbuffers.c (the only place it's used now)
2007-11-05 11:59:09 -07:00
Brian
6ad4656cc4
Move driBatchPoolInit() into new intel_batchpool.h header.
...
Note that intel_batchpool.[ch] have no intel-specific dependencies at this poi
Maybe rename files for re-use in the future.
2007-11-05 11:54:36 -07:00
Brian
b17675d709
Move driBatchPoolInit() into new intel_batchpool.h header.
...
Note that intel_batchpool.[ch] have no intel-specific dependencies at this point.
Maybe rename files for re-use in the future.
2007-11-05 11:53:56 -07:00
Brian
adf3761fbd
remove intelScreenPrivate typedef and use cast wrapper function to be like intel_context and intel_framebuffer
2007-11-05 11:48:54 -07:00
Brian
736baf22e9
remove driScrnPriv field from intel_screen
2007-11-05 11:38:46 -07:00
Brian
cd360b7d60
comments
2007-11-05 11:35:43 -07:00
Brian
1bbc86e651
fix typo, formatting
2007-11-05 11:17:40 -07:00
Brian
f8f1c4a022
remove unused intelScreen->texPool
2007-11-05 11:09:19 -07:00
Brian
6a95fe8735
add missing free() in intelDestroyContext
2007-11-05 10:16:28 -07:00
Brian
897428c426
comments, clean-ups, assertions
2007-11-05 10:14:24 -07:00
Brian
413688415c
rewrite/simplify intelCopySubBuffer()
2007-11-05 10:04:23 -07:00
Brian
81c1993daa
rewrite/simplify intelSwapBuffers()
2007-11-05 10:01:51 -07:00
Brian
74866737db
added st_notify_swapbuffers()
2007-11-05 09:59:34 -07:00
Brian
9fc03fed01
replace get_color_surface() with st_get_framebuffer_surface()
2007-11-05 09:53:02 -07:00
Brian
616bf35569
added st_get_framebuffer_surface() and ST_SURFACE_x tokens
2007-11-05 09:52:14 -07:00
Brian
f221ea658b
comments, tweaks
2007-11-05 09:35:31 -07:00
Brian
29c1fdd0ce
better use of intel_context() cast wrappers
2007-11-05 09:28:28 -07:00
Brian
2edc87eb3d
clean-up/re-org of intel_framebuffer code
2007-11-05 09:24:03 -07:00
Brian
1f17d845ff
remove unused intel_fb decls, code
2007-11-05 09:09:11 -07:00
Brian
32f05c35d2
move intelCopySubBuffer() decl
2007-11-05 09:07:35 -07:00
Brian
c1933ed23f
remove dead code in intelCreateBuffer()
2007-11-05 09:04:37 -07:00
Brian
bac76b71f1
remove intel_context cliprect code
2007-11-05 09:02:54 -07:00
Brian
1cb81470b7
remove unused var
2007-11-05 09:00:18 -07:00
Brian
5d8e383380
remove cliprect code
2007-11-05 08:58:45 -07:00
Brian
4e0b38958d
remove mesa includes
2007-11-05 08:47:48 -07:00
Brian
131330994a
use st_unreference_framebuffer()
2007-11-05 08:42:18 -07:00
Brian
44dfed15e0
added st_unreference_framebuffer()
2007-11-05 08:41:45 -07:00
Brian
fc73b21606
rename intelWindowMoved() to intelUpdateWindowSize()
2007-11-05 08:04:48 -07:00
Brian
02a1c8f569
pass __DRIdrawablePrivate to intelWindowMoved(), rather than context ptr
2007-11-05 08:04:48 -07:00
Brian
cb62b64e33
simplify the window moved/resized code a bit
2007-11-05 08:04:48 -07:00
Brian
ed8774e920
set stfb->Base.Initialized
2007-11-05 08:04:48 -07:00
Brian
e9d2156edf
Remove intelUpdateFramebufferSize(), use st_resize_framebuffer().
2007-11-05 08:04:48 -07:00
Brian
3d14b2c01e
added st_resize_framebuffer()
2007-11-05 08:04:48 -07:00
Brian
ecb41279d6
use st_make_current()
2007-11-05 08:04:48 -07:00
Brian
c4a9c49cdb
restore dummy card_extensions extensions array, needed for dispatch setup
2007-11-05 08:04:48 -07:00
Brian
2085cc9ac7
use st_create_framebuffer()
2007-11-05 08:04:48 -07:00
Brian
e49efdab4a
st_create_framebuffer() working
2007-11-05 08:04:48 -07:00
Brian
bffed01e27
move st_create_framebuffer() to new st_framebuffer.c file
2007-11-05 08:04:48 -07:00
Brian
01b71b8f7a
new file for st_framebuffer stuff
2007-11-05 08:04:48 -07:00
Brian
794e03d392
Introduce st_framebuffer type and st_create_framebuffer(), st_make_current()
2007-11-05 08:04:48 -07:00
Brian
7edf630468
more dead code removal, clean-up
2007-11-05 08:04:47 -07:00
Brian
5ff1ff2b55
move intelScreenContext() to intel_swapbuffers.c and make static
2007-11-05 08:04:47 -07:00
Brian
070aad3a9d
remove mesa extension code
2007-11-05 08:04:47 -07:00
Brian
35924a34e5
remove old mesa context creation code
2007-11-05 08:04:47 -07:00
Brian
e8f1006081
remove dead code, unnecessary #includes, etc
2007-11-05 08:04:47 -07:00
Brian
798658cc81
remove INTEL_FIREVERTICES
2007-11-05 08:04:47 -07:00
Brian
cf30d377ac
remove refcount, fboRect fields
2007-11-05 08:04:47 -07:00
Brian
ca96ee421a
remove intel->pipe field
2007-11-05 08:04:47 -07:00
Brian
a50d2feadd
remove some struct decls
2007-11-05 08:04:47 -07:00
Brian
0452eb9086
s/intelDisplayBuffer/intelDisplaySurface
2007-11-05 08:04:47 -07:00
Brian
d04938331a
simplify intelSwapBuffers()
2007-11-05 08:04:47 -07:00
Brian
d083cbb4db
remove useless code
2007-11-05 08:04:47 -07:00
Brian
2beb872e3b
remove disabled vblank/sync code
2007-11-05 08:04:47 -07:00
Brian
488326b0b9
disable vblank/sync code
2007-11-05 08:04:47 -07:00
Brian
a5df4239c2
added check for fb==NULL
2007-11-05 08:04:47 -07:00
Brian
29feee2c02
remove dead pageflip code
2007-11-05 08:04:47 -07:00
Brian
b8897d7481
disable page flip code
2007-11-05 08:04:47 -07:00
Brian
0ff447e7c4
include context.h
2007-11-05 08:04:47 -07:00
Brian
156e490699
replace IntelFlush(), FLUSH_VERTICES(), etc. with st_flush() call
2007-11-05 08:04:47 -07:00
Brian
08f88cbbc9
call FLUSH_VERTICES() in st_flush()
2007-11-05 08:04:47 -07:00
Brian
4019277f09
public st_flush()
2007-11-05 08:04:47 -07:00
Brian
f6427e3557
remove extern decls for non-existant functions
2007-11-05 08:04:47 -07:00
Brian
09771f8c70
#include clean-ups, fixes
2007-11-05 08:04:47 -07:00
Brian
381b68d804
comment about renderbuffers vs. surfaces
2007-11-05 08:04:47 -07:00
Brian
00a133ad19
remove some dead code, clean-ups
2007-11-05 08:04:47 -07:00
Brian
17d044ec01
more clean-up in intelDisplayBuffer()
2007-11-05 08:04:46 -07:00
Brian
fda91cfa4b
Check if the user/texenvprogram is just a pass-through program and skip program concatenation.
2007-11-04 16:39:01 -07:00
José Fonseca
7a7899a247
Allow batch buffer debugging without calling i915_winsys->batch_start so often.
2007-11-03 02:01:32 +00:00
José Fonseca
5fa6ea6858
Do something sensible when failed to reserve space in the batch buffer.
2007-11-03 02:01:32 +00:00
José Fonseca
5c1606a2b3
Detail i915 winsys interface comments.
2007-11-03 02:01:32 +00:00
José Fonseca
3c393b8df3
Render primitives using indirect vertices in a vertex buffer.
2007-11-03 02:01:31 +00:00
Zack Rusin
16fe6a0f2d
Cleanups.
...
Remove some debugging output and try to make sure that
Mesa compiles when configured without LLVM
2007-11-02 12:18:02 -04:00
Zack Rusin
a2debc2704
Implement sin opcode.
...
Seems to have similar rounding border problems as cos.
2007-11-02 12:09:23 -04:00
Zack Rusin
e0e91e7ceb
Implement scs opcode
2007-11-02 12:05:00 -04:00
Zack Rusin
5c7bfb06e0
Implement COS and CMP opcode.
...
There's some weird rounding issue with COS that I can't figure
out.
2007-11-02 11:47:09 -04:00
Zack Rusin
cf363ba307
Add debugging ifdefs to make it less verbose
2007-11-02 07:15:18 -04:00
Zack Rusin
45003b0bb9
Get fragment shaders working on top of LLVM.
...
Redo the entry points, get the output propagation correctly,
interpolate the inputs before feeding into llvm for now.
2007-11-02 07:15:18 -04:00
Zack Rusin
2af2f7e419
Change the fragment shader signature to better match actual
...
arguments that we need there.
2007-11-02 07:15:18 -04:00
Zack Rusin
25d91c23ff
Add basic entry points for fragment shaders.
2007-11-02 07:15:17 -04:00
Zack Rusin
7ff0df6c2b
Renaming llvmtgsi to gallivm. Taking first steps on the way to supporting
...
fragment shaders through llvm.
2007-11-02 07:15:17 -04:00
Brian
d8e66aca84
Start re-working SwapBuffers.
...
intelCopyBuffer() is now intelDisplayBuffer(): it displays the given surface
in the on-screen window.
Added a pipe_surface parameter to winsys->flush_frontbuffer().
Front buffer rendering/flushing actually works now.
But, we should only allocate the front surface on demand...
2007-11-01 18:37:00 -06:00
Brian
28bed6d355
Use new state tracker context/destroy funcs with wrap Mesa context.
2007-11-01 18:01:47 -06:00
Brian
80d2658e12
Sketch out new create/destroy context functions which create/wrap a Mesa context.
2007-11-01 18:01:47 -06:00
Brian
7cafaff0eb
disable the driverContext assertions
2007-11-01 18:01:47 -06:00
Brian
64988ff7fe
silence the finalize_mipmap_tree msg
2007-11-01 18:01:47 -06:00
Brian
15c565b018
don't call _mesa_init_driver_functions()
2007-11-01 18:01:47 -06:00
Brian
ca123a69fa
remove _mesa_init_driver_functions()
2007-11-01 18:01:47 -06:00
Brian
f8549e8f4f
plug in _mesa_test_proxy_teximage, temporarily
2007-11-01 18:01:47 -06:00
Brian
2072a9c6d0
remove dead code
2007-11-01 18:01:47 -06:00
Brian
308bc50dc2
remove unneeded tnl stuff
2007-11-01 18:01:47 -06:00
Brian
b1ed405cfc
remove old comment about tnl/vf
2007-11-01 18:01:47 -06:00
José Fonseca
54be3a7add
Reserve the right number of dwords for hardware state, and handle the case where it fails.
2007-11-01 22:23:46 +00:00
Brian
c4e9bfedbc
Obsolete file
2007-11-01 13:06:53 -06:00
Brian
ea50025c76
remove xmesa_set_renderbuffer_funcs()
2007-11-01 13:06:29 -06:00
Brian
a00bd3fc2f
disable/omit renderbuffer span code
2007-11-01 12:57:48 -06:00
Brian
6180895553
disable/omit renderbuffer span code
2007-11-01 12:57:26 -06:00
Brian
1c8d064c39
remove unused funcs, macros
2007-11-01 12:55:20 -06:00
Brian
b2fabbc197
xget_image() wrapper to catch BadMatch errors
2007-11-01 12:54:30 -06:00
Brian
ea816fd6db
move dither kernels to xm_surface.c
2007-11-01 12:37:13 -06:00
Brian
ef35f664ca
fix some tile clipping bugs
2007-11-01 12:36:09 -06:00
Brian
cd132354dd
move CLIP_TILE, add comments
2007-11-01 12:26:37 -06:00
Brian
d0dde6e26c
rewrite xmesa_get_tile_rgba() to not use span funcs
2007-11-01 12:24:36 -06:00
Brian
ba0b1bdc33
reimplement xmesa_put_tile_rgba() w/out span funcs
2007-11-01 12:08:01 -06:00
Brian
a333088986
implement get/put_tile() for xlib driver
2007-11-01 11:23:50 -06:00
Brian
0d6608ee68
Implement surface clearing w/out dependency on XMesa/Mesa stuff.
2007-11-01 10:52:31 -06:00
Brian
b7611770ea
make winsys objects singletons, comments
2007-10-31 19:00:23 -06:00
Brian
4c7be3faa3
Clean up xmesa winsys stuff
...
Plug xmesa_is_format_supported() into the softpipe_winsys object.
2007-10-31 18:29:00 -06:00
Brian
1103e9c3d0
update comments for pipe_context
2007-10-31 18:19:46 -06:00
Brian
1e3651569b
remove some extension #defines
2007-10-31 16:01:18 -06:00
Brian
3feca9b5fc
Obsolete
2007-10-31 16:00:14 -06:00
Brian
b60f88aec6
remove xm_dd.c from build
2007-10-31 15:59:47 -06:00
Brian
869318db64
move few remaining bits of xm_dd.c into xm_api.c
2007-10-31 15:59:24 -06:00
Brian
3023756684
move dither kernels/tables to xm_span.c
2007-10-31 15:57:57 -06:00
Brian
a778d60076
Remove xmesa_update_state(), which was called by ctx->Driver.UpdateState()
2007-10-31 15:32:16 -06:00
Brian
8d0d6f04a1
move surface clear functions to xm_buffer.c
2007-10-31 15:27:09 -06:00
Brian
30fb4c43b0
clean-up includes
2007-10-31 15:16:22 -06:00
Brian
e5ff772523
remove HPCR support
2007-10-31 15:13:29 -06:00
Brian
017d08a5e0
get rid of xmesa_clear_buffers()
2007-10-31 15:08:19 -06:00
Brian
4411614fed
don't pass x,y,width,height to clear functions
2007-10-31 15:01:25 -06:00
Brian
c1f11891df
remove get_string, test_proxy_teximage
2007-10-31 14:53:55 -06:00
Brian
b345c9258b
remove timer_query, s3tc extension bits
2007-10-31 14:51:15 -06:00
Brian
f36372f0b2
Start removing old driver funcs like ColorMask, ClearColor, etc.
2007-10-31 14:49:46 -06:00
Brian
4a13a550e0
remove FX/glide stuff
2007-10-31 14:33:49 -06:00
Brian
7398272d4b
remove tnl/swrast code
2007-10-31 14:32:16 -06:00
Brian
751d7a74ca
Obsolete
2007-10-31 14:30:20 -06:00
Brian
68a38b5853
remove dead swrast/tnl code
2007-10-31 14:29:36 -06:00
Brian
e0e8cf1346
disable swrast/tnl stuff
2007-10-31 14:28:05 -06:00
Brian
5d6b314bcf
remove Draw/CopyPixels functions
2007-10-31 14:27:38 -06:00
Brian
12f3f6cb2a
omit X point/line/triangle routines
2007-10-31 14:22:49 -06:00
Brian
87560bc10f
switch to Xlib driver in pipe/xlib/
2007-10-31 14:19:31 -06:00
Brian
ef25c496d5
Copy of xlib driver. This will get trimmed down a lot for Gallium.
2007-10-31 14:19:09 -06:00
Brian
f4a5ea2ccb
Update texenvprogram.c code to use prog_cache.c routines.
2007-10-31 12:45:32 -06:00
Brian
a35a2fc0d3
remove dead program cache code
2007-10-31 12:34:09 -06:00
Brian
8db4acc554
No longer need st_update_tnl atom
2007-10-31 12:31:25 -06:00
Brian
d4dfe3e0b4
No longer need st_update_tnl atom.
2007-10-31 12:30:56 -06:00
Brian
68ab379be0
more flags for MaintainTnlProgram case, update #includes
2007-10-31 12:27:47 -06:00
Brian
8d9afa76eb
Use ffvertex_prog.c code instead of t_vp_build.c code.
2007-10-31 12:17:32 -06:00
Brian
4990695f1b
fix some breakage from lifting vbo/tnl code
2007-10-31 12:12:37 -06:00
Brian
cf3f601682
Lift fixed function vertex program generation up from tnl module.
2007-10-31 12:03:55 -06:00
Brian
287d573f5d
fix type for Samplers field
2007-10-31 12:02:55 -06:00
Brian
b26aae67f5
alloc caches for fixed-func vertex/fragment progs
2007-10-31 12:02:55 -06:00
Brian
3798395af5
move a few lines of code
2007-10-31 12:07:03 -06:00
Brian
8984a28338
Lift VBO/tnl stuff up out of drivers
2007-10-31 11:35:50 -06:00
Brian
b31e37f14d
remove intelInvalidateState
2007-10-31 11:08:31 -06:00
Brian
d775509fb7
plug st_invalidate_state() into ctx->Driver.UpdateState
...
Start lifting Mesa stuff up out of winsys/driver code.
2007-10-31 11:08:07 -06:00
Brian
2860f60994
re-enable fb size assertions which were previously disabled
2007-10-31 10:52:44 -06:00
José Fonseca
fe55eab8fa
Hold the vertex buffer handle.
2007-10-31 15:11:18 +00:00
José Fonseca
44e6944e9d
Handle TGSI_OPCODE_RET.
2007-10-31 14:58:43 +00:00
José Fonseca
af60ebc4ee
Allow more verbose error output.
2007-10-31 14:16:00 +00:00
José Fonseca
13acc26385
Chain vertex buffers into the batch buffer.
2007-10-31 13:20:01 +00:00
Brian
520c71161a
Implement shader concatenation for glBitmap.
2007-10-30 18:38:32 -06:00
Brian
fb9cf48259
fix InputsRead bug in _mesa_combine_programs()
2007-10-30 18:26:34 -06:00
Brian
c1b2b97b8a
special-case KIL/KIL_NV
2007-10-30 18:24:54 -06:00
Brian
2dfe0c4a24
combine shaders for glCopyPixels
2007-10-30 17:46:40 -06:00
Brian
d6a739f6b0
Use program serial numbers to avoid re-generating fragment programs for glDrawPixels.
2007-10-30 16:13:37 -06:00
Brian
ee70c02b62
Before calling texformat->StoreImage() set _ImageTransferState=0 since we'll do pixel transfer in the fragment program.
2007-10-30 13:55:56 -06:00
Brian
4836217850
color matrix
2007-10-30 13:54:24 -06:00
Brian
0abd1fca91
more additions for COLOR_MATRIX, etc
2007-10-30 13:53:38 -06:00
Brian
068c7bd912
add state vars for color matrix, pixel transfer scale&bias
2007-10-30 12:39:58 -06:00
Brian
8aa42546ad
start using program cache
2007-10-30 12:25:25 -06:00
Brian
df174bdb81
added pixel_transfer_cache
2007-10-30 12:25:25 -06:00
Brian
3e31799640
added prog_cache.c
2007-10-30 12:25:25 -06:00
Brian
0ee15e050b
Program cache functions.
...
Generic version of cache code from texenvprogram.c and t_vp_build.c
Not used by those files just yet, will also be used for pixel_transfer programs.
2007-10-30 12:25:25 -06:00
Michel Dänzer
2f496ff957
tgsi_translate_mesa_program: Don't crash when program->Parameters == NULL.
2007-10-30 18:40:55 +01:00
Brian
ab3f6015aa
Disable debug code.
...
Basic code for PixelTranslfer ops and glDrawPixels works now.
A pixel transfer program is generated and combined with the current
fragment shader.
2007-10-30 11:32:53 -06:00
Brian
cbdff56f8c
Remove obsolete files
2007-10-30 11:32:53 -06:00
Brian
7ce99a1103
Rename file since it's now a state atom
2007-10-30 11:32:53 -06:00
Brian
de38d9c498
checkpoint: combine pixel transfer and user shader for glDrawPixels
2007-10-30 11:32:53 -06:00
Brian
b8042fb7fb
make st_upload_constants() public
2007-10-30 11:32:53 -06:00
Brian
0be546fa53
added pixel_transfer_program field
2007-10-30 11:32:53 -06:00
Brian
088e80f6db
added st_update_pixel_transfer atom
2007-10-30 11:32:53 -06:00
Brian
64a97680a7
bug fixes, implement state atom for pixel transfer
2007-10-30 11:32:53 -06:00
Brian
8234935b65
check for NULL ptr in _mesa_print_parameter_list()
2007-10-30 11:32:53 -06:00
Brian
ba0fcc47d6
Set _NEW_BUFFERS in glRead/DrawBuffer().
...
Previously, we set _NEW_PIXEL and _NEW_COLOR in these functions, respectively.
That correponds to the GL attribute groups, but doesn't make much sense
otherwise. This could improve validation efficiency in a few places too.
It looks like all the drivers are already checking for _NEW_BUFFERS in the
right places (since that's the bit for FBO state) so we can trim out
_NEW_PIXEL and _NEW_COLOR at any time.
2007-10-30 11:32:53 -06:00
Brian
b19a933930
comment unused 'cb' field
2007-10-30 11:32:53 -06:00
Brian
cc9b4df5cb
update comments, fix typo
2007-10-30 11:32:53 -06:00
Brian
1203f54686
make _mesa_combine_programs() params const
2007-10-30 11:32:52 -06:00
Brian
bcc026893b
added st_pixeltransfer.c
2007-10-30 11:32:52 -06:00
Brian
cf56a99fb0
Initial version of st_get_pixel_transfer_program().
...
For generating fragment programs which implement pixel transfer ops.
2007-10-30 11:32:52 -06:00
Brian
9ffd88911f
Added _mesa_combine_programs() for concatenating two programs.
2007-10-30 11:32:52 -06:00
Brian
4b30d177b4
added _mesa_combine_parameter_lists()
2007-10-30 11:32:52 -06:00
Zack Rusin
449562cde0
Switch to using LLVM builder.
...
Instead of creating all the instructions by hand, switching
to using LLVMBuilder.
2007-10-30 09:00:36 -04:00
Zack Rusin
c97c03da46
Refactor vector extraction.
2007-10-30 07:43:02 -04:00
Zack Rusin
dfd774318d
Export true C based builtins to a file of its own.
2007-10-30 07:16:22 -04:00
Zack Rusin
a01341a762
Rename to better reflect what it's really doing.
2007-10-30 06:55:08 -04:00
Zack Rusin
ea2c74a25e
Code cleanups.
2007-10-30 06:33:30 -04:00
Zack Rusin
a94251d081
Cleanup constant vector handling a bit.
2007-10-30 05:15:06 -04:00
Zack Rusin
75a9018fb9
Dump only relevant functions when in the debugging output.
2007-10-30 05:15:06 -04:00
Zack Rusin
fd908ce234
Change the way we handle temporaries in LLVM translation.
...
TGSI uses TEMP, among others, as a way of passing arguments
from one function to another. Instead of trying to figure out
which temp's a function needs and trying to dynamically adjust its
signature just pass the whole array of temporaries to them.
2007-10-30 05:15:05 -04:00
Zack Rusin
b0f3b5910e
Enable immediates in TGSI and work with them in LLVM code.
...
Enables immediates by default in the TGSI translation code
and adds code handling it in llvm tgsi translation.
2007-10-30 05:15:05 -04:00
Brian
8b2f997af5
minor code simplification
2007-10-29 15:15:34 -06:00
Brian
64ffc9540b
fix memcpy bugs
2007-10-29 15:15:34 -06:00
Brian
1553eba50c
Rewrite update_program() to use _mesa_get_fixed_func_fragment/vertex_program().
2007-10-29 15:15:34 -06:00
Brian
f18d4e058e
Remove ctx field from texenvprog_cache
2007-10-29 15:15:34 -06:00
Brian
9946012949
refactoring to begin removing dependency on tnl context
2007-10-29 15:15:34 -06:00
Brian
783cedcdc1
simplify getting of current frag prog
2007-10-29 15:15:34 -06:00
Brian
27153bf02d
Refactor _tnl_UpdateFixedFunctionProgram().
...
New _mesa_get_fixed_func_vertex_program() function...
2007-10-29 15:15:34 -06:00
Brian
83ce6c51d7
Refactor _mesa_UpdateTexEnvProgram()
...
Will be replaced by _mesa_get_fixed_func_fragment_program().
2007-10-29 15:15:34 -06:00
Michal Krol
918ea5168b
Rename 'mms-config.' to 'mms.config'.
...
It looks like Windows does not like filenames ending with a dot,
in effect renaming it to 'mms-config'.
2007-10-29 19:50:10 +00:00
José Fonseca
f33ced441c
Update intel_is_format_supported.
2007-10-29 17:37:05 +00:00
Michal Krol
da9815e17f
Add detailed comments.
2007-10-29 17:36:20 +00:00
Michal Krol
7de874ec2c
Make it compile under linux.
...
Move pipe_region/surface_reference functions to pipe/p_inlines.h.
Remove #include "p_util.h" from pipe/p_context.h.
2007-10-29 17:05:38 +00:00
Michal Krol
ee295fccdd
Make gallium compile in win32.
...
Use FREE, MALLOC, CALLOC, GETENV wrappers.
Silence compiler warnings.
Add proper copyrights.
2007-10-29 17:05:38 +00:00
Brian
d37eb130c0
remove dead code
2007-10-29 10:37:12 -06:00
Brian
ebe1642d7a
check for signed vs. unsigned in st_get_format_info() - fixes accum buffer failure
2007-10-29 10:36:10 -06:00
Brian
b58b64f361
fix bad fragment shader pointer assignment
2007-10-29 09:41:53 -06:00
Brian
cc0b55c242
simplify code which access the current vertex/fragment shaders
2007-10-29 09:25:00 -06:00
Brian
2a3f3679eb
Disable the else clause which assigns the default fragment program to ctx->FragmentProgram._Current
...
The _Current field should either point to the fragment program which is to be
run (GLSL, ARB_f_p, fixed-func-generated, etc) or be NULL if conventional
fixed-function code is to be used. Matches TNL program code.
2007-10-29 09:25:00 -06:00
Zack Rusin
a6a3d8cb75
Remove conditionals from the makefiles.
2007-10-29 16:14:10 +00:00
Zack Rusin
a70c5e37f1
Remove typedefs from enums.
...
typedefs are rather evil, remove them and use the enum
keyword explicitely.
2007-10-29 16:14:10 +00:00
Zack Rusin
25b17b213b
Refactor the LLVM code a bit.
...
Move the CPU vertex shader execution code to the draw
module, remove traces of LLVM from the state tracker,
abstract execution engine for the purposes of the draw module.
2007-10-29 16:14:10 +00:00
Zack Rusin
abe8cd1917
Make sure the swizzling vector is being recreated for each function. This makes
...
GLSL bricks work.
2007-10-29 16:14:10 +00:00
Michal Krol
3b25ce9eca
Add SSE dump facilities.
...
Wrap x86_, sse_ and sse2 rtasm calls in emit_ calls.
Those emit_ calls, if required, dump instructions to stdout.
SSE dumping disabled by default.
2007-10-29 13:25:00 +00:00
Michal Krol
1eabc29ed1
Code re-org. Add comments.
2007-10-29 13:25:00 +00:00
Michal Krol
bd922c6437
Implement RET opcode.
2007-10-29 13:25:00 +00:00
Michal Krol
e15ca7963e
Remove TGSI_INTERPOLATE_ATTRIB.
2007-10-29 13:25:00 +00:00
José Fonseca
242b8659e4
Fix i915simple build.
2007-10-29 12:29:06 +00:00
José Fonseca
1039a75514
Reuse hardware vertice representation.
2007-10-29 12:15:57 +00:00
José Fonseca
a9e1fcf98a
Enable the vertex buffer stage according to the I915_VBUF environment var.
2007-10-29 12:15:57 +00:00
José Fonseca
46aeff5814
Get vertex buffer stage in a minimally working state.
2007-10-29 12:15:57 +00:00
José Fonseca
02091e0f9c
Reserve the accurate number of dwords in the batch buffer.
2007-10-29 12:15:57 +00:00
José Fonseca
dbb33a9710
Start a vertex buffer constuction stage for i915 based on Keith's draft done on softpipe.
2007-10-29 12:15:57 +00:00
Michal Krol
af5061cf5a
Fix newlines.
2007-10-29 11:03:37 +00:00
Michal Krol
c1b9f0eb7a
Remove unused static functions.
2007-10-28 17:53:02 +00:00
Michal Krol
2bbd714fda
Update comments.
2007-10-28 17:48:46 +00:00
Michal Krol
3c81219672
Replace supported_formats with is_format_supported interface.
...
The old supported_formats interface returned a list of formats
supported by a pipe/winsys implementation. This was reasonable
when gallium had a fixed list of predefined format.
Now things has changed and the definition of PIPE_FORMAT is
more flexible.
The new shiny is_format_supported interface gets PIPE_FORMAT
as an argument and returns a boolean whether this particular
format is supported.
2007-10-28 17:34:39 +00:00
Michal Krol
b85cd7b700
Use FREE and MALLOC instead of free and malloc.
2007-10-28 17:34:36 +00:00
Michal Krol
2953415223
Rework sse-utility function calls.
2007-10-28 17:34:35 +00:00
michal
c5ad88e9f1
Declare temporaries in a more compact fashion.
...
The following declarations:
DCL TEMP[0]
DCL TEMP[1]
DCL TEMP[2]
DCL TEMP[4]
become:
DCL TEMP[0..2]
DCL TEMP[4]
2007-10-28 17:34:33 +00:00
michal
e420e9d485
Declare temporaries in a more compact fashion.
...
The following declarations:
DCL TEMP[0]
DCL TEMP[1]
DCL TEMP[2]
DCL TEMP[4]
become:
DCL TEMP[0..2]
DCL TEMP[4]
2007-10-28 16:53:11 +00:00
michal
80ab2ab335
Control FS TGSI dumping with GALLIUM_DUMP_FS env variable.
2007-10-28 16:53:11 +00:00
michal
90e47c8c7b
Fix newlines.
2007-10-28 16:53:11 +00:00
michal
f93b9dc09a
Use FREE instead of free. Fix newlines.
2007-10-27 19:04:20 +01:00
michal
a846d7d027
Enable SSE path.
2007-10-27 19:04:19 +01:00
michal
a1b4285c5c
Fix fragment shader.
2007-10-27 19:04:19 +01:00
michal
9c22f91030
Optimize fragment program.
2007-10-27 19:04:19 +01:00
michal
f16f23b3ab
Use PIPE_FORMAT in state tracker.
...
Fix PIPE_FORMAT field encoding.
Re-implement st_get_format_info.
2007-10-27 19:04:19 +01:00
michal
d8b59ba177
Refactor supported format queries.
2007-10-27 19:04:19 +01:00
michal
205d4e4900
Respect use_sse flag.
2007-10-27 19:04:19 +01:00
michal
9dfc27edf1
Fix SSE bug.
2007-10-27 19:04:19 +01:00
michal
478b5692de
Add #ifs.
2007-10-27 19:04:19 +01:00
michal
b23350700e
vertex_element::src_format needs 32 bits.
2007-10-27 19:04:19 +01:00
michal
f27dcb51f7
Respect use_sse flag.
2007-10-27 19:04:19 +01:00
michal
e9ce69b1c9
Remove PIPE_FORMAT_COUNT references.
2007-10-27 19:04:18 +01:00
michal
1ab8f6e696
Enable SSE2 for fragment shaders.
2007-10-27 19:01:12 +01:00
michal
31b4b26108
Enable SSE2 for vertex shaders.
2007-10-27 19:01:12 +01:00
michal
7362fe5d16
Fix YCBCR macro.
...
Fix line endings.
2007-10-27 19:01:11 +01:00
michal
bf229cb6f1
Fix alignment problems.
...
Remove NOP opcode.
TEX opcode returns solid white (a hack for D3D state tracker).
2007-10-27 19:01:11 +01:00
michal
9053fcabcb
Remove GL dependencies.
2007-10-27 19:01:11 +01:00
michal
6961769cb2
Define destroy method called by softpipe's destructor.
2007-10-27 19:01:11 +01:00
michal
dee9406e48
Silence compiler warnings.
2007-10-27 19:01:11 +01:00
michal
187c164bb6
Silence compiler warnings.
2007-10-27 19:01:11 +01:00
michal
3755840e00
Call quad stage destructors.
2007-10-27 19:01:11 +01:00
michal
21b5ff5dcc
Remove llvm and sse2 dependencies.
2007-10-27 19:01:10 +01:00
michal
26df9d1a30
Move format definitions from p_defines.h to p_format.h.
...
PIPE_FORMAT is not an ordinary enum -- it encodes its
format description in the value that defines it.
2007-10-27 19:01:10 +01:00
michal
bc99ea96fb
Add sse2_program to draw_vertex_shader.
2007-10-27 19:01:10 +01:00
michal
11a19866f6
Silence compiler warnings.
2007-10-27 19:01:10 +01:00
michal
0e96a53aec
Remove llvm dependencies.
2007-10-27 19:01:10 +01:00
Brian
79d8e78442
New comments, replace //-style with /* */
2007-10-27 09:43:28 -06:00
Brian
d75ff8447c
indentation fixes
2007-10-27 09:38:41 -06:00
Brian
d7c189b854
s/GLbitfield/uint/
2007-10-27 09:37:40 -06:00
Brian
e807b1900f
remove #define MESA stuff
2007-10-27 09:36:43 -06:00
Brian
88c021a0d1
s/256/TGSI_EXEC_NUM_IMMEDIATES/
2007-10-27 09:35:51 -06:00
Brian
0c2bcedf9a
indentation fixes
2007-10-27 09:33:50 -06:00
Brian
6ada4e3a69
Comments about texture instructions and the src regs
2007-10-27 09:32:50 -06:00
Brian
f6a73c3f28
Remove remnants of softpipe_surface.
...
This is the last of the clean-up following the change which moved surface
allocation to the winsys layer.
2007-10-27 09:26:59 -06:00
Brian
4f24568dc7
Obsolete
2007-10-27 09:04:43 -06:00
Brian
ef6940f172
Move mesa_to_tgsi.[ch] to state_tracker
2007-10-27 09:03:15 -06:00
Brian
3cf6644c00
Move mesa_to_tgsi.[ch] into state tracker.
2007-10-27 09:02:40 -06:00
Brian
bafbfb4dce
Fix up handling of immediate values for TGSI shaders.
...
Still disabled pending LLVM updates.
2007-10-26 19:31:35 -06:00
Brian
19710c95da
turn off debug output
2007-10-26 19:29:38 -06:00
Brian
8fed2466e4
Re-implement GLSL texture sampler variables.
...
GLSL sampler variables indicate which texture unit to use for TEX instructions.
Previously, this was baked into the fragment/vertex program and couldn't be
readily changed once set.
Now, SamplerUnits[] array indicates which texture unit is to be used for
each sampler variable. These values are set with glUniform1i().
This is extra state that must be passed to the fragment/vertex program
executor at runtime.
2007-10-26 19:19:51 -06:00
Zack Rusin
789d248558
Hold a stack of temporaries so that we can redeclare them
...
for all defined functions. Fixes crashes in function calls.
2007-10-26 19:12:56 -04:00
Brian
78c1f8b2de
convert OPCODE_END -> TGSI_OPCODE_RET
2007-10-26 13:10:37 -06:00
Brian
f92083c338
if we hit RET w/ empty call stack, halt
2007-10-26 13:10:37 -06:00
Brian
6b30f3888e
Initial support for immediate values in TGSI programs.
...
These can be evaluated at compile time.
Code disabled pending clarifications of TGSI immediate data structures.
2007-10-26 13:10:37 -06:00
Zack Rusin
67e4b82996
Get basic function calls working in the shaders.
2007-10-26 14:59:38 -04:00
Zack Rusin
56da35ef76
Fix swizzle fetching in tgsi_util_get_full_src_register_extswizzle. Shorten
...
the swizzle coding in LLVM compilation using it and fix some warnings.
2007-10-26 14:59:38 -04:00
Zack Rusin
61d998c966
Make ret part of the instruction block instead of implicitely
...
closing at the end of parsing.
2007-10-26 14:59:38 -04:00
Brian
e4f6f0ec02
surface_alloc() is now a winsys function.
...
This allows surfaces to be allocated without a rendering context.
A few loose ends to resolve, but in working condition.
2007-10-26 10:45:42 -06:00
José Fonseca
f7be1b419a
Actually move region_alloc() and region_release() to intel_winsys.
2007-10-26 13:31:04 +01:00
Brian
ec85467457
clean-up, simplify some tile code, more to come
2007-10-25 20:35:23 -06:00
Brian
f684120417
Move region_alloc() and region_release() to pipe_winsys.
...
This allows regions to be allocated w/out a rendering context.
2007-10-25 20:35:23 -06:00
Brian
616112ea2e
silence warning
2007-10-25 20:32:45 -06:00
Brian
ee80e0b620
Move the get/put_tile() functions to pipe_context.
...
The _rgba versions are temporary until the state tracker is updated.
2007-10-25 20:32:45 -06:00
Brian
afd19177e4
tex comments
2007-10-25 20:32:45 -06:00
Brian
aaac436c6c
added some comments
2007-10-25 20:32:45 -06:00
Brian
3dde3715db
update TILE_TOP/BOTTOM_* values to match softpipe
2007-10-25 20:32:45 -06:00
Brian
86f09fd1a7
s/GLfloat/float/, s/GLint/int/, etc
2007-10-25 20:32:45 -06:00
José Fonseca
18a22a4302
Briefly describe the buffer management interface.
2007-10-25 23:41:23 +01:00
José Fonseca
1d2ff452d4
Expand pkg-config flags before invoking the compiler.
...
This allows IDEs such as Eclipse to get the correct c-preprocessor flags used
from the build output.
2007-10-25 23:37:25 +01:00
José Fonseca
414a933ad2
Ignore generated files.
2007-10-25 23:25:02 +01:00
Michel Dänzer
8568fadaf2
LLVM requires linking with the C++ compiler.
...
It's basically luck if it works with the C compiler on some platforms...
2007-10-25 18:26:26 +02:00
Zack Rusin
4a4e6f2cab
Implement loops
2007-10-25 11:47:25 -04:00
Zack Rusin
1d17cb721a
Fix nested swizzles. Actually fetch the destination contents
...
instead of input.
2007-10-25 09:04:41 -04:00
Zack Rusin
1d26e9c447
Fix nested conditionals
2007-10-25 09:04:41 -04:00
Zack Rusin
e842b5e5ba
Test some functionality of vp using GLSL that pure vp isn't testing.
2007-10-25 09:04:41 -04:00
Zack Rusin
7073ef9682
Implement else ops.
2007-10-25 09:04:41 -04:00
keithw
731352f03e
set vcache.referenced bit always
2007-10-25 10:21:52 +01:00
Zack Rusin
5022ee43fc
Make branching work :) Simply allow output variables as valid
...
operand inputs when they've been assigned already.
2007-10-24 19:26:09 -04:00
Zack Rusin
1c5fec714d
Simplify branch handling. Prepare for proper decleration extraction.
2007-10-24 19:20:32 -04:00
Brian
7636aac54b
Fix glDrawElements + VBO rendering when ptr/offset is not zero.
...
When an index VBO is bound, glDrawElement's indices pointer is really an
offset into the element buffer. Add that offset to the prims[i].start
value before calling pipe->draw_elements().
Fixes vbo.c conform test.
2007-10-24 14:40:09 -06:00
Brian
40a0b053f7
Revert "Undo indexOffset change (I think, git???)"
...
This reverts commit 11ce6244a7 .
2007-10-24 14:35:40 -06:00
Brian
11ce6244a7
Undo indexOffset change (I think, git???)
2007-10-24 14:34:40 -06:00
Brian
3733b1f2e9
add to git
2007-10-24 12:43:52 -06:00
Brian
f68fce1f1f
Implement gl_PointCoord attribute for GLSL fragment shaders.
...
Contains the normalized fragment position within a point sprite.
2007-10-24 12:38:07 -06:00
Brian
3a345e0003
print CAL label
2007-10-24 12:32:42 -06:00
Brian
e506514dbb
fix bug in RET code
2007-10-24 12:32:42 -06:00
Brian
4eafe69a2a
better debug output
2007-10-24 12:32:42 -06:00
Brian
76a4fd098f
a bit more work for optimizing clears in tile cache (not enabled yet)
2007-10-24 12:32:42 -06:00
Brian
b78e90807a
flush pipe in draw_stencil_pixels()
2007-10-24 12:32:42 -06:00
Brian
47f2e97019
get_tile() for z16, z32, s8z24 surfaces needs to return 4 floats per pixel (for depth texture sampling)
2007-10-24 12:32:42 -06:00
Brian
af96043167
added a pipe->flush() call in xmesa_clear()
2007-10-24 12:32:41 -06:00
Zack Rusin
02cf317ed6
Add copyright headers and do some cleanups.
2007-10-24 12:48:06 -04:00
Zack Rusin
9d4b51aab8
Remove the silly function and remove the bogus comment.
2007-10-24 11:41:28 -04:00
Zack Rusin
d76a7b61bb
Cleanup some code.
2007-10-24 11:21:05 -04:00
Zack Rusin
5040eefbb7
Implement arl, lerp opcodes and do a first stab at if/endif
...
handling and branching support.
2007-10-24 11:21:05 -04:00
Zack Rusin
ba823b3ded
Implement cross product and abs opcode
2007-10-24 11:21:05 -04:00
Zack Rusin
1248b9776b
Implement extended swizzling.
2007-10-24 11:21:05 -04:00
Zack Rusin
743e96eec5
Implement SGE and SLT
2007-10-24 11:21:04 -04:00
Zack Rusin
b04430efd9
Introduce linux-llvm target. Remove the llvm code from the default build for now.
...
Cleanup some of the debugging output.
2007-10-24 11:21:04 -04:00
Zack Rusin
ba88751716
Align the load/stores. Reduce the amount of debugging output.
2007-10-24 11:21:04 -04:00
Zack Rusin
6815a9af6c
Cleanup some of the debugging output code
2007-10-24 11:21:04 -04:00
Zack Rusin
3b772a277f
Make lit work but in a very lame way - will have to be rewritten.
2007-10-24 11:21:04 -04:00
Zack Rusin
d4d8d7c468
Muchos fixos. gears kinda works. and cases don't crash.
...
glorious
2007-10-24 11:21:04 -04:00
Zack Rusin
e9a623d6a6
implement min and max
2007-10-24 11:21:04 -04:00
Zack Rusin
3ae767dd07
Fix some warnings and implement lg2
2007-10-24 11:21:04 -04:00
Zack Rusin
c6a1beb18f
Implement frc and floor
2007-10-24 11:21:04 -04:00
Zack Rusin
1c955171c8
Implement ex2 opcode
2007-10-24 11:21:04 -04:00
Zack Rusin
bd38f4d921
Implement dst opcode
2007-10-24 11:21:04 -04:00
Zack Rusin
3c558e17f0
Implement dph opcode
2007-10-24 11:21:04 -04:00
Zack Rusin
7abe3364b2
Implement dot4 opcode
2007-10-24 11:21:04 -04:00
Zack Rusin
e20294be11
Implement pow/rcp and sub opcodes
2007-10-24 11:21:04 -04:00
Zack Rusin
fcbde5e9f4
Add the "add" opcode and assert one vp if an opcode isn't supported
2007-10-24 11:21:03 -04:00
Zack Rusin
b0f8069343
Refactor the tgsi->llvm storage translator
2007-10-24 11:21:03 -04:00
Zack Rusin
3975f34fd3
Implement basic opcode translation and storage translation.
2007-10-24 11:21:03 -04:00
Zack Rusin
fa2962d148
Draw first triangle. Start on the llvm builder.
2007-10-24 11:21:03 -04:00
Zack Rusin
5e0205023e
Cleanup some of the testing code. Implement first pass at actually
...
running shaders in llvm.
2007-10-24 11:21:03 -04:00
Zack Rusin
5ffdada717
Execution engine is a singleton, for now keep it in the pipe.
2007-10-24 11:21:03 -04:00
Zack Rusin
9e6d58fac2
Generate the base shader.
2007-10-24 11:21:03 -04:00
Zack Rusin
2dbba8b024
Implement the conversion and do the initial execution pass.
2007-10-24 11:21:03 -04:00
Zack Rusin
11bc1f015a
Stub out some conversion.
2007-10-24 11:21:03 -04:00
Zack Rusin
b2e529982e
Initial stab at LLVM integration.
2007-10-24 11:21:03 -04:00
Brian
4664261f8d
Fix vertex cache bug that allows multiple vertices to fall into the same slot.
...
Need to set the slot's bit in draw->vcache.referenced even when there was a
cache hit since flushing the primitive buffer will have cleared the bitfield
but not the cache's vertex indexes.
Fixes a bug found when drawing long triangle fans but could be hit by other
prim types as well.
An alternate fix would be to call draw_vertex_cache_invalidate() from
draw_vertex_cache_unreference().
2007-10-23 15:08:54 -06:00
Brian
3df65af849
added comment
2007-10-23 15:02:02 -06:00
Brian
40e46d0727
In get_vertex(), slot was computed using & 31. Replace with % VCACHE_SIZE.
...
Also, assert that index is not too large before indexing array.
2007-10-23 12:32:02 -06:00
Brian
be04999982
adjust coords in wide_line() to be conformant
2007-10-23 11:38:17 -06:00
Brian
112a1580f6
properly init dst reg's CondMask/Swizzle fields
2007-10-23 10:54:50 -06:00
Brian
e69943e6dd
bump up MAX_INSTRUCTIONS and add an assertion to catch emitting too many instructions
2007-10-23 10:23:01 -06:00
Brian
5c79c088cd
Don't pad renderbuffers to multiple of two pixels anymore.
...
This was only needed to avoid out-of-bounds memory accesses with the
2x2 quad_read/write() functions which no longer exist.
2007-10-23 08:30:36 -06:00
Brian
588c91eb0a
don't apply ColorMask to main gc
2007-10-22 17:50:00 -06:00
Brian
455a08d87d
fix masking bug, memory leak
2007-10-22 17:20:56 -06:00
Brian
0a3eaeadb9
don't use GL types for get/put_tile() params
2007-10-22 17:20:08 -06:00
Brian
beefc6011b
new flag to control psize (from vertex shader or fixed size)
2007-10-22 12:19:54 -06:00
Brian
1b48523459
add support for sprite texcoord modes
2007-10-22 12:10:30 -06:00
Brian
22e5c4f0f0
implement point sprite mode
2007-10-22 11:59:26 -06:00
Brian
cd4d732773
add point_sprite flag to rasterizer state
2007-10-22 11:41:31 -06:00
Brian
34abb93ea1
remove unused var
2007-10-22 11:41:17 -06:00
Brian
8d24415987
tweak point corners to pass conform test
2007-10-22 11:38:40 -06:00
Brian
e3444deec5
plug the wide prims code into the pipeline
2007-10-22 11:01:34 -06:00
Brian
80d2bb7c64
update to working condition
2007-10-22 11:01:02 -06:00
Brian
70eb7996f2
Finish unifying the surface and texture tile caches.
2007-10-22 09:37:26 -06:00
keithw
ec3bd21c46
pull clip/ module wide and stippled lines/points code
2007-10-22 15:24:42 +01:00
Brian
b3204c2aff
Start implementing cache routines for textures.
...
First step to consolidating surface/texture caching...
2007-10-21 18:06:35 -06:00
Brian
c2322333b8
rename some vars
2007-10-21 17:15:07 -06:00
Brian
cae640eae6
silence warning
2007-10-21 17:14:46 -06:00
Brian
49848208cf
Remove obsolete read/write_quad() functions
2007-10-20 16:09:17 -06:00
Brian
03145d864c
init sp->sbuf_cache to avoid possible segfault
2007-10-20 15:52:59 -06:00
Brian
f9aa757187
Call softpipe_unmap_surfaces() in softpipe_flush().
...
This fixes a DRM BO failure upon swapbuffers caused by the color buffer
still being mapped.
This is a bit heavy handed since we don't always need to unmap buffers
when flushing. Need to pass a flag to flush() or design a new function.
2007-10-20 15:52:36 -06:00
Brian
7c8b2f7ce3
In region_unmap(), check if region is mapped before decrementing refcount.
2007-10-20 15:45:24 -06:00
Brian
bb3d61551c
flush the pipe before accum ops
2007-10-20 15:21:02 -06:00
Brian
a1633c0716
unmap regions when reallocating renderbuffer storage
2007-10-20 15:20:46 -06:00
Brian
fd3876e9e3
renderbuffer tweaks in update_framebuffer_state()
2007-10-20 15:20:17 -06:00
Brian
46e2d2bb0a
use combined depth/stencil buffer when possible
2007-10-20 15:19:14 -06:00
Brian
7e83963998
Convert Z/stencil ops to use cached tiles like colors.
...
Also, quite a bit of re-org of the tile caches and surface mapping/unmapping.
Leave surfaces mapped between primitives now.
2007-10-20 15:18:02 -06:00
Brian
832e73bc09
added case for TGSI_OPCODE_END
2007-10-20 10:09:12 -06:00
Brian
c492725abf
get/put_tile_raw() funcs for 16/32bpp surfaces
2007-10-19 12:47:05 -06:00
Brian
d4a9d4bdef
added get/put_tile_raw() methods
2007-10-19 12:45:54 -06:00
Brian
ffd37b1fda
don't alloc region in xmesa_surface_alloc(), fixes a mem leak
2007-10-19 12:42:05 -06:00
Brian
257f0da6a2
disable debug printf
2007-10-19 10:13:55 -06:00
Brian
96b06ac557
call Driver.Flush() in _mesa_notifySwapBuffers()
2007-10-19 10:12:00 -06:00
Brian
2b2f761e2b
Initial implementation of surface tile caching.
...
Instead of using read/write_quad() functions, do framebuffer accesses via
get/put_tile(). A cache of tiles is used to avoid frequent get/put() calls.
Only implemented for color buffers right now.
2007-10-19 10:10:08 -06:00
Brian
46c3cf1831
Tile cache functions.
2007-10-19 10:08:24 -06:00
Brian
5cf4fc5832
clamp/clip in put_tile(), move softpipe_init_surface_funcs() call
2007-10-19 10:07:55 -06:00
Brian
b57f573b99
remove old comment
2007-10-18 16:27:01 -06:00
Brian
0007cd7ba0
Alternate CopyPixels path based on get/put_tile().
...
For some drivers (like Xlib) it's not possible to treat the front/back color
buffers as pipe_regions. So pipe->region_copy() won't work. Added a new
state tracker field indicating if we can use regions for colorbuffer accesses.
This should probably be re-considered someday...
2007-10-18 15:18:55 -06:00
Brian
5d39f4f9fd
fix bug in copy_rect(), use temp vars in sp_region_copy() to aid debugging
2007-10-18 15:14:50 -06:00
Brian
874b6b9960
fix off-by-one error in CopyPixels src position
2007-10-18 14:30:03 -06:00
Brian
d44e515fd7
fix upside down CopyPixels image
2007-10-18 14:22:38 -06:00
Brian
68b88fab88
fix function name
2007-10-18 14:20:38 -06:00
Brian
563584a4ee
checkpoint: code refactoring for glCopyPixels
2007-10-18 13:27:10 -06:00
Brian
bdc574c5bd
start implementing glCopyPixels (stencil works)
2007-10-18 12:31:35 -06:00
Brian
8f3fb395ff
make read_stencil_pixels() non-static
2007-10-18 12:31:05 -06:00
Brian
447c93dd1b
Change type of shader->executable field from void * to generic function pointer.
...
Fix warnings in draw_create_vertex_shader()
2007-10-18 11:41:13 -06:00
Brian
b21f4ac15f
added const qualifiers
2007-10-18 11:41:12 -06:00
Brian
2ae9f53c9d
better debug code, silence some warnings
2007-10-18 11:41:12 -06:00
Brian
54c5262eaf
print vertex input mapping
2007-10-18 11:41:12 -06:00
Brian
5bd119f943
handle fogcoord/raster distance
2007-10-18 11:41:12 -06:00
Brian
66586762f1
added st_debug.c
2007-10-18 11:41:12 -06:00
Brian
958c92e0c7
debug functions
2007-10-18 11:41:12 -06:00
Brian
376fb1c23e
fix logic error in stipple_quad() (point/line fragments were getting dropped)
2007-10-18 11:41:12 -06:00
Oliver McFadden
a22fafbb4b
Corrected the file permissions in src/mesa/pipe.
2007-10-18 16:36:04 +00:00
Oliver McFadden
d16b844ff6
pipe/draw/draw_context.c:47: error: 'false' undeclared (first use in this function)
2007-10-18 16:01:42 +00:00
Oliver McFadden
7cd58433fa
sp_context.c:255: error: 'false' undeclared (first use in this function)
2007-10-18 15:56:21 +00:00
Brian
17c2f56dc3
fix interpolation bug in nearest-image/linear-mipmap filtering
2007-10-17 17:22:06 -06:00
Brian
f953c223df
remove #include vf.h
2007-10-17 16:23:25 -06:00
Brian
52111366cc
disable the NeedFlush assertion for now
2007-10-17 16:19:10 -06:00
Brian
49adf51eee
Add some FLUSH_CURRENT() calls.
...
Without these we can find ourselves in _mesa_load_state_parameters()
computing derived lighting/material values whhen the current material
properties haven't been updated from the VBO.
This may be a somewhat wide-spread problem that needs more attention...
2007-10-17 16:18:45 -06:00
Brian
420c062cb6
Assert that there's no outstanding current state that needs to be flushed from the vbo in _mesa_load_state_parameters().
...
Several of the state parameters use current state (such as materials).
Need to make sure those values are not stale.
2007-10-17 15:59:59 -06:00
Brian
5cb0d749b0
formatting fix
2007-10-17 14:57:15 -06:00
Brian
e48ea92510
fix addressing error in read_stencil_pixels()
2007-10-17 14:56:55 -06:00
Brian
906768316d
Replace repeat_remainder() with simpler macro that just casts args to unsigned.
2007-10-17 14:29:12 -06:00
Brian
df4410a597
reorder params to get_texel()
2007-10-17 14:16:42 -06:00
Brian
3d6f9d904f
implement 3D texture sampling
2007-10-17 14:13:21 -06:00
Brian
7392dac962
When in GL_FEEDBACK mode, make sure we emit color and texcoord registers.
2007-10-17 12:42:29 -06:00
Brian
38743e2ef1
generate selection hit if in selection mode and pos is not clipped
2007-10-17 12:32:21 -06:00
Brian
4338f0f709
Update framebuffer state in response to _NEW_COLOR (set by glDrawBuffer)
2007-10-17 12:27:40 -06:00
Brian
2dd27cfdd9
Fix viewport Z scale/bias to get the right Z values from drawing the quad.
2007-10-17 11:24:06 -06:00
Brian
4f23468bd0
don't crash if texture border is used (unsupported for now)
2007-10-17 10:52:30 -06:00
Brian
863cc0af74
fix square point rasterization
2007-10-17 10:51:55 -06:00
Brian
7db3cf8c48
lower clamp bound for UNCLAMPED_FLOAT_TO_SHORT() is -1
2007-10-16 18:46:14 -06:00
Brian
45700ac280
use new st_clear_accum_buffer() function
2007-10-16 18:45:42 -06:00
Brian
2de9477fee
New st_clear_accum_buffer() function (can't use pipe->clear() since it doesn't handle negative color values)
...
Also, remove unneeded clamping in the accum ops.
2007-10-16 18:45:28 -06:00
Brian
4959617164
front/back determination was wrong
2007-10-16 17:59:24 -06:00
Brian
29cfec1581
remove debug assertion
2007-10-16 17:56:13 -06:00
Brian
efdacc90b4
Update mask calculations for point drawing.
2007-10-16 17:43:41 -06:00
Brian
bd35c53143
Fix broken polygon stippling (see comments for details).
2007-10-16 17:37:46 -06:00
Brian
0edd490a96
Redefine QUAD_TOP_LEFT, TOP_RIGHT, etc. to reflect Y=0=TOP raster layout.
2007-10-16 17:36:37 -06:00
Brian
63b0b5b6c7
fix perspective-interpolated attribs for points, liens
2007-10-16 12:04:16 -06:00
Brian
ce0f2e88e3
fix blend term translation bug, rename some funcs
2007-10-16 08:53:08 -06:00
Brian
c838d4c876
finish remaining blend modes
2007-10-15 19:14:40 -06:00
Brian
cd54414b75
fix incorrect register in get_eye_normal() for rescale_normals case
2007-10-15 17:59:16 -06:00
Brian
b2605d5f80
GL_UNSIGNED_BYTE indexes
2007-10-15 17:27:54 -06:00
Brian
7abc78a967
implement logicop
2007-10-15 17:26:01 -06:00
Brian
566c11254f
remove commented out #include
2007-10-15 15:31:24 -06:00
Brian
ce8988018c
check for width or height = 0 before calling driver Bitmap func
2007-10-15 15:30:45 -06:00
Brian
b1f136dba2
Fix useabs logic in build_fog().
...
We always need to compute the absolute value of the fogcoord if we're
passing it through for per-fragment fog.
2007-10-15 15:30:13 -06:00
Brian
b4deb73fab
remove feedback hack
2007-10-15 15:05:39 -06:00
Brian
0585b4e746
Undo prev changes.
2007-10-15 15:05:08 -06:00
Brian
65b1f6947f
setup vertex format for GL_FEEDBACK mode
2007-10-15 13:42:56 -06:00
Brian
520ad5f854
GL_SELECT mode works now
2007-10-15 13:25:13 -06:00
Brian
230225c5d7
formatting
2007-10-15 13:06:53 -06:00
Brian
8630e5edb3
call pipe->set_vertex_buffer() after drawing/unreferencing.
...
This fixes potential a stale reference to vertex buffers.
Fixes cubemap demo on i915.
2007-10-15 13:05:15 -06:00
Brian
e3a729a681
fix logic for printing extended swizzles
2007-10-15 11:48:20 -06:00
Brian
369eefc34c
add 'normalized_coords' field to pipe_sampler_state
...
This controls whether texcoords are interpreted as-is or scaled up from [0,1].
Fixes glDrawPixels/glBitmap problems on i915 when image is non power-of-two.
Also, cleans up the CSO sampler state for i915 a bit.
2007-10-15 11:47:53 -06:00
Brian
c8bf63e992
feedback/rasterpos fix-ups
2007-10-15 11:28:25 -06:00
Brian
3eeef8aabe
Change 'drawing' field to boolean.
2007-10-15 10:30:38 -06:00
Brian
66ea4b7c7c
remove unused includes
2007-10-15 10:30:09 -06:00
Brian
583c11d383
simplify KIL usage for bitmap fragprog
2007-10-15 10:28:18 -06:00
Brian
41b3fcbf04
check for extended swizzles, added TGSI_OPCODE_KILP
2007-10-15 10:27:12 -06:00
Brian
29db69e222
added print_texkil_op()
2007-10-15 10:25:42 -06:00
Brian
e7af944162
implement accum ops
2007-10-14 12:34:55 -06:00
Brian
a7611dce40
implement put_tile()
2007-10-14 12:32:39 -06:00
Brian
90f7ae2370
accum buffer support
2007-10-14 11:55:45 -06:00
Brian
7b0b694406
16-bit rgba surface/format for accum
2007-10-14 11:55:31 -06:00
Brian
d45fdc3f1f
16-bit RGBA surface format for accum buffers
2007-10-14 11:53:15 -06:00
Brian
9f797d8cb3
Added accum function/files.
2007-10-14 11:52:00 -06:00
Brian
69466c60a5
GL_STENCIL_INDEX support
2007-10-13 12:29:11 -06:00
Brian
fa1d442879
GL_STENCIL_INDEX support
2007-10-13 12:28:53 -06:00
Brian
12f41c8884
format info for Z16/Z32
2007-10-13 12:28:34 -06:00
Brian
1e2770e2e6
inequality tests were backward
2007-10-13 12:27:10 -06:00
Brian
a2c8b0e861
glDrawPixels support for GL_DEPTH_COMPONENT
2007-10-13 11:11:59 -06:00
Brian
d75acc8ffa
Check texture format in get_texel() to handle depth textures.
2007-10-13 11:11:11 -06:00
Brian
eb389aaf72
get_tile() of Z surfaces returns floats now
2007-10-13 09:05:20 -06:00
Brian
a1e332950b
added z16/z32_git_tile(), change s8z24_get_tile() to return Z as float, ignore stencil
2007-10-13 09:04:35 -06:00
Brian
89414d951d
Use KIL in glBitmap shader to cull the fragments for 0 bits.
2007-10-12 16:16:20 -06:00
Brian
47fc06753e
added assertion to be sure we don't exceed bitfield size
2007-10-12 16:13:15 -06:00
Brian
2a699038dc
added code to print extended swizzles
2007-10-12 16:12:22 -06:00
Brian
4becfdfdd8
change exec_kilp() to only touch lowest four bits in kilmask
2007-10-12 16:11:58 -06:00
Brian
e552b9bd09
initial use of KIL for glBitmap rendering
2007-10-12 09:42:06 -06:00
Brian
3fb88639af
Init draw->prim = ~0
...
We weren't rendering correctly if the first thing drawn was a point (PRIM_MODE_POINT=0).
2007-10-11 11:09:36 -06:00
Brian
afd6bd3cb0
rename some vars, updated comments
2007-10-11 10:03:59 -06:00
Brian
3ab326e1d7
remove unused tgsi_attrib_to_mesa_attrib()
2007-10-11 10:01:17 -06:00
Brian
55dd7d7947
update st_feedback_draw_vbo()
2007-10-11 10:00:54 -06:00
Brian
4d79f2c4a2
streamline st_draw_vbo() a bit more, free user-space buffers at end
2007-10-11 09:48:06 -06:00
Brian
71efb6cf69
clean-up, streamline st_draw_vbo()
2007-10-11 09:11:13 -06:00
Brian
98e638aa8d
implement intel_user_buffer_create()
2007-10-11 09:10:43 -06:00
Brian
cdc156d52f
Initial support for user-space buffer objects.
...
Basically, add userBuffer/Data/Size fields to _DriBufferObject, check those
fields in driBOMap/Unmap().
New driGenUserBuffer() function.
2007-10-11 09:10:19 -06:00
Brian
453ac4b1eb
Use winsys->user_buffer_create() to wrap user-space vertex arrays and element buffers.
...
Now client-side vertex arrays and glDrawElements work.
More testing/debug/clean-up to come...
2007-10-10 18:00:12 -06:00
Brian
66ab569590
implement the user_buffer_create() function
2007-10-10 17:58:12 -06:00
Brian
fcdd34de4b
Added user_buffer_create() method
...
This is used to wrap user-space data in a pipe buffer object to allow more
uniform treatment of various things. For example, wrapping client-side
vertex arrays so they look like VBOs.
2007-10-10 17:57:47 -06:00
Brian
3f226d4baf
added SSCALED cases in fetch_attrib4()
2007-10-10 17:50:31 -06:00
Brian
178beffd35
update comments (s/softpipe/gallium/ etc)
2007-10-10 16:51:09 -06:00
Brian
babdd1f651
minor optimization for color/z results
2007-10-10 16:21:28 -06:00
Brian
d37e048cd1
disable some assertions which pop up during window resize, but can be ignored for now
2007-10-10 16:19:49 -06:00
Brian
d0bca086ab
fix get_result_vector() since fp output slots are not fixed anymore
2007-10-10 15:45:57 -06:00
Brian
9f8cfa75ca
fix softpipe_clear() to handle ps->offset!=0 (such as when rendering to texture and level!=0)
2007-10-10 15:09:57 -06:00
Brian
8b68104b90
free/unreference pipe_surface in get_texel()
2007-10-10 15:05:24 -06:00
Brian
2b31b413f9
use correct mipmap level in st_render_texture()
2007-10-10 14:13:21 -06:00
Brian
e23a7b2ea4
use pipe_region_reference() in softpipe_get_tex_surface() to fix refcount error
2007-10-10 11:40:04 -06:00
Brian
500e3af175
fix width/height padding that caused failed assertion upon window resize
2007-10-10 11:04:48 -06:00
Brian
fa7a589876
Size of input_to_index array should be VERT_ATTRIB_MAX.
...
This fixes an out of bounds array write that was causing the glsl/bump demo to render incorrectly.
2007-10-10 10:33:38 -06:00
Brian
44200421e8
Merge tgsi_mesa_compile_fp_program() and tgsi_mesa_compile_vp_program() into tgsi_translate_mesa_program().
2007-10-10 09:44:54 -06:00
Brian
013ce15595
remove unused var
2007-10-10 09:43:37 -06:00
Brian
d4c3f26662
start on a unified vertex/fragment program translation function
2007-10-09 16:56:25 -06:00
Brian
11a46c61e0
Generate DCLs for temporaries.
2007-10-09 16:28:01 -06:00
Brian
578962d624
Finish up decls for packed fragment program outputs.
2007-10-09 16:20:00 -06:00
Brian
bc139a19b0
Pack fragment program outputs to be consistant with vertex programs.
...
Previously, output[0] was always Z and output[1] was color. Now output[0]
will be color if Z is not written.
In shade_quad() use the semantic info to determine which quantity is in
which output slot.
2007-10-09 14:55:22 -06:00
Brian
342bc50c3d
update some comments
2007-10-09 14:52:26 -06:00
Brian
aec1f8e4f8
More work on flow control for CAL/RET.
2007-10-09 14:40:11 -06:00
Brian
31bd01f93b
New ATTRIB interpolation type for vertex program inputs/declarations.
2007-10-09 14:36:14 -06:00
Brian
47ff9428ee
Don't emit semantic info for vertex program inputs.
2007-10-09 14:31:45 -06:00
Brian
94490f63c8
Use linked fragment shader inputs (if present) to determine which outputs are needed.
2007-10-09 14:12:26 -06:00
Brian
1a69db9d2d
use different temps in exec_tex() for bias
2007-10-03 16:34:04 -06:00
Brian
68c4254d75
updated comments
2007-10-03 16:18:44 -06:00
Brian
635c4c41bd
Add outputs_written bitfield to pipe_shader_state, use it to determine if fragment shader writes Z.
2007-10-03 14:43:57 -06:00
Brian
65996f27f4
Move XSTDCALL definition to p_compiler.h
2007-10-03 13:50:12 -06:00
Brian
5356ba250c
handle frag progs that write Z
2007-10-03 13:50:11 -06:00
Brian
a9f0330061
basic support for reading GL_DEPTH_COMPONENT
2007-10-03 13:50:11 -06:00
Brian
e6f4af6b23
added s8z24_get_tile()
2007-10-03 13:50:11 -06:00
Brian
76e61556e7
fix eq/neq bugs
2007-10-03 13:50:11 -06:00
Brian
df235f33a6
fix f/u mix-up in micro_trunc()
2007-10-03 13:50:11 -06:00
Brian
1a18ebc6b3
move TEX code into exec_tex()
2007-10-03 13:50:11 -06:00
Michel Dänzer
e9df20c2fa
Some minor cleanups.
2007-10-03 20:37:59 +02:00
Michel Dänzer
86a03e43ce
Double amount of memory allocated for generated shader code.
...
The code generated for the glxgears vertex shader didn't fit, causing a crash.
2007-10-03 20:35:19 +02:00
Michel Dänzer
344464bf2e
Track fragment and vertex shader code generation via pipe shader state objects.
...
Unfortunately, the generated fragment shader code is effectively unusable until
it handles quad->mask.
2007-10-03 20:33:23 +02:00
Michel Dänzer
ce765a7fb7
intel_winsys: Adapt to DRM changes (again).
...
It was decided after all to stick to 'pipes' here, even though the actual
meaning is now 'planes'.
2007-10-03 18:39:39 +02:00
Zack Rusin
07cd46d111
In vertex shaders also expect the template to be stack allocated
...
structure so allocate a private copy of it.
2007-10-03 12:01:18 -04:00
Zack Rusin
b46926c4be
Unify the definitions of the 4 component dot product into one
...
location.
2007-10-03 10:33:38 -04:00
Zack Rusin
cdd38d487a
Unify handling of userplanes and regular planes to simplify
...
the clipping code.
(really done by Keith)
2007-10-03 10:33:38 -04:00
Zack Rusin
a7e997cfc5
Get rid of ST_NEW_SHADER flag and the dependency on _NEW_PROGRAM
...
which is being hit all the time. Done by Keith really.
2007-10-03 10:33:38 -04:00
Zack Rusin
5e4309ee92
Explain a little better what we're doing here.
2007-10-03 08:50:27 -04:00
Zack Rusin
51345cb3c4
Make softpipe behave more like a real driver by always allocating something
...
in the state functions.
2007-10-03 08:47:36 -04:00
Brian
4b6cc36b2b
clean-ups
2007-10-02 19:44:55 -06:00
Brian
355f8f7eed
Implement/use fragment kill results
2007-10-02 19:16:57 -06:00
Brian
ff9949d05c
Implement TGSI_OPCODE_SNE with micro_ne()
2007-10-02 17:13:06 -06:00
Brian
066ccec494
Separate TGSI_OPCODE_KIL and TGSI_OPCODE_KILP (predicated).
...
These correspond to the NV and ARB-style fragment program KIL instructions.
The former is really supposed to examine the NV condition codes but Mesa's
GLSL compiler always emits unconditional KIL instructions.
2007-10-02 17:07:30 -06:00
Brian
ca34912bf7
assert that program length > 1 (some code, plus END)
2007-10-02 16:57:19 -06:00
Brian
ae28d19bbf
added MESA_FORMAT_Z16 in st_mesa_format_to_pipe_format(), for Glean
2007-10-02 16:56:02 -06:00
Brian
d781cdc8fa
Generate a texenv fragment program if there's a GLSL vertex shader but no GLSL fragment shader.
...
This allows Glean glsl1 test to get pretty far.
2007-10-02 16:55:21 -06:00
Brian
c9dceb17c0
Push mask stacks upon CAL, pop upon RET.
...
Still need to handle conditional RET statements...
2007-10-02 16:24:40 -06:00
Brian
4d155a32d2
added license and interpreter comments
2007-10-02 16:17:34 -06:00
Brian
53a6a55c7c
Implement CONT statement.
2007-10-02 16:05:07 -06:00
Brian
fe1d15acc7
added micro_trunc(), re-order some code
2007-10-02 15:17:37 -06:00
Brian
8955bc3458
Minor optimization: no-op CAL when ExecMask==0x0.
2007-10-02 14:25:43 -06:00
Brian
6aab3e3d26
Added TGSI_FILE_OUTPUT case in fetch_src_file_channel().
...
GLSL output variables (such as vertex varyings) can be read (they're not
write-only).
2007-10-02 14:17:47 -06:00
Brian
4ad80ad5cf
Implement CAL/RET and a call stack for subroutines.
...
The glsl/brick.c shader demo runs now.
2007-10-02 14:05:21 -06:00
Brian
5e49ec339d
Added TGSI_OPCODE_END
...
Halt program execution when we get to END instruction. The GLSL compiler
puts subroutines after the end instruction so we have to stop before then.
2007-10-02 13:49:38 -06:00
Brian
4726489248
Fold expand_program() into tgsi_exec_prepare()
2007-10-02 13:41:56 -06:00
Brian
e2009d0871
no more need for tgsi_exec_machine_run2(), remove dead code
2007-10-02 11:49:43 -06:00
Brian
9ac03856f5
remove dead code
2007-10-02 11:47:21 -06:00
Brian
0d13ade0cd
Move tgsi machine state init/allocations so they're done less frequently.
...
This, plus expanding all instructions ahead of time, seems to have improved
the performance of program execution by 8x or so.
2007-10-02 11:46:11 -06:00
Brian
57d3770f35
checkpoint: unpack all instructions before interpretation. Actual looping works.
2007-10-02 10:38:56 -06:00
Brian
cdf99a9fad
comments/code for min/max_lod - revisit someday
2007-10-01 18:10:53 -06:00
Brian
4c19f95a39
use i915_miptree_layout when using an i915
2007-10-01 15:39:15 -06:00
Brian
f8b2148a2b
avoid updating vertex format when it doesn't really change
2007-10-01 14:46:19 -06:00
Brian
a24031d50c
don't crash in RasterPos if feedback not implemented yet
2007-10-01 13:55:16 -06:00
Brian
3c41589420
disable debug printf
2007-10-01 13:54:37 -06:00
Brian
726060680b
don't crash when fog enabled, still not rendered correctly though
2007-10-01 13:54:24 -06:00
Brian
dab288b982
remove specular color assertion (the path works)
2007-10-01 13:50:24 -06:00
Brian
b13618c316
fix a few vert/frag program items to get i915 driver going again
2007-10-01 13:45:53 -06:00
Brian
2727cfddbf
hack in some code to test loops, break
2007-09-29 10:44:05 -06:00
Brian
78f3cd1e08
Initial conditional execution support for loops and BRK instruction.
...
Also, instead of passing cond mask to each micro op, just apply it in the
store_dest() function.
2007-09-29 10:43:29 -06:00
Brian
91550f0a17
remove unused tgsi_exec_cond_* types
2007-09-29 09:51:11 -06:00
Brian
9405ec6251
temporary hack to test nested conditionals
2007-09-28 21:04:56 -06:00
Brian
fc38c82771
Initial implementation of IF/ELSE/ENDIF using conditional masking.
...
mach->CondMask controls writing to each of the 4 components in a quad.
mach->CondMaskStack handles nested conditionals.
Only a few of the micro ops (add/sub/mul/store) have been updated to obey CondMask at this time.
2007-09-28 21:04:34 -06:00
Brian
ae7f200788
fix bug causing unnecessary translations
2007-09-28 20:31:24 -06:00
Brian
bbcbd362a9
remove old debug code, fix warning
2007-09-28 16:20:10 -06:00
Brian
78876bf61c
fix st_use_program()
2007-09-28 16:19:51 -06:00
Brian
636480cc9c
Instead of linked program pairs, keep a list of vertex programs translated for each fragment program.
2007-09-28 15:39:39 -06:00
Brian
f14ece2d2c
Use texture->first_level, not 0, when not mipmapping.
...
Fixes crash when GL_BASE_LEVEL!=0.
Also, remove old assertion.
2007-09-28 15:39:39 -06:00
José Fonseca
f971bdc051
Gallium's doxygen documentation.
2007-09-28 18:48:15 +01:00
José Fonseca
59424e2d34
Update x86's static and profile configs.
2007-09-28 18:18:50 +01:00
Zack Rusin
8731e391f5
Use sse only if GALLIUM_SSE is defined
2007-09-28 12:29:30 -04:00
Zack Rusin
a1a989f0be
Redoing the way we handle vertex shaders for the draw module.
2007-09-28 12:29:22 -04:00
Zack Rusin
f78193f444
Remove gl dependency from the x86 assembler code
2007-09-28 12:29:14 -04:00
Zack Rusin
901577e07f
Revert "Redoing the way we handle vertex shaders for the draw module."
...
This reverts commit 6dcfddb8e2 .
2007-09-28 12:28:16 -04:00
Zack Rusin
f2a33a63f1
Revert "Use sse only if GALLIUM_SSE is defined"
...
This reverts commit 57b5d36057 .
2007-09-28 12:28:06 -04:00
Zack Rusin
57b5d36057
Use sse only if GALLIUM_SSE is defined
2007-09-28 09:12:20 -04:00
Zack Rusin
6dcfddb8e2
Redoing the way we handle vertex shaders for the draw module.
2007-09-28 09:12:20 -04:00
Brian
7966e479dc
set miptree pitch to region pitch after allocating the region in st_miptree_create()
...
This fixes rendering with small (4x4) textures with softpipe.
Haven't yet tested with i915.
2007-09-27 16:33:01 -06:00
Brian
28b315dc1a
comments
2007-09-27 16:31:13 -06:00
keithw
e0271e16da
remove dead code
2007-09-27 16:20:31 +01:00
keithw
48385cd13a
reduced debug
2007-09-27 12:50:02 +01:00
Keith Whitwell
82e2d32268
Fix some compiler warnings with -pedantic
2007-09-27 07:56:23 +01:00
Keith Whitwell
65e3af51ef
Enable codegen based whenever __i386__ is defined.
2007-09-27 07:56:23 +01:00
keithw
035a824730
fix merge
2007-09-27 07:56:23 +01:00
Keith Whitwell
c5cfa63988
disable debug
2007-09-27 07:56:23 +01:00
keithw
e078f910dc
restore primitive trimming in sp_draw_arrays.c
2007-09-27 07:56:23 +01:00
Keith Whitwell
08589f7105
Make flushing more lazy in the draw module.
2007-09-27 07:56:23 +01:00
keithw
7770acf8d4
Use Gallium in the renderer string
2007-09-27 07:56:22 +01:00
Brian
5c83f13719
Do image flipping in do_copy_texsubimage() and GL pixel transfer ops (except convolution).
2007-09-26 18:54:20 -06:00
Brian
c6717a8642
fallback_copy_texsubimage() basically works now (at least w/ Xlib driver).
...
Have to map regions before calling get_tile()/put_tile().
Need to invert srcY of glCopyTexSubImage() depending on renderbuffers
up/down orientation.
Still need to invert image in fallback_copy_texsubimage() when needed.
2007-09-26 18:39:14 -06:00
Brian
78008dbcaa
added a8r8g8b8_put_tile()
2007-09-26 18:34:43 -06:00
Brian
fcd4eeb743
don't use scissored bounds in _mesa_clip_copytexsubimage()
2007-09-26 18:34:13 -06:00
Brian
038cb561eb
More work on glCopyTexSubImage.
...
Start sketching out a fallback path based on surface->get_tile(), put_tile()
which will do format convertion and GL's pixel transfer ops.
2007-09-26 17:57:15 -06:00
Brian
b27498c7ca
checkpoint: glCopyTexImage work
2007-09-26 17:18:42 -06:00
Brian
b3bb1e3ebf
s/_mesa_copy_rect/copy_rect/
2007-09-26 17:03:40 -06:00
Brian
324ecadbfd
Added new _mesa_clip_copytexsubimage() function to do avoid clipping down in the drivers.
...
This should probably be pulled into main-line Mesa...
2007-09-26 17:03:11 -06:00
Brian
bad4e10af7
check for _NEW_PROGRAM mesa state (fixes arbfplight)
2007-09-26 15:34:51 -06:00
Brian
715e5edff6
better debugging
2007-09-26 15:34:31 -06:00
Brian
960fe21008
comments, null ptr checks, etc.
2007-09-25 17:07:59 -06:00
Brian
b28f4a27d5
don't apply pixelzoom to bitmaps
2007-09-25 17:03:19 -06:00
Brian
0dfa5506a3
st_draw_vertices() no longer needs attribs[] array parameter
2007-09-25 16:56:35 -06:00
Brian
ccff14de0d
Simple implementation of glBitmap rendering.
...
Create a texture matching the bitmap image and use a fragment program
to modulate current raster color by the boolean-valued texture. Need to
eventually use fragment culling (see comments in code).
2007-09-25 16:52:38 -06:00
Brian
02ea8b8141
re-org/prep for glBitmap
2007-09-25 15:48:14 -06:00
Brian
b5051bf6bb
clean-up #includes
2007-09-25 15:21:19 -06:00
Brian
38504011c8
better debug output
2007-09-25 15:20:58 -06:00
Brian
83fad68ec1
include programopt.h
2007-09-25 15:20:04 -06:00
Brian
3bf8d2ac71
Disable vertex shader fog, compute fog in fragment shader.
2007-09-25 15:18:51 -06:00
Brian
07f31a29b4
some clean-up of ST_NEW_ shader flags
2007-09-25 14:46:49 -06:00
Brian
1201eb8529
disable TGSI_DEBUG
2007-09-25 14:46:18 -06:00
Brian
6b1d2fa815
replaced by st_atom_shader.c
2007-09-25 14:30:26 -06:00
Brian
40c543eb71
Translate mesa vertex/fragment programs to TGSI programs at same time to do proper linking.
...
Previously, programs were translated independently during validation.
The problem is the translation to TGSI format, which packs shader
input/outputs into continuous slots, depends on which vertex program is
being paired with which fragment shader. Now, we look at the outputs
of the vertex program in conjunction with the inputs of the fragment shader
to be sure the attributes match up correctly.
The new 'linked_program_pair' class keeps track of the associations
between vertex and fragment shaders. It's also the place where the TGSI
tokens are kept since they're no longer per-program state but per-linkage.
Still a few loose ends, like implementing some kind of hash/lookup table
for linked_program_pairs.
2007-09-25 14:29:11 -06:00
Brian
f9ed2fdaac
translate Mesa programs to TGSI programs (formerly in st_atom_[fv]s.c)
2007-09-25 14:22:13 -06:00
Brian
07ef3e4245
vertex/fragment shader state and linking
2007-09-25 14:21:18 -06:00
Brian
ff08c7b032
test for presence of both front and back color vertex slots
2007-09-25 14:18:17 -06:00
Brian
608914aeb0
remove unused lookup array
2007-09-25 14:16:53 -06:00
Keith Whitwell
a37e0daeb9
First attempt at building vertex buffers post-clip.
...
Build a buffer of contigous vertices and indices at the backend of our
software transformation/clipping path. This will become the mechanism
for emitting buffers of vertices to rasterization hardware.
This is similar to but not the same as the post-transform vertex cache.
In particular, these vertices are subject to clipping, culling, poly offset,
etc. The vertices emitted will all be used by hardware.
TODOs include the actual transformation to hardware vertex formats, moving
this out of softpipe to somewhere more useful and allowing >1 primitive to
share the generated VB.
2007-09-25 13:23:20 +01:00
keithw
45b37dc078
turn off shader debug
2007-09-25 13:21:57 +01:00
keithw
0940059f8b
test against -1 for front/back attrib
2007-09-25 13:21:57 +01:00
michal
c0dd02219d
Enable SSE2 for FS.
2007-09-24 12:32:26 +01:00
Zack Rusin
c0afc92f00
In here we actually do want to assign it. Fix compilation.
2007-09-24 05:43:07 -04:00
Brian
1ae7373ac5
invert draw_vertex_cache_check_space()
2007-09-21 12:37:13 -06:00
Brian
ac394414fc
added PSIZE
2007-09-21 12:36:59 -06:00
Brian
890125d3ad
fix some post-transform vertex layout issues (bcolors, psize emitted last
2007-09-21 12:21:05 -06:00
Brian
da45890818
Fix up some point size breakage. Start on fogcoord too.
2007-09-21 12:06:08 -06:00
Brian
46f606e971
reenable some clear code that was temporarily disabled
2007-09-21 11:55:28 -06:00
Brian
440a5c7c24
remove debug printfs
2007-09-21 11:54:57 -06:00
Brian
a3a8887e57
comments
2007-09-21 11:34:28 -06:00
Brian
1ce50d8bd9
use VERT_ATTRIB_MAX for loop limit
2007-09-21 11:34:20 -06:00
Brian
1199605088
remove SEMANTIC_TEXCOORD
2007-09-21 11:22:34 -06:00
Brian
e9259ad0d7
Get rid of TGSI_SEMANTIC_TEXCOORD and just use TGSI_SEMANTIC_GENERIC.
2007-09-21 11:20:29 -06:00
Brian
97b81eb98f
rename index var from i to attr, use FRAG_ATTRIB_MAX instead of 16
2007-09-21 11:14:49 -06:00
Brian
8d987d3c4e
minor renaming
2007-09-21 11:14:49 -06:00
Brian
9f96c5d619
pass vs output semantics to tgsi_mesa_compile_vp_program() to generate output DECs
2007-09-21 11:14:49 -06:00
Brian
f38881c542
fix in/out typos
2007-09-21 11:14:49 -06:00
Brian
ed10ece932
Pass vertex program input semantics into tgsi_mesa_compile_vp_program() to produce DCLs.
2007-09-21 11:14:49 -06:00
Brian
562c941063
fix 1/i typos
2007-09-21 11:14:49 -06:00
José Fonseca
ae58f38fee
Fix the doxygen target in the top-level Makefile.
2007-09-21 16:47:56 +01:00
Zack Rusin
42df29d3b9
Convert i915 to use cso semantics of alpha_test.
2007-09-21 07:06:19 -04:00
Zack Rusin
6cb87cf26f
Make the alpha test state a cso.
2007-09-21 07:00:20 -04:00
Zack Rusin
b0fa489eba
Silence a few warnings.
2007-09-21 04:56:39 -04:00
Brian
154335d53f
remove :5 form format field in pipe_surface, makes no difference at this time
2007-09-20 19:06:26 -06:00
Brian
1bf93fccdf
remove old code in src_vector()
2007-09-20 15:32:18 -06:00
Brian
f69b5c56fe
Clean-up the TGSI_SEMANTIC tokens, introduce semantic indexes.
...
Still need to produce decl instructions for vertex shaders...
2007-09-20 14:47:22 -06:00
Brian
478d1e2c9c
remove old/used code
2007-09-20 14:08:09 -06:00
Brian
064daf319c
remove lots of dead code related to program input/output mapping
2007-09-20 14:03:00 -06:00
Brian
a8834a75a5
obsolete
2007-09-20 13:58:47 -06:00
Brian
c231a9d020
remove #includes of tgsi_attribs.h
2007-09-20 13:58:12 -06:00
Brian
674d013069
checkpoint: TGSI_ATTRIB_x tokens no longer used
2007-09-20 13:50:53 -06:00
Brian
086734502a
Checkpoint: vertex attribute clean-up.
...
Remove/disable the attrib/slot mapping arrays in a few places.
Work in progress...
2007-09-20 13:43:23 -06:00
Brian
745f0cbe05
Always update st->state.vs, not just when the program is dirty.
...
This fixes a regression in the cubemap.c demo which alternates between
two different vertex shaders.
2007-09-20 13:43:23 -06:00
Brian
768302c539
remove unused lookup[]
2007-09-20 13:43:23 -06:00
Brian
b5908a7671
fix input/output typos
2007-09-20 13:43:23 -06:00
Zack Rusin
742e32a40b
Cache the i915 sampler state.
2007-09-20 12:34:31 -04:00
Zack Rusin
cc2629f591
Make the rasterizer state in i915 use the cso semantics.
2007-09-20 11:33:35 -04:00
Zack Rusin
893f9cda76
Allow drivers to cache the template in case they want to
...
fallback through softpipe which will require the template.
2007-09-20 11:33:05 -04:00
Zack Rusin
1d8c31b47b
Rewrite the depth_stencil state handling in i915.
...
Done to match the new cso semantics. translate in create,
use in bind and later delete.
2007-09-20 10:28:20 -04:00
Zack Rusin
7a06c026ad
Fix failover state binding and convert the sampler to use the new
...
state constant state object semantics.
2007-09-20 10:07:10 -04:00
Zack Rusin
a6c0c5532f
Convert depth_stencil state to the new semantics.
2007-09-20 08:35:10 -04:00
Zack Rusin
daf5b0f41b
Switch fragment/vertex shaders to the new caching semantics.
...
Allow driver custom allocation within cached objects. The shaders
are currently twiced (by cso layer and by the program itself).
2007-09-20 07:50:33 -04:00
Brian
37cf13ed9a
Checkpoint: replacement of TGSI_ATTRIB_x tokens with input/output semantics.
...
TGSI_ATTRIB_x tokens still present and used in a few places.
Expanded set of TGSI_SEMANTIC_x tokens for describing the meaning
of inputs/outputs. These tokens are in a crude state ATM.
Lots of #if 0 / disabled code to be removed yet, etc...
Softpipe and i915 drivers should be in working condition but not heavily tested.
2007-09-19 18:53:59 -06:00
José Fonseca
83a674a7af
Update linux-profile config.
2007-09-19 23:48:07 +01:00
Zack Rusin
a0e948f3aa
Fix a really stupid mistake that Michel hit. Return proper hash.
2007-09-19 15:29:48 -04:00
Michel Dänzer
c9a5ef1a1c
Fix window resizes.
...
The memcmp is insufficient for eliminating redundant framebuffer state changes.
2007-09-19 20:40:09 +01:00
Michel Dänzer
617b39ce98
Pad surface dimensions to multiples of 2.
...
Avoids an assertion failure with softpipe if requested width or height is odd.
2007-09-19 20:40:09 +01:00
Zack Rusin
b8ecec7abe
Adding proper includes often helps with the warnings,
...
or so i hear..
2007-09-19 14:14:03 -04:00
Zack Rusin
c8650b0874
Avoid redundant reallocation of the template.
...
cso already allocated the template for us. Returning 0 means
we have no driver specific representation and just want
the template on the bind.
2007-09-19 14:06:19 -04:00
Zack Rusin
fe555c39bb
Convert the rasterizer cso to the new semantics.
...
Basically make cso hold the driver specific struct, while
managing the template.
2007-09-19 14:01:18 -04:00
Zack Rusin
b6d50abd7d
Convert the i915 driver blend state to the new semantics.
2007-09-19 13:12:09 -04:00
Zack Rusin
c0bf732208
Redo the cso cache to map driver data in a lot more pleasing way.
...
Drivers can now create whatever they want from the state template. We
use cso_state object to store the template (necessary during lookups),
and the driver data. Convert blend state to the new semantics.
2007-09-19 13:12:09 -04:00
Brian
b3cc74aa44
grab vertex program pointer after state validation
2007-09-19 10:16:46 -06:00
Michel Dänzer
bcc13fd3f8
Only generate vertex shader code when necessary.
2007-09-19 16:39:04 +01:00
Zack Rusin
f22e920f47
Finish up conversions of shaders to immutable objects.
...
Create/Delete calls should be split since in create we'll be
compiling them so we want to know which one it is (vertex/fragment).
2007-09-19 06:46:32 -04:00
Brian
bb611c5f1f
Checkpoint: rework shader input/output register mapping.
...
This is a step toward removing TGSI_ATTRIB_ tokens.
Basically, when translating Mesa programs to TGSI programs, pass in input and
output register re-maps, plus interpolation info.
There's some known breakage (cubemap.c) so more to be done...
2007-09-18 19:38:35 -06:00
Brian
63be96bdc7
temporarily set the FRAG_BIT_FOGC bit in InputsRead when fog is enabled
2007-09-18 19:38:35 -06:00
Michel Dänzer
3f0e04e0e6
intel_winsys: Disable scheduled buffer swaps for now.
...
They don't work with private back buffers yet.
This gets vsync working.
2007-09-18 21:50:31 +01:00
Michel Dänzer
d39dde6ed4
Fix linux-dri-x86 target.
2007-09-18 21:49:43 +01:00
Brian
6fbbeed690
use perspective projection, press r/R to rotate the quad
2007-09-18 12:56:23 -06:00
Brian
2a460f6185
Fix some issues with perspective-corrected interpolation.
...
In mesa_to_tgsi.c, use TGSI_INTERPOLATE_PERSPECTIVE by default (to match
post-transform vertex info convention). More to be done there...
In sp_quad_fs.c, interpolate W in addition to Z. This fixes the divide
by zero happening in perspective_interpolation() tgsi_exec.c
As it was, we were only getting perspective correction of texture coords
used by the TGSI_TEX instruction since it does a homogeneous divide.
Other coords/varyings were incorrect.
2007-09-18 12:56:23 -06:00
Brian
72b0a57cfa
additional comments for tri_persp_coeff()
2007-09-18 12:56:22 -06:00
Zack Rusin
ccd63b54cf
Convert shader to an immutable state object.
2007-09-18 13:24:44 -04:00
Zack Rusin
498a1b5dc4
Add emacs dirvars file with Mesa indention definition.
2007-09-18 10:02:51 -04:00
Zack Rusin
de69fc1703
Finishing up rename of the setup state to the rasterizer state.
2007-09-18 10:02:16 -04:00
Zack Rusin
fbb2f840ae
move cso cache to the pipe directory
2007-09-18 07:20:14 -04:00
Zack Rusin
29789ca026
Fix a silly bug on setting samplers.
...
Bind when the currently bound state is /not/ the one
we just found/created.
2007-09-18 07:19:12 -04:00
Zack Rusin
294401814d
converting the setup state to immutable object and renaming it to rasterizer state
2007-09-18 07:18:12 -04:00
Zack Rusin
d6ac959833
Combing depth and stencil objects and making them immutable.
...
Converting depth and stencil objects into a single state object
(d3d10 like) and making it immutable.
2007-09-18 06:31:22 -04:00
Zack Rusin
56edb98d97
Fix the warning.
...
The const is there to enforce the immutable state of the object,
which is in reality owned by the pipe so just cast away the
constness.
2007-09-18 06:31:22 -04:00
Zack Rusin
f117327a3f
Make sampler an immutable state object.
...
Switch the sample to be an immutable state object.
2007-09-18 06:31:22 -04:00
Zack Rusin
e16c045b83
Implementing a better hash, removing state_tracker dependency from the cache.
...
Replacing mesa's main hash with one that handles collisions, moving state_tracker
related caching to the state tracker to keep cso cache independent of it. Cleanups.
2007-09-18 06:31:22 -04:00
Zack Rusin
9780327c5d
First stab at immutable state objects (create/bind/delete)
...
We want our state objects to be immutable, handled via the
create/bind/delete calls instead of struct propagation.
Only implementing the blend state to see how it would look like
and work.
2007-09-18 06:31:22 -04:00
Brian
ffacb1c12a
Replace GL_TEXTURE_* tokens with PIPE_TEXTURE_*
...
Must have missed this a while back. This fixes cube mapping.
2007-09-17 15:44:59 -06:00
Brian
b4bacd1fca
Plug in selection/feedback code.
...
Not quite finished yet.
Selection/feedback are done with a private instance of the 'draw' module
in the state tracker. Not quite all the draw context's state is set yet,
namely vertex format info. Hold off on that for a bit...
2007-09-17 14:24:11 -06:00
Brian
2a40c71fed
selection/feedback support
2007-09-17 14:22:49 -06:00
Brian
060a638027
s/bugmgr/bufgr/
2007-09-17 12:18:32 -06:00
Brian
72d7d2bcc3
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-09-17 12:07:29 -06:00
Keith Whitwell
5578f8ce3b
Remove non-meaningful region_idle() interface
...
This is already handled by the semanics of map(), etc.
2007-09-17 18:04:03 +01:00
Brian
f48e055c10
silence warning
2007-09-17 10:05:34 -06:00
Brian
9ea91974e1
update begin/end_query() functions
2007-09-17 10:05:21 -06:00
Michel Dänzer
bf92350b5b
Fix linux-dri-x86 build.
2007-09-17 13:22:51 +01:00
Michel Daenzer
d59c95bfae
intel_winsys: Fix intel_buffer_reference.
...
Correctly clear the pointer to the old buffer (not sure how this could build at
all before...) and only reference the new one when its pointer is non-NULL.
2007-09-14 15:53:52 +01:00
Michel Daenzer
c01a5ec3d6
intel_winsys: Adapt to recent drm changes (s/pipes/planes/).
2007-09-14 15:48:54 +01:00
Brian
09fbb3837b
Implement query object interface.
...
This replaces the temporary occlusion counter functions we had before.
Added new ctx->Driver.WaitQuery() function which should block until the result is ready.
Sketch out some code for vertex transformation feedback counters.
2007-09-11 16:01:17 -06:00
Brian
5620d66e36
vertex feedback functions
2007-09-10 17:02:58 -06:00
Brian
6275b40063
merge buffer_unreference(), buffer_reference()
2007-09-10 16:52:05 -06:00
Brian
051a2a3028
clean-ups, comments
2007-09-10 16:35:16 -06:00
Brian
c3f7f3124a
s/xm_softpipe.c/xm_winsys.c/
2007-09-10 16:32:24 -06:00
Brian
b06641eb4a
Rename
2007-09-10 16:31:24 -06:00
Brian
d56a3adc30
More work on vertex feedback / glRasterPos. Basic rasterpos works now.
2007-09-10 16:29:23 -06:00
Brian
b2dfe2be6c
added st_cb_rasterpos.c
2007-09-10 16:28:39 -06:00
Brian
bee148cb7d
plug in rasterpos/feedback code
2007-09-10 16:28:27 -06:00
Brian
bb193c6d22
glRasterPos function
2007-09-10 16:28:10 -06:00
Brian
21c925f491
move FLUSH_CURRENT
2007-09-10 16:27:07 -06:00
Brian
63a51aee86
Initial work for post-transformed vertex feedback buffers.
...
This will be used for:
GL_NV_transform_feedback, or similar GL3 functionality
glRasterPos
GL selection/feedback modes
2007-09-06 17:07:09 -06:00
Brian
41ddd76b98
Initial work for post-transform vertex feedback buffers.
...
This will be used for:
GL_NV_transform_feedback, or GL3 equivalent.
RasterPos
GL select/feedback modes
2007-09-06 17:03:54 -06:00
Brian
4c01d498fa
Move guts of glRasterPos down into T&L module.
2007-09-06 17:02:07 -06:00
Brian
f2f168d0f8
Move guts of glRasterPos into tnl module, called via new ctx->Driver.RasterPos() function.
2007-09-06 14:26:35 -06:00
Brian
9a11a4a8b4
move some protos from draw_vertex.h to draw_private.h
2007-08-31 11:28:31 -06:00
Brian
2e21058e3d
Define attrib_format and interp_mode enum typedefs and use where appropriate.
2007-08-31 11:27:16 -06:00
Brian
898d68a376
Consolidate vertex-related code in new draw_vertex.c
...
A few functions which were basically duplicated between softpipe and the
i915 driver are now re-used:
draw_emit_vertex_attr()
draw_compute_vertex_size()
2007-08-30 16:49:24 -06:00
Brian
963b8a7449
Remove dependency on TGSI_ATTRIB_x tokens in draw_twoside.c
...
Added a new draw_set_twoside_attributes() function for specifying which
vertex attributes are to be copied/replaced when a polygon is back-facing.
2007-08-30 16:37:56 -06:00
Brian
c9e133eab4
fix breakage from prev commit
2007-08-30 16:04:10 -06:00
Brian
8f1a0decad
fix unhandled switch/case warning
2007-08-30 16:01:23 -06:00
Brian
050837045f
more usage info
2007-08-30 14:44:40 -06:00
Brian
f726ffd060
test flat shading w/ clipping
2007-08-30 14:43:59 -06:00
Brian
942b9bc5bc
In draw_flatshade.c use vertex_info->interp_mode[] to choose attribs/colors to cpy.
...
One less dependency on the TGSI_ATTRIB_x flags.
This requires setting the vertex_info->interp_mode[] values in the i915 driver and passing them to draw_set_vertex_attributes().
2007-08-30 14:43:08 -06:00
Brian
aaf03b9486
Fix lost edge flags problem when clipping.
...
In emit_poly() we need to compute header.edgeflags from the vertex
edge flags. Also need to set header.det so later stages can determine
front/back orientation.
2007-08-30 14:43:08 -06:00
Brian
2d187672b7
Sketch out per-vertex point size.
...
The code is all in place, but mostly disabled for now:
In t_vp_build.c, write the VERT_RESULT_PSIZE register
In sp_state_derived.c, need to emit vertex point size if drawing points.
In setup_point() use the point size from the vertex.
2007-08-30 14:43:08 -06:00
michal
e62b9241d2
Add p_compiler.h.
2007-08-29 22:35:28 +01:00
michal
a6e2b76fb5
Break GL dependencies.
2007-08-29 22:35:28 +01:00
michal
6468e68466
Break GL dependencies.
2007-08-29 22:35:28 +01:00
michal
86fe5f235b
Break GL dependencies.
2007-08-29 22:35:28 +01:00
michal
529c411e40
Break GL dependencies.
2007-08-29 22:35:28 +01:00
michal
5c337508fe
Fix ffs().
2007-08-29 22:35:28 +01:00
Keith Whitwell
874b926560
Split out vertex shader/cache/fetch functionality from draw_prim.c
2007-08-27 19:30:11 +01:00
keithw
b0455958cc
add missing files
2007-08-25 22:05:16 +01:00
keithw
3f8b5e3951
fix frag vs vertex typo
2007-08-25 22:01:32 +01:00
keithw
4185da4681
add names to tracked state atoms to improve debug
2007-08-25 22:01:32 +01:00
Keith Whitwell
07d97e80e6
checkpoint in constant tracking rework
2007-08-25 22:01:32 +01:00
keithw
599ba515f9
remove unneeded dirty flag
2007-08-25 22:01:32 +01:00
Brian
def8bb784c
code re-org, minor improvements
2007-08-24 19:36:23 -06:00
Brian
b4a8175da0
s/==/=/
2007-08-24 18:50:56 -06:00
Brian
703140bbd5
Fix fragment program color output mapping (0=depth, 1=color)
2007-08-24 18:26:42 -06:00
Brian
29dc25bcfe
check for USE_X86_ASM or SLANG_X86 in st_delete_program()
2007-08-24 18:19:50 -06:00
Brian
b7de64c46c
set I915_NEW_VERTEX_FORMAT in calculate_vertex_layout(), fixes demos/texenv
2007-08-24 18:08:23 -06:00
Brian
59e7bfa1de
Add support for more surface types in sp_surface.c
...
replace PIPE_FORMAT_U_L8_A8 with PIPE_FORMAT_U_A8_L8
2007-08-24 18:08:23 -06:00
michal
4fd7bc00f0
Hook-up SSE2 to VS.
2007-08-24 17:51:12 +01:00
michal
2c7b74725b
Indent. Remove GL dependencies. Simplify. Add rtasm instructions.
2007-08-24 16:23:02 +01:00
michal
b5c14b36ad
Add tgsi_sse2.
2007-08-24 12:53:19 +01:00
Brian
cd93682530
remove deleted i915_state_fragprog.c
2007-08-24 12:38:31 -06:00
Brian
57394f3446
fix a tracking of changed lighting state
2007-08-24 12:10:31 -06:00
Brian
6ef1bdbdaa
add some warnings about bitmaps/copypixels
2007-08-24 12:10:31 -06:00
keithw
e648a86601
disable debug
2007-08-24 11:25:42 +01:00
keithw
d36e01aa94
remove dead file
2007-08-24 11:25:07 +01:00
keithw
7a1027cd40
have to check I915_HW_SAMPLER when emitting MAP state, because of sampler_enable_flags.
2007-08-24 11:25:07 +01:00
keithw
b4d8be235b
sampler state tweaks
2007-08-24 11:25:06 +01:00
Brian
f9a77a3080
Fix user-defined clip planes. They seem to work properly now.
...
The bits for the N user-defined planes are now set in the vertex_header->clipmask.
See some detailed comments about this in the clip_line() function.
CLIP_USER_BIT no longer exists.
2007-08-24 11:06:13 -06:00
Brian
6a13caec09
re-enable compute_clipmask() call
2007-08-24 11:06:13 -06:00
Brian
6998402016
emit S4_VFMT_XYZ vs. S4_VFMT_XYZW as needed
2007-08-24 11:06:13 -06:00
Keith Whitwell
c89502bb4e
Fixup include paths after rename
2007-08-24 10:01:20 +01:00
Keith Whitwell
f93a360319
Rename tgsi "core" directory
2007-08-24 10:01:03 +01:00
Brian
c50e054bd4
track more vertex-related state changes
2007-08-23 21:59:48 +01:00
Brian
7fe0934148
added GL_STENCIL_INDEX8_EXT
2007-08-23 21:59:27 +01:00
Brian
17598ad591
fix-up stencil buffers
2007-08-23 21:59:06 +01:00
Brian
ac8249d0ed
check for null ptr in xm_buffer_unreference()
2007-08-23 21:39:51 +01:00
Brian
440e794b05
Use vertex_info struct for softpipe - lots of clean-up.
2007-08-23 19:28:59 -06:00
Brian
d4883ee24c
remove dead code
2007-08-23 19:05:38 -06:00
Brian
e967b246ec
Vertex shader outputs are now tightly packed into the output slots.
...
Fix softpipe vertex attribute setup.
Also, update vs constants when the projection matrix changes (fixes samples/prim.c)
2007-08-23 19:03:42 -06:00
Brian
30236573da
Need to copy header->edgeflags to tmp when creating new prim_header.
...
Edge flags were random/undefined otherwise.
2007-08-23 18:54:51 -06:00
Brian
c998ce1df0
minor improvement to get_vertex() in-use flag setting
2007-08-23 17:59:17 -06:00
Brian
38091ef42a
fix an edgeflag logic error, see comments
2007-08-23 17:57:08 -06:00
Brian
eef2e35981
fix incorrect vertex index for POLYGON drawing
2007-08-23 17:41:03 -06:00
Brian
d6d995d20c
get rid of VERT_RESULT_ usage
2007-08-23 17:40:19 -06:00
Brian
7d5e7f0319
map Mesa vertex attribs/arrays to TGSI attribs
2007-08-23 17:39:52 -06:00
Brian
d8b16d416d
Checkpoint: new vertex/fragment attribute naming
...
Replace VF_ATTRIB_x with TGSI_ATTRIB_x
When converting mesa programs to TGSI programs, also convert the InputsRead
and OutputsWritten to a mask of TGSI_ATTRIB_ bits.
Still need to do conversion for vertex programs...
2007-08-23 17:00:47 -06:00
Brian
83547d1dca
TGSI_ATTRIB_ tokens
2007-08-23 16:59:08 -06:00
Brian
074f07176a
define new TGSI_ATTRIB_ tokens for program inputs/outputs, plus translation functions
2007-08-23 14:58:26 -06:00
Brian
ba50b6958a
comment about code duplication
2007-08-23 14:56:00 -06:00
Brian
399077d760
clean-up comments
2007-08-23 14:55:43 -06:00
Brian
6d88515190
remove dead/debug code, misc clean-up
2007-08-23 13:41:23 -06:00
Brian
d3eb25c575
Checkpoint commit: i915 texture works, use new vertex_info struct
...
Basic i915 2D texturing seems to work now.
The vertex format is determined from the current fragment shader.
2007-08-23 13:27:18 -06:00
Brian
690a9de40b
Define a re-usable vertex_info structure to describe vertex layouts.
...
This also includes legacy #defines for VF_ATTRIB_*, FRAG_ATTRIB_*, etc tokens.
Those will go away eventually, but at least we no longer need vf/vf.h
2007-08-23 13:25:46 -06:00
Brian
ef7c250900
For the time being, interpolate Z in shade_quad() rather in the shader.
...
This was causing trouble for the i915 driver.
2007-08-23 13:24:06 -06:00
Brian
c990d0fd57
Checkpoint: texture image and sampler state handling, plus better vertex format code.
...
Texture image/sampler state code should be working, but is disabled for now.
Need to fix outstanding issues with vertex formats and texcoords first...
2007-08-22 18:52:40 -06:00
Brian
ace2b98dd3
fix assertions in swizzle()
2007-08-22 18:52:40 -06:00
Brian
69ab4b23f5
more debug output
2007-08-22 18:52:40 -06:00
Brian
fa8cbc45e8
Need to store vendor and renderer strings in the context.
...
As it was, we always returned the same pointer. So glxinfo, which calls
glGetString() before printing anything, was printing the same string for
both vendor and renderer.
2007-08-22 18:52:40 -06:00
Brian
e9190ec534
remove old draw_vertices()
2007-08-22 18:52:39 -06:00
michal
e94ea99254
Add deco_caps.c.
2007-08-22 17:37:32 +01:00
michal
89c0d32b45
First pass on tgsi deco.
2007-08-22 17:21:02 +01:00
michal
6b6cc4c0fe
Include headers.
2007-08-22 16:38:00 +01:00
michal
fa8c74fcc9
New file.
2007-08-22 16:24:35 +01:00
michal
d866e648ae
New file.
2007-08-22 16:17:41 +01:00
Brian
be673e9719
Sampler state code now compiles and is built. Not tested yet.
2007-08-22 13:33:19 -06:00
Brian
d45dd5672a
added border_color to sampler state
2007-08-22 13:30:26 -06:00
Brian
8a868919b5
Improved pipe_region/surface_reference() functions
...
Now dereferences the old object first.
Target object may be NULL to clear the pointer.
2007-08-22 12:41:59 -06:00
Brian
c0bb4ba9e6
Rework of shader constant buffers.
...
They're now totally independent of the actual shaders.
Also, implemented in terms of pipe_buffer_handles/objects.
2007-08-22 12:26:46 -06:00
Keith Whitwell
d1fbf621dc
Import some sampler state code.
...
Doesn't compile, isn't built.
2007-08-22 10:34:38 +01:00
Brian
5ac22877c9
code movement, null ptr checks, etc
2007-08-22 10:04:45 -06:00
Brian
e7f814e034
remove unneeded include
2007-08-22 10:04:36 -06:00
Brian
4ed87bf229
remove unneeded includes
2007-08-22 10:04:16 -06:00
Brian
0e87617255
Obsolete.
2007-08-22 09:41:51 -06:00
Brian
c8c616d33c
don't need i915_fpc.c
2007-08-22 09:41:32 -06:00
Brian
2154d1c5ac
implement negation for src operands
2007-08-22 09:41:20 -06:00
Keith Whitwell
d021381d4e
Clear all the dirtyflag words
2007-08-22 09:01:34 +01:00
Keith Whitwell
9606cb15e7
Remove duplicate i915 shader disassembler
2007-08-22 09:01:34 +01:00
michal
5c086518f1
Headers.
...
Fix alignment issues.
Silence compiler warnings.
More debugging code.
2007-08-21 20:47:31 +01:00
michal
eb51761b82
Silence compiler warnings.
2007-08-21 20:45:09 +01:00
michal
044c19e6b3
Define __MSC__.
...
Make ALIGN macros more error-proof.
2007-08-21 20:42:33 +01:00
Brian
af3d6c83d2
temporarily call _mesa_enable_sw_extensions() so we can run more test progs without failing the extension checks
2007-08-21 20:18:58 -06:00
Brian
88e12872fa
comments
2007-08-21 20:18:58 -06:00
Brian
0d9bcdbeb1
Fragment shader translation seems to basically work now. More testing needed.
2007-08-21 20:18:58 -06:00
keithw
d70d41eefc
fix cut and paste
2007-08-21 19:49:46 +01:00
Keith Whitwell
ce4659e92a
First pass at a fallback concept for pipe devices.
...
Creates a new pipe driver that feeds commands to either a hardware or
software pipe depending on fallback state.
Untested concept checkpoint. At this point it compiles.
2007-08-21 19:46:48 +01:00
Keith Whitwell
93c7173ed2
Add missing #include
2007-08-21 17:34:13 +01:00
Brian
d97f90b93e
added fpc sources
2007-08-21 16:24:48 -06:00
Brian
3af1f3b922
Initial check-in of i915 fragment program translation (from tgsi).
2007-08-21 16:24:38 -06:00
Brian
d640198b2d
Set viewport state so viewport matches window dims.
...
trivial/readpixels.c works again.
2007-08-20 21:45:14 +01:00
Brian
3cb6fc3f9a
Move vertex transformation/shader code into draw_prim.c to avoid need for vs_flush() function pointer.
2007-08-20 18:53:41 -06:00
Brian
3772441c49
move ALIGN16-related macros into p_compiler.h
2007-08-20 18:45:14 -06:00
Brian
79b8f97457
include draw_context.h
2007-08-20 18:44:53 -06:00
Brian
d054331c47
Update glClear and glDrawPixels code.
...
Since they're implemented by drawing quadrilaterals (and go through vertex
transformation and viewport mapping) we don't have to invert Y coords.
2007-08-20 18:24:02 -06:00
Brian
c1fbd72adc
minor clean-ups
2007-08-20 17:26:00 -06:00
Brian
3239532795
Use new draw_arrays() code.
...
The i915 driver now uses the software-based vertex shader interpreter
and draws everything through pipe->draw_arrays().
2007-08-20 17:25:38 -06:00
Brian
a17d5361b2
remove the -DMESA flags
2007-08-20 17:02:27 -06:00
Brian
766fa51537
remove some of the #ifndef MESA stuff
2007-08-20 17:02:07 -06:00
Brian
ddf8ba2d1b
Obsolete
2007-08-20 16:48:55 -06:00
Brian
9d9e838974
remove dead code related to vf module
2007-08-20 16:43:58 -06:00
Brian
8175eaa3b4
Checkpoint: remove more of the old draw_vb() code.
2007-08-20 16:31:12 -06:00
Brian
51da8ee85e
Start to remove the temporary draw_vb() and draw_vertices() code.
...
new st_draw_vertices() utility used by glClear and glDrawPixels
2007-08-20 16:21:08 -06:00
Brian
0a262998ef
Move guts of vertex array drawing into the 'draw' module.
2007-08-20 15:11:11 -06:00
Brian
a83b72a672
implement DrawElements, still some rough spots
2007-08-20 12:52:33 -06:00
Brian
1dd55a77c8
implement draw_elements()
2007-08-20 12:52:00 -06:00
Brian
730df7662f
don't map element buffer in _mesa_validate_DrawElements() unless necessary
2007-08-20 12:50:34 -06:00
Brian
7d14c3e538
remove debug printf
2007-08-20 11:53:36 -06:00
Brian
98d30cb2d4
call draw_trim()
2007-08-20 11:49:16 -06:00
Brian
904163e4e9
fix cache overflow bug in get_vertex()
2007-08-20 11:41:23 -06:00
Brian
f252974121
fix VBO clean-up in vbo_exec_vtx_destroy()
2007-08-20 11:05:35 -06:00
Brian
df1df82f16
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-08-20 10:23:28 -06:00
Brian
14327705fd
Fix some draw_arrays issues.
...
We weren't mapping all the needed vertex array buffers.
Move array state that was temporarily in draw_context to softpipe_context.
Remove a bunch of dead code.
2007-08-19 17:31:21 +01:00
Brian
0453760a0b
more work on vertex shaders, now using vertex shaders instead of TnL module by default
2007-08-18 16:06:49 +01:00
Brian
1f026d98dd
Create a default vertex attribute buffer which mirrors ctx->Current.Attrrib[]
...
Used when the vertex shader references attributes which aren't present in VBOs.
2007-08-18 16:05:49 +01:00
Brian
b3f067e859
added tnl state atom
2007-08-18 16:04:49 +01:00
Brian
7274e14d4a
fix xm_buffer_data
2007-08-18 09:22:15 +01:00
Brian
8339ca7d1e
replace memcpy() with assignment, better type safety
2007-08-17 12:40:35 -06:00
Brian
74e58c5b82
added CLIP_x_SHIFT vals
2007-08-17 12:34:40 -06:00
Brian
48b09322ee
write outputs according to vs.outputs_written
2007-08-17 12:31:13 -06:00
Brian
a2805a8165
added outputs_written field to pipe_shader_state
2007-08-17 12:30:30 -06:00
Brian
4973136e20
load machine.Inputs based on vs.inputs_read
2007-08-17 12:23:26 -06:00
Brian
a30939714c
added pipe ptr to draw_context
2007-08-17 12:19:40 -06:00
Brian
e3647578d1
compute clipmask
2007-08-17 12:09:50 -06:00
Brian
7668e53c8c
define CLIP_LEFT/RIGHT etc
2007-08-17 12:09:31 -06:00
Brian
83f428e799
shade four vertices at a time
2007-08-17 11:40:53 -06:00
Brian
cd3162f578
added align16() function
2007-08-17 11:40:06 -06:00
Brian
2fc54f5bb5
added uint64 type
2007-08-17 11:39:45 -06:00
Brian
8e4ed6323d
added null VB->AttribPtr[i] check
2007-08-17 15:38:29 +01:00
Brian
bc3f87683a
fix edgeflag bug
2007-08-17 15:37:22 +01:00
Brian
c5004c7db6
pack output vertex attributes in sequential slots
2007-08-17 15:28:17 +01:00
Brian
1e6d1ab6fc
tell vbo module to use bufferobjs
2007-08-17 15:27:18 +01:00
Brian
305b83a415
added call to _mesa_load_state_parameters()
2007-08-17 15:27:00 +01:00
Brian
5568a7d301
added vbo_use_buffer_objects() to specify that immediate mode data should be put into bufferobjects
2007-08-17 15:26:33 +01:00
Brian
89cda7bdc8
replace assertion w/ conditionals in xmesa_clear()
2007-08-17 10:50:06 +01:00
Brian
5b59e6116d
Use simple st->pipe->clear() in more cases for depth/stencil clears.
2007-08-17 10:49:36 +01:00
Brian
ae64d5c173
fix buffer clearing problems
2007-08-17 10:28:20 +01:00
Brian
93efcf50fa
assertions
2007-08-17 10:27:53 +01:00
Brian
04f2078860
added assertions, disable debug output
2007-08-17 10:27:37 +01:00
michal
24b2f30410
Break mesa dependencies.
...
Silence compiler warnings.
2007-08-16 19:50:08 +01:00
michal
f692cdb544
Silence compiler warnings.
2007-08-16 19:49:04 +01:00
michal
1b19aa522a
Break mesa dependencies.
...
Silence compiler warnings.
2007-08-16 19:47:18 +01:00
michal
2f559606dc
Silence compiler warnings.
2007-08-16 19:45:55 +01:00
michal
546f1fa019
Define ffs() for __WIN32__ & __MSC__.
...
Break mesa dependencies.
2007-08-16 19:44:53 +01:00
michal
bef9b40c39
Define __WIN32__.
2007-08-16 19:42:28 +01:00
michal
00b7a91508
Move VS code from st_atom_fs.c to st_atom_vs.c.
2007-08-16 18:29:45 +01:00
michal
a279b221bf
Cosmetic changes.
2007-08-16 18:17:07 +01:00
Brian
3fc926f374
Remove many dependencies on mesa headers.
...
To build with mesa, need -DMESA in makefile/config file.
2007-08-16 18:11:55 -06:00
Brian
e3bdd66bf6
misc changes to support vertex shaders (disabled by default)
2007-08-16 17:33:49 -06:00
Brian
bf55f32c6f
run real vertex shaders, a total hack for now
2007-08-16 17:33:05 -06:00
Brian
78d6d5e8fe
make pass-through vertex shader
2007-08-16 17:32:24 -06:00
Brian
9ba4311e71
check for null swrast (pipe work-around)
2007-08-16 17:30:38 -06:00
Brian
de653b4c9b
Begin added vertex shader state/support.
...
Renamed pipe_fs_state to pipe_shader_state since it can be used for both
vertex and fragment shader info.
2007-08-16 13:33:43 -06:00
Brian
ebe5107669
disable Z value scaling - it's done in sp_quad_depth_test.c
2007-08-16 13:12:24 -06:00
Brian
717cc0f214
move the draw_alloc/free_tmps() functions to draw_prim.c
2007-08-16 12:57:05 -06:00
Brian
fd0a6d6b47
Remove GL/mesa types, rearrange things into more logical groups
2007-08-16 12:57:05 -06:00
michal
4fb2f09fdd
Add missing inlcude directory.
2007-08-16 12:50:51 +01:00
michal
cbef86a6ea
Copy fragment z if the fragment shader does not write depth on its own.`
2007-08-16 12:44:04 +01:00
Brian
59bd1e260b
Drawing code refactoring.
...
Move code duplicated between draw_vb.c and sp_draw_arrays.c into draw_prim.c
draw_vb.c will eventually go away, but this seems like a good step anyway.
2007-08-16 12:37:26 -06:00
Brian
926323df86
point/line/polygon drawing (factored out of draw_vb.c)
2007-08-16 12:37:25 -06:00
michal
76f9f3ee83
Silence warnings.
2007-08-16 12:17:30 +01:00
michal
4fcfab3347
Silence warnings.
2007-08-16 12:16:57 +01:00
michal
e36b27cf86
Silence warnings.
2007-08-16 12:16:27 +01:00
michal
830169414e
Silence warnings.
2007-08-16 12:13:37 +01:00
michal
9982044a8d
Use 'f' for float suffix.
2007-08-16 12:12:14 +01:00
Keith Whitwell
b0b871429d
Remove mesa include directories, be stricter about include paths.
2007-08-15 23:48:48 +01:00
Brian
5390a43ce0
translate GL texture targets to PIPE_TEXTURE_x values
2007-08-15 19:23:58 -06:00
Brian
94a4910c9a
added PIPE_PRIM_x tokens (matching GL), use in a few places
2007-08-15 19:13:03 -06:00
Brian
d9a230f30a
Hook in new draw_arrays() code, disabled for now.
2007-08-15 19:04:45 -06:00
Brian
2de9958624
softpipe_draw_arrays() function
...
Also includes:
Temporary stand-in for vertex program execution.
draw_prim() code
post-transform vertex cache
2007-08-15 19:04:45 -06:00
Brian
ab0b040b60
added new draw_arrays()
2007-08-15 19:04:45 -06:00
Brian
181cf1d52a
convert vbo->draw_prims() to pipe->draw_arrays(): works in very limited cases, disabled for now
2007-08-15 19:04:44 -06:00
Brian
3e2be1ce4a
added vertex array info fields
2007-08-15 19:04:44 -06:00
Brian
293cc25261
added draw_set_vertex_array_info()
2007-08-15 19:04:44 -06:00
Brian
24083f4e47
comment
2007-08-15 19:04:44 -06:00
michal
058b978a5a
Add UsageMask to DECLARATION in TGSI.
...
Interpolate FS attributes in the shader.
Do not copy WPOS in FS.
2007-08-15 18:16:11 +01:00
michal
b9eeb8dccf
Add declaration_semantic token to TGSI.
...
Cosmetic changes, GLuint -> unsigned.
Preserve mesa gl_fragment_program DEPTH and COLOR semantics.
2007-08-15 13:55:22 +01:00
michal
6504dc3178
Declare fragment shader output registers.
2007-08-15 13:10:25 +01:00
michal
477ab9c196
Cleanup, do not use fp_attr_to_slot[] mapping array.
2007-08-15 13:10:25 +01:00
Brian
bff0411c5a
sketch out vbo drawing function
2007-08-15 11:45:54 -06:00
Brian
f300934189
added state funcs for vertex buffer/element info
2007-08-15 11:45:12 -06:00
Brian
3f70b50438
softpipe vertex element/buffer state funcs
2007-08-15 11:44:33 -06:00
Brian
6e02b4c7c3
comments
2007-08-15 11:43:14 -06:00
Brian
c431a22f52
added some const qualifiers
2007-08-15 11:42:53 -06:00
Brian
8038d5b68c
comments, minor clean-ups
2007-08-15 11:42:37 -06:00
Brian
681b1ebd5e
use regular malloc/free instead of macros
2007-08-14 17:20:40 -06:00
Brian
9623683dfc
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-08-14 15:58:56 -06:00
Brian
267052c735
added glCopyPixels stub
2007-08-14 15:42:40 -06:00
Brian
b7316e4732
fix typo
2007-08-14 15:37:45 -06:00
Brian
d16b4bc32a
minor hack to allow 1D textures to work
2007-08-14 15:20:00 -06:00
Brian
bfcc337e38
vars to test 1D/2D textures with linear/nearest filtering
2007-08-14 15:19:37 -06:00
Brian
a34b8594b7
refactor some code - cube map textures work now
2007-08-14 15:12:04 -06:00
Brian
a13de2464d
Implement texture cache with multiple, direct-mapped entries.
2007-08-14 14:52:38 -06:00
Brian
c7722edcfd
Consolidate filter and mipmap level selection in choose_mipmap_levels().
2007-08-14 13:32:19 -06:00
Brian
f9e331a574
Implement remaining mipmap modes for 2D textures.
...
Also, add lodbias param to get_samples()
2007-08-14 13:04:07 -06:00
Brian
b4480285ed
tgsi_sampler->get_samples() now operates on a quad (returns 4 colors).
...
Lambda/level-of-detail is also computed in get_samples() now.
2007-08-14 11:00:35 -06:00
Keith Whitwell
4bb2134239
Beginnings of a demand-filled post-tnl vertex cache.
...
Probably breaks a bit of stuff, eg unfilled clipping, edgeflags, etc.
2007-08-14 15:57:30 +01:00
Keith Whitwell
8269bc48d8
Add structs and set-functions for vertex buffer, element state.
...
Not currently used.
2007-08-14 15:57:30 +01:00
Keith Whitwell
2691b18747
Add surface formats to be used for specifying vertex element layouts.
2007-08-14 15:57:30 +01:00
Keith Whitwell
70af238b49
Continue reducing dependencies on core mesa include files.
...
Mainly down to the support for legacy TNL processing now.
2007-08-14 15:57:30 +01:00
Brian
9f51e181b1
added pixelzoom cmd line opt
2007-08-13 18:20:04 -06:00
Brian
2f605fd457
set renderbuffer Width/Height = texture size
2007-08-13 18:20:04 -06:00
Brian
4698483f84
Added st_fb_orientation() function to determine the up/down orientation of the framebuffer.
2007-08-13 18:20:04 -06:00
Brian
cd308dfa79
map stencil buffer too
2007-08-13 18:20:04 -06:00
Brian
612cfb749c
added assertion to check that texture width is non-zero
2007-08-13 18:20:04 -06:00
Brian
5e1bfe426f
fix up some render-to-texture code ... almost there
2007-08-13 18:20:04 -06:00
Brian
8571c4babf
added an assertion
2007-08-13 18:20:03 -06:00
Keith Whitwell
76818b6709
Missing files
2007-08-13 16:24:24 +01:00
Keith Whitwell
40a86b2047
Start breaking the #include dependencies between pipe drivers and mesa.
...
Pipe drivers shouldn't really know much about mesa and certainly shouldn't
be #including files from src/mesa/main and the like.
I've also (in i915simple especially) moved over from GL types to
more conventional int/unsigned usage. This probably isn't really the
ultimate desired set of types to use - possibly C99 would be better. It
may even be that a subset of the GL types is preferable.
2007-08-13 16:23:44 +01:00
Brian
d46779103b
check if we have a zbuf before enabling depth_test stage
2007-08-13 15:21:01 -06:00
Brian
8cc668a4a8
fix some issues with texture/mipmap_tree state tracking
2007-08-13 15:20:08 -06:00
Brian
c271078048
with Y=0=top, front/back determination is negated
2007-08-13 15:02:50 -06:00
Brian
faa14a9ded
check for ctx==NULL in st_renderbuffer_delete()
2007-08-13 14:53:27 -06:00
Brian
b7693ee559
Draw white square in lower-left corner to test orientation
2007-08-13 14:00:03 -06:00
Brian
21b9b8b74e
fill in the get_tile() function so ReadPixels can work
2007-08-13 13:56:54 -06:00
Brian
eb450bbb40
flush pipe before reading image
2007-08-13 13:56:30 -06:00
Brian
0095be534d
Change/fix surface allocation functions.
...
Use xmesa_new_color_surface() for front/back renderbuffer surfaces.
Use xmesa_surface_alloc() for everything else (textures, other renderbuffers)
2007-08-11 21:21:12 +01:00
Brian
5d42fdb9b7
mt->pitch must be at least 16 because of 64-byte alignment in sp_region.c (fix that someday)
2007-08-11 21:19:04 +01:00
Brian
e209ca866d
do clipping in get_tile()
2007-08-11 21:18:33 +01:00
Brian
498c9e9782
added Bitmap() stub, call st_validate_state() in DrawPixels
2007-08-11 20:03:24 +01:00
Brian
24e21301e0
remove some temp pipe hacks
2007-08-11 19:57:50 +01:00
Brian
24864741c5
added st_cb_queryobj.c
2007-08-11 19:57:37 +01:00
Brian
01efb1dd8f
Begin/EndQuery functions
2007-08-11 19:56:30 +01:00
Brian
bf383d1f54
repair breakage from recent pipe_winsys re-org
2007-08-11 17:04:12 +01:00
Brian
37fdc69a99
fix invalid usage of buffer_unreference()
...
Need to pass the address of the buffer ptr, not the buffer ptr.
Before, the region->buffer type was void * so it wasn't effectively
type-checked. Changing the type to pipe_buffer_object* allows the
compiler to detect the error. Fixing this solves a segfault.
2007-08-11 17:03:51 +01:00
Brian
83521ee66a
notes/asserts for get/put_tile()
2007-08-11 17:00:56 +01:00
Brian
bec2230514
move pipe_buffer_handle definition to top of file, use it in pipe_region
2007-08-11 16:59:54 +01:00
Brian
0b13336540
remove #include mtypes.h
2007-08-11 16:59:15 +01:00
Keith Whitwell
91c2216165
Rename intel_buffers.[ch] to intel_swapbuffers.[ch]
2007-08-11 14:19:48 +01:00
Keith Whitwell
8c4409690d
Fix some build failures. Move intelScreenContext to intel_context.c
2007-08-11 14:01:37 +01:00
Keith Whitwell
a0e48b1ff9
Pull in improved debug from master
2007-08-11 14:00:19 +01:00
Keith Whitwell
2eb839ce1d
make it easier to compare debug code with non-pipe version
2007-08-11 13:06:24 +01:00
keithw
eada74dc54
add intel_lock.c to build
2007-08-11 00:20:30 +01:00
keithw
37863c3c42
remove intel_ioctl.c
2007-08-11 00:18:47 +01:00
keithw
4bc932ab29
move batch ioctl to intel_batchbuffer.c
2007-08-11 00:16:36 +01:00
keithw
20995b74c9
remove unused irq functions
2007-08-11 00:13:40 +01:00
keithw
acff996c44
move locking to new file
2007-08-11 00:10:30 +01:00
keithw
ecea02fd70
remove intelGetString()
2007-08-11 00:09:21 +01:00
Keith Whitwell
39407fd854
Move string functions to state_tracker, add queries to pipe, winsys.
2007-08-10 16:44:07 +01:00
Brian
1c8bcc733d
Y invert, clean-up
2007-08-10 16:25:21 -06:00
Brian
717831ea71
invert Y for scissor
2007-08-10 16:24:55 -06:00
keithw
fb4ff8a2a8
use winsys supported_formats() query
2007-08-10 16:12:09 +01:00
keithw
5b30113236
add missing printf
2007-08-10 16:08:45 +01:00
keithw
03a9994280
move dri_bo() to a header file
2007-08-10 16:04:17 +01:00
Brian
8fbd81b4ed
added pipe->max_texture_size() query, use it in st_drawpixels()
2007-08-10 15:48:54 -06:00
Keith Whitwell
47fc2c4349
Lift common winsys functions into pipe's new p_winsys.
2007-08-10 15:35:48 +01:00
Brian
12e3bb1a65
fix image orientation
2007-08-10 15:29:56 -06:00
Brian
04ee3cecdf
readpixels handles any format/type/packing/transfer ops now
2007-08-10 15:29:41 -06:00
Brian
bc4aa83794
setup sampler state, computed wincoords with pixel zoom factors
2007-08-10 13:30:22 -06:00
Brian
6ccdd5bb15
don't hardcode cpp
2007-08-10 13:11:47 -06:00
Brian
ce02b16dac
added st_sizeof_format()
2007-08-10 13:11:31 -06:00
Brian
34d535ad2c
glRead/DrawPixels test
2007-08-10 13:06:07 -06:00
Brian
e51aa57293
basic texture-based glDrawPixels path works
2007-08-10 13:03:57 -06:00
Brian
9cf9aa1ea2
use st_mesa_format_to_pipe_format()
2007-08-10 13:03:57 -06:00
Brian
24e510ea37
added st_mesa_format_to_pipe_format()
2007-08-10 13:03:57 -06:00
Brian
da9178c730
alignment/pitch/width clean-ups
2007-08-10 13:03:57 -06:00
Brian
48f853f73f
minor clean-ups
2007-08-10 13:03:57 -06:00
Keith Whitwell
5c2c056000
Handle glFlush/glFinish through the state tracker.
2007-08-10 12:58:26 +01:00
Brian
9ac1a8d416
pipe->region_alloc() now takes width instead of pitch, plus a flags param
2007-08-10 12:14:25 -06:00
Brian
519aacef03
fix asst glitches
2007-08-10 12:14:25 -06:00
michal
80e8538a5d
Add SGT/LT/GE/LE/EQ/NE opcodes for ps/vs_2_x.
2007-08-10 11:54:39 +01:00
michal
9cad4dde97
Support predicates.
...
Predicates, as per D3D9 spec, are a complete subset of NVIDIA's
condition codes. However, due to its broad support in non-NVIDIA
hardware, it is being exposed in TGSI to ease hw driver development.
Two decomposition functions are expected in the future.
1. GetRidOfPredicates() - predicates are implemented with condition
codes.
2. There is no second function, it's just this pesky VI that does not
allow me to move with arrow keys and so I cannot edit previous paragraphs.
2007-08-10 11:45:56 +01:00
Brian
900b0807b8
added st_cb_readpixels.c
2007-08-10 11:37:41 -06:00
Brian
6f27aabe49
use st_cb_readpixels.c
2007-08-10 11:37:21 -06:00
Brian
c943dab9a3
glReadPixels
2007-08-10 11:37:05 -06:00
Brian
9879ca019b
add missing break stmt
2007-08-10 11:36:23 -06:00
Brian
3738606a52
more render to texture work
2007-08-10 11:35:57 -06:00
Brian
137ec50994
sketch out some render-to-texture code
2007-08-10 11:17:26 -06:00
Brian
6349bd3112
remove some temporary hacks
2007-08-10 11:16:53 -06:00
Brian
0aa8b1643b
added pipe_surface_unreference()
2007-08-10 11:15:33 -06:00
Brian
3cc5b1645b
include surface.offset in address calculations
2007-08-10 11:15:15 -06:00
Keith Whitwell
30e506eb04
Clean up / sanitize debugging
2007-08-10 10:37:20 +01:00
Keith Whitwell
a27c0db260
Missing files
2007-08-10 10:23:24 +01:00
Keith Whitwell
c26d635e22
Remove dead include line
2007-08-10 10:21:42 +01:00
Keith Whitwell
07fd9ad7bb
Fix merge issue
2007-08-10 10:20:35 +01:00
Keith Whitwell
fa6815f056
Give softpipe a native texture layout of its own.
...
Basically the same as the 945's for now.
2007-08-10 10:17:51 +01:00
Keith Whitwell
938c307e45
Add printf handlers, pass pci id and move texlayout code to driver.
2007-08-10 10:17:51 +01:00
Keith Whitwell
c12b71ef93
Pass pci_id to i915_create()
2007-08-10 10:15:31 +01:00
Keith Whitwell
cb2d95ba68
Add a printf method to winsys and use for all debugging.
2007-08-10 10:15:31 +01:00
Keith Whitwell
af25ca6e69
Add a printf method to winsys. Not currently used.
2007-08-10 10:15:31 +01:00
Brian
6e3c01578e
obsolete files
2007-08-10 10:09:52 -06:00
Brian
0643ea07ca
no longer need intel_surface.c
2007-08-10 10:09:29 -06:00
Brian
8639a54319
move intel_supported_formats() into intel_context.c
2007-08-10 10:09:12 -06:00
Brian
12b0aa129e
we can now just rely on softpipe for surface creation, quad_read/write, etc
2007-08-10 10:06:57 -06:00
Brian
3654922b33
flesh out w/ more formats, y=0=top convention
2007-08-10 10:06:00 -06:00
Brian
c7dd9bf870
return (softpipe) in GL_RENDERER string - temporarily
2007-08-10 08:38:31 +01:00
Brian
f8ab24760d
rename st_cb_teximage.h st_format.h
2007-08-10 08:37:15 +01:00
Brian
1463c00d4e
Rename (file contains surface format-related functions)
2007-08-10 08:35:13 +01:00
Brian
a25dd4d407
code movement
2007-08-10 08:34:18 +01:00
Brian
d2bfdae860
invert Y axis
2007-08-10 08:33:43 +01:00
Brian
c7157065b2
change triangle orientation, fix exit()
2007-08-10 08:33:09 +01:00
Brian
3a9eca5cc0
asst changes to get softpipe rendering again (no zbuf support for now)
2007-08-09 22:56:50 +01:00
Brian
6883930f61
init strb->Base.DataType appropriately, clean-ups
2007-08-09 22:56:21 +01:00
Brian
2f4f703af1
export softpipe_init_surface_funcs()
2007-08-09 22:55:28 +01:00
Brian
ac36cdbcc1
added null ptr checks
2007-08-09 22:55:15 +01:00
Keith Whitwell
78b1a29a0d
Split texfilter enums to match common hardware usage.
2007-08-09 19:09:44 +01:00
Keith Whitwell
00677fb67c
silence warning
2007-08-09 19:09:44 +01:00
Keith Whitwell
1ac106eefd
silence warning
2007-08-09 19:09:44 +01:00
Brian
c19a95510f
more work toward texture-based glDrawPixels
2007-08-09 19:04:50 -06:00
Brian
be57c1aac4
comments
2007-08-09 19:04:28 -06:00
Brian
3d31252d44
move viewport Y inversion to state tracker
2007-08-09 18:25:50 -06:00
Keith Whitwell
7c9a1357be
Add more i915 state packets.
...
These correspond to the dynamic indirect state, though they are
currently just pushed straight to the batch buffer.
2007-08-09 18:09:09 +01:00
Keith Whitwell
b3efc75f1a
Remove unused file
2007-08-09 18:09:08 +01:00
Brian
f1637e89de
invert Y axis with the viewport transformation to put things right side up
2007-08-09 18:02:22 -06:00
Brian
584c076201
vertex colors are ARGB
2007-08-09 18:02:22 -06:00
Keith Whitwell
debb4884e3
Missing files
2007-08-09 16:45:20 +01:00
Keith Whitwell
e23966f3de
Some basic state - blend and ztest sort of work.
2007-08-09 16:44:22 +01:00
Keith Whitwell
3bf25e5516
Remove references to fallbacks from this directory
2007-08-09 16:44:22 +01:00
Brian
df338be6d7
comments, assertions, etc
2007-08-09 16:31:48 -06:00
Brian
ef5d99e083
Obsolete
2007-08-09 16:05:08 -06:00
Brian
e24c696ca8
dead code removal
2007-08-09 16:04:39 -06:00
Keith Whitwell
94fda5695e
Emit drawrect command as we no longer ask the kernel to do this.
2007-08-09 16:00:43 +01:00
Keith Whitwell
bb142746bd
Remove unused blit functions.
2007-08-09 15:52:38 +01:00
Keith Whitwell
277e4989f3
Don't reemit hardware state *every* primitive.
2007-08-09 15:46:15 +01:00
Brian
fb8caffea8
fix merge conflicts
2007-08-09 15:42:12 -06:00
Brian
0c4c86cf2c
don't use intel_read_draw_buffer.c anymore
2007-08-09 15:41:08 -06:00
Brian
3c07bbb198
assertions
2007-08-09 15:39:54 -06:00
Brian
807ecbd344
*numFormats = 3
2007-08-09 15:39:31 -06:00
Brian
3e930c3f1f
minor clean-ups
2007-08-09 14:29:48 -06:00
Brian
a4517215ca
remove intel_depthstencil.c and intel_fbo.c
2007-08-09 14:29:48 -06:00
Brian
a47c387793
Obsolete files
2007-08-09 14:29:48 -06:00
Brian
3a035d0d23
don't include intel_depthstencil.h
2007-08-09 14:29:48 -06:00
Brian
74b5cb0e6f
remove some includes
2007-08-09 14:29:48 -06:00
Brian
f5713c7d2e
Checkpoint intel_renderbuffer removal.
...
Remove surface ptr from gl_renderbuffer.
Use st_renderbuffer in most places.
More clean-up.
2007-08-09 14:29:48 -06:00
Brian
36fc648ddd
remove dead code, remove intel_fbo.h includes
2007-08-09 14:29:48 -06:00
Brian
01ee12cc5f
surface-related prototypes
2007-08-09 14:28:41 -06:00
Brian
64da751500
checkpoint: no longer using intel_fbo.c
2007-08-09 14:28:41 -06:00
Brian
b6e4efb451
remove color_rb[] and lots of dead code
2007-08-09 14:26:31 -06:00
Brian
0481f22fdb
disable intel_get_rb_region()
2007-08-09 14:26:31 -06:00
Brian
334d3650a9
checkpoint: more intel_renderbuffer removal
2007-08-09 14:26:31 -06:00
Brian
d177a00e5b
checkpoint: intel_renderbuffer removal (intel_renderbuffer now == gl_renderbuffer
2007-08-09 14:26:31 -06:00
Brian
4ab52c412d
checkpoint: intel_renderbuffer removal (move vbl_pending field into intel_framebuffer
2007-08-09 14:26:02 -06:00
Brian
3614a9a8ae
checkpoint: intel_renderbuffer removal
2007-08-09 14:26:02 -06:00
michal
ba75e41e41
Update opcode list.
2007-08-09 12:59:15 +01:00
michal
81e595dfe2
Further opcode list reorg.
...
Add TXP opcode.
Alias SGN to SSG.
Alias EXPP to EXP.
2007-08-09 12:59:15 +01:00
Keith Whitwell
5279b26768
Quieten TGSI
2007-08-09 11:23:19 +01:00
Keith Whitwell
17dde8dbb1
Quieten TGSI
2007-08-09 11:23:18 +01:00
Keith Whitwell
4e517f9b0a
Supporting batchbuffer changes for 1st hwpipe triangles...
2007-08-09 11:23:18 +01:00
Keith Whitwell
13eaf04b56
Remove unreferenced file.
2007-08-09 11:23:18 +01:00
Keith Whitwell
93b6e8aeac
Tweaks to state emit, acheives first hw triangles from a pipe driver.
2007-08-09 11:23:18 +01:00
Keith Whitwell
c046174eb0
Pull in debug code for human-readable batchbuffer dumps.
2007-08-09 11:23:18 +01:00
Keith Whitwell
9526f7445e
The pipe version of these files. Can probably relocate to pipe/i915simple.
2007-08-09 11:23:18 +01:00
Keith Whitwell
dc2c20b625
Put back the old versions of intel_tex_layout.* in this shared directory.
...
Unbreak the original i915, i915tex drivers. We will have our own
version of this functionality in the pipe driver and not attempt to share
with the older code.
2007-08-09 11:23:18 +01:00
Keith Whitwell
b0e57f789c
Hook up pipe flush functionality
2007-08-09 11:23:18 +01:00
Keith Whitwell
93d5cfd8b7
Add flush/finish functionality to pipe.
...
Not sure if finish() is the right interface yet.
2007-08-09 11:23:18 +01:00
Keith Whitwell
d0521ebd51
Split swapbuffers and read/draw buffers functionality into two files.
2007-08-09 11:23:17 +01:00
michal
64f4268e85
Declare missing opcode aliases. Declare SGN opcode.
2007-08-09 10:44:38 +01:00
Brian
562fdca12d
update lod bias, limits
2007-08-08 16:47:51 -06:00
Brian
5671bba1cb
clean-up
2007-08-08 16:46:59 -06:00
Brian
8140642f53
use surface offset value in get_tile()
2007-08-08 16:46:32 -06:00
Brian
09a1b91260
initial lod/mipmap texture supported
2007-08-08 16:10:40 -06:00
Brian
7faa3542f0
setup frag shader state: color pass-through program
2007-08-08 16:10:40 -06:00
Brian
ed227b7b8d
added assertion
2007-08-08 16:10:40 -06:00
Brian
6dc212ce49
print_vertex func for debugging
2007-08-08 16:10:40 -06:00
Brian
3113254689
new assertions
2007-08-08 16:10:40 -06:00
michal
960bf97c9f
Add D3D9 opcodes up to ps_2_x and vs_2_x.
2007-08-08 13:56:29 +01:00
Keith Whitwell
65f7b3834b
Don't use hardware driver by default, until its working a bit better.
2007-08-08 12:32:06 +01:00
Keith Whitwell
715acc7622
The i915simple driver now runs well enough to lock up hardware.
2007-08-08 12:30:27 +01:00
Keith Whitwell
cf3fb4e3ef
Call init_state_funcs
2007-08-08 12:30:27 +01:00
Keith Whitwell
7bf2e9e383
Fix typo so that i915simple actually gets used.
2007-08-08 12:30:27 +01:00
keithw
c28d2e6702
remove unused file
2007-08-08 12:30:26 +01:00
keithw
db068269fc
remove unused file
2007-08-08 12:30:26 +01:00
Keith Whitwell
7f74538173
Remove unused code, definitions.
2007-08-08 12:30:26 +01:00
root
f71edfa41b
increase texture size to 32x32
2007-08-08 12:04:08 -06:00
Brian
267cf16e06
very simple texture cache implementation
2007-08-08 12:04:08 -06:00
Brian
c8cc1e86f6
fix qs->next tests
2007-08-08 12:04:08 -06:00
Brian
e4eb97318c
add quad_stage::begin() funcs
2007-08-08 12:04:08 -06:00
Brian
f00179f9b4
Add a quad_stage::begin() method to do per-primitive preparations (like setting up samplers).
2007-08-08 12:04:08 -06:00
Keith Whitwell
8daa738cf9
Remove more dead files.
2007-08-08 11:19:17 +01:00
Keith Whitwell
173e2c6a67
Remove dead files.
2007-08-08 11:17:48 +01:00
Keith Whitwell
ef8b68a8a8
Pull in i915simple.a
2007-08-08 11:14:08 +01:00
Keith Whitwell
dbb297fac6
Hook up i915simple. Doesn't compile.
2007-08-08 11:14:08 +01:00
Brian
7e78b9e4d0
rewrite texture sampling code (smaller, simpler)
2007-08-08 11:09:53 -06:00
Brian
e12810d92f
add lambda param to get_sample()
2007-08-08 11:09:02 -06:00
Brian
34a48abd5f
sketch out 1D/3D/cube texture sampling
2007-08-08 10:26:51 -06:00
Brian
eb147ed775
added PIPE_TEX_FACE_*
2007-08-08 10:26:16 -06:00
Brian
40bc47f578
replace draw_offset w/ 0 for now
2007-08-08 09:52:35 -06:00
Brian
7523f490b0
define i915_surface struct
2007-08-08 09:52:08 -06:00
Keith Whitwell
8a475cb791
Rename drivers/dri/i915pipe --> drivers/dri/intel_winsys.
...
This is appropriate as this is not a "pipe driver for the i915" as the
old name would suggest, but rather a dri driver that can provide "winsys"
backends to softpipe/i915/i965/etc pipe drivers, running under the
intel DDX, drm, etc.
It also frees up the i915pipe name for something more appropriate, ie
mesa/pipe/i915pipe.
2007-08-08 09:42:19 +01:00
Brian
f62b573922
more get_tile() work
2007-08-08 09:36:53 +01:00
Brian
08f33a0251
fully support all texcoord wrap modes
2007-08-08 09:36:53 +01:00
Keith Whitwell
01c35b52a1
Checkpoint of a super-simplified i915 driver in the pipe model.
...
Doesn't yet compile, but when it does, it will only draw gouraud tris
and even those will be as simple as possible. Needs some 'winsys' support
also before that can happen.
2007-08-08 09:30:45 +01:00
Brian
ddd30d8160
clean up tgsi_sampler-related bits
2007-08-07 18:24:30 -06:00
Brian
e4b5265487
use new tex filtering code
2007-08-07 18:24:30 -06:00
Brian
0dc4eea64f
initial texture filtering code
2007-08-07 18:24:30 -06:00
Brian
283ed438b6
include p_state.h
2007-08-07 18:24:30 -06:00
Brian
85675db0fc
added a get_tile() func
2007-08-07 18:24:29 -06:00
Brian
11c557d3ca
map/unmap textures
2007-08-07 18:24:29 -06:00
Brian
204d35c0ef
remove dst!=src assertion
2007-08-07 18:24:29 -06:00
Brian
b4784862b4
debug info
2007-08-07 18:24:29 -06:00
Brian
b245840b86
set mt->format
2007-08-07 18:24:29 -06:00
Brian
6cdff693a7
added pipe_mipmap_tree::format
2007-08-07 18:24:29 -06:00
Brian
14b9834330
s/intel/st/
2007-08-07 18:24:29 -06:00
michal
4a470f63c9
Naive implementation of IF/ELSE/ENDIF.
...
Handle TGSI labels correctly.
Enhance MESA opcode info queries.
2007-08-07 15:34:46 +01:00
Brian
adf5560ea5
checkpoint new tgsi_sampler_state struct
2007-08-07 15:28:12 -06:00
Brian
ab80be0df1
remove pipe_surface_sampler
2007-08-07 15:27:03 -06:00
Brian
d805d46a5f
added st_atom_texture.c
2007-08-07 15:12:40 -06:00
Brian
d78dab1267
plug in texture/sampler state update
2007-08-07 15:12:22 -06:00
Brian
28d64d398b
texture image state handling
2007-08-07 15:11:20 -06:00
Brian
b23f358cbc
sketch out new pipe surface/sampler types
2007-08-07 13:13:41 -06:00
michal
281dad2259
Handle labels for IF/ELSE correctly
2007-08-07 12:50:12 +01:00
michal
f141399031
Enable compact TGSI dump.
2007-08-07 11:50:01 +01:00
michal
c7e6a2eb83
Dump tokens in more compact form.
2007-08-07 11:50:01 +01:00
Brian
cec49ee954
s/pipe_texture_object/pipe_mipmap_tree/, drop st_texobj.c
2007-08-07 10:56:41 -06:00
Brian
c61927a0cb
don't include non-existant intel_buffer_objects.h
2007-08-07 10:56:01 -06:00
Keith Whitwell
90ee7a4144
Gutsy oopses on touch of existing file. Workaround.
2007-08-07 10:18:30 +01:00
Keith Whitwell
87a8f5643d
Remove old intel_buffer_objects code - there is a state_tracker version now.
2007-08-07 10:18:29 +01:00
michal
285c7d5931
Labels are always label targets.
...
Translate label for GLSL IF, ELSE.
2007-08-07 10:15:21 +01:00
Brian
958a1ad420
prototypes
2007-08-07 10:07:23 -06:00
Brian
e43bc8da7a
get rid of temp write_mono_row_ub() function
2007-08-07 09:55:13 -06:00
Brian
647afc3179
call st_init_driver_functions(), make intelInitDriverFunctions() static
2007-08-06 20:56:29 +01:00
Brian
34ff87e46a
call st_init_driver_functions()
2007-08-06 20:54:41 +01:00
Brian
4a60b94701
added softpipe_mipmap_tree_layout
2007-08-06 20:54:18 +01:00
Brian
07633371ff
need a softpipe func for texture layout
2007-08-06 20:54:03 +01:00
Brian
6da9234fd4
New st_init_*_functions() to initialize the driver functions table.
...
We need to do these initializations before initializing the Mesa context
because context init involves creating texture/program/etc objects.
2007-08-06 20:53:28 +01:00
Brian
8ebf91d15e
new header
2007-08-06 20:52:04 +01:00
Brian
a2e3def40c
fix asst. warnings
2007-08-06 20:49:44 +01:00
michal
3f26f61678
Add GLSL opcodes.
2007-08-06 17:20:31 +01:00
michal
2cd6291c62
Add GLSL ops.
2007-08-06 17:18:25 +01:00
michal
76478a4706
Make SGE, SGT, SLE working.
2007-08-06 17:15:37 +01:00
michal
10fd2742c6
Remove garbage text.
2007-08-06 17:06:03 +01:00
michal
555ff45260
Use fp_attr_to_slot[].
2007-08-06 17:04:34 +01:00
michal
1d45082f6e
Reorder opcodes.
2007-08-06 17:03:51 +01:00
michal
2f35238394
Translate the remaining ops.
2007-08-06 17:00:55 +01:00
Brian
073d25eca0
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-08-06 16:18:25 -06:00
Brian
8929c90a71
added xm_softpipe.c
2007-08-06 16:17:41 -06:00
Brian
b1ad6289f8
use new xmesa_create_softpipe()
2007-08-06 16:17:26 -06:00
Brian
a96d20eac8
softpipe/winsys interface
2007-08-06 16:17:16 -06:00
michal
f79b90bc19
Translate MESA GLSL opcodes to TGSI opcodes.
2007-08-06 16:18:37 +01:00
michal
f2034954a7
Add path for GL includes in mesa tree.
2007-08-06 16:02:35 +01:00
Brian
ddece00faa
added st_cb_texture.c
2007-08-06 15:50:16 -06:00
Brian
9ee61c9700
clean-ups
2007-08-06 15:50:03 -06:00
Brian
1cc774f8da
switch to new texture functions in state tracker
2007-08-06 15:49:44 -06:00
Brian
4435baef18
use new texture funcs
2007-08-06 15:49:11 -06:00
Brian
0790d9a074
clean-ups
2007-08-06 15:49:00 -06:00
Brian
24df8f895f
new texture functions
2007-08-06 15:48:42 -06:00
Brian
3e147fe8e7
comments
2007-08-06 15:48:08 -06:00
michal
fe52cce0e8
Add GLSL opcodes.
2007-08-06 15:57:26 +02:00
Brian
2dd4506de3
disable/remove intel dependencies
2007-08-06 13:42:18 -06:00
Brian
d49cee1a74
more intel_context removal
2007-08-06 13:31:23 -06:00
Brian
f42feca075
disable some PBO code, remove intel dependencies
2007-08-06 13:24:54 -06:00
Brian
e3ad58975b
remove timing code
2007-08-06 13:17:38 -06:00
Brian
b9f4b0ce4e
Replace intel_texture_object with st_texture_object, intel_texture_image with st_texture_image
2007-08-06 13:12:24 -06:00
Brian
bc3b608317
minor renaming
2007-08-06 12:41:39 -06:00
Brian
307fe0702e
Lift intel_mipmap_tree.c to st_mipmap_tree.c
2007-08-06 12:40:51 -06:00
Brian
bdd3ccf959
More code movement, removal of intel dependencies
2007-08-06 12:32:16 -06:00
Brian
24ddf1169d
remove more intel dependencies
2007-08-06 12:28:33 -06:00
Brian
681f04f6d3
remove intel dependencies from intel_mipmap_tree.c
2007-08-06 12:07:48 -06:00
Brian
e6c8691b1a
checkpoint: move some texture layout code
2007-08-06 11:51:16 -06:00
Brian
d9605cdf7c
Checkpoint lifting of intel_mipmap_tree (intel_mipmap_tree -> pipe_mipmap_tree and move some code)
2007-08-06 11:22:00 -06:00
Keith Whitwell
95794abec4
Add pipe buffer managment functions.
...
The state_tracker driver needs these to implement, eg. pixel buffer objects,
vertex buffer objects.
2007-08-06 10:15:30 +01:00
Keith Whitwell
1d1b9e6be4
Add a new interface between softpipe and the window system / buffer manager.
...
This interface is defined by softpipe and any window system (eg i915pipe)
wishing to use softpipe is required to implement the interface.
Currently the interface is all about buffer management.
Generalizing, each pipe driver will advertise an interface in a similar
spirit to this, and again any window system driver wishing to use that
rendering pipeline will have to implement the interface it defines. It
clearly isn't a one-way street however, as softpipe could just do its own
buffer management with malloc. The interaction with a buffer manager is
desired to allow us to exercise the hardware swapbuffers functionality of
the i915pipe driver, and also to get a feel for the way hardware drivers
which really need a buffer manager will work.
2007-08-05 17:25:36 +01:00
Brian
5e7921b778
remove intel_pixel.c
2007-08-03 13:31:56 -06:00
Brian
16682fee0a
added st_cb_fbo.c
2007-08-03 13:30:55 -06:00
Brian
fdedc4fec0
more work on st_choose_pipe_format()
2007-08-03 13:29:02 -06:00
Brian
4b87d37e90
framebuffer object functions
2007-08-03 13:28:35 -06:00
Keith Whitwell
ec471e9f07
Remove dead files
2007-08-03 18:58:41 +01:00
Keith Whitwell
db70498462
Rip out more dead drawing-related code.
2007-08-03 18:56:12 +01:00
Keith Whitwell
7d5c25c8a7
Remove "static region" support.
...
The frontbuffer/driBufMgr interactions are handled as a special case
in the intel_screen code.
2007-08-03 13:22:30 +01:00
Keith Whitwell
b8846a5be9
Simplify frontbuffer / sarea / rotation management.
...
Remove lots of old cruft.
2007-08-03 13:14:27 +01:00
Keith Whitwell
389b1d1a3f
Workaround wierd oops on gutsy when building mesa.
2007-08-03 12:28:03 +01:00
Brian
c358a39af5
added pipe->supported_formats()
2007-08-02 20:40:33 -06:00
Brian
61d0215d7b
hook in teximage bits
2007-08-02 20:40:19 -06:00
Brian
66ae07854e
more formats
2007-08-02 20:39:45 -06:00
Brian
fc9ff31298
trim #includes
2007-08-02 20:36:36 -06:00
Brian
4ab3bbba29
beginings of teximage functions
2007-08-02 20:36:06 -06:00
Brian
47fdaf0ed9
pipe->clear() now takes a surface, rather than color/depth/stencil flags.
...
pipe->clear() only used to clear whole buffers (no scissor) w/out masking.
Draw a colored quadrilateral in all other cases.
2007-08-02 16:08:18 -06:00
Brian
184b6a1f04
call st_init_cb_drawpixels
2007-08-02 14:21:16 -06:00
Brian
4df8e90a01
added st_cb_drawpixels.c
2007-08-02 14:21:02 -06:00
Brian
d09f4e2007
initial work for textured-quad glDrawPixels
2007-08-02 14:20:40 -06:00
Brian
566ae9196b
remove st_draw.h include
2007-08-02 14:20:13 -06:00
Brian
406da44da3
setup more state for clear_with_quad()
2007-08-02 13:48:02 -06:00
Brian
7b274b4318
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-08-02 13:46:47 -06:00
Brian
3ab0210c31
get rid of accum param
2007-08-02 13:38:38 -06:00
Keith Whitwell
877478e6fc
Remove all references to swrast.
...
The one place the functionality continues to be needed is as last-ditch
implementations of TexCopyImage, etc. TBD what to do about that, but
that will be an issue for state_tracker, not for here.
2007-08-02 20:35:50 +01:00
Keith Whitwell
d878bdc7a1
Fix make recursion.
...
Unfortunately means you can't just type make in softpipe any more.
2007-08-02 20:33:58 +01:00
Brian
bf64be2268
added clear-scissor.c
2007-08-02 12:14:16 -06:00
Brian
65cc3d29a6
test glClear w/ scissor
2007-08-02 12:14:05 -06:00
Brian
55314f8f31
Implement new draw_vertices() path for simple vertex array drawing, use it for glClear.
2007-08-02 12:12:48 -06:00
Keith Whitwell
0e067f1fb2
Remove references to accum buffers in softpipe.
...
Also some minor clear fixes.
2007-08-02 18:25:10 +01:00
Keith Whitwell
3dfe125861
Remove intel_state.c, intel_rotate.[ch]
2007-08-02 17:45:54 +01:00
Brian
107206bbbe
New header file.
2007-08-02 10:30:32 -06:00
Brian
51b300c54d
include st_cb_clear.h
2007-08-02 10:29:50 -06:00
Brian
e415dced44
sketch out clearing with quads
2007-08-02 10:29:42 -06:00
Brian
5936b439e8
add PIPE_MASK_RGBA
2007-08-02 10:29:04 -06:00
Brian
a6dd731656
comment follow-up
2007-08-02 10:01:14 -06:00
Brian
d747bf14dd
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-08-02 09:17:56 -06:00
Keith Whitwell
a4a0189ed6
Remove intelClear() hack.
...
Have added intel_batchbuffer_flush calls to the blit functions. We
still shouldn't be calling back into this remnant intel code from the
softpipe driver, though, so that will go too at some point.
2007-08-02 14:53:08 +01:00
Keith Whitwell
d2bffbb7b5
Remove remnants of i915 texture-from-pbo code.
2007-08-02 14:50:08 +01:00
Keith Whitwell
4f442d9ef5
Reroute some clear functionality.
...
Still require the intelClear() call to flush batchbuffers. That will be
removed later...
2007-08-02 13:59:31 +01:00
Brian
1b0e92b91a
implement masking in sp_region_fill()
2007-08-01 16:15:30 -06:00
Brian
1ecc648398
rearrange things in xmesa_clear() a bit
2007-08-01 15:39:19 -06:00
Brian
54135597b8
get cliprect bounds after softpipe_update_derived()
2007-08-01 15:38:59 -06:00
Brian
0c4acfe15a
Re-implement intelClear() in terms of softpipe_clear(). Pretty simple/small now.
...
Note: softpipe_clear() should really be renamed to something like
pipe_clear_with_blits() and put into a driver-indepedent module...
2007-08-01 15:11:59 -06:00
Brian
0eb02a1963
More work on glClear.
...
Add a 'mask' param to region_fill() to help with clearing combined Z/stencil buffers, glColorMask, etc.
2007-08-01 14:46:07 -06:00
Brian
cddce60e7b
s/Z24_S8/S8_Z24/
2007-08-01 13:11:34 -06:00
Brian
5fd4606591
s/Z24_S8/S8_Z24/ (stencil is in the high byte)
2007-08-01 13:04:58 -06:00
Brian
fb206809ba
Checkpoint: glClear changes - working, bug very rough.
2007-08-01 12:58:38 -06:00
Keith Whitwell
e99b673cb0
Build libsoftpipe.a
...
Each pipe driver will build to a .a library, as these will optionally
be included in the various DRI drivers (this will make more sense once
there is at least one hardware driver...). Not strictly necessary for
softpipe, but want to minimize the differences between it and
actual hw implementations.
2007-08-01 15:56:23 +01:00
Keith Whitwell
028a08f563
Remove unused file intel_render.c
2007-08-01 09:01:06 +01:00
Keith Whitwell
e5df28f39a
Remove unused file
2007-08-01 09:01:06 +01:00
Keith Whitwell
c5802911df
Remove intel_span.[ch]
2007-08-01 09:01:06 +01:00
Brian
d28661870a
sp_z_surface.h is dead
2007-07-31 17:55:32 -06:00
Brian
18fbf48a1e
Obsolete.
2007-07-31 17:54:56 -06:00
Brian
20adf45c23
Redesign pipe_surface in terms of pipe_region.
...
struct pipe_buffer goes away.
Added basic region functions to softpipe to allocate/release malloc'd regions.
Surface-related code is fairly coherent now.
2007-07-31 17:42:03 -06:00
Brian
2f245bce42
Lift region-related functions up to the pipe interface.
...
Some of these functions probably should be driver-private.
Note: intel_buffer_object is in p_state.h and should be fixed/removed.
There are just a few i915 dependencies in intel_region.c
2007-07-31 15:44:50 -06:00
Brian
33891b64a9
re-fix stencil addressing bug
2007-07-31 13:42:23 -06:00
Keith Whitwell
58c1297b22
Add missing files
2007-07-31 20:34:17 +01:00
Keith Whitwell
43d07d8697
Remove references to intel_tris.h
2007-07-31 20:28:26 +01:00
Keith Whitwell
b4c18efcd0
Build the "pipe" version of the i915tex driver.
...
This hands all rendering off to the softpipe rasterizer.
2007-07-31 20:22:49 +01:00
Keith Whitwell
280cb37130
A version of the i915tex driver with all drawing code removed.
...
This is intended to support the softpipe development work. More code
will be removed and pushed into softpipe until this basicially becomes
the DRI/GLX interface for that driver.
2007-07-31 20:06:09 +01:00
Brian
973985b7ef
simplify clear.x1,y2,x2,y2 setup
2007-07-31 13:03:18 -06:00
Brian
f0b4d9cb24
In i915/i830_emit_state(), check if state->draw_region is non-null.
...
This fixes a problem hit by glClear in the samples/stencil.c program.
2007-07-31 12:49:11 -06:00
Brian
6490c7d4aa
fix stencil addressing bug
2007-07-31 11:15:30 -06:00
Brian
da2b82059f
remove obsolete xmesa_get_stencil_surface() stub
2007-07-31 10:43:36 -06:00
Brian
00afb67199
fix comments and param names for intel_miptree_image_map()
2007-07-31 10:43:16 -06:00
Brian
616c329e81
fix value returned by intel_new_renderbuffer_fb()
2007-07-31 10:42:39 -06:00
Brian
ed83159ff4
fix assertions
2007-07-31 08:22:18 -06:00
Keith Whitwell
9273150f9a
Merge branch 'i915tex_privbuffers' into softpipe_0_1_branch
...
Conflicts:
src/mesa/drivers/dri/i915tex/intel_buffers.c
src/mesa/drivers/dri/i915tex/intel_context.c
src/mesa/drivers/dri/i915tex/intel_fbo.c
src/mesa/drivers/dri/i915tex/intel_pixel_draw.c
2007-07-31 14:37:45 +01:00
Brian
9bc1c92a0b
32 and z24s8 softpipe buffers
2007-07-30 21:39:57 -06:00
Brian
42c817269a
remove some obsolete xmesa remnants
2007-07-30 17:20:02 -06:00
Brian
f884f6886e
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-07-30 17:16:38 -06:00
Brian
4576d754c9
Lots of improvements to the surface-related code.
...
Z testing now works with i915 driver.
Add gl_renderbuffer::surface pointer (and reverse pointer).
Remove intel_surface and xmesa_surface types - no longer used.
2007-07-30 17:17:44 -06:00
Brian
6558af67d3
compute scale for Z24 buffers
2007-07-30 17:15:50 -06:00
Brian
09574bee85
implement read_quad_f_swz()
2007-07-30 14:00:27 -06:00
Brian
7baa0865b1
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-07-30 13:46:00 -06:00
Brian
3a35ce3364
implement surfaces for softpipe rendering
2007-07-30 13:11:52 -06:00
Brian
f1569bf0d5
map/unmap surfaces before/after rendering
2007-07-30 13:11:27 -06:00
Brian
1c8905790b
remove old comments
2007-07-30 13:11:09 -06:00
Brian
737f6e7eb1
disable ProgramStringNotify assertion
2007-07-30 13:10:52 -06:00
Brian
a548d3cb71
call st_invalidate_state()
2007-07-30 13:10:12 -06:00
Brian
f38d26fd83
added map/unmap() stubs
2007-07-30 13:09:53 -06:00
Roland Scheidegger
7aefdd5185
fix range reduction for sin/cos in i915tex ( #11609 )
2007-07-29 19:40:50 +02:00
Roland Scheidegger
9d2d34b5ea
Fix crashes when the frag prog can't be handled in hardware ( #11131 )
...
Must not change to/from swrast after Render.Start or bad things will happen.
(Driver will still somewhat incorrectly report an implementation error,
and apps can't really figure out if a prog is natively supported as validation
is later - could try doing it earlier to give some hint at least, even though
native status may still change later due to fog etc.)
2007-07-29 18:07:42 +02:00
Brian
75b8a396e5
renaming, comments, clean-up
2007-07-27 11:02:54 -06:00
Brian
05ba76757b
Clip triangles against softpipe->cliprect which includes scissor and surface bounds.
...
This prevents rendering out of bounds when the viewport is partially outside the surface bounds.
2007-07-27 10:50:35 -06:00
Brian
05bde092f3
remove obsolete comments
2007-07-27 10:25:11 -06:00
Brian
a0c1d591ab
Maintain cliprect (scissor) info in sp_state_derived.c.
...
The cliprect depends on the scissor rect (if enabled), otherwise the drawing
surface bounds.
2007-07-27 10:21:34 -06:00
Brian
78ea9cee0d
Implement point/line quad clipping. Not quite as efficient as it probably could be, but sufficient for now.
2007-07-27 10:10:49 -06:00
Brian
6abdad28f6
check scissor state
2007-07-27 09:27:56 -06:00
Brian
df23ebbb9f
s/SP_TILE_H/SP_QUAD_H/
2007-07-27 09:06:15 -06:00
Brian
e1a19781dd
init quad.coverage values to 1.0 in case line AA is enabled so that we see something
2007-07-27 09:06:02 -06:00
michal
8755594647
Avoid unnecessary input attrib copy by aligning exec_machine attribs.
2007-07-27 12:50:38 +02:00
michal
e0a26b0467
Merge branch 'master' of git+ssh://michal@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-07-27 10:05:40 +02:00
Brian
0360b49afb
Implement line stippling.
...
Also added draw_stage::reset_line_stipple(). There may be a better way
of doing that though.
2007-07-25 15:48:09 -06:00
Brian
1f6b4b0f75
rename some vars
2007-07-25 14:32:28 -06:00
Brian
8b2955b736
implement DDX, DDY instructions
2007-07-25 14:28:24 -06:00
Brian
be8725321c
Fix pinterp() to compute 1 / FRAG_ATTRIB_WPOS.w Update comments too.
2007-07-25 14:27:38 -06:00
Brian
d24e60a6b1
patch things up enough to allow texture sampling to work
2007-07-25 12:15:02 -06:00
Brian
a502c08a25
use consistent indentation
2007-07-24 17:10:30 -06:00
Brian
2eb9061f73
check return value of tgsi_parse_init()
2007-07-24 16:50:46 -06:00
Brian
ed52adc64e
added PROGRAM_NAMED_PARAM in map_register_file()
2007-07-24 16:50:00 -06:00
Brian
3ffd30638a
added GL_FRAGMENT_PROGRAM_NV in st_new_program()
2007-07-24 16:49:41 -06:00
Brian
496ee38b71
Add VF_ATTRIB_VAR0..7 for varying variables.
...
The demos/fslight.c demo runs now.
2007-07-24 15:39:41 -06:00
Brian
5c2cff44d2
added PROGRAM_UNIFORM to map_register_file()
2007-07-24 15:38:41 -06:00
Brian
6a235d3fe5
comments
2007-07-24 14:45:57 -06:00
Brian
8c99f7ba61
s/GLuint/GLbitfield/
2007-07-24 14:45:38 -06:00
Brian
1475d74cfb
Compute need_z and need_w properly and use the correct const/linear/perspective interpolation in shade_quad().
2007-07-24 14:44:44 -06:00
Brian
2de4c7573e
Fix a typo (i << i) that was fouling up the vertex layout info.
2007-07-24 14:31:16 -06:00
Brian
67b61520ce
added missing OPCODE_ARL to TGSI_OPCODES[], added sanity check assertion
2007-07-24 13:48:20 -06:00
Brian
3af7876521
added code to test per-vertex colors
2007-07-24 12:28:01 -06:00
Brian
43d7c1fe9d
Basic fragment programs run now.
...
Handling of constants might change. For now, the st_fragment_program struct
contains a pipe_constant_buffer (not a pointer).
2007-07-24 12:27:38 -06:00
Brian
ef3849ffa0
rebuild quad pipeline when framebuffer changes too
2007-07-24 12:12:52 -06:00
Brian
9110dbd9b2
simple fragment shader test
2007-07-24 10:00:29 -06:00
Brian
47fafcf06f
use enabled/linked fragment shader in preference to a fragment program
2007-07-24 09:58:19 -06:00
Brian
4477a01372
call ctx->Driver.NewProgram() instead of _mesa_new_program()
2007-07-24 09:57:26 -06:00
Brian
5b737b7df2
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-07-24 09:17:59 -06:00
michal
98eaf5503d
Execute fs tokens.
...
Fix align128 bug.
2007-07-23 18:26:25 +02:00
Roland Scheidegger
36fce66034
set the _BaseFormat for window-framebuffers, could hit some assertion otherwise
2007-07-21 16:51:15 +02:00
Roland Scheidegger
118bd626b1
fix bogus recently introduced function param comments
2007-07-20 11:34:26 +02:00
Roland Scheidegger
97cd87ef74
minor cleanups, disable debugging
2007-07-20 11:33:24 +02:00
Keith Whitwell
4824c342c8
Trigger tgsi compilation for fragment programs.
...
Not sure the generated program looks correct though...
2007-07-19 20:24:55 +01:00
Roland Scheidegger
e0850e52ee
remove some more really old ifdefed out code...
2007-07-19 18:11:48 +02:00
Roland Scheidegger
79ddb7f9a2
more cleanups (looks pretty reasonable now)
...
remove some already ifdefed out, no longer functional and used code.
Don't do our own scissor clipping in the pixeldraw/copy paths,
as meas already does that for us...
2007-07-19 17:42:14 +02:00
Roland Scheidegger
da21eff86b
fix drawables not getting freed if context is made current with new drawables
2007-07-19 16:41:14 +02:00
Roland Scheidegger
131a036312
fix mesa's handling of fbo's / window fb (again)
...
Make sure the relevant fields in window fbs get updated at appropriate time
(those are NOT the same as fbos!!!), and fix up related code accordingly.
This is a bit ugly, but there's a reason the issues section in EXT_fbo is
a couple hundred pages long...
Hopefully correct now.
2007-07-18 20:17:14 +02:00
Roland Scheidegger
3f318c2eb9
more fixes for mesa's fbo handling (fixes tests/fbotest1/2)
2007-07-18 18:07:12 +02:00
Roland Scheidegger
ccb713cdb8
swapbuffers with non-current contexts, cleanups
...
manywin got broken (when intelPageflip got no longer called).
Make sure that intelFlush is getting called when a context gets unbound,
to handle later swapbuffer calls on that context's drawable better.
Related, fix non-current cliprects getting used on unbound drawables.
2007-07-18 15:18:43 +02:00
Roland Scheidegger
c5a8bc7125
get rid of checks for old ddx
2007-07-17 20:06:44 +02:00
Roland Scheidegger
7664105fc2
remove some more old stuff
2007-07-17 19:49:25 +02:00
Roland Scheidegger
881d71495b
get rid of more pageflip/rotation code.
2007-07-17 19:37:05 +02:00
Roland Scheidegger
a8bf93e00e
fix up mesa's probably bogus framebuffer updates with different read/write fbs
2007-07-17 19:22:23 +02:00
Roland Scheidegger
d9499a151d
fix mesa fb binding
...
Make sure that we bind the right buffer (draw or read) when rebinding
the window framebuffer (the api doesn't allow binding different draw and
read buffers at the same time, but the default window framebuffer is basically
2 fb objects, one for read, one for write, which can be different). Pass both
of these two down the driver api (no driver uses this right now).
2007-07-17 17:29:55 +02:00
Roland Scheidegger
04d49ff24d
remove old code, remaining bits of static handles, disable (no longer functional anyway) rotation code
2007-07-17 15:56:43 +02:00
Roland Scheidegger
4dd8e2648d
increase MAX_RELOCS so never run out before batch buffer is full (fixes xdemos/shape)
2007-07-17 12:56:30 +02:00
Keith Whitwell
6101fe641c
Merge branch 'origin' into softpipe_0_1_branch
2007-07-17 11:06:31 +01:00
Keith Whitwell
bb1b01616b
Merge branch 'i915tex_privbuffers' into softpipe_0_1_branch
2007-07-17 11:06:02 +01:00
Roland Scheidegger
cc9cf90b09
fix resize bugs (fb size updated too late), fix typos, cleanups...
2007-07-16 20:53:33 +02:00
Roland Scheidegger
5fc7973d54
small cleanups
2007-07-16 19:01:47 +02:00
Roland Scheidegger
894557d625
get rid of more cliprects...
2007-07-16 17:41:22 +02:00
Roland Scheidegger
56cbdfd7d5
more cliprect elimination (swrast span)
2007-07-16 15:53:23 +02:00
Roland Scheidegger
6104044f6b
get rid of more fake cliprects (drawpixel), and enable blit draw with scissor
2007-07-16 15:33:09 +02:00
Roland Scheidegger
8b93d9238e
get rid of more cliprects (readpixel)...
2007-07-16 13:57:49 +02:00
Roland Scheidegger
d69cae95a0
allow blit path for read pixels if pack->alignment isn't 1.
...
pack->alignment doesn't matter usually if the image is sufficiently aligned
anyway. Speeds up some tests/readrate cases by a factor of 100 (since
the pack->alignment default which noone ever bothers to change is 4).
2007-07-16 11:51:08 +02:00
Roland Scheidegger
99c7e38d83
change back driver change from previous commit
2007-07-15 22:53:59 +02:00
Roland Scheidegger
a1ec23a30f
fix bogus fb/drawable information (fixes xdemos/wincopy)
...
the framebuffer objects attached to drawables can have invalidate state
associated with them, since for the window framebuffer this is per-context
state and not per-fbo state. Since drivers may rely on that information
(otherwise would need to check if currently the window-framebuffer is
bound in a lot of places) fix it up in _mesa_make_current (ugly).
2007-07-15 22:47:42 +02:00
Roland Scheidegger
8172f50419
fix the texture copypixels path
2007-07-15 20:15:19 +02:00
Roland Scheidegger
cd3afa2a95
begin getting rid of fake clip rects (copy_pixel)
2007-07-15 18:17:36 +02:00
Roland Scheidegger
a04056d313
fix assertion, z/stencil swarst readback, (still looks suspicious) copyTexSubimage
2007-07-14 14:24:20 +02:00
Brian
f0636d9653
Fix setup.light_twoside determination.
...
When a vertex program is used, use value of GL_VERTEX_PROGRAM_TWO_SIDE.
Otherwise, if FF lighting, use value of GL_LIGHT_MODEL_TWO_SIDE.
2007-07-13 14:28:15 -06:00
Brian
a2e471e05e
press 'f' to toggle front-face winding
2007-07-13 14:25:28 -06:00
Brian
dc313b5783
Fix more polygon winding, culling confusion.
...
If the determinant of the triangle is positive, its winding is CCW (right-handed coord system).
2007-07-13 14:22:46 -06:00
Roland Scheidegger
f022bff5aa
bugfixes (wrt fb updates), cleanups
...
move drawable validation back to where it was now that the driDrawable
information isn't used directly anymore.
Fix bogus fb updates (the context we get for SwapBuffer processing
may not have the drawable being processed attached!)
glthreads behaves a bit better but still not correct.
2007-07-13 20:47:17 +02:00
Brian
2bf4a500de
Fix for-loop in interp() so we don't go out of bounds.
...
Improved comments for that loop.
Added some sanity check assertions regarding vertex layout.
2007-07-13 12:28:42 -06:00
Brian
5810b40d6e
set INTERP_CONSTANT when appropriate
...
Not really signficant now since draw_flat stage copies the provoking
vertex color to all prim verts.
2007-07-13 12:26:09 -06:00
Brian
a47b5764c0
comments
2007-07-13 12:23:34 -06:00
Brian
a6eccf9e4f
Enable Keith's branch-less stipple code - it works.
2007-07-13 11:16:13 -06:00
Brian
80362a90d8
Add 'prim' field to quad so that stipple and aa coverage stages can do the right thing.
2007-07-13 11:15:10 -06:00
Brian
46bba80a54
Implement AA points and AA coverage application in quad pipeline.
2007-07-13 10:33:48 -06:00
Brian
5796056e28
press 's' to toggle smoothing
2007-07-13 10:32:56 -06:00
Brian
563479552e
Added basic occlusion counting
2007-07-13 09:25:57 -06:00
Brian
676fcf0de2
minor rename
2007-07-13 09:23:41 -06:00
Keith Whitwell
aa0f415c8d
Add conditional-free implementation (disabled, not tested)
2007-07-13 11:28:42 +01:00
Keith Whitwell
60a21f6c54
Simplify slightly.
...
Don't bother trying to save a small memcpy.
2007-07-13 11:27:57 +01:00
Brian
f0f9a22609
minor changes, comments about multiple color buffers, MRT.
2007-07-12 16:17:14 -06:00
Brian
a48d767cf2
Add a quad 'bufloop' stage to handle glDrawBuffer(GL_FRONT_AND_BACK).
...
This removes the notion of multiple color buffers from all other stages.
Will need a bit more work when shaders with multiple render targets arrive.
2007-07-12 14:13:48 -06:00
Roland Scheidegger
8b6517abfc
don't use driDrawable information directly, don't resize at makecurrent
...
driDrawable information now isn't used in most parts of the driver.
makecurrent only updates fb information when the context is new
(driDrawable is still updated by the dri common code).
2007-07-12 21:52:02 +02:00
Brian
e8ceb5a2eb
XXX comment about skipping stipple for points/lines
2007-07-12 13:44:43 -06:00
Brian
c78f372b17
s/prim_setup/sp_draw_render_stage/, new comments
2007-07-12 13:43:33 -06:00
Brian
4f218958cc
Remove dead code
2007-07-12 13:33:33 -06:00
Brian
ea470eec86
Rename prim_stage -> draw_stage
2007-07-12 13:32:31 -06:00
Brian
86352ff70d
Added colormask, dither, multisample state. Implement colormasking stage.
2007-07-12 12:20:14 -06:00
Brian
bd5533bb7c
front/back-face determination was wrong
2007-07-12 11:59:43 -06:00
Brian
9e94e9b798
culling was inverted
2007-07-12 11:59:15 -06:00
Brian
62f5f18b3e
handle edge flags for GL_POLYGONs
2007-07-12 11:50:52 -06:00
Brian
5b06424a15
fix MIN/MAX mix-up
2007-07-12 10:43:33 -06:00
Brian
2371ed36f7
remove unused hw_data_offset
2007-07-11 16:17:23 -06:00
Brian
46d75518fa
disable debug printfs
2007-07-11 13:13:00 -06:00
Brian
8db689350d
remove glDepthFunc(GL_LEQUAL) change from prev commit
2007-07-11 13:12:33 -06:00
Brian
aac2129663
Fix broken depth offset.
...
The edge vectors were totally wrong.
Need to multiply bias units by the min resolvable depth delta.
2007-07-11 13:02:03 -06:00
Roland Scheidegger
9870f7bccc
restrict blitted area to size of rendered area
2007-07-11 20:18:51 +02:00
Brian
bc4dd63f12
Obsolete file.
2007-07-11 11:36:22 -06:00
Brian
e89bd0fbc5
Implement polygon stipple state tracking, application.
2007-07-11 11:34:19 -06:00
Keith Whitwell
20cf13e03b
Fix screen corruption on resize.
...
Move buffer resize check to immediately after swapbuffers.
Update cliprects inside the locked region of swapbuffers.
2007-07-11 17:01:30 +01:00
Brian
300e97081e
need to clamp floats to [0,1] in write functions
2007-07-11 09:56:46 -06:00
Brian
d6aa360edd
fix stencil logic error, use proper front/back face value
2007-07-11 09:52:32 -06:00
Brian
0ac0fb91bd
Compute quad.facing from prim->det and polygon winding.
...
Updated comments/questions about area vs. prim->det.
2007-07-11 09:52:00 -06:00
Roland Scheidegger
fb67b1609e
remove bogus assertion, change drawable updates
...
don't update driDrawable information until later at all
(blit needs fixing).
2007-07-11 17:30:01 +02:00
Roland Scheidegger
eb2a896f68
drop some more code no longer needed
2007-07-11 16:08:14 +02:00
Roland Scheidegger
43e24ff507
some fixes, fake frontbuffer
...
still doesn't work quite right (resize).
Fake frontbuffer doesn't copy in real frontbuffer.
Don't even think about doing rotation/page flip/triple buffering for now...
More cleanups needed (fake cliprects etc.)
2007-07-11 14:20:39 +02:00
Brian
73daa68854
Checkpoint: stencil roughly working, some bugs to fix...
2007-07-10 18:59:17 -06:00
Brian
e6eca5c37e
Begin hooking up stenciling.
2007-07-10 16:37:18 -06:00
Brian
227c95737b
clean-ups
2007-07-10 16:37:03 -06:00
Brian
d015d2e0f4
Fill in remaining switch cases. Only call next stage if quad->mask != 0.
2007-07-10 16:25:43 -06:00
Brian
093d1b42d0
remove debug printf
2007-07-10 15:29:17 -06:00
Brian
a49a23efc5
Fix line clipping bug. New comments.
...
Need to use a new prim_header for the post-clipped line. Otherwise,
we were changing the header passed to us from the vb code. That messed
up the vertex pointers for the next line primitive.
2007-07-10 15:24:31 -06:00
Brian
985e37eedb
clean-up, comments
2007-07-10 14:46:15 -06:00
Brian
13aa51de41
clamp after offsetting, new comments
2007-07-10 14:38:10 -06:00
Brian
6aa9c8ebc1
remove unneeded casts, added comments
2007-07-10 14:36:10 -06:00
Brian
1deafdb1de
Do depth testing with integer values.
...
Using floats (and float->ushort->float conversion) introduces errors.
Only GLushort depth buffers work for now...
2007-07-10 13:53:21 -06:00
Brian
f6dffd6ee7
fix problems with polygon offset
2007-07-10 13:34:23 -06:00
Brian
5e4379b5a4
comments, clean-up
2007-07-10 13:33:45 -06:00
Roland Scheidegger
1278514ff4
copybuffer/cliprect fixups
2007-07-10 19:56:44 +02:00
Brian
720c0eb71d
added comments
2007-07-10 11:54:16 -06:00
Brian
1fe4cf83cd
Fix front/back mix-up. added comments.
2007-07-10 11:54:03 -06:00
Brian
24b68f4184
press 'f' to toggle GL_CCW/GL_CW front face
2007-07-10 11:53:27 -06:00
Brian
9a89cc3b6b
use 'c' to cycle through polygon cull modes
2007-07-10 11:39:08 -06:00
Brian
8733ee9dc9
use cursor keys to translate triangle
2007-07-10 11:33:10 -06:00
Brian
17b86cfa4e
Comments, minor clean-up.
2007-07-10 11:03:51 -06:00
Brian
e7a2085148
comments
2007-07-10 11:00:24 -06:00
Brian
57a5385652
Added comments, assertions.
2007-07-10 10:53:57 -06:00
Brian
8c1fa904ed
Fix EMIT_ATTR() to populate the draw->vf_attr_to_slot[] array.
...
Note that attribute index has to be biased by two, since vertex->data[]
starts after the header and clipcoord fields. See comments for details.
Added a bunch of comments/docs.
2007-07-10 10:53:29 -06:00
Brian
d68ea4e23f
remove some dead/disabled stuff
2007-07-10 10:24:28 -06:00
Roland Scheidegger
d348a48ac3
First attempt at using private back/z buffers.
...
Allocate and use private back and z/stencil buffers.
This is still very broken.
2007-07-10 18:07:38 +02:00
Brian
f4053ce858
Remove softpipe includes
2007-07-09 16:21:18 -06:00
Brian
ebafc193fa
s/G_/SP_/
2007-07-09 16:20:16 -06:00
Brian
a380f98b6c
Rename G_NEW_* tokens to SP_NEW_*
2007-07-09 16:17:50 -06:00
Brian
546eff6ba8
Obsolete file.
2007-07-09 16:15:20 -06:00
Brian
279ffe3f16
New 'draw' module for primitive drawing (clipping, culling, etc).
2007-07-09 16:14:26 -06:00
Brian
9fbdf50078
New 'draw' module for handling the various stages of primitive drawing (clipping, culling, etc).
2007-07-09 16:12:13 -06:00
Brian
10f4b37bd7
Rename/move some files to modularize the primitive/draw code.
2007-07-09 16:04:08 -06:00
michal
9b32c33e9d
Fix function names.
2007-07-06 18:57:47 +02:00
michal
6d8fb1a543
Indent.
...
Fix function prototype.
2007-07-06 18:53:55 +02:00
michal
3b8bc1f467
Merge branch 'master' of git+ssh://michal@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
2007-07-06 17:53:44 +02:00
michal
ffe58739da
Softpipe: import TGSI tree. Not hooked-up yet.
2007-07-05 19:55:38 +02:00
Brian
ac5523a9c3
SIMD comments
2007-07-03 17:31:59 -06:00
Brian
284efcfc27
hook in state tracking for blend color
2007-07-03 17:19:30 -06:00
Brian
d378a2c0b8
added blend_color
2007-07-03 17:13:45 -06:00
Brian
111880798a
Blend MIN/MAX modes are special: the src/dest terms are always one.
2007-07-03 17:13:04 -06:00
Brian
f6d4f5e1e9
Rewrite blending in terms of SIMD operations.
2007-07-03 17:12:11 -06:00
Brian
a813f65487
clarify that line_stipple_factor is in [0,255] corresponding to GL's range of [1,256].
2007-07-03 10:58:03 -06:00
Brian
ea92566ed9
rename a few structs (use _state suffix consistantly), reorder/sort fields in some structs
2007-07-02 15:32:12 -06:00
Brian
d523a04853
added buffer_data(), buffer_sub_data() to pipe_buffer
2007-06-29 13:10:47 -06:00
Brian
e62cf5c69a
more work on tex objects, surfaces, mappable buffers
2007-06-29 13:03:01 -06:00
Brian
48076dc784
added texture types and mapping types
2007-06-29 12:59:58 -06:00
Brian
34cbcf92af
texture object construction
2007-06-29 12:59:02 -06:00
Brian
16fdae16b6
s/G_CONTEXT_H/SP_CONTEXT_H/
2007-06-29 12:16:37 -06:00
Brian
1be17dc446
consolidate point/line state into pipe_setup_state
2007-06-26 17:35:24 -06:00
Brian
192f9ab81b
fix logic error in updating of quad's Z values. Basic depth testing works now
2007-06-25 09:46:04 -06:00
Brian
363e602042
clean-ups
2007-06-25 09:45:10 -06:00
Brian
0717daf4f9
emit quad->outputs.depth[], hack need_z
2007-06-25 09:44:28 -06:00
Brian
8f6d06d037
code for functional Z buffer surface
2007-06-25 09:43:02 -06:00
Brian
05b2297bef
better triangle Z coords
2007-06-25 09:41:49 -06:00
Keith Whitwell
c2577bb1a0
Restructure z test code slightly.
...
Make the logic slightly closer to an eventual SSE or SPE implementation.
2007-06-24 10:32:48 +01:00
Brian
5d69aeb002
initial texture object, texture format code
2007-06-22 13:37:47 -06:00
Brian
13682d959d
more texture sampler work
2007-06-22 13:08:49 -06:00
Brian
8754b59667
added blend comments
2007-06-22 12:49:23 -06:00
Brian
f79c225d9e
Assorted token renaming/removal, minor state changes, etc.
2007-06-22 12:47:04 -06:00
Brian
493ed9fc11
alpha test and misc changes
2007-06-21 20:08:10 -06:00
Brian
ecfa794037
checkpoint: implement z/depth testing
2007-06-20 17:20:02 -06:00
Brian
3c0790ca92
triangles w/ depth test
2007-06-20 17:19:13 -06:00
Keith Whitwell
f185411637
Only build i915tex
2007-06-20 23:17:13 +01:00
Keith Whitwell
24a989c5d1
Add state tracker create/destroy calls to i915 driver.
2007-06-20 23:17:12 +01:00
Keith Whitwell
78cc48f70a
Rename static variable in temporary tnl code
2007-06-20 23:17:12 +01:00
Keith Whitwell
b8657e44dc
Remove dependency on vf.h in public headers
2007-06-20 23:17:12 +01:00
Brian
2fd7b30bfe
update includes (s/tile/quad/)
2007-06-20 16:15:09 -06:00
Brian
47e970b2cc
s/tile/quad/
2007-06-20 16:14:55 -06:00
Brian
e0398f43a2
Rename "tile" files to "quad".
2007-06-20 16:12:26 -06:00
Brian
acef7c7501
only blend active pixels in the quad
2007-06-20 15:22:39 -06:00
Brian
7658a0208a
quad blending works now, but many blend terms need to be added in blend_quad().
2007-06-20 15:14:47 -06:00
Brian
fb5cdbd078
Initial implementation of a software pipeline for quad rasterization (fragment ops).
...
This is very much like the clipper/setup pipeline for primitives.
2007-06-20 14:29:14 -06:00
Brian
1edb5aafad
better comment
2007-06-20 14:27:42 -06:00
Brian
b7c646d1bc
actually use new glClear code
2007-06-20 13:10:48 -06:00
Brian
abf45c2a3d
fix comment
2007-06-20 12:50:16 -06:00
Brian
83b6c46b50
plug in write_mono_row_ub
2007-06-20 12:23:47 -06:00
Brian
837f2c18c4
implement softpipe clearing (untested)
2007-06-20 09:41:41 -06:00
Brian
73f96c5105
Initial work for glClear(), clear color state.
2007-06-20 08:47:09 -06:00
Brian
6cb2d0cb71
hook up point state
2007-06-19 19:52:25 -06:00
Brian
af9b5ca035
Re-org of surface/framebuffer state.
...
We should be able to render to any depth/format of X window now.
2007-06-19 19:19:31 -06:00
Brian
03933ad656
don't request GLUT_ALPHA
2007-06-19 19:17:48 -06:00
Brian
0e9838263c
just use regular malloc(), free(), memcpy()
2007-06-19 08:45:34 -06:00
Brian
2137e3053e
add point/line/polygon state
2007-06-19 08:43:05 -06:00
Brian
493f7b5f3a
Added alpha test state.
2007-06-18 17:54:38 -06:00
Brian
efe6c50089
Define just one set of PIPE_FUNC_LESS, GREATER, EQUAL, etc tokens.
...
Used for depth test, alpha test, stencil test, shadow test, etc.
2007-06-18 17:53:09 -06:00
Brian
9ec2e16223
change clear color
2007-06-18 06:57:36 -06:00
Brian
97fc768574
s/PRIM_H/SP_STATE_H/
2007-06-15 10:57:44 -06:00
Brian
3cdd8bfe8e
Added st_update_framebuffer struct/object.
2007-06-15 10:55:12 -06:00
Brian
1119852d02
framebuffer state
2007-06-15 10:54:08 -06:00
Brian
fde755aefb
In softpipe_set_viewport() use ordinary (struct) assignment to update softpipe->viewport.
...
The previous memcpy() was incorrect since it only copied 4 bytes instead of 32.
With struct assignment we avoid data size errors.
2007-06-15 10:50:48 -06:00
Brian
8f6b6eed35
initial framebuffer state
2007-06-15 09:51:53 -06:00
Brian
fe1f94f26c
framebuffer state
2007-06-15 09:51:27 -06:00
Keith Whitwell
477e18cb02
Add GLUT_ALPHA for softpipe
2007-06-14 18:25:10 +01:00
Keith Whitwell
943964a1e5
Rename directories again?!
...
Some git wierdness going on.
2007-06-14 18:23:43 +01:00
Keith Whitwell
6393cda676
Renamed softpipe directories and files to something less confusing.
...
softpipe/state_tracker --> state_tracker/
softpipe/ --> pipe/
softpipe/generic --> pipe/softpipe/
I don't think pipe is a great name, but I disliked all the others too.
Luckily it's fairly easy to rename with git, so this can be revisited
later.
2007-06-14 18:11:48 +01:00
Keith Whitwell
7050a4a7bc
Small optimization for line drawing.
...
And some comments on point sprites.
2007-06-14 15:18:27 +01:00
Keith Whitwell
790ec6ad3f
Remove some dead code.
2007-06-14 14:29:59 +01:00
Brian
6378dc3ae3
simple line drawing code
2007-06-12 08:47:49 -06:00
Brian
c9527eae8e
added st_atom_depth.c
2007-05-30 16:27:17 -06:00
Brian
02a47549ad
sketch out texture sampler state
2007-05-30 16:26:55 -06:00
Brian
092a9ecbba
comments, clean-up, alphabetize members
2007-05-30 16:10:31 -06:00
Brian
8f28887581
added depth(Z) state support
2007-05-30 16:07:39 -06:00
Brian
4c9b48dcc5
depth(Z) state
2007-05-30 16:07:27 -06:00
Brian
6fc5961933
implement point rendering
2007-05-28 16:13:17 -06:00
Brian
d46fa8bbef
INLINE goes before the function's return type
2007-05-25 15:53:42 -06:00
Brian
00d5334899
Add some comments to explain things, code clarifications.
...
Also, add quad.facing field for front/back facing. See comments for details.
2007-05-25 15:45:21 -06:00
Brian
cbe4dbef8e
use GLubyte for stencil ref/mask/clear
2007-05-24 22:16:26 -06:00
Brian
008fb50174
Stencil state.
2007-05-24 17:37:36 -06:00
Brian
2248829b99
added st_atom_blend.c, st_atom_scissor.c
2007-05-24 16:50:45 -06:00
Brian
6debc8078a
Implement blend state
2007-05-24 16:50:22 -06:00
Brian
7234550cf7
#ifndef SP_DEFINES_H protection, copyright
2007-05-24 16:49:27 -06:00
Brian
9267341bd0
scissor depends on glScissor() and framebuffer size
2007-05-24 16:48:38 -06:00
Brian
3bf0fd6090
add scissor state
2007-05-24 14:37:00 -06:00
Brian
711af67fe4
scissor state
2007-05-24 14:36:48 -06:00
Brian
f889ad21da
define, use SP_MAX_CLIP_PLANES
2007-05-24 14:36:02 -06:00
Keith Whitwell
b1dc66b7bd
Add the vf module.
...
This is a cleaned up version of the code in tnl/t_vertex*.
2007-05-24 11:37:08 +01:00
Keith Whitwell
b939adfa15
Use the x11 driver as a test harness for the softpipe/state_tracker code.
...
This has some limitations as we currently require a mapped framebuffer,
so it only really works with double-buffered ximage rgba8888 windows.
2007-05-24 10:44:53 +01:00
Keith Whitwell
8e4a95a93d
First version of the softpipe rasterizer.
...
This will flesh out to hopefully acheive 3 things:
- New software rasterizer for mesa
- New driver model for mesa & dri with much smaller drivers
- The basis for the cell driver.
It's got a long way to go yet, but will at least run trivial/tri.c.
2007-05-24 10:41:34 +01:00
Keith Whitwell
572dc0864e
Modifications to run with softpipe test harness
...
RGB->RGBA
double buffer by default.
2007-05-24 10:38:57 +01:00