aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nvc0: standardize on using #if for NVC0_DEBUG_FENCEIlia Mirkin2013-08-155-8/+8
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: refactor video buffer management logic into nouveau_vp3Ilia Mirkin2013-08-158-175/+243
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: allow forcing PMPEG use, for ease of testingIlia Mirkin2013-08-152-2/+4
| | | | | | | This also allows people who don't want to install the binary blobs required for VP2 to still get MPEG decoding. Signed-off-by: Ilia Mirkin <[email protected]>
* nv30: hook up PMPEG support via nouveau_video, enables XvMC to workIlia Mirkin2013-08-153-15/+15
| | | | | | | Force the format to be the reasonable format that doesn't require an inverse z-scan. Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau: set buffer format of video bufferIlia Mirkin2013-08-151-0/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau: fix number of surfaces in video buffer, use definesIlia Mirkin2013-08-151-4/+4
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv30: U8_USCALED only works for size 4Ilia Mirkin2013-08-151-3/+0
| | | | | | | | | See https://bugs.freedesktop.org/show_bug.cgi?id=61635 for a sample program. Changing it to use a vec4 makes it work. Remove the unsupported formats. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "9.2 and 9.1" <[email protected]>
* i965: allow 8 user clip planes on CTG+Chris Forbes2013-08-165-6/+21
| | | | | | | | | | | | | There's no need to use a clip flag for NEGW on these gens, so no reason we can't just enable 8 planes. V2: - Bump (and document!) MAX_VERTS in the clip code. - Fix clip flag masks in the clip unit state and in the shader prolog - Move this to the end of the series for less breakage. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965: get rid of clip plane compactionChris Forbes2013-08-164-55/+11
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/clip: Support clip distances for line clippingChris Forbes2013-08-161-19/+47
| | | | | | | | | This does the same thing as we do for triangle clipping -- select the appropriate source (either dot(hpos,fixed plane) or a clipdistance slot). Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/clip: remove spurious clipvertex paramChris Forbes2013-08-161-11/+4
| | | | | | | | | | Nothing in the clipper uses gl_ClipVertex any more, so we don't care where it is. V2: Don't bother fishing out the clipvertex offset either. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/clip: Use clip distances for all user clippingChris Forbes2013-08-161-5/+6
| | | | | | | V2: Adjust explanation of load_clip_distance() Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i956/clip: push dp4 into load_clip_distanceChris Forbes2013-08-161-17/+22
| | | | | | | | | | Soon the dp4 is only going to be used for fixed clip planes. V2: Remove old inaccurate comment about the behavior of this function; add a better explanation above. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/clip: Track offset into the vertex for clipdistanceChris Forbes2013-08-162-0/+12
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/Gen4-5: Set clip flags from clip distancesChris Forbes2013-08-161-11/+11
| | | | | | | | | | | | | V2: - Use the new VS_OPCODE_UNPACK_FLAGS_SIMD4X2 to correctly split the flags for the two vertices being processed together. - Don't apply bogus masking of clip flags. The set of plane enables aren't included in the shader key, and we wouldn't want the recompiles anyway. V3: - Tidy up spurious instructions, name temps properly. Signed-off-by: Chris Forbes <[email protected]> [V2] Reviewed-by: Paul Berry <[email protected]>
* i965: add new VS_OPCODE_UNPACK_FLAGS_SIMD4X2Chris Forbes2013-08-164-1/+29
| | | | | | | | | | | | | | Splits the bottom 8 bits of f0.0 for further wrangling in a SIMD4x2 program. The 4 bits corresponding to the channels in each program flow are copied to the LSBs of dst.x visible to each flow. This is useful for working with clipping flags in the VS. V3: - Fixup immediate types - Teach scheduler about the hidden dep on flags Signed-off-by: Chris Forbes <[email protected]> V2: Reviewed-by: Paul Berry <[email protected]>
* i965/vs: add vec4_instruction::depends_on_flagsChris Forbes2013-08-162-2/+7
| | | | | | | We're about to have an instruction that depends on the flags but isn't predicated. This lays the groundwork. Signed-off-by: Chris Forbes <[email protected]>
* i965/clip: Enable interpolation of clip distancesChris Forbes2013-08-161-7/+3
| | | | | | | | Previously we had disabled interpolation of the clip distances as a special case, since they were unused. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/vs: Do legacy clip lowering earlierChris Forbes2013-08-162-20/+15
| | | | | | | | | We need to produce clip flags for the vertex header on Gen4/5, so clip plane lowering has to be done before we try to emit the flags/psiz attribute. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/Gen4-5: ensure VUE slots for clipdistance are valid if user clipping is ↵Chris Forbes2013-08-161-0/+5
| | | | | | | | | | | enabled. V2: We don't particularly care where they fall in the VUE map, as long as they are allocated somewhere, and occupy two contiguous slots. Don't fiddle with the SF layout at all -- there's no need. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* ilo: fix fragment shaders that use PCB on GEN7+Chia-I Wu2013-08-152-3/+7
| | | | Missed this commit when preparing PCB changes for upstreaming.
* nouveau: Fix variable name.Vinson Lee2013-08-141-1/+1
| | | | | | | | | | | | Fixes build error introduced with commit d1ba1055d98c246d1ee9d9c14706bb9fba6a98c7. CC nouveau_video.lo nouveau_video.c: In function 'nouveau_screen_get_video_param': nouveau_video.c:866:33: error: 'screen' undeclared (first use in this function) nouveau_video.c:866:33: note: each undeclared identifier is reported only once for each function it appear Signed-off-by: Vinson Lee <[email protected]>
* glsl: Add i2b() and b2i() to ir_builder.Matt Turner2013-08-142-0/+14
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* glsl: Add nequal() to ir_builder.Matt Turner2013-08-142-0/+7
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* glsl: Add abs() to ir_builder.Matt Turner2013-08-142-0/+7
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* glsl: Add bitcast_i2f() to ir_builder.Matt Turner2013-08-142-0/+28
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radeonsi: unduplicate code in create_contextMarek Olšák2013-08-151-6/+0
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: initialize the radeon_surface structureMarek Olšák2013-08-151-1/+1
| | | | | | this fixes valgrind warnings Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: correct sampler function namesMarek Olšák2013-08-151-23/+23
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: rename r600_texture::dirty_db_mask to dirty_level_maskMarek Olšák2013-08-154-8/+8
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: rename r600_resource_texture to r600_textureMarek Olšák2013-08-157-48/+48
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* tgsi: add info about MSAA samplers to tgsi_shader_infoMarek Olšák2013-08-152-0/+14
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* tgsi: fix the location of sample indexMarek Olšák2013-08-151-1/+3
| | | | | | The sample index is always in W. Reviewed-by: Michel Dänzer <[email protected]>
* r600/radeonsi: implement new float comparison instructionsRoland Scheidegger2013-08-152-19/+48
| | | | | | | Also use ordered comparisons for old cmp instructions. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* nv50: implement new float comparison instructionsRoland Scheidegger2013-08-151-0/+17
| | | | | | untested. Reviewed-by: Christoph Bumiller <[email protected]>
* ilo: implement new float comparison instructionsRoland Scheidegger2013-08-151-8/+12
| | | | | | untested. Reviewed-by: Chia-I Wu <[email protected]>
* gallivm: already pass coords in the right place in the sampler interfaceRoland Scheidegger2013-08-153-99/+90
| | | | | | | | | | | | | | | | | This makes things a bit nicer, and more importantly it fixes an issue where a "downgraded" array texture (due to view reduced to 1 layer and addressed with (non-array) samplec instruction) would use the wrong coord as shadow reference value. (This could also be fixed by passing target through the sampler interface much the same way as is done for size queries, might do this eventually anyway.) And if we'd ever want to support (shadow) cube map arrays, we'd need 5 coords in any case. v2: fix bugs (texel fetch using wrong layer coord for 1d, shadow tex using wrong shadow coord for 2d...). Plus need to project the shadow coord, and just for fun keep projecting the layer coord too. Reviewed-by: Zack Rusin <[email protected]>
* gallivm: change coordinate handling throughout functionsRoland Scheidegger2013-08-153-133/+133
| | | | | | | | | | | | | | | | Instead of passing s,t,r coordinates pass a coord array - the reason is that I need to pass more coords (in particular for shadow "coord", future will also need another one for cube map arrays) so just pass them as an array. Also, to simplify things, use fixed location for the shadow reference value I want to get rid of the silly "where is the right coord value" game. Keep old-style however for aos sampling (which is not going to need shadow coord, though for cube map arrays it still would need fixing). (Next patch will pass those through using the new arrangement directly from sampler interface.) v2: fix up soa split path (unreachable currently but still...) Reviewed-by: Zack Rusin <[email protected]>
* gallivm: fix border color with normalized texture formatsRoland Scheidegger2013-08-151-13/+53
| | | | | | | | | | | | | We need to put border color into texture format color space which essentially means clamping for non-float, normalized formats (not entirely sure if we're also meant to quantize the float but it's probably ok not to do it thankfully). For OpenGL we could do this easily outside generated code due to the 1:1 sampler/texture correspondence but not for d3d10 which is terrible (as we recalculate a constant over and over again per shader invocation). Fortunately border color should be rare enough that we don't care THAT much. Reviewed-by: Zack Rusin <[email protected]>
* llvmpipe: fix pipeline statistics with a null psZack Rusin2013-08-148-8/+43
| | | | | | | | | | If the fragment shader is null then pixel shader invocations have to be equal to zero. And if we're running a null ps then clipper invocations and primitives should be equal to zero but only if both stancil and depth testing are disabled. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: make sure that the stages setup outputsZack Rusin2013-08-145-30/+62
| | | | | | | | | | | | Calling the prepare outputs cleans up the slot assignments for outputs, unfortunately aapoint and aaline didn't have code to reset their slots after the initial setup, this was messing up our slot assignments. The unfilled stage was just missing the initial assignment of the face slot. This fixes all of the reported piglit failures. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* glsl: Fix incorrect pattern matching in ir_set_program_inoutsPaul Berry2013-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | In commit 8fc41df (glsl: Modify ir_set_program_inouts to handle geometry shaders), when attempting to pattern match the "foo" part of expressions such as: foo[i][j] foo[i] I incorrectly called as_dereference_variable() on the subexpression foo[i] instead of foo. As a result, the pattern never matched, so ir_set_program_inouts would fall back on marking the entire variable as used, rather than just the portion indexed by the array. This didn't result in incorrect behaviour, but it could have resulted in inefficiency by causing the back-end to allocate resources for unused parts of an input or output array. Reviewed-by: Kenneth Graunke <[email protected]>
* vl: Add support for max level query v2Rico Schüller2013-08-1412-4/+99
| | | | | | | | | This patch adds the level query support to the video decoders and uses some more reasonable defaults. v2: (ck) add commit message Reviewed-by: Christian König <[email protected]>
* glsl: Emit better warnings for things that look like default precision ↵Ian Romanick2013-08-131-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statements Previously we would emit a warning for empty declarations like float; We would also emit the same warning for things like highp float; However, this second case is most likely the application trying to set the default precision. This makes the compiler generate a stronger warning with some suggestion of a fix. It really seems like this should be an error. I'll bet that 100% of the time someone writes 'highp float;' the actually meant 'precision highp float;'. Alas, both AMD and NVIDIA accept this syntax, and the spec doesn't explicitly forbid it. This makes piglit's precision-05.vert generate the following warnings: 0:12(11): warning: empty declaration with precision qualifier, to set the default precision, use `precision lowp float;' 0:13(12): warning: empty declaration with precision qualifier, to set the default precision, use `precision mediump int;' v2: Add { } around a one-line if body and fix a comment. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]>
* glsl/ast: Don't perform GS input array checks on non-inputs.Paul Berry2013-08-131-1/+1
| | | | | | | | Previously, we were accidentally calling handle_geometry_shader_input_decl() on non-input interface block declarations, resulting in bogus error checking. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl/ast: Fix assertion failure when GS input declared as non-array.Paul Berry2013-08-131-4/+12
| | | | | | | | | | | | Previously, if a geometry shader input was declared as a non-array, we would flag the proper compiler error, but then before we got a chance to report it to the client, handle_geometry_shader_input_decl() would assertion fail. With this patch, handle_geometry_shader_input_decl() ignores non-arrays. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl/ast: Check that geometry shader interface block inputs are arrays.Paul Berry2013-08-131-0/+13
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen7+: Fix build error introduced by renaming upload_3dstate_so_decl_list.Paul Berry2013-08-131-1/+1
| | | | | | Commit 9f9ccf707c54156b4559a4b1206022c2ca2d45cd renamed upload_3dstate_so_decl_list to gen7_upload_3dstate_so_decl_list but forgot to update the caller.
* radeon/llvm: Add missing "%s" format string to fprintf.Jon Severinsson2013-08-131-1/+1
| | | | | | | | This fixes a compilation warning with -Wformat-security. CC: "9.2" <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* i965: Move arrays brw_multisample_positions* to new headerChad Versace2013-08-132-46/+73
| | | | | | | | Move the arrays to the new header brw_multisample_state.h, which will be shared with Broadwell code. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>