Commit graph

37913 commits

Author SHA1 Message Date
Chia-I Wu
6d28bf917f gallium: Implement draw_vbo and set_index_buffer for all drivers.
Some drivers define a generic function that is called by all drawing
functions.  To implement draw_vbo for such drivers, either draw_vbo
calls the generic function or the prototype of the generic function is
changed to match draw_vbo.

Other drivers have no such generic function.  draw_vbo is implemented by
calling either draw_arrays and draw_elements.

For most drivers, set_index_buffer does not mark the state dirty for
tracking.  Instead, the index buffer state is emitted whenever draw_vbo
is called, just like the case with draw_elements.  It surely can be
improved.
2010-07-29 13:45:30 +08:00
Chia-I Wu
c5e9d3114a gallium: Add pipe_context::draw_vbo and pipe_context::set_index_buffer.
This commit adds a new unified draw_vbo method to pipe_context.  Unlike
other draw methods, draw_vbo treats the index buffer as a state which is
set with set_index_buffer.
2010-07-29 13:45:30 +08:00
Vinson Lee
7e4e79be6b mesa: Remove unnecessary header. 2010-07-28 22:27:52 -07:00
Kristian Høgsberg
2c343af098 egl: Fix deref before NULL-check 2010-07-28 23:54:16 -04:00
Kristian Høgsberg
9456e22c7a intel: Implement EGL_KHR_surfaceless extension 2010-07-28 23:07:09 -04:00
Kristian Høgsberg
efd4a8cffd egl_dri2: Implement EGL_KHR_surfaceless_* extensions 2010-07-28 23:07:09 -04:00
Kristian Høgsberg
b90a3e7d8b egl: EGL_KHR_surfaceless_* extensions
These extensions allow an application to make a context current by
passing EGL_NO_SURFACE for the write and read surface in the call to
eglMakeCurrent.  The motivation is that applications that only want to
render to client API targets (such as OpenGL framebuffer objects)
should not need to create a throw-away EGL surface just to get a
current context.
2010-07-28 23:07:00 -04:00
Kristian Høgsberg
aa44bd9189 Untangle gallium/egl/glx source sharing mess and make it compile again 2010-07-28 22:18:58 -04:00
Eric Anholt
d6942460ce glsl2: Actually fix glsl-version-define. 2010-07-28 17:36:07 -07:00
Eric Anholt
d4a04f3155 glcpp: Add __VERSION__ define to the current language version.
Fixes:
glsl-version-define
glsl-version-define-110
glsl-version-define-120
2010-07-28 17:32:39 -07:00
Eric Anholt
8605c297cf glcpp: Print integer tokens as decimal, not hex. 2010-07-28 17:32:11 -07:00
Eric Anholt
192b57df8c glsl2: Make lowp, mediump, highp, and precision identifiers pre-1.20.
Fixes glsl-precision-110.
2010-07-28 17:32:11 -07:00
Jerome Glisse
42c1f27149 r600g: state context ptr in sampler_view & add I8/L8 buffer format
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 20:09:15 -04:00
Jerome Glisse
35e044ab56 r600g: switch btw flat/linear interpolation
I am not sure how to properly handle flat shading regarding
non color parameter to fragment shader. It seems we should
still interpolate non color using linear interpolation and
flat shade only apply to color.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 19:59:38 -04:00
Kenneth Graunke
35cc8b98ec glsl2/Makefile: Append to DEFINES rather than replacing them.
Otherwise, we lose DEBUG, which causes mtypes.h to set NDEBUG, which
causes assertions to not happen, which is no fun for anyone.
2010-07-28 16:48:04 -07:00
Jerome Glisse
6f0f6c6459 r600g: split pipe state creating/binding from hw state creation
Split hw vs pipe states creation handling as hw states group doesn't
match pipe state group exactly. Right now be dumb about that and
rebuild all hw states on each draw call. More optimization on that
side coming.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 19:36:16 -04:00
Eric Anholt
859fd56245 ir_to_mesa: Respect the driver if it rejects a shader. 2010-07-28 15:51:36 -07:00
Kenneth Graunke
56af4e56e3 glsl2: Fix outerProduct builtin.
The type signatures were completely backwards.
2010-07-28 15:46:29 -07:00
Kenneth Graunke
7ddee6a535 ir_constant_expression: Add support for the "outerProduct" builtin. 2010-07-28 15:46:29 -07:00
Kenneth Graunke
5d255e24b2 ir_constant_expression: Add support for the "mix" builtin.
Both 1.10 and 1.30 variants.
2010-07-28 15:46:29 -07:00
Kenneth Graunke
b09ae5dd3f ir_constant_expression: Add support for the "transpose" builtin. 2010-07-28 15:46:29 -07:00
Kenneth Graunke
546f3a2754 ir_constant_expression: Add support for the "smoothstep" builtin. 2010-07-28 15:46:29 -07:00
Kenneth Graunke
a4ca1cfb66 ir_constant_expression: Add support for the "clamp" builtin. 2010-07-28 15:46:29 -07:00
Kenneth Graunke
ff58b7c9b6 ir_constant_expression: Add support for the "step" builtin. 2010-07-28 15:46:29 -07:00
Kenneth Graunke
3d5c2f0adb ir_constant_expression: Add support for the "faceforward" builtin. 2010-07-28 15:46:29 -07:00
Kenneth Graunke
04b3643dbf ir_constant_expression: Add support for the "refract" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
d60b2b03da ir_constant_expression: Add support for the "reflect" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
53f306d573 ir_constant_expression: Add support for the "normalize" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
8fe5f30645 ir_constant_expression: Add support for the "matrixCompMult" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
a7650af706 ir_constant_expression: Simplify code that implements the "dot" builtin.
There's no need to use an ir_expression; we have a handy C function.
2010-07-28 15:46:28 -07:00
Kenneth Graunke
5489ad086f ir_constant_expression: Add support for the "length" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
ffcec13599 ir_constant_expression: Extract dot product calculation for reuse. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
4b1d77ea96 ir_constant_expression: Remove support for dot products of integers.
This shouldn't be required since dot is only defined for floating point
types, even in GLSL 4.0.
2010-07-28 15:46:28 -07:00
Kenneth Graunke
557827340a ir_constant_expression: Add support for the "greaterThanEqual" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
7f042b9812 ir_constant_expression: Add support for the "greaterThan" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
319f4949e0 ir_constant_expression: Add support for the "lessThanEqual" builtin. 2010-07-28 15:46:28 -07:00
Kenneth Graunke
6d897f07cf ir_constant_expression: Add support for the "lessThan" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
48a69ba057 ir_constant_expression: Add support for the "notEqual" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
0b6ef6ef6e ir_constant_expression: Add support for the "equal" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
2eaf31642c ir_constant_expression: Add support for the "distance" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
7bcaa3828f ir_constant_expression: Add support for the "degrees" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
0afe349322 ir_constant_expression: Add support for the "radians" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
20970f7dea ir_constant_expression: Add support for the "tanh" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
9c9f8b2d69 ir_constant_expression: Add support for the "tan" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
5d551daf38 ir_constant_expression: Add support for the "sinh" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
ba4178345a ir_constant_expression: Add support for the "cosh" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
13f8758e9c ir_constant_expression: Add support for "atan" builtins. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
f6ea9dfe47 ir_constant_expression: Add support for "acos" builtin. 2010-07-28 15:46:27 -07:00
Kenneth Graunke
3b6c29b8f0 ir_constant_expression: Add support for "asin" builtin. 2010-07-28 15:46:26 -07:00
Kenneth Graunke
d6792a7f7c ir_constant_expression: Add support for "any" builtin. 2010-07-28 15:46:26 -07:00