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