Brian
e4e66476a9
remove debug code
18 years ago
Brian
f43eac3ed8
remove swizzle param from new_var()
18 years ago
Brian
8a2368edce
rewrite additional matrix-related functions to reduce register needs
19 years ago
Brian
89a3bafe04
rewrite mat4 * mat4 operator to use fewer temps
19 years ago
Brian
272622a2e0
do bounds check in _slang_push_var_table(), added comment
19 years ago
Brian
2585b74e19
rewrite matrix constructors
19 years ago
Brian
4864aaeb02
handle var size > 4 in _slang_pop_var_table()
19 years ago
Brian
f4e345c1a8
minor fprintf() change
19 years ago
Brian
eb0c478b17
Rewrite a bunch of constructors. It's now important that the first
constructor for any given type be the one that takes the most parameters
as this is the constructor that'll be used when there's no perfect match
to the caller's arguments.
See the _slang_adapt_call() function for details.
19 years ago
Brian
3a3bb953b6
_slang_gen_function_call_name() now tries to adapt function calls (expand
vectors, insert casts) when a perfect match isn't found.
19 years ago
Brian
eabb7e66bd
New _slang_adapt_call() function.
This is used to modify function calls (when possible) to make the arguments
map to the function parameters. This includes "unrolling" vector types
and doing casts.
Example:
vec2 v2 = vec2(1.2, 3.4)
ivec3 iv = ivec3(false, v2);
Is converted into:
ivec3 iv = ivec3(int(false), int(v2[0]), int(v2[1]))
19 years ago
Brian
397b807ad5
code clean-up, re-org. Added IR_F_TO_I support.
19 years ago
Brian
bb53124fca
added IR_F_TO_I, update comments
19 years ago
Brian
0bad236cfb
Added OPCODE_INT to convert 4 floats to 4 ints.
19 years ago
Brian
46a9241248
add texturing, other options
19 years ago
Brian
811f54fa75
Fix/clean-up a number of things related to variable/temporary allocation.
19 years ago
Brian
552a65e454
Implement codegen for the selection operator ( b ? x : y )
19 years ago
Brian
3596903068
fix typo
19 years ago
Brian
271d504ed7
draw a box, press 'a' to animate
19 years ago
Brian
9d0ae967d4
added some VerteAttrib funcs
19 years ago
Brian
f44ba11815
Added toyball and bumpmap tests using shaders from the OpenGL Shading Language (orange) book.
19 years ago
Brian
9b5dc1358a
when automatically binding vertex attributes, start with attrib 1, not 0
19 years ago
Brian
4f027a33b9
remove dead code
19 years ago
Brian
0f91310bf3
comments
19 years ago
Brian
d90c655b05
implement logical or, xor, not
19 years ago
Brian
99e788fe56
some additional vector constructors
19 years ago
Brian
156e583a35
fix _slang_gen_subscript() for the case when a simple vector is accessed as an array: convert index to a swizzle/writemask
19 years ago
Brian
0d55346156
Use arrow keys to pan and z/Z to zoom in/out to explore the fractal.
19 years ago
Brian
2ccd264695
Added new directory of GL shading language demos: glsl
19 years ago
Brian
f6507157e2
Reimplement the post-increment/decrement functions.
Instead of defining functions with an extra dummy parameter to distinguish
from the pre-incr/decr functions, just use new function names: __postIncr
and __postDecr.
19 years ago
Brian
c410994653
Implement the ++var and --var operators, improve some constructors.
19 years ago
Brian
0a097675f1
added vec3 constructor code
19 years ago
Brian
82258b7af3
added IR_ELEMENT
19 years ago
Brian
04ac15fd80
checkpoint: ++, -- and && operators
19 years ago
Brian
83d3ff590d
Redo the way array indexes are handled. Resolve storage location at code emit time, not codegen time.
19 years ago
Brian
c807169888
remove old globals
19 years ago
Brian
a5bbe206a8
comments
19 years ago
Brian
8de3dc1701
Move some global vars into slang_assemble_ctx.
19 years ago
Brian
4f5901b265
fix the subassig, mulassign and divassign cases
19 years ago
Brian
629fd78f79
clean-up slang_allocate_storage()
19 years ago
Brian
64414ea0e9
added glUniform1fv_func, glUniform2fv_func
19 years ago
Brian
691ed5e54b
Rework code related to temp register allocation, both for user variables
and expression temporarires. Much better register utilization now.
Lots of other fixes.
The OpenGL GLSL "orange book" brick shader demo works now.
19 years ago
Brian
5daa99d2a4
slang_variable_scope now stores array of pointers to slang_variables.
19 years ago
Brian
97c7937c65
added another vec4 constructor, updated += operator
19 years ago
Brian
95a441112e
Fix a problem with inlined "return" statements. Make some attempt to free temporaries.
19 years ago
Brian
063f3f7fc4
disable some code that'll eventually go away
19 years ago
Brian
749ed66549
new vec3 constructor, replace float_add w/ vec4_add
19 years ago
Brian
c8e148e38c
tweak output
19 years ago
Brian
c0c31024a3
checkpoint: codegen for global vars/constants now working
19 years ago
Brian
88e2dbfd10
checkpoint: codegen for global vars w/ initializers
19 years ago