Age | Commit message (Collapse) | Author |
|
Don't overload the Size field with the texture target, to avoid confusion.
|
|
|
|
|
|
|
|
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.
|
|
|
|
On Windows snprintf is renamed as _snprintf.
(cherry picked from commit f8f9a1b620d31d1a59855fd502caed325d4a324f)
|
|
|
|
|
|
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...
|
|
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).
|
|
(cherry picked from commit 3740a06e28f4cd09e2a3dce2da60320aa9304df1)
|
|
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.
|
|
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.
|
|
array.length() wasn't working.
Swizzle mask for accessing elements of float arrays was incorrect.
|
|
And update some copyrights.
|
|
|
|
|
|
|
|
This allows uniform declarations with scalar/array initializers.
The code is rough though, and will be cleaned up.
|
|
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.
|
|
|
|
|
|
|
|
For example: float[3] xxx = float[3](1.1, 2.2, 3.3);
Optimizations for const-qualified arrays next.
|
|
Function that return arrays should work now.
|
|
|
|
|
|
|
|
|
|
|
|
More code consolidation coming...
|
|
|
|
|
|
This allows things like float[3] x = float[3](1., 2., 3.);
Parsing and AST construction now. Codegen not working yet.
|
|
|
|
This is the only method supported in GLSL 1.20 so we take a few short-cuts.
|
|
|
|
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
|
|
function
Bug #18659.
|
|
|
|
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.
|
|
|
|
The Swizzle and Size fields carry all the info we need now.
|
|
|
|
|
|
This lets one specify initial values for uniforms in the code, avoiding
the need to call glUniform() in some cases.
|
|
emitted yet though)
|
|
Expressions like array[i] + array[j] didn't work properly before.
|
|
The swizzle mask for such variables wasn't set up properly.
|