summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: whitespace cleanups.Timothy Arceri2013-10-281-3/+0
| | | | | | | | | Signed-off-by: Timothy Arceri <[email protected]> v2 (Paul Berry <[email protected]>): Separate from "glsl: Add check for unsized arrays to glsl types". Reviewed-by: Paul Berry <[email protected]>
* glsl: Fix commentTimothy Arceri2013-10-281-1/+1
| | | | | Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* vl/h264: split fields into SPS/PPSChristian König2013-10-287-125/+169
| | | | | | Add alot of missing fields as well. Signed-off-by: Christian König <[email protected]>
* radeon/uvd: fix H264 chroma format handlingChristian König2013-10-281-1/+15
| | | | Signed-off-by: Christian König <[email protected]>
* vl: add 400 chroma format as wellChristian König2013-10-281-0/+1
| | | | Signed-off-by: Christian König <[email protected]>
* ilo: minor cleanups for recent interface changesChia-I Wu2013-10-283-156/+9
| | | | | Kill ilo_bind_sampler_states2 and ilo_set_sampler_views2. Map PIPE_FORMAT_R10G10B10A2_UINT to BRW_SURFACEFORMAT_R10G10B10A2_UINT.
* glsl: Move error message inside validation check reducing duplicate message ↵Timothy Arceri2013-10-271-13/+14
| | | | | | | | | handling v2 (Paul Berry <[email protected]): Fix precedence error in call to _mesa_glsl_error(). Reviewed-by: Paul Berry <[email protected]>
* i965: Make fs gl_PrimitiveID input work even when there's no gs.Paul Berry2013-10-272-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a geometry shader is present, the fragment shader gl_PrimitiveID input acts like an ordinary varying, receiving data from the gs gl_PrimitiveID output. When there's no geometry shader, we have to ask the fixed function SF hardware to provide the primitive ID to the fragment shader instead. Previously, the SF setup code would handle this situation by recognizing that the FS gl_PrimitiveID input didn't match to any VS output; since normally an FS input with no corresponding VS output leads to undefined data, the SF setup code used to just arbitrarily assign it to receive data from attribute 0. This patch changes the SF setup code so that instead of arbitrarily using attribute 0, it assigns the unmatched FS input to receive gl_PrimitiveID. In the case where the FS input really is gl_PrimitiveID, this produces the intended result. In all other cases, no harm is done since GL specifies that the behaviour is undefined. Fixes piglit test primitive-id-no-gs. v2: If an attribute is already being overridden with point coordinates, don't try to also override it with gl_PrimitiveID. This is necessary to avoid regressing piglit tests such as shaders/glsl-fs-pointcoord. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add GL_NV_vdpau_interop functions to dispatch_sanity.cpp.Vinson Lee2013-10-261-0/+12
| | | | | | | | Fixes 'make check' failures introduced with commit 80964226e9b8a05c39157f9305c06c0b2861e080. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70900 Signed-off-by: Vinson Lee <[email protected]>
* mesa: add vdpau.c and st_vdpau.c to src/mesa/SConscriptBrian Paul2013-10-261-0/+2
| | | | Fixes SCons build.
* implement NV_vdpau_interop v7Christian König2013-10-2619-9/+934
| | | | | | | | | | | | | | | | | | | v2: Actually implement interop between the gallium state tracker and the VDPAU backend. v3: Make it also available in non legacy contexts, fix video buffer sharing. v4: deny interop if we don't have the same screen object v5: rebased on upstream changes v6: implemented VDPAUGetSurfaceivNV, improved error handling, unregister all surfaces in VDPAUFiniNV v7: squash merge with Mareks changes Signed-off-by: Christian König <[email protected]>
* winsys/radeon: make radeon_drm_winsys_create publicChristian König2013-10-261-1/+1
| | | | | | Otherwise OpenGL/VDPAU interop won't work as expected. Signed-off-by: Christian König <[email protected]>
* i965: Remove ir_txf coord+offset special case in visitorsChris Forbes2013-10-262-65/+16
| | | | | | | Just let it be handled by the lowering pass. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Generalize coord+offset lowering pass for ir_txfChris Forbes2013-10-261-3/+26
| | | | | | | | | | ir_txf expects an ivec* coordinate, and may be larger than ivec2; shuffle things around so that this will work. V2: Fix style nits, use ir_builder Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add lowering pass to fold offset into unnormalized coordsChris Forbes2013-10-264-0/+81
| | | | | | | | | | | | | | | It turns out that nonzero offsets with gsampler2DRect don't work -- they just return garbage. Work around this by folding the offset into the coord. Done as an IR pass rather than yet another hack in the visitors because it's clear what's going on this way. Can possibly reuse this to replace the existing txf coord+offset hacks. V2: Use ir_builder Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add lowering pass for splitting textureGatherOffsetsChris Forbes2013-10-264-0/+92
| | | | | | | | | | | | | | | | Rewrites textureGatherOffsets(s, p, offsets) into gvec4( textureGatherOffset(s, p, offsets[0]).w, textureGatherOffset(s, p, offsets[1]).w, textureGatherOffset(s, p, offsets[2]).w, textureGatherOffset(s, p, offsets[3]).w ) V2: Use ir_builder to be slightly clearer. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add asserts to ensure that ir_tg4 offset arrays are loweredChris Forbes2013-10-262-0/+6
| | | | | | | | | We don't have a message that does 4 independent offsets; a lowering pass needs to lower it to 4 normal gather4s before reaching this point. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: add signatures for textureGatherOffsets()Chris Forbes2013-10-261-0/+30
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: add support for texture functions with offset arraysChris Forbes2013-10-261-0/+9
| | | | | | | This is needed for textureGatherOffsets() Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add support for shadow comparitors with gather4Chris Forbes2013-10-262-3/+15
| | | | | | | | Note that gather4_po_c's parameters are too long for SIMD16. It might be worth emitting 2xSIMD8 messages in this case at some point. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Add support for shadow comparitors with gather4Chris Forbes2013-10-262-3/+16
| | | | | | | | | | gather4_c's argument layout is straightforward -- refz just goes on the end. gather4_po_c's layout however -- the array index is replaced with refz. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add Gen7 gather4_c and gather4_po_c message typesChris Forbes2013-10-261-0/+2
| | | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add new textureGather[Offset]() overloads for shadow samplersChris Forbes2013-10-261-0/+10
| | | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add support for separate reference Z for shadow samplersChris Forbes2013-10-261-5/+15
| | | | | | | | | | ARB_gpu_shader5's textureGather*() functions which take shadow samplers have a separate `refz` parameter rather than adding it to the coordinate. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: add support for gather4 with nonconstant offsetsChris Forbes2013-10-261-1/+15
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965/fs: add support for gather4 with nonconstant offsetsChris Forbes2013-10-261-7/+46
| | | | | | | | V3: fixup crazy check for whether we need to emit the coordinate after custom handling. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: relax brw_texture_offset assertChris Forbes2013-10-264-5/+10
| | | | | | | | Some texturing ops are about to have nonconstant offset support; the offset in the header in these cases should be zero. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Add SHADER_OPCODE_TG4_OFFSET for gather with nonconstant offsets.Chris Forbes2013-10-266-3/+20
| | | | | | | | | The generator code ends up clearer this way than if we had to sniff via the message length. Implemented via the gather4_po message in hardware, which is present in Gen7 and later. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: add missing tg4 case in brw_instruction_nameChris Forbes2013-10-261-0/+2
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: relax const offset requirement for textureGatherOffsetChris Forbes2013-10-261-20/+41
| | | | | | | | | | Prior to ARB_gpu_shader5 / GLSL 4.0, the offset is required to be a constant expression. With that extension, it is relaxed to be an arbitrary expression. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add ARB_gpu_shader5 textureGatherOffset signaturesChris Forbes2013-10-261-0/+16
| | | | | | | | - gsampler2DRect - optional `comp` parameter Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Weaken the flushing in gen7_end_transform_feedback().Kenneth Graunke2013-10-251-6/+6
| | | | | | | | | | | | Since 062317d6671 (i965: Go back to using the kernel SOL reset feature.) we've been flushing the batch on BeginTransformFeedback(). So it's not necessary to do it on EndTransformFeedback(). A PIPE_CONTROL will work. This makes gen7_end_transform_feedback() exactly the same as the gen6 variant. However, they'll diverge again shortly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Stop trying to hack around MRF dep chains on gen7+ LIFO scheduling.Eric Anholt2013-10-251-1/+1
| | | | | | | | | | | | | | This was a hack to avoid choosing to schedule all texturing before consumption of any texture results due to the way dependency chains worked out in the presence of MRFs. On gen7, we don't have MRFs, so the problem doesn't apply, and this was just badly constraining our scheduling. total instructions in shared programs: 1615306 -> 1612534 (-0.17%) instructions in affected programs: 9958 -> 7186 (-27.84%) GAINED: 259 LOST: 9 Reviewed-by: Matt Turner <[email protected]>
* i965: Try not to reverse-schedule things when doing LIFO scheduling.Eric Anholt2013-10-251-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LIFO plan was simple: Take the most recently made available instructions, and pick those first. But because of the order we were pushing things onto our list of available-to-schedule instructions, it meant that when a set of instructions was made available at the same time (for example, everything at the start of the program that didn't depend on other instructions) we'd schedule them in reverse order. If you had 10 texture calls in a row in your program, each with independent argument setup, we'd set up the last texture call's args and execute it first, even though we wouldn't be able to consume its results until we'd finished the other 9 texture calls (assuming consumption of texture results happens near each texture call, and combines it with another texture result, which is normal for a convolution shader). To fix this, walk the list for doing LIFO in the order that instructions were originally generated in the program, but choose to push newly-made-available instructions to the other end of the list instead. total instructions in shared programs: 1587242 -> 1586290 (-0.06%) instructions in affected programs: 7801 -> 6849 (-12.20%) GAINED: 76 LOST: 67 Thanks to Chia-I Wu for pointing out the bug in my first version of the patch that made it a huge loss. Reviewed-by: Matt Turner <[email protected]>
* mesa/st: disable ARB_framebuffer_object when no driver support.Ilia Mirkin2013-10-261-2/+5
| | | | | | | | When PIPE_CAP_MIXED_FRAMEBUFFER_SIZES is not provided, parts of ARB_framebuffer_object can't be supported, such as on NV30. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZESIlia Mirkin2013-10-2614-1/+17
| | | | | | | | | This CAP will determine whether ARB_framebuffer_object can be enabled. The nv30 driver does not allow mixing swizzled and linear zsbuf/cbuf textures. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* glx: Fix return value from indirect_bind_contextAdam Jackson2013-10-251-4/+4
| | | | | | | | | _XReply returns 1 on success, but indirect_bind_context returns 0 on success. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70486 Reviewed-and-tested-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glsl: Optimize (not A) and (not B) into not (A or B).Matt Turner2013-10-251-0/+9
| | | | | | No shader-db changes, but seems like a good idea. Reviewed-by: Eric Anholt <[email protected]>
* glsl: Optimize (not A) or (not B) into not (A and B).Matt Turner2013-10-251-0/+12
| | | | | | | | A few Serious Sam 3 shaders affected: instructions in affected programs: 4384 -> 4344 (-0.91%) Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Match commutative expressions with reversed arguments.Matt Turner2013-10-251-3/+23
| | | | | | | total instructions in shared programs: 1645011 -> 1644938 (-0.00%) instructions in affected programs: 17543 -> 17470 (-0.42%) Reviewed-by: Eric Anholt <[email protected]>
* i965: s/Muchnik/Muchnick/.Matt Turner2013-10-254-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* r600g,radeonsi: use fences provided by the winsysMarek Olšák2013-10-258-462/+37
|
* winsys/radeon: add the implementation of fences from r300gMarek Olšák2013-10-254-33/+87
|
* radeonsi: add the vertex shader position output if it's missingMarek Olšák2013-10-251-0/+13
| | | | | | This fixes a lockup in piglit/spec/glsl-1.40/execution/tf-no-position. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: respect semantic indices for COLOR[i] fragment shader outputsMarek Olšák2013-10-251-5/+2
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* glsl: When disabling gl_PerVertex variables, check that mode matches.Paul Berry2013-10-241-1/+2
| | | | | | | | | | | | | | | | | | | In commit 1b4a737 (glsl: Support redeclaration of VS and GS gl_PerVertex output), I added code to ensure that when an unnamed gl_PerVertex interface block is redeclared, any ir_variables that weren't included in the redeclaration are removed from the IR (and the symbol table). This ensures that only those variables that were explicitly redeclared may be used. However, when I wrote this code, I neglected to match the variable mode when finding variables to remove. This meant that redeclaring a built-in output block might cause the built-in input gl_in to be accidentally removed. Fixes piglit test gs-redeclares-pervertex-out-only. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Remove unused gl_PerVertex interface blocks.Paul Berry2013-10-241-0/+90
| | | | | | | | | | | | | | | | The GLSL 4.10 rules for redeclaration of built-in interface blocks (which we've chosen to regard as clarifications of GLSL 1.50) only require gl_PerVertex blocks to match in shaders that actually use those blocks. The easiest way to implement this is to detect situations where a compiled shader doesn't refer to any elements of gl_PerVertex, and remove all the associated ir_variables from the shader at the end of ast-to-ir conversion. Fixes piglit tests linker/interstage-{pervertex,pervertex-in,pervertex-out}-redeclaration-unneeded. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Call check_builtin_array_max_size when redeclaring gl_in.Paul Berry2013-10-241-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | Normally when a built-in array (such as gl_ClipDistance) is redeclared, we call get_variable_being_redeclared() to do the redeclaration, and it in turn calls check_builtin_array_max_size() to make sure that the redeclared array size isn't too large. However when a built-in array is redeclared as part of redeclaring gl_in, we don't call get_variable_being_redeclared() (since the individual built-ins aren't each represented by their own ir_variable anymore). So we need to add an explicit call to check_builtin_array_max_size() to make sure the new array size isn't too large. Note: at the moment this is redundant with a test that's done at link time, so there's no change to piglit results. But the patch that follows will prevent link errors from being reported if gl_PerVertex isn't used, so in order to prevent that patch from causing regressions, we need to add the compile check now. Besides, it's nicer to report this error at compile time anyhow. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: Fix geometry shader program queries.Paul Berry2013-10-241-60/+40
| | | | | | | | | | | | | | | | | | | | | | | | The queries GEOMETRY_VERTICES_OUT, GEOMETRY_INPUT_TYPE, and GEOMETRY_OUTPUT_TYPE (defined by GL 3.2) differ from the corresponding queries in ARB_geometry_shader4 in the following ways: - They use different enum values - They can only be queried; they cannot be set. - Attempting to query them yields INVALID_OPERATION if the program is not linked, or lacks a geometry shader. This patch switches us over from the ARB_geometry_shader4 behaviour to the GL 3.2 behaviour. Fixes piglit test query-gs-prim-types. v2: Improve comment above has_core_gs. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Account for interface block lowering in program_resource_visitor.Paul Berry2013-10-241-1/+57
| | | | | | | | | | | | | | When program_resource_visitor visits variables that were created by lower_named_interface_blocks, it needs to do extra work to un-do the effects of lower_named_interface_blocks and construct the proper API names. Fixes piglit test spec/glsl-1.50/execution/interface-blocks-api-access-members. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>