summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
* r600g/sb: use MULADD workaround on R7xx for MULADD_IEEEVadim Girlin2013-08-141-1/+2
| | | | | | | | | | | | Looks like the same issue that was seen with MULADD in trans slot on R7xx also affects MULADD_IEEE (maybe all OP3 instructions and MULADD is just a most frequently used?). So the workaround is to not allow affected instructions to be placed into the trans slot. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67927 Signed-off-by: Vadim Girlin <[email protected]> Cc: "9.2" <[email protected]>
* gallivm: implement new float comparison instructions returning integer masksRoland Scheidegger2013-08-131-2/+79
| | | | | | | | | FSEQ/FSGE/FSLT/FSNE work just the same as SEQ/SGE/SLT/SNE except skip the select. And just for consistency use the same appropriate ordered/unordered comparisons for the old opcodes as well. Reviewed-by: Zack Rusin <[email protected]>
* tgsi: implement new float comparison instructions returning integer masksRoland Scheidegger2013-08-134-4/+102
| | | | | | | | Also while here add a bunch of other forgotten (integer) instructions to tgsi_util_get_inst_usage_mask() (which isn't used for much except optimizing away unused input components), though it may still be incomplete. Reviewed-by: Zack Rusin <[email protected]>
* gallium: add new float comparison instructions returning integer masksRoland Scheidegger2013-08-132-17/+82
| | | | | | | | | | | | Newer graphic languages don't want messy float mask results but instead true "boolean" mask results for float comparisons. Otherwise just need to convert the floats back to integers. Need to keep the old opcodes however due to both legacy (gl and d3d9) needing them and because older hw can't really deal with integers. These new FSEQ/FSGE/FSLT/FSNE opcodes are part of integer API and hence must be supported if a driver claims to support glsl 1.30 (or PIPE_SHADER_CAP_INTEGERS). Reviewed-by: Zack Rusin <[email protected]>
* ilo: enable dumping of WM PCBChia-I Wu2013-08-131-1/+5
| | | | It was disabled because it wasn't supported.
* ilo: no binding table change when constants are pushedChia-I Wu2013-08-131-21/+17
| | | | | When constants can be pushed, and nothing else requires new SURFACE_STATEs, there is no need to emit BINDING_TABLE_STATE.
* ilo: support push constant model in shadersChia-I Wu2013-08-136-12/+143
| | | | | Source constants from URB constant data when the constant data can fit in the PCB.
* ilo: support copying constant buffer 0 to PCBChia-I Wu2013-08-135-19/+105
| | | | | Add ILO_KERNEL_PCB_CBUF0_SIZE so that a kernel can specify how many bytes of constant buffer 0 need to be copied to PCB.
* ilo: make constant buffer 0 upload optionalChia-I Wu2013-08-133-29/+35
| | | | | Add ILO_KERNEL_SKIP_CBUF0_UPLOAD so that we can skip constant buffer 0 upload when the kernel does not need it.
* Revert "ilo: initialize constant buffer SURFACE_STATE early"Chia-I Wu2013-08-134-32/+27
| | | | | | This reverts commit a9b800aa81cffdcaef2490ff49986099feae2663. With push constant support, the constructed SURFACE_STATE is unused and wasted. The change only slows things down.
* gallivm: fix exec_mask interaction with geometry shader after end of mainRoland Scheidegger2013-08-122-16/+14
| | | | | | | | | | | | | | | | Because we must maintain an exec_mask even if there's currently nothing on the mask stack, we can still have an exec_mask at the end of the program. Effectively, this mask should be set back to default when returning from main. Without relying on END/RET opcode (I think it's valid to have neither) it is actually difficult to do this, as there doesn't seem any reasonable place to do it, so instead let's just say the exec_mask is invalid outside main (which it really is effectively). The problem is that geometry shader called end_primitive outside the shader (in the epilogue), and as a result used a bogus mask, leading to bugs if we had to set the (somewhat misnamed) ret_in_main bit anywhere. So just avoid the mask combining function when called from outside the shader. Reviewed-by: Zack Rusin <[email protected]>
* draw: simplify prim mask constructionRoland Scheidegger2013-08-121-22/+10
| | | | | | | | | The code was quite weird, the second comparison was in fact a complete no-op and we can also do the comparison with the vector directly instead of scalar, which should not also be faster but it is way more obvious how that mask is actually going to look like. Reviewed-by: Zack Rusin <[email protected]>
* gallivm: simplify geometry shader mask handling a bitRoland Scheidegger2013-08-121-36/+28
| | | | | | | | | | | | Instead of reducing masks to 0/1 simply use the mask directly as -1. Also use some signed comparison instead of unsigned (as far as I understand these values have to be (very) small and signed means llvm doesn't have to apply additional logic to do the unsigned comparisons the cpu can't do). Saves a couple of instructions in some test geometry shader here. v2: that was a bit to much optimization, don't skip combining the masks... Reviewed-by: Zack Rusin <[email protected]>
* draw: (trivial) dump tgsi for geometry shaders with GALLIVM_DEBUG_TGSIRoland Scheidegger2013-08-121-0/+5
| | | | | | And dump the variant key too (same as vs does). Just so I can stop wondering why I see the tgsi dump for fs and vs but not gs...
* gallivm: (trivial) fix typo in argument declaration of lp_build_size_query_soaRoland Scheidegger2013-08-121-1/+1
| | | | Was meant to match the name used elsewhere, spotted by Anthony.
* ilo: initialize constant buffer SURFACE_STATE earlyChia-I Wu2013-08-124-27/+32
| | | | | | Fix ilo_gpe_init_view_surface_for_buffer to allow buffer to be NULL, and add ilo_gpe_set_view_surface_bo to set it later. This allows us to set up SURFACE_STATE early for constant buffers backed by user buffers.
* ilo: 3DSTATE_INDEX_BUFFER may be wrongly skippedChia-I Wu2013-08-101-1/+5
| | | | | | | | | | In finalize_index_buffer(), when the current index buffer was destroyed due to u_upload_data(), it may happen that the new index buffer is at the same address as the old one. Comparing the pointers to the two buffers could fail to work, and 3DSTATE_INDEX_BUFFER would be incorrectly skipped. Holding a reference to the current index buffer before calling u_upload_data() should fix the problem.
* gallivm: set non-existing values really to zero in size queries for d3d10Roland Scheidegger2013-08-094-22/+22
| | | | | | | | | | | My previous attempt at doing so double-failed miserably (minification of zero still gives one, and even if it would not the value was never written anyway). While here also rename the confusingly named int_vec bld as we have int vecs of different sizes, and rename need_nr_mips (as this also changes out-of-bounds behavior) to is_sviewinfo too. Reviewed-by: Zack Rusin <[email protected]>
* gallivm: use texture target from shader instead of static state for size queryRoland Scheidegger2013-08-096-4/+77
| | | | | | | | | | | | | | | | | | | d3d10 has no notion of distinct array resources neither at the resource nor sampler view level. However, shader dcl of resources certainly has, and d3d10 expects resinfo to return the values according to that - in particular a resource might have been a 1d texture with some array layers, then the sampler view might have only used 1 layer so it can be accessed both as 1d or 1d array texture (I think - the former definitely works). resinfo of a resource decleared as array needs to return number of array layers but non-array resource needs to return 0 (and not 1). Hence fix this by passing the target from the shader decl to emit_size_query and use that (in case of OpenGL the target will come from the instruction itself). Could probably do the same for actual sampling, though it may not matter there (as the bogus components will essentially get clamped away), possibly could wreak havoc though if it REALLY doesn't match (which is of course an error but still). Reviewed-by: Zack Rusin <[email protected]>
* gallivm: honor d3d10's wishes of out-of-bounds behavior for texture size queryRoland Scheidegger2013-08-091-8/+27
| | | | | | | Specifically, must return 0 for non-existent mip levels (and non-existent textures which is an unsolved problem) for everything but total mip count. Reviewed-by: Zack Rusin <[email protected]>
* util: (trivial) fix asm input/output list for fxsaveRoland Scheidegger2013-08-091-1/+1
| | | | | Otherwise gcc might do very unsafe optimizations, spotted by Uros Bizjak. Hopefully this time it's finally right?
* r600g: disable GPUVM by defaultAlex Deucher2013-08-091-1/+1
| | | | | | | | | | | | | | | Cayman and trinity systems still seem to suffer from stability problems with GPUVM. This also fixes compute on these asics. It can still be enabled for testing by setting env var RADEON_VA=true. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=65958 Signed-off-by: Alex Deucher <[email protected]> CC: "9.2" <[email protected]> CC: "9.1" <[email protected]> Reviewed-by: Christian König <[email protected]>
* softpipe: fix the regressionsZack Rusin2013-08-081-2/+0
| | | | | | softpipe has a really weird handling of the draw attrs, lets just not inject outputs in its data. Trivial.
* draw: rewrite primitive assemblerZack Rusin2013-08-089-297/+180
| | | | | | | | | | | | We can't be injecting the primitive id's in the pipeline because by that time the primitives have already been decomposed. To properly number the primitives we need to handle the adjacency primitives by hand. This patch moves the prim id injection into the original primitive assembler and completely removes the useless pipeline stage. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: reset the vertex id when injecting new primitive idZack Rusin2013-08-081-0/+9
| | | | | | | | | | | | Without reseting the vertex id, with primitives where the same vertex is used with different primitives (e.g. tri/lines strips) our vbuf module won't re-emit those vertices with the changed primitive id. So lets reset the vertex id whenever injecting new primitive id to make sure that the vertex data is correctly emitted. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: cleanup the extra attribsZack Rusin2013-08-081-0/+1
| | | | | | | | | | Before inserting new front face and prim id outputs cleanup the old extra outputs, otherwise our cache will use previous output slots which will break as soon as outputs of the current shader don't match the last. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>