summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-09-07glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke
Also define it if #version 100 is encountered.
2010-09-07glsl: Accept language version 100 and make it the default on ES2.Kenneth Graunke
2010-09-07glsl: Set default language version in mesa_glsl_parse_state constructor.Kenneth Graunke
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.
2010-09-07ir_to_mesa: Add support for gl_NormalScale.Eric Anholt
Bug #30040.
2010-09-07glsl: Make sure shader source isn't NULL.Kenneth Graunke
This should only occur if glCompileShader is called without a prior call to glShaderSource. An empty source program should be the empty string.
2010-09-08r600g: Added missing r600_bc_add_literal() calls to XPD implementation.Tilman Sauerbeck
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08r600g: Added preliminary support for the LOG opcode.Tilman Sauerbeck
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08r600g: Added missing abs-ification to RSQ.Tilman Sauerbeck
This makes the 'fp1-RSQ test 2' piglit test work. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08r600g: split opcodes out and add wrapper around usage.Dave Airlie
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.
2010-09-08r600g: add support for constants in memory buffers.Dave Airlie
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.
2010-09-08r600g: abstract the hw states out behind a vtbl.Dave Airlie
this is step one towards evergreen support, it lets us plug in whole new hw level states.
2010-09-07glsl2: Forbid array-types in ?: operator in GLSL 1.10Ian Romanick
Fixes bugzilla #30039.
2010-09-07mesa: Set the base format of GL_ALPHA FBOs and teach swrast about it.Eric Anholt
Fixes assertion failures in fbo-alpha with a debug build of Mesa. Bug #29781.
2010-09-07ir_to_mesa: Fix warning in last commit.Eric Anholt
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.
2010-09-07ir_to_mesa: Move the STATE_VAR elements of a builtin uniform to a temp (v2).Eric Anholt
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.
2010-09-07glsl2: Early return with visit_continue in ↵Ian Romanick
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.
2010-09-07glsl: Change grammar rules for selection statements to match the spec.Kenneth Graunke
Fixes piglit test case loop-06.vert. Unfortunately, causes 1 shift/reduce conflict.
2010-09-07i965: Store the byte address in the VS constant buffer as an integer.Eric Anholt
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.
2010-09-07i965: Make pixel_xy results UW.Eric Anholt
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.
2010-09-07glsl2: check for _NumLinkedShaders being 0Török Edvin
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].
2010-09-07glx: Set an all NULL vtable for dummyContextKristian Høgsberg
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.
2010-09-07glx: Fix compilation with out xf86vidmodeKristian Høgsberg
2010-09-07glx: Use GLX_BufferSwapComplete unconditionally, we require glproto 1.4.11Kristian Høgsberg
2010-09-07Fix crashes when some GLX API entrypoints are called with no current context.Michel Dänzer
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. :)
2010-09-07i965: Don't bother with RNDZ for f2i.Eric Anholt
The default type conversion for MOV should be fine, and RNDZ actually requires two instructions.
2010-09-07i965: Add some validation on BRW_OPCODE_MUL and ADD's arguments.Eric Anholt
Now that we're playing with other types in brw_fs.cpp, it's easy to trip over issues like these.
2010-09-07i965: Add assertion for another requirement about types.Eric Anholt
This catches a failure in the FS backend.
2010-09-07i965: Align the start of attribute interp coefficients in FS to use PLN.Eric Anholt
2010-09-07i965: Just assert when we flagged a compile error in the FS for now.Eric Anholt
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.
2010-09-07i965: Clean up fs_reg setup by using a helper for constructors.Eric Anholt
2010-09-07i965: When using the new FS backend, don't validate the Mesa IR version.Eric Anholt
2010-09-07i965: Add a bit of validation for some ISA restrictions in the docs.Eric Anholt
2010-09-07i965: set the source width/stride when handling reladdr dests in the VS.Eric Anholt
This is a requirement specified in the docs. No behavior change in glsl-vs-varying-array.shader_test that violated these requirements.
2010-09-07Make XF86VIDMODE extension optionalJon TURNEY
Code in glx/glxcmds.c which uses the XF86VIDMODE extension is already guarded. Also use that guard to control inclusion of the xf86vmode.h header, and only enable that guard if the XF86VIDMODE extension is found by pkgconfig. This changes the behaviour on platforms which XF86VIDMODE exists, in that XF86VIDMODE used to be mandatory, but is now optional. Presumably other build systems are already arranging for -DXF86VIDMODE to be supplied to the complier when glxcmds.c is compiled, so are not affected by this change Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-09-07glx: Drop unused dri2proto.h includeKristian Høgsberg
2010-09-07glx: Move dpy and scr fields out of direct rendering conditionalKristian Høgsberg
Nothing direct rendering specific about these fields. Moving them out makes no-direct-rendering compilation work again. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-07Some fixes for GLX_INDIRECT_RENDERING only buildJon TURNEY
This fixes some of the build issues with GLX_INDIRECT_RENDERING but !GLX_DIRECT_RENDERING due to recent changes. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-07dri: Make it a little clearer that we're not dereferencing a NULL pointernobled
2010-09-07dri: Use the right type for the API tokennobled
Pass mesa_api to CreateContext, and abort early if the requested API isn't recognized.
2010-09-07libgl-xlib: Fix --enable-gallium-llvm build.Chia-I Wu
Check MESA_LLVM and link to LLVM as other targets do.
2010-09-07llvmpipe: Add lp_rast_debug.c to Makefile.Chia-I Wu
2010-09-07glx: Only clear the stored context tag when the context has been unboundJon TURNEY
The calling order of ->bind and ->unbind changed and then ->unbind would clear the currentContextTag of the old context before ->bind could reuse it in the make current request, in the indirect case. Instead, clear the old currentContextTag if and only if we send a request to the server to actually unbind it or reassign it to another context. https://bugs.freedesktop.org/show_bug.cgi?id=29977 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-07llvmpipe: Refactor lp_scene_add_resource_referenceJosé Fonseca
Less goto spaghetti.
2010-09-07llvmpipe: Fix negated logic in lp_scene_add_resource_reference().José Fonseca
Fixes performance regression.
2010-09-07llvmpipe: move more coef setup into lp_setup_coef.cKeith Whitwell
2010-09-07llvmpipe: declare fence handle structKeith Whitwell
2010-09-07llvmpipe: rasterization debugging helpersKeith Whitwell
2010-09-07llvmpipe: use opcodes instead of function pointers in binsKeith Whitwell
Also, move some state from rasterizer struct to the scene.
2010-09-07llvmpipe: rearrange queriesKeith Whitwell
2010-09-07llvmpipe: enforce fixed memory limit on scenesKeith Whitwell