summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: Replace magic numbers with register definitions in sampler state.Michel Dänzer2012-04-181-15/+15
|
* radeonsi: Fix white border color type in sampler state.Michel Dänzer2012-04-181-1/+1
|
* glsl/builtins: Rework profiles to use the new '.glsl' common suffix.Kenneth Graunke2012-04-1720-4807/+1902
| | | | | | | | | | | | | | | | | | | | Deletes a lot of pointless duplication, as well as some run-time effort. Conveniently, GLSL 1.40 no longer needs a .vert variant, since it doesn't define any built-ins specific to the vertex shader stage. ARB_texture_rectangle and OES_EGL_image_external also only need a single profile, since the .vert and .frag variants were identical. I didn't bother with EXT_texture_array and OES_texture_3D because they're so tiny that the savings would be miniscule. Cuts the generated builtin_function.cpp from 1.7MB to 1.0MB (41%). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Ian Romanick <[email protected]>
* glsl/builtins: Support stage-agnostic built-in profiles.Kenneth Graunke2012-04-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The built-in subsystem uses "profiles," or GLSL shaders containing prototypes for all built-ins supported within a particular language version (or extension) and shader stage. Since profiles were stage-specific, we had to cut and paste almost all the prototypes between (e.g.) 110.vert and 110.frag. Naturally, this led to sundry cut and paste bugs, where someone fixed an issue in .frag but neglected to update .vert, or vice-versa. Geometry shaders would have only made this worse. This patch introduces support for a new '.glsl' profile suffix which contains prototypes common to all shader stages. The existing '.frag' and '.vert' profiles need only contain the few stage-specific built-ins. Not only does this remove duplication, it makes built-in setup slightly faster: we don't need to re-read the common prototypes and function bodies for both the vertex and fragment shader stage. Internally, this was trivial. We already create a list of gl_shader objects to search through for built-ins: one for the core language version/stage, and additional shaders for any extensions in use. This patch simply adds another shader to the list: core/common, core/stage, and extensions. The next patch will update the profiles to remove the duplication. It's separated out purely to make review easier. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Ian Romanick <[email protected]>
* glsl: Make the standalone compiler accept '.glsl' files.Kenneth Graunke2012-04-171-1/+1
| | | | | | | | | | These ought to be treated as 'any stage', but for now, they're just treated as vertex shaders. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Ian Romanick <[email protected]>
* mesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()Brian Paul2012-04-171-7/+55
| | | | | | | | | | | | Accelerates a few glReadPixels cases for WebGL. See https://bugs.freedesktop.org/show_bug.cgi?id=48545 v2: Per Jose, use bit twiddling for the swizzle case instead of ubyte arrays (it's about 44% faster). Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* glsl/builtins: Use ivec for texel offsets in textureProjGradOffset.Kenneth Graunke2012-04-173-4/+4
| | | | | | | | | | | | | | | | | The GLSL 1.30 -> 4.10 specs all erroneously say "vec2" for a few overloads of textureProjGradOffset, while most overloads and all other texturing functions use ivec types. The GLSL 4.20 specification corrects these to "ivec2", but doesn't mention this as being a conscious change in behavior. Nor does the ARB_shading_language_420pack extension. So presumably it was a typo. At any rate, our builtin functions all use ivec already, so the fact that these prototypes use plain vecs will only lead to applications dying in a fire when trying to use them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* nv50: specify location of UCPs to code generatorChristoph Bumiller2012-04-171-0/+2
| | | | | Was made configurable in e44089b2f79aa2dcaacf348911433d1e21235c0c for Kepler but forgot to update nv50.
* r600g: Use automake to generate MakefileTom Stellard2012-04-172-17/+17
|
* Revert "glsl: Refuse to link GLSL 1.40+ shaders that would use fixed function."Eric Anholt2012-04-161-14/+0
| | | | | | | | | | | | | | | | | | | | | This reverts commit 4ec449a6ed1d2cea3bf83d6518b3b352ce5daceb. I meant to not push this one. Review found that a link error is not mandated: it should link, but you get undefined rendering if you rely on a missing stage. page 42/55 section 2.11 "Vertex Shaders": "If the program object has no vertex shader, or no program object is currently in use, the results of vertex shader execution are undefined." (and similar for page 160/173 section 3.9 "Fragment Shaders" for FS, and page 45/58 section 2.11.2 "Program Objects" for program being 0) It turns out the commit was broken anyway, because it was missing a "goto done", so linkstatus got smashed back to true later and the error just showed up as a warning in the infolog.
* glsl: Refuse to link GLSL 1.40+ shaders that would use fixed function.Eric Anholt2012-04-161-0/+14
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add remaining *sampler2DRect* texture functions.Eric Anholt2012-04-163-0/+158
| | | | | | Fixes the new piglit texelFetch() tests on these. Note that the rest of the new functions are not tested (same as the non-2DRect versions of most of them).
* glsl: Fix the prototype of textureProjGradOffset(sampler2DShadow)Eric Anholt2012-04-161-1/+1
| | | | | | | Indirectly caught by Ken's review of my GLSL 1.40 changes where I copy-and-pasted this line. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Mark [iu]sampler{Buffer,2DRect}as reserved in GLSL 1.40.Eric Anholt2012-04-162-2/+14
| | | | | | | | | The non-integer versions were already reserved in 1.30, but apparently these were forgotten. Fixes piglit glsl-1.40/compiler/reserved/ Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add textureSize(*samplerBuffer) support.Eric Anholt2012-04-163-0/+9
| | | | | | Fixes the corresponding new tests in piglit. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Fix comment typo in 1.40 work.Eric Anholt2012-04-161-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove dead _mesa_sizeof_glsl_type().Eric Anholt2012-04-162-63/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gtest: Don't actually install a library.Eric Anholt2012-04-161-1/+1
| | | | | | | | | The whole point of importing it was that you're not supposed to install this library. Reviewed-by: Matt Turner <[email protected]> Fixes: https://bugs.gentoo.org/show_bug.cgi?id=411825 Reviewed-by: Kenneth Graunke <[email protected]>
* svga: add case for PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETSBrian Paul2012-04-161-0/+2
|
* nvc0: fix nve4 linear copiesChristoph Bumiller2012-04-161-1/+2
|
* targets/xvmc-nouveau: fix accidental hardcoded include pathChristoph Bumiller2012-04-151-1/+1
| | | | 5b0cd37324555638661a4a70c2bdf49eeebe876c wasn't meant to be pushed.
* nv50: use correct semantic map value for undefined PointSize outputChristoph Bumiller2012-04-151-7/+8
|
* targets/xvmc-nouveau: add libdrm include pathChristoph Bumiller2012-04-151-0/+2
|
* nv30: init sample_mask to some default value at context creation timeBen Skeggs2012-04-151-0/+1
| | | | Fixes demos/lodbias.
* nv30: fix some sifm transfer issuesBen Skeggs2012-04-151-3/+2
|
* scons: Fix egl-static build due to conflicting symbols.José Fonseca2012-04-151-2/+1
| | | | | | radeonsi and r600 have duplicate symbols, so it's not possible to statically link both. Remove the newcomer, radeonsi, until duplicate symbols are fixed.
* nvc0: add initial support for nve4+ (Kepler) chipsetsChristoph Bumiller2012-04-1528-159/+799
| | | | | | | | | Most things that work on Fermi should work on Kepler too. There are a few performance optimizations left to do, like better placement of texture barriers and adding scheduling data to the shader instructions (without them, a thread group will be masked for 32 cycles after each single instruction issue).
* radeonsi: s/DUAL_SOURCE_BLEND/MAX_DUAL_SOURCE_RENDER_TARGETS/Tom Stellard2012-04-141-1/+1
| | | | Fixes build broken by commit 0d29fb017bce0968240ae875af4b3702c2cd46ef
* nv50/ir/opt: extend handleCVT for nv50's SET u32 to f32 chainChristoph Bumiller2012-04-141-1/+17
|
* nv50/ir: print interpolation modeChristoph Bumiller2012-04-141-0/+22
|
* nv50: update FP linkage state on one/two-sided lighting switchChristoph Bumiller2012-04-142-1/+12
|
* nv50: delete old shader compiler filesChristoph Bumiller2012-04-147-7252/+0
|
* nv50: hook up to new shader code generatorChristoph Bumiller2012-04-1410-664/+262
|
* nv50/ir: import nv50 targetChristoph Bumiller2012-04-1413-220/+2476
|
* nv50/ir: fix off-by-ones in CSE and nvc0 insnCanLoadChristoph Bumiller2012-04-142-2/+2
|
* nv50/ir/tgsi: generate UCPs with actual outputs instead of SVsChristoph Bumiller2012-04-141-4/+20
| | | | | gl_ClipDistance is treated the same way, this is just nicer and easier assign slots for them on nv50.
* nv50/ir: Fix type of the instruction created by mkCmp() for dst in FILE_FLAGS.Francisco Jerez2012-04-141-1/+2
|
* nv50/ir: fix Instruction::isCommutationLegal for WAWChristoph Bumiller2012-04-141-4/+14
|
* nv50/ir/opt: Add isOptSupported() check in logical arith optimization.Francisco Jerez2012-04-141-8/+5
|
* nv50/ir/ra: Fix live set propagation in the secondary passes of buildLiveSets().Francisco Jerez2012-04-141-3/+3
|
* nv50/ir/opt: don't regard OP_WRSV as dead codeChristoph Bumiller2012-04-141-1/+2
|
* nv50/ir: add isUniform query to ValuesChristoph Bumiller2012-04-142-0/+24
|
* nv50/ir: rewrite the register allocator as GCRA, with spillingChristoph Bumiller2012-04-1411-418/+1475
| | | | | This is more flexible than the linear scan, and we don't need the separate allocation pass for constrained values anymore.
* nv50/ir/tgsi: only export x-component of PSIZEChristoph Bumiller2012-04-141-1/+5
|
* nvc0: fix emission of 3rd src in SET_AND,OR,XORChristoph Bumiller2012-04-141-0/+3
|
* nv50/ir: Fix BuildUtil::mkSelect and mkClobberFrancisco Jerez2012-04-141-6/+2
|
* nv50/ir: fix reg file conflicts with undefined-value placeholdersChristoph Bumiller2012-04-141-10/+19
|
* nv50/ir/opt: silence warning (int < Elements() signedness)Christoph Bumiller2012-04-141-1/+1
|
* nv50/ir/opt: fix combineSt access to wrong instructionChristoph Bumiller2012-04-141-1/+1
|
* nv50/ir/opt: another insn NULL check in phi eliminationChristoph Bumiller2012-04-141-0/+2
|