summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Support GLSL ES in the standalone compile.Chia-I Wu2010-09-081-1/+3
| | | | GLSL ES mode is enabled when --glsl-es is passed to glsl_compiler.
* glsl: Require a context in _mesa_glsl_parse_state.Chia-I Wu2010-09-082-62/+62
| | | | | Create a dummy context in the standalone compiler and pass it to _mesa_glsl_parse_state.
* st/dri: Call dri_init_extensions only for API_OPENGL.Chia-I Wu2010-09-081-1/+9
| | | | | | | | libmesagallium.a that this state tracker will be linked to expects OpenGL's _glapi_table. That is, it expects libGL.so instead of libGLESv1_CM.so or libGLESv2.so. As there is no clean way to know the shared library the app links to, use the api as a simple check. It might be as well to simply remove this function call though.
* st/dri: Use enum st_api_type internally.Chia-I Wu2010-09-085-27/+39
|
* st/dri: Add multi-api supportnobled2010-09-085-13/+46
| | | | | | | | | | Make st/dri screens capable of creating OpenGL ES and OpenGL ES2 contexts. TODO: Figure out the "get_current" problem with multiple st_api's for real. (s/API_OPENGLES1/API_OPENGLES/ by Chia-I Wu)
* st/dri: Make clear which API's are supportednobled2010-09-081-1/+4
| | | | | If the caller requests a GLES context, don't silently create a desktop GL context in its place.
* r600g: add initial bank swizzle support.Dave Airlie2010-09-084-4/+295
| | | | | this is ported from r600c mostly, bank swizzling is real messy and I don't think I got enough sleep last night to fully understand it.
* glcpp: Fix build on non-GCC compilers.Kenneth Graunke2010-09-072-90/+92
|
* ast_to_hir: Mark arrays as lvalues in GLSL ES, but prohibit assignment.Kenneth Graunke2010-09-071-1/+7
| | | | | | This allows them to be passed as out/inout parameters, but still prevents them from being used as the target of an assignment. This is per section 5.8 of the GLSL ES 1.00 specification.
* glsl: Allow overloading of built-ins without hiding in GLSL ES.Kenneth Graunke2010-09-071-1/+1
| | | | The rules are explicitly different from desktop GLSL.
* glsl: Move is_builtin flag back to ir_function_signature.Kenneth Graunke2010-09-079-15/+28
| | | | | | | | | | | This effectively reverts b6f15869b324ae64a00d0fe46fa3c8c62c1edb6c. In desktop GLSL, defining a function with the same name as a built-in hides that built-in function completely, so there would never be built-in and user function signatures in the same ir_function. However, in GLSL ES, overloading built-ins is allowed, and does not hide the built-in signatures - so we're back to needing this.
* ast_to_hir: Reject embedded structure definitions in GLSL ES 1.00.Kenneth Graunke2010-09-071-0/+9
|
* ast_to_hir: Reject unsized array declarations in GLSL ES 1.00.Kenneth Graunke2010-09-071-9/+18
|
* ast_to_hir: Allow matrix-from-matrix constructors in GLSL ES.Kenneth Graunke2010-09-071-1/+1
| | | | Everything but 1.10 supports this, so just change the check to ==.
* i965: Enable EXT_framebuffer_blit internally.Kenneth Graunke2010-09-071-0/+1
| | | | | | Otherwise, ES2's BindFramebuffer entrypoint hits this assertion: main/fbobject.c:1323: _mesa_BindFramebufferEXT: Assertion `ctx->Extensions.EXT_framebuffer_blit' failed.
* mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.Kenneth Graunke2010-09-071-1/+16
| | | | | Signed-off-by: Kristian Høgsberg <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* linker: Fix assertion and cross-version checks for version 100.Kenneth Graunke2010-09-071-2/+3
| | | | | | Fixes an assert (min_version >= 110) which was no longer correct, and also prohibits linking ES2 shaders with non-ES2 shaders. I'm not positive this is correct, but the specification doesn't seem to say.
* glsl: Add built-in function profiles for GLSL ES 1.00.Kenneth Graunke2010-09-073-11/+2953
|
* glsl: Add built-in variables for GLSL ES 1.00.Kenneth Graunke2010-09-072-0/+82
|
* glsl: Split out types that are in 1.10 but not GLSL ES 1.00.Kenneth Graunke2010-09-073-15/+35
|
* glsl: Recognize GLSL ES 1.00 keywords.Kenneth Graunke2010-09-074-281/+287
|
* glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke2010-09-079-228/+250
| | | | Also define it if #version 100 is encountered.
* glsl: Accept language version 100 and make it the default on ES2.Kenneth Graunke2010-09-074-242/+255
|
* glsl: Set default language version in mesa_glsl_parse_state constructor.Kenneth Graunke2010-09-074-260/+249
| | | | | | | | | | This should make it easier to change the default version based on the API (say, version 1.00 for OpenGL ES). Also, synchronize the symbol table's version with the parse state's version just before doing AST-to-HIR. This way, it will be set when it matters, but the main initialization code doesn't have to care about the symbol table.
* ir_to_mesa: Add support for gl_NormalScale.Eric Anholt2010-09-072-0/+7
| | | | Bug #30040.
* glsl: Make sure shader source isn't NULL.Kenneth Graunke2010-09-071-0/+8
| | | | | This should only occur if glCompileShader is called without a prior call to glShaderSource. An empty source program should be the empty string.
* r600g: Added missing r600_bc_add_literal() calls to XPD implementation.Tilman Sauerbeck2010-09-081-0/+8
| | | | Signed-off-by: Dave Airlie <[email protected]>
* r600g: Added preliminary support for the LOG opcode.Tilman Sauerbeck2010-09-081-1/+121
| | | | Signed-off-by: Dave Airlie <[email protected]>
* r600g: Added missing abs-ification to RSQ.Tilman Sauerbeck2010-09-081-1/+30
| | | | | | This makes the 'fp1-RSQ test 2' piglit test work. Signed-off-by: Dave Airlie <[email protected]>
* r600g: split opcodes out and add wrapper around usage.Dave Airlie2010-09-084-208/+233
| | | | | | This splits the r600 opcodes out of the sq file and adds a wrapper so we can convert to evergreen opcodes later without touching these functions too much.
* r600g: add support for constants in memory buffers.Dave Airlie2010-09-0814-51/+154
| | | | | | DX9 constants were in the constant file, and evergreen no longer support cfile. r600/700 can also use constants in memory buffers, so add the code (disabled for now) to enable that as precursor for evergreen.
* r600g: abstract the hw states out behind a vtbl.Dave Airlie2010-09-087-975/+1103
| | | | | this is step one towards evergreen support, it lets us plug in whole new hw level states.
* glsl2: Forbid array-types in ?: operator in GLSL 1.10Ian Romanick2010-09-071-0/+11
| | | | Fixes bugzilla #30039.
* mesa: Set the base format of GL_ALPHA FBOs and teach swrast about it.Eric Anholt2010-09-073-3/+12
| | | | | Fixes assertion failures in fbo-alpha with a debug build of Mesa. Bug #29781.
* ir_to_mesa: Fix warning in last commit.Eric Anholt2010-09-071-1/+1
| | | | | I swear there was some git option for "don't push things when you've got uncommitted changes", but I can't find it now.
* ir_to_mesa: Move the STATE_VAR elements of a builtin uniform to a temp (v2).Eric Anholt2010-09-071-345/+326
| | | | | | | | | | | | | | | | | | Like the constant handling and the handling of other uniforms, we add the whole thing to the Parameters, avoiding messy, incomplete logic for adding just the elements of a builting uniform that get used. This means that a driver that relies only on ParameterValues[] for its parameters will have an increased parameter load, but drivers generally don't do that (since they have other params they need to handle, too). Fixes glsl-fs-statevar-call (testcase for Ember). Bug #29687. v2: Continue referencing the STATE_VAR[] file directly when the uniform will land in STATE_VAR[] formatted exactly as we'd put into a temporary. When there's array dereferencing, we don't copy-propagate in Mesa IR (not knowing where the array is in register space), so smarts here are required or we'll massively increase the temp count.
* glsl2: Early return with visit_continue in ↵Ian Romanick2010-09-071-1/+1
| | | | | | | | | | | | loop_analysis::visit(ir_dereference_variable *) Returning early with visit_continue_with_parent prevented the then-statements and else-statements of if-statements such as the following from being processed: if (some_var) { ... } else { ... } Fixes piglit test case glsl-fs-loop-nested-if and bugzilla #30030.
* glsl: Change grammar rules for selection statements to match the spec.Kenneth Graunke2010-09-073-950/+913
| | | | | | Fixes piglit test case loop-06.vert. Unfortunately, causes 1 shift/reduce conflict.
* i965: Store the byte address in the VS constant buffer as an integer.Eric Anholt2010-09-071-1/+1
| | | | | | | We carefully multiplied our two ints (since we want to be precise after all) then stored them in a float, which is not specced to really work, in addition to wasting precision. Fixes vp-arl-constant-array-huge-* things since the assertions were added.
* i965: Make pixel_xy results UW.Eric Anholt2010-09-071-0/+2
| | | | | | | There is a restriction on the destination of an operation involving a vector immediate being 128-bit aligned and the destination horizontal stride being equivalent to 2 bytes. Fixes bad pixel_x results from gl_FragCoord, where each pair had the same value.
* glsl2: check for _NumLinkedShaders being 0Török Edvin2010-09-071-1/+1
| | | | | | | Otherwise spring 0.82+.4.0 crashes when starting a game because prog->_LinkedShaders[0] is NULL. This also fixes piglit test cases glsl-link-empty-prog-0[12].
* glx: Set an all NULL vtable for dummyContextKristian Høgsberg2010-09-073-8/+9
| | | | | | This reverts 6a6e6d7b0a84e20f9754af02a575ae34081d310c and initializes dummyContext with an all NULL vtable. The context vtable pointer is supposed to always be non-NULL, but the vtable entries can be NULL.
* glx: Fix compilation with out xf86vidmodeKristian Høgsberg2010-09-071-7/+1
|
* glx: Use GLX_BufferSwapComplete unconditionally, we require glproto 1.4.11Kristian Høgsberg2010-09-071-11/+0
|
* Fix crashes when some GLX API entrypoints are called with no current context.Michel Dänzer2010-09-071-5/+5
| | | | | | | | | I was hitting this with gliv. The GLX spec explicitly mentions that glXWaitX, glXWaitGL and glXUseXFont calls are ignored when there's no current context. Not sure what if anything the GLX_EXT_texture_from_pixmap spec says about this, but I think ignoring the calls makes more sense than crashing there as well. :)
* i965: Don't bother with RNDZ for f2i.Eric Anholt2010-09-071-1/+1
| | | | | The default type conversion for MOV should be fine, and RNDZ actually requires two instructions.
* i965: Add some validation on BRW_OPCODE_MUL and ADD's arguments.Eric Anholt2010-09-071-2/+57
| | | | | Now that we're playing with other types in brw_fs.cpp, it's easy to trip over issues like these.
* i965: Add assertion for another requirement about types.Eric Anholt2010-09-071-1/+13
| | | | This catches a failure in the FS backend.
* i965: Align the start of attribute interp coefficients in FS to use PLN.Eric Anholt2010-09-071-0/+8
|
* i965: Just assert when we flagged a compile error in the FS for now.Eric Anholt2010-09-071-3/+5
| | | | | | Dumping back to potentially 16-wide dispatch doesn't really work out at the moment, and hopefully I'll just be able to resolve all the failures so we never have to do this at all.