Commit graph

29067 commits

Author SHA1 Message Date
Michal Krol
f00805a117 slang: Predefine ES symbols for FEATURE_es2_glsl. 2009-12-10 12:59:23 +01:00
Michal Krol
417f36ccb0 glsl/apps: Predefine __GLSL_PP_PREDEFINED_MACRO_TEST for testing. 2009-12-10 12:58:44 +01:00
Michal Krol
22200bcafc glsl/pp: Add support for user-defined macros. 2009-12-10 12:58:21 +01:00
Michal Krol
d1a09a9ba4 glsl/apps: Explicitly add ARB_draw_buffers and ARB_texture_rectangle. 2009-12-10 12:39:37 +01:00
Michal Krol
48c60b0ecb slang: Explicitly enable ARB_draw_buffers and ARB_texture_rectangle.
They are no longer built into the glsl preprocessor.
2009-12-10 12:39:10 +01:00
Michal Krol
91e164b3d0 glsl/pp: Add sl_pp_context_add_extension().
This way third parties are able to add supported extension strings.
2009-12-10 12:38:22 +01:00
Vinson Lee
05b6296092 mesa: Fix SCons build.
Commit cd6b8dd9e8 deleted
src/mesa/state_tracker/st_cb_get.c.
2009-12-09 22:35:32 -08:00
Roland Scheidegger
71f4267ac2 winsys/intel: fix dereferencing of opaque type due to pipe_reference changes 2009-12-10 03:51:35 +01: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
michal
068596c9a7 Build mesa glsl with make.
Still don't know how to add glsl to mesa dependencies.
2009-12-10 01:03:15 +01:00
Marek Olšák
c6b450033d r300g: fix routing of vertex streams if TCL is bypassed
Generating mipmaps finally works, among other things. Yay!
2009-12-09 13:38:11 -08:00
Marek Olšák
6de7ac73bf r300g: always disable unused colorbuffers 2009-12-09 13:38:11 -08:00
Marek Olšák
87b822e024 r300g: make pow(0,0) return 1 instead of NaN in the R500 fragment shader
Unfortunately we can't fix this easily in the R300 fragment shader,
and it's probably not worth the effort.
2009-12-09 13:38:11 -08:00
Marek Olšák
8cc570a48c r300g: clean up r300_emit_aos 2009-12-09 13:38:11 -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
Richard Li
8927b72118 r600 : add pre-compile mesa shader calling interface, in order to handle
complex built-in shader instructions.
2009-12-09 15:39:16 -05:00
Vinson Lee
a082d965de glsl: Remove unused member x from struct slang_operation. 2009-12-09 11:26:24 -08:00
Keith Whitwell
a08e348a84 gallium: first steps to treat edgeflags as regular vertex element
The idea here is to eliminate the set_edgeflags() call in pipe_context
by treating edgeflags as a regular vertex element.

Edgeflags provoke special treatment in hardware, which means we need to
label them in some way, in this case we'll be passing them through the
vertex shader and labelling the vertex shader output with a new TGSI
semantic (TGSI_SEMANTIC_EDGEFLAG).
2009-12-09 19:03:10 +01: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
Michal Krol
dfdf83d714 Revert "Simplify the redundant meaning of format layout."
This reverts commit eb926ddf9e.
2009-12-09 14:22:30 +01:00
José Fonseca
59f6af51b8 util: Document the meaning of util_format_layout.
The util_format_layout name was unfortunate and there
are  as been a lot of confusion due to this. Hopefully
this will shed some light on what it was meant for.

Bottom line is: do not rely on these values unless
you're automatically code generating pixel
packing/unpacking routines.

Suggestions for better names than util_format_layout
are welcome!
2009-12-09 11:00:26 +00:00
Andre Maasikas
33a120e476 r600: fix state size prediction after dc0777d3 2009-12-09 10:51:52 +02:00
Jakob Bornecrantz
5e2a86cb1b vmware/xorg: Properly detect overlay support 2009-12-09 09:51:05 +01:00
Jakob Bornecrantz
b7cf8a1f93 vmware/core: Update vmwgfx_drm.h 2009-12-09 09:51:04 +01:00
Ian Romanick
e3fa700c17 meta: Bind texture to unit 0 for mipmap generation
If the active texture unit on entry to mipmap generation is not zero, bind the
texture to unit zero.

Fixes bug #24219.
2009-12-09 11:05:15 -08:00
Eric Anholt
cd6b8dd9e8 mesa: Move OES_read_format support from drivers into the core.
The assertion is that the correct read type to be using is the native
type of the underlying read renderbuffer.  For some fallback paths, this
may be worse than GL_RGBA/GL_UNSIGNED_BYTE for reads today, but it gets
all drivers the expected GL_BGRA/GL_UNSIGNED_BYTE for ARGB8888 or
GL_BGR//GL_UNSIGNED_SHORT_5_6_5_REV for rgb565 with no work.

This fixes the intel (and other) DRI drivers to report read formats that
should hit blit PBO readpixels paths.
2009-12-09 10:37:36 -08: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
Eric Anholt
dd9eb8774a i965: Enable the accelerated ReadPixels path on gen4 along with pre-gen4.
Passes piglit pbo-read-argb8888, and doesn't otherwise regress quick.tests.
2009-12-08 16:35: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
Michal Krol
eb926ddf9e Simplify the redundant meaning of format layout.
We really just need to know whether the format is compressed or not.
For more detailed information format colorspace should suffice.
2009-12-08 20:48:47 +01:00
Roland Scheidegger
47c780180b nouveau: use boolean instead of bool 2009-12-08 19:58:46 +01:00
Roland Scheidegger
849a0644ad cell: use boolean instead of bool 2009-12-08 19:58:36 +01:00
Roland Scheidegger
fd7a9ec7f9 gallium: use boolean instead of bool in p_refcnt.h
all code in gallium should use boolean not bool
2009-12-08 19:58:28 +01:00
Michal Krol
876a785a18 Format layout cannot be used to distinguish scaled/normalised formats. 2009-12-08 19:58:13 +01:00
Roland Scheidegger
4ebc54795d Merge branch 'gallium-strict-aliasing' 2009-12-08 19:26:20 +01:00
Roland Scheidegger
ee1720b99d gallium: fix more potential strict aliasing issues
In particular, gcc man page warns that
union a_union {
   int i;
   double d;
};

int f() {
   double d = 3.0;
   return ((union a_union *) &d)->i;
}

"might" not be ok (why not?), even though it doesn't seem to generate
any warnings. Hence don't use this and do the extra step to actually use
assignment to get the values in/out of the union.
This changes parts of 3456f9149b.
2009-12-08 19:17:08 +01:00
Brian Paul
bc7567d966 tgsi: fix some off-by-one errors in shader length, instruction length
The ureg and/or tgsi-simplification work introduced some inconsistencies
between the ureg and traditional TGSI construction code.

Now the tgsi_instruction::NrTokens field is consistant and the
tgsi_header::BodySize field isn't off by one.

Fixes bug 25455.
2009-12-08 08:14:14 -07:00
Michal Krol
ddbd2d08b7 util/format: Take advantage of sequential nature of pipe_format enum.
Make sure the format descriptor table can be indexed directly.
2009-12-08 15:46:15 +01:00
Michal Krol
714e1880d9 gallium: Make pipe_format a sequential enum. 2009-12-08 15:35:54 +01:00
Michal Krol
ceb3cf5519 util/format: Remove unreferenced local. 2009-12-08 15:31:07 +01:00
Michal Krol
6fd8b9b550 Remove remaining pipe format utility functions.
Depricate pf_type(), pf_size_*(), pf_layout() and pf_exp2().

Map depricated PIPE_FORMAT_TYPE to new UTIL_FORMAT_ values:

UNKNOWN = TYPE_VOID
UNORM   = TYPE_UNSIGNED + LAYOUT_ARITH
SNORM   = TYPE_SIGNED + LAYOUT_ARITH
FIXED   = TYPE_FIXED
FLOAT   = TYPE_FLOAT
USCALED = TYPE_UNSIGNED + LAYOUT_ARRAY
SSCALED = TYPE_SIGNED + LAYOUT_ARRAY
SRGB    = TYPE_COLORSPACE_SRGB
2009-12-08 15:30:10 +01:00