summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/codegen
Commit message (Collapse)AuthorAgeFilesLines
* nv50: implement new float comparison instructionsRoland Scheidegger2013-08-151-0/+17
| | | | | | untested. Reviewed-by: Christoph Bumiller <[email protected]>
* tgsi: rename the TGSI fragment kill opcodesBrian Paul2013-07-121-5/+5
| | | | | | | | | | | | | | | | | | | | | TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional kill (if any src component < 0). The later was unconditional kill. At one time KILP was supposed to work with NV-style condition codes/predicates but we never had that in TGSI. This patch renames both opcodes: TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0) TGSI_OPCODE_KILP -> KILL (unconditional kill) Note: I didn't just transpose the opcode names to help ensure that I didn't miss updating any code anywhere. I believe I've updated all the relevant code and comments but I'm not 100% sure that some drivers had this right in the first place. For example, the radeon driver might have llvm.AMDGPU.kill and llvm.AMDGPU.kilp mixed up. Driver authors should review their code. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-2322-88/+88
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-2322-22/+22
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* gallium: Disambiguate TGSI_OPCODE_IF.José Fonseca2013-04-172-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TGSI_OPCODE_IF condition had two possible interpretations: - src.x != 0.0f - Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was false either for vertex and fragment shaders - gallivm/llvmpipe - postprocess - vl state tracker - vega state tracker - most old drivers - old internal state trackers - many graw examples - src.x != 0U - Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was true for both vertex and fragment shaders - tgsi_exec/softpipe - r600 - radeonsi - nv50 And drivers that use draw module also were a mess (because Mesa would emit float IFs, but draw module supports native integers so it would interpret IF arg as integers...) This sort of works if the source argument is limited to float +0.0f or +1.0f, integer 0, but would fail if source is float -0.0f, or integer in the float NaN range. It could also fail if source is integer 1, and hardware flushes denormalized numbers to zero. But with this change there are now two opcodes, IF and UIF, with clear meaning. Drivers that do not support native integers do not need to worry about UIF. However, for backwards compatibility with old state trackers and examples, it is advisable that native integer capable drivers also support the float IF opcode. I tried to implement this for r600 and radeonsi based on the surrounding code. I couldn't do this for nouveau, so I just shunted IF/UIF together, which matches the current behavior. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> v2: - Incorporate Roland's feedback. - Fix r600_shader.c merge conflict. - Fix typo in radeon, spotted by Michel Dänzer. - Incorporte Christoph Bumiller's patch to handle TGSI_OPCODE_IF(float) properly in nv50/ir.
* nv50/codegen: do not emitATOM() if the subOp is unknownEmil Velikov2013-04-121-1/+1
| | | | | | | | | | | | For debug build we'll hit the assert, for release we are going to emit random data as subOp is used uninitilised. Spotted by gcc codegen/nv50_ir_emit_nv50.cpp: In member function 'void nv50_ir::CodeEmitterNV50::emitATOM(const nv50_ir::Instruction*)': codegen/nv50_ir_emit_nv50.cpp:1554:12: warning: 'subOp' may be used uninitialized in this function [-Wmaybe-uninitialized] uint8_t subOp; ^ Signed-off-by: Emil Velikov <[email protected]>
* nvc0: implement multisample texturesChristoph Bumiller2013-04-122-6/+22
|
* nvc0: fix max varying count, move CLIPVERTEX,FOG out of the wayChristoph Bumiller2013-03-201-5/+18
| | | | | | The card spews an error if I use all 128 generic slots. Apparently the real limit isn't just dictated by the address space layout.
* gallium: add TGSI_SEMANTIC_TEXCOORD,PCOORD v3Christoph Bumiller2013-03-201-2/+0
| | | | | | | | | | | | | | | This makes it possible to identify gl_TexCoord and gl_PointCoord for drivers where sprite coordinate replacement is restricted. The new PIPE_CAP_TGSI_TEXCOORD decides whether these varyings should be hidden behind the GENERIC semantic or not. With this patch only nvc0 and nv30 will request that they be used. v2: introduce a CAP so other drivers don't have to bother with the new semantic v3: adapt to introduction gl_varying_slot enum
* tgsi: use separate structure for indirect address v2Christian König2013-03-191-0/+6
| | | | | | | | | | | | | | To further improve the optimization of source and destination indirect addressing we need the ability to store a reference to the declaration of the addressed operands. Since most of the fields in tgsi_src_register doesn't apply for an indirect addressing operand replace it with a separate tgsi_ind_register structure and so make room for extra information. v2: rename Declaration to ArrayID, put the ArrayID into () instead of [] Signed-off-by: Christian König <[email protected]>
* tgsi: remove TGSI_FILE_(IMMEDIATE|TEMP)_ARRAYChristian König2013-03-191-80/+0
| | | | | | Nobody seems to be using it, and only nv50 had a partial implementation. Signed-off-by: Christian König <[email protected]>
* nvc0: they removed the NTID,NCTAID,GRIDID registers on nve4Christoph Bumiller2013-03-121-0/+1
|
* nv50/ir: add CCTL (cache control) opChristoph Bumiller2013-03-124-4/+8
|
* nv50/ir: add support for different sampler and resource index on nve4Christoph Bumiller2013-03-122-0/+29
| | | | | | | | | | And remove non-working code for indirect sampler/resource selection. Will be added back later. Includes code from "nv50/ir/tgsi: Resource indirect indexing" by Francisco Jerez (when mixing the R and S handles we can only specify them via a register, i.e. indirectly, unless we upload all the used handle combinations to c[] space, which we don't for now).
* nv50/ir: implement splitting of 64 bit ops after RAChristoph Bumiller2013-03-125-20/+86
|
* nv50/ir: fix size adjustment for sched info for multiple functionsChristoph Bumiller2013-03-121-6/+11
|
* nv50/ir: print function inputs and outputsChristoph Bumiller2013-03-121-1/+22
|
* nv50/ir/ssa: add a few comments regarding RenamePassChristoph Bumiller2013-03-121-0/+19
|
* nv50/ir/tgsi: Exclude local declarations from function prototypes.Francisco Jerez2013-03-121-5/+28
|
* nv50/ir/opt: try to make use of SUCLAMP addendChristoph Bumiller2013-03-121-0/+45
|
* nv50/ir: don't assert on type in Modifier.applyTo if it is 0Christoph Bumiller2013-03-121-0/+2
|
* nv50/ir: add support for barriersChristoph Bumiller2013-03-126-15/+65
| | | | nv50 part by Francisco Jerez.
* nv50/ir/tgsi: add support for atomicsChristoph Bumiller2013-03-121-0/+89
|
* nv50/ir/tgsi: handle TGSI_OPCODE_LOAD,STOREChristoph Bumiller2013-03-127-30/+303
| | | | | | | | | | | | | | | | Squashed and (heavily) modified original patches by Francisco Jerez: nv50/ir/tgsi: Implement resource LOAD/STORE (wip). nv50/ir/tgsi: Emit SUST/SULD for surface access, and add CB LOAD/STORE support nv50/ir/tgsi: Fix/clean up the LOAD/STORE handling code. Left out for now: nv50/ir/tgsi: Resource indirect indexing Treating raw, read-only surfaces as constant buffers (CBs) was removed because CBs are limited to a size of 64 KiB which isn't desireable, and because this decision should probably be made by the state tracker. If we used a number of CB slots for surfaces, it might find that we cannot accomodate the advertised limit.
* nvc0/ir: implement lowering of surface ops for nve4Christoph Bumiller2013-03-125-12/+29
|
* nv50/ir: extend moveSources for delta < 0Christoph Bumiller2013-03-122-16/+31
|
* nv50/ir/emit: handle OP_ATOMChristoph Bumiller2013-03-121-0/+41
|
* nv50/ir/opt: CALLs cannot loadChristoph Bumiller2013-03-121-0/+3
|
* nv50/ir: add support for indirect BRA,CALLChristoph Bumiller2013-03-124-4/+12
|
* nv50/ir: initialize CodeEmitters' specialized target fieldsChristoph Bumiller2013-03-121-3/+4
|
* nv50/ir/opt: make optimization aware of atomics, barriers, surface opsChristoph Bumiller2013-03-122-1/+28
|
* nv50/ir: add various new OPs that will be needed for computeChristoph Bumiller2013-03-128-45/+175
|
* nv50/ir: Rename "mkLoad" to "mkLoadv" for consistency.Francisco Jerez2013-03-123-10/+19
|
* nv50/ir: fix comparison of system valuesChristoph Bumiller2013-03-121-0/+3
|
* nv50/ir/tgsi: Translate grid-related system parameters.Francisco Jerez2013-03-121-0/+4
|
* nv50/ir/tgsi: Accept COMPUTE programs.Francisco Jerez2013-03-121-0/+1
|
* nv50/ir/ra: make sure all used function inputs get assigned a regChristoph Bumiller2013-03-121-0/+7
| | | | | | A live range [0, 0) counts as empty. For function inputs this can be a problem, so insert a nop at the beginning to make it [0, 1). This is a bit of a hack but also the most simple solution.
* nv50/ir/ra: also add pre-existing MERGE,SPLIT to constraint listChristoph Bumiller2013-03-121-1/+3
|
* nv50/ir/ra: fix confusion with conditional RegisterSet::occupyChristoph Bumiller2013-03-122-12/+32
|
* nv50/ir/ra: swap copyCompound args if src is compound and dst isn'tChristoph Bumiller2013-03-121-0/+9
|
* nv50/ir/ra: Fix maxGPR calculation for programs with multiple functions.Francisco Jerez2013-03-121-1/+1
|
* nv50/ir/ra: Fix traversal before the beginning of the active list in buildRIG.Francisco Jerez2013-03-121-6/+5
|
* nv50/ir/ra: Fix RegisterSet::occupy(const Value *v).Francisco Jerez2013-03-121-1/+1
|
* nv50/ir/ra: Fix argument const-ness in RegisterSet::idToUnits and idToBytesFrancisco Jerez2013-03-121-2/+2
|
* nv50/ir/opt: Fix tryPropagateBranch for BBs with several exit branches.Francisco Jerez2013-03-121-28/+32
| | | | | Comments and "if (bf->cfg.incidentCount() == 1)" condition added by Christoph Bumiller.
* nv50/ir: Clean up references to function values before destroying them.Francisco Jerez2013-03-121-0/+4
|
* nv50: Remove nv0_ir_from_sm4.*José Fonseca2013-03-122-2512/+0
| | | | | | Unused, depends on d3d1x. Reviewed-by: Christoph Bumiller <[email protected]>
* nv50: fix bogus parameters when processing sample instructionsRoland Scheidegger2013-02-121-1/+1
| | | | | | | | Discovered accidentally when changing SAMPLE_L definition. Turns out the lod arguments were already correct for the new definition but the compare and derivs were not. Reviewed-by: Christoph Bumiller <[email protected]>
* nv50/ir: add definitions of Target and CodeEmitter dtorsChristoph Bumiller2013-01-191-2/+2
| | | | I really did build test, my compiler just doesn't seem to care.
* nv50/ir: fix a couple of warningsChristoph Bumiller2013-01-193-6/+11
|