aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/nine_ff.c
Commit message (Collapse)AuthorAgeFilesLines
* st/nine: make use of common uploaders v4Constantine Charlamov2017-02-251-4/+4
| | | | | | | | | | Make use of common uploaders that landed recently to Mesa v2: fixed formatting, broken due to thunderbird configuration v3: per Axel comment: added a comment into NineDevice9_DrawPrimitiveUP v4: per Axel comment: changed style of the comment
* st/nine: Remove all usage of ureg_SUB in nine_ffAxel Davy2017-01-051-20/+20
| | | | | | | This is required to remove gallium SUB. Signed-off-by: Axel Davy <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/nine: Do not use NineBaseTexture9 in nine_contextAxel Davy2016-12-201-3/+3
| | | | | | | Some fields are subject to modification outside of nine_context (SetLod, etc). Signed-off-by: Axel Davy <[email protected]>
* st/nine: Move pipe and cso to nine_contextAxel Davy2016-12-201-4/+4
| | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Rename pipe to pipe_data in nine_contextAxel Davy2016-12-201-10/+10
| | | | | | | This patch it to avoid name conflict when device->pipe will be moved to nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Track dirty state groups in nine_contextAxel Davy2016-12-201-12/+13
| | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back ps to nine_contextAxel Davy2016-12-201-3/+3
| | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back all ff states in nine_contextAxel Davy2016-12-201-59/+55
| | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Put ff data in a separate structureAxel Davy2016-12-201-2/+2
| | | | | | | | | | And make nine_state_access_transform take this new structure as input. Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back viewport to nine_contextAxel Davy2016-12-201-1/+1
| | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back vs to nine_contextAxel Davy2016-12-201-4/+4
| | | | | | | | | And move programmable_vs storage and computation. Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back vdecl to nine_contextAxel Davy2016-12-201-5/+5
| | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back textures into nine_contextAxel Davy2016-12-201-3/+3
| | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Move draw calls to nine_stateAxel Davy2016-12-201-39/+45
| | | | | | | | | | | | Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. v2: Release buffers for Draw*Up functions in device9.c, instead of nine_context. This prevents a leak with csmt where the wrong pointers were released. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Introduce nine_contextAxel Davy2016-12-201-12/+13
| | | | | | | | | | | nine_context is a new structure which goal will be to contain all internal states. It will be the states of the second thread in the to-be-introduced CSMT mode. This patch moves several internal states to nine_context, while the next patches add the other fields. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Implement WFOG properlyAxel Davy2016-12-201-7/+35
| | | | | | | | We were advertising support for WFOG (like all win drivers), but we weren't implementing it. This patch implements the behaviour. See comments. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix ff texture coordinate selectionAxel Davy2016-12-201-4/+5
| | | | | | | | The code was wrongly detecting which texture coordinates to generate when the coordinate index was different to the stage index. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Convert redundant check to assert in ff psAxel Davy2016-12-201-2/+3
| | | | | | We disable the alpha stage if the color stage is disabled. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix two special cases in ff psAxel Davy2016-12-201-0/+20
| | | | | | | | | | if first alpha stage is disabled and writes to temp, diffuse alpha is written to temp. Last stage always writes to current. Behaviour was deduced by tests with a test app. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove useless code in ff psAxel Davy2016-12-201-5/+0
| | | | | | Current is already initialized to Diffuse. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix ff cases when stages should be disabledAxel Davy2016-12-201-6/+16
| | | | | | | | | | When a texture is read by a stage for colorop, it should be disabled, and disable following stages. When a texture is read for alphaop, 1.0f is read for the input, which is the behaviour for a dummy texture. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Always initialize current in ff psAxel Davy2016-12-201-24/+1
| | | | | | | The check was not catching all possible cases. NVE4 should be fine. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix check for ff specularAxel Davy2016-12-201-2/+7
| | | | | | | | | Fix the check for computing ff specular. This seems to match the opengl behavior, and give the correct output on windows. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Do not saturate illumination coefficients in ffAxel Davy2016-12-201-4/+0
| | | | | | | Fixes bad rendering of a test app. Wine has the same behaviour. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix ff COLOR0 w component computationAxel Davy2016-12-201-21/+10
| | | | | | | | | | The computation was wrong. COLOR0's last component should be equal to the material diffuse w component. The behaviour was checked with a test app on Windows. Wine has the same behaviour. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix specular enable for alphaAxel Davy2016-12-201-1/+1
| | | | | | | | | | | Apparently specular enable doesn't affect the alpha channel. Fixes https://github.com/iXit/Mesa-3D/issues/253 Behaviour comfirmed looking in wine sources. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix leak in user constant upload pathAxel Davy2016-12-201-10/+12
| | | | | | | The new code properly releases the previous buffers allocated. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Properly declare sampler states for ffAxel Davy2016-10-101-1/+6
| | | | | | | Fixes a softpipe assertion failure with wine tests Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Handle user clipping planes properly for ffAxel Davy2016-10-101-4/+17
| | | | | | Found reading msdn and checking Wine. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix specular w coordinateAxel Davy2016-10-101-4/+2
| | | | | | | Found looking at Wine formulas. Fixes a few visual issues. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Disable parts of lighting calculation if no normal providedAxel Davy2016-10-101-26/+35
| | | | | | Behaviour found in Wine sources, and checked with some test apps. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix condition for specular lightningAxel Davy2016-10-101-12/+11
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Do always accumulate diffuseAxel Davy2016-10-101-3/+2
| | | | | | | According to spec. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Initialize ps ff registersAxel Davy2016-10-101-0/+5
| | | | | | | Found with wine tests for the rTmp register. Not sure for the other ones. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Do not pollute rTmp in ff psAxel Davy2016-10-101-2/+4
| | | | | Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Allocate temporaries on demand for ps ffAxel Davy2016-10-101-14/+10
| | | | | | | | | | Same change than for vs ff. This makes it easier to not introduce mistakes reusing temporaries whose result shouldn't be erased. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Fix ff computation for inverseAxel Davy2016-10-101-20/+6
| | | | | | | | | Thanks to wine tests. Apparently 4x4 inverse is to be used, and if the inverse can't be calculated, the input matrix is to be used. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Used normed Vtx for reflectionvectorAxel Davy2016-10-101-2/+5
| | | | | | Fix deduced from the spec. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Implement SPHEREMAPAxel Davy2016-10-101-3/+29
| | | | | | Behaviour checked with a test app. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Enable passthrough only if positiont is usedAxel Davy2016-10-101-0/+2
| | | | | | | | | | Wine tests for the passthrough feature are for positiont. Nothing seems to indicate passthrough happens when positiont it not used. However having passthrough with positiont makes sense (to be used with ProcessVertices outputs). Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix wrong mask in ff vsAxel Davy2016-10-101-1/+1
| | | | | Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Fix tweening factor computationAxel Davy2016-10-101-2/+2
| | | | | | | The computation was reversed. Deduced by tests on windows. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Disable ff vertex blending if required inputs are missingAxel Davy2016-10-101-2/+12
| | | | | | This behaviour has been partially tested on windows. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use materials if source is not given.Axel Davy2016-10-101-4/+5
| | | | | | Deduced by test on windows. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix ff SPECULARENABLEAxel Davy2016-10-101-10/+3
| | | | | | | | | | | | | | | We were (wrongly) adding specular to diffuse in vertex shaders when SPECULARENABLE was set. However the spec says specular has to be added after texture processing (which is in ps). Besides SPECULARENABLE is flagged as a pixel state. There was unused support for SPECULARENABLE in the ps ff code. Remove the vs code, and use the ps code. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Undefined specular should be full of zerosAxel Davy2016-10-101-6/+6
| | | | | Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Implement normal transformation with vertex blendingAxel Davy2016-10-101-5/+21
| | | | | | | The formula is different from the one of the spec, but otherwise nothing particular. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Increase MaxVertexBlendMatrixIndexAxel Davy2016-10-101-4/+4
| | | | | | Modern cards do advertise 8. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Compact ff vs constants a bitAxel Davy2016-10-101-9/+9
| | | | | | | | There are several holes. This patch reduces the holes a bit, which reduces the size of the constant buffer uploaded. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix vertex blending aVtx computationAxel Davy2016-10-101-17/+10
| | | | | | | There was an multiplication by the world matrix 0 which had nothing to do there. Signed-off-by: Axel Davy <[email protected]>