summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* glsl: add several EmitNo* options, and MaxUnrollIterationsLuca Barbieri2010-09-085-9/+15
| | | | | | | | | This increases the chance that GLSL programs will actually work. Note that continues and returns are not yet lowered, so linking will just fail if not supported. Signed-off-by: Ian Romanick <[email protected]>
* glsl: make compiler options per-targetLuca Barbieri2010-09-088-25/+64
| | | | | | | This allows us to specify different options, especially useful for chips without unified shaders. Signed-off-by: Ian Romanick <[email protected]>
* mesa: add PIPE_SHADER_* like constants and conversions to/from enums (v2)Luca Barbieri2010-09-083-0/+72
| | | | | Changes in v2: - No longer adds tessellation enums
* mesa: Refactor parameter processing in set_combiner_(operand|source)Ian Romanick2010-09-081-68/+22
| | | | | The enum values were chosen to have sequential values for a reason. Use that to compact and simplify the code.
* mesa: Fix handling of texenv operands for EXT vs ARB versionIan Romanick2010-09-081-18/+19
| | | | | | | | | | GL_EXT_texture_env_combine has slightly more restrictive limits on the valid sources for some operands. This wasn't caught before because almost every driver in Mesa that supports the EXT version also supports the ARB version. Inspired by a patch posted the the mesa-dev mailing list by Andrew Randrianasulu.
* dri: Unset current context and dispatch table when unbindingKristian Høgsberg2010-09-084-0/+13
| | | | | | | | Otherwise, when we switch to an indirect glx context and then back, it looks like we're still current. https://bugs.freedesktop.org/show_bug.cgi?id=29977#c7 Signed-off-by: Kristian Høgsberg <[email protected]>
* 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]>
* glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke2010-09-071-1/+1
| | | | Also define it if #version 100 is encountered.
* 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.
* 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.
* 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.
* 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.
* i965: Clean up fs_reg setup by using a helper for constructors.Eric Anholt2010-09-071-27/+16
|
* i965: When using the new FS backend, don't validate the Mesa IR version.Eric Anholt2010-09-071-0/+16
|
* i965: Add a bit of validation for some ISA restrictions in the docs.Eric Anholt2010-09-071-0/+70
|
* i965: set the source width/stride when handling reladdr dests in the VS.Eric Anholt2010-09-071-0/+6
| | | | | This is a requirement specified in the docs. No behavior change in glsl-vs-varying-array.shader_test that violated these requirements.
* dri: Make it a little clearer that we're not dereferencing a NULL pointernobled2010-09-071-1/+2
|
* dri: Use the right type for the API tokennobled2010-09-071-1/+3
| | | | | Pass mesa_api to CreateContext, and abort early if the requested API isn't recognized.
* nouveau: restore nouveau_class.h for nv04-nv20Luca Barbieri2010-09-071-1/+4953
| | | | | Sorry, I deleted the Gallium copy without realizing that the DRI one was just a symlink to it.
* mesa: Define C99's __func__ macro on MSVC.José Fonseca2010-09-061-0/+12
|
* radeon: Add radeon_buffer_objects.c.Henri Verbeet2010-09-051-0/+1
|
* r200: Add radeon_buffer_objects.c.Henri Verbeet2010-09-053-0/+3
|
* radeon: Make do_blit_readpixels() into a PBO work.Henri Verbeet2010-09-051-11/+31
|
* mesa: don't smash the stack in _mesa_find_used_registersLuca Barbieri2010-09-051-2/+6
| | | | | | At some point this actually triggered, not sure if it still does. Give a meaningful assert and refuse to smash the stack anyway.
* mesa: don't expose unsupported GL_ARB_geometry_shader4 for nowLuca Barbieri2010-09-051-1/+2
| | | | | | | The new GLSL compiler doesn't support it. Advertising it prevents Unigine Heaven from working, since it attempts to use it.
* r300g,r300c: memset the compiler struct to zerosMarek Olšák2010-09-053-0/+3
| | | | This should fix bogus reports "Too many temporaries." and maybe some others.
* r300/compiler: Remove stray break statementTom Stellard2010-09-041-1/+0
| | | | This fixes glsl-fs-loop-nested.
* r300/compiler: fix the instruction limit in vertex shadersMarek Olšák2010-09-051-1/+1
| | | | | | Broken with commit d774b0c710bb7d833d17bd12f5151a0176baad96. Reported by Chris Rankin.
* Revert "ir_to_mesa: Load all the STATE_VAR elements of a builtin uniform to ↵Marek Olšák2010-09-041-291/+345
| | | | | | | | | | | | | | a temp." This reverts commit 5ad74779cea07cc6a19a52874cdaef8b018e2f1b. Sorry, but I had to revert this. Any commit which needlessly increases the number of temporaries is wrong. More temporaries mean less shader performance because of reduced parallelism and therefore less efficient latency hiding. In this case, there is possible performance degradation of every shader which uses GL state variables. I cannot accept this.
* r300/compiler: indent printed instructions according to the branch depthMarek Olšák2010-09-041-4/+44
|
* r300/compiler: use limits from the compiler input instead of inline constantsMarek Olšák2010-09-041-5/+4
|
* r300/compiler: improve register allocation with indexable temporaries for VSMarek Olšák2010-09-041-17/+46
| | | | | Register allocation can now reallocate temporaries right after the last indexed source operand, instead of being disabled for the whole shader.
* r300/compiler: fix handling of indexed temporaries in peepholeMarek Olšák2010-09-041-1/+9
|
* r300/compiler: disable deadcode elimination for indexed dst operandsMarek Olšák2010-09-041-0/+14
|
* r300/compiler: allocate at least FS inputs if register allocation is disabledMarek Olšák2010-09-043-9/+52
|
* r300g: add a new debug option which disables compiler optimizationsMarek Olšák2010-09-046-6/+13
| | | | | | | | | | | | Those are: - dead-code elimination - constant folding - peephole (mainly copy propagation) - register allocation There are some bugs which I need to track down. Also fix up the descriptions of all the debug options.
* r300/compiler: compute the final number of temporaries during translationMarek Olšák2010-09-041-7/+23
| | | | | And not during the register allocation, which may be skipped for debugging purposes. Also the predicate register is now added to the number of temps.
* r300/compiler: make optimizations not use 0.5 swizzles in vertex shadersMarek Olšák2010-09-045-1/+6
|
* r300/compiler: use peephole and constant folding for vertex shaders tooMarek Olšák2010-09-041-1/+3
|
* r300/compiler: remove unused enum OPCODE_REPL_ALPHAMarek Olšák2010-09-041-5/+0
| | | | We use RC_OPCODE_REPL_ALPHA instead.
* r300/compiler: refactor fragment shader compilationMarek Olšák2010-09-0419-165/+85
| | | | This cleans up the mess in r3xx_compile_fragment_program.