summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* st/nine: Implement MSAA quality levelsPatrick Rudolph2016-10-107-12/+125
| | | | | | | | | | | | | | | | Advertise quality levels: Each supported multisample count matches to one quality level. The application doesn't know how much samples each quality level has. For that reason it's not possible to set the multisample mask. Return errors on quality level missmatch. Fixes several old games not having multisample support until now. Fix for issue #73. Signed-off-by: Patrick Rudolph <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Prepare update_framebuffer for MS quality levelsPatrick Rudolph2016-10-101-4/+4
| | | | | | | | Compare resource's nr_samples instead of D3D multisample level. Required for multisample quality levels to work correct. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Add additional error handling in CheckDeviceMultiSampleTypePatrick Rudolph2016-10-101-0/+6
| | | | | | | | | | Return one supported quality level in error cases. Return error on invalid multisample count. Fixes failing wine tests. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix compiler warningPatrick Rudolph2016-10-102-7/+11
| | | | | | | | | Use strict aliasing in SetPrivateData and struct pheader. Casting char[1] to IUnknown** isn't allowed in strict aliasing. Compute pointer to body by adding size of header to header pointer. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Remove resource9 {Set/Get/Free}PrivateData functionsPatrick Rudolph2016-10-102-134/+1
| | | | | | | | Remove {Set/Get/Free}PrivateData in resource9. Functionality has been implement in IUnknown interface. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Remove volume9 {Set/Get/Free}PrivateData functionsPatrick Rudolph2016-10-103-159/+0
| | | | | | | | Remove {Set/Get/Free}PrivateData in volume9. Functionality has been implement in IUnknown interface. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Switch {Set/Get/Free}PrivateData functionsPatrick Rudolph2016-10-108-61/+61
| | | | | | | Switch {Set/Get/Free}PrivateData function to introduced IUnknown functions. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Implement {Set/Get/Free}PrivateData in iunknownPatrick Rudolph2016-10-102-0/+134
| | | | | | | | Implement {Set/Get/Free}PrivateData in iunknown to get rid of duplicated code in resource9 and volume9. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Return device in NineSurface9_GetContainerPatrick Rudolph2016-10-101-2/+10
| | | | | | | | | | | | | According to MSDN the device is returned for surfaces that do not have a regular container. Such surfaces are: OffscreenPlainSurface, DepthStencilSurface and RenderTarget Tested and verified on Windows. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Allocate surface resources in surface ctorPatrick Rudolph2016-10-102-68/+44
| | | | | | | | | | Allocate resources in surface ctor. Allows to use statetracker internal memory accounting. Fix for issue #231. Signed-off-by: Patrick Rudolph <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix D3DFMT_NULL sizeAxel Davy2016-10-101-0/+2
| | | | | | | | | D3DFMT_NULL is mapped to PIPE_FORMAT_NONE. Instead of relying on PIPE_FORMAT_NONE to return a size, pick one. The one picked is the same than Wine. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add debugging outputPatrick Rudolph2016-10-101-0/+4
| | | | | | | | Add DBG calls to NineTexture9_GetLevelDesc and NineTexture9_GetSurfaceLevel to ease debugging. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix assert in NineUnknown_QueryInterfacePatrick Rudolph2016-10-101-1/+4
| | | | | | | | | Tests showed that is allowed to call this method on object that have a zero refcount. Required for issue #230. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Print interface id in NineVolume9_GetContainerPatrick Rudolph2016-10-101-0/+5
| | | | | | | To ease debugging print interface id. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Print interface id in NineSurface9_GetContainerPatrick Rudolph2016-10-101-0/+5
| | | | | | | To ease debugging print interface id. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Print interface id in NineUnknown_QueryInterfacePatrick Rudolph2016-10-101-1/+3
| | | | | | | To ease debugging print interface id. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Move assert in NineSurface9_ctorPatrick Rudolph2016-10-101-2/+2
| | | | | | | Move assert to function entry. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-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 the calculation of the number of vs inputsAxel Davy2016-10-101-1/+1
| | | | | | | | Fixes hangs on radeonsi, and assert on llvmpipe. Signed-off-by: Axel Davy <[email protected]> Cc: "12.0" <[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 texbemAxel Davy2016-10-101-2/+2
| | | | | | | | | Error found with wine tests. nine_shader was expecting another order than the one device9 was using. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Fix ff computation for inverseAxel Davy2016-10-102-23/+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-102-4/+30
| | | | | | 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-102-5/+5
| | | | | | 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]>
* st/nine: Reorganize ff vtx processingAxel Davy2016-10-101-52/+72
| | | | | | | The new order simplified the code a bit for next patches. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Small simplification for position_t and fogAxel Davy2016-10-101-6/+3
| | | | | | position_t disables fog computation. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Cleaning code for vs temporariesAxel Davy2016-10-101-98/+135
| | | | | | | | | | | | | | | | | This has been a real mess up to now: the temporaries were allocated once, and shared after that between the different parts of the code. To help maintaining the code, the temporaries are now allocated and released on need. As surprising as it could be, this patch, which was supposed to introduce no behaviour change, actually solved a visual bug observed on a sample program. This was due to ureg_normalize3 polluting a temporary variable. Signed-off-by: Axel Davy <[email protected]>
* st/nine: No need for the local flag for temporaries in ffAxel Davy2016-10-101-2/+2
| | | | | Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Handle D3DRS_NORMALIZENORMALSAxel Davy2016-10-101-2/+5
| | | | | | | | When this state is set, the normals computed in the vs ff shader should be normalized. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Initial ProcessVertices supportAxel Davy2016-10-1011-69/+735
| | | | | | | | For now only VS 3 support is implemented. This enables The Sims 2 to work. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Partial software vertex processing supportAxel Davy2016-10-108-60/+322
| | | | | | | | | | | | | | | | | | | | | | | | Software Vertex Processing allows: . Less limitations for shaders (more loops, etc) . Less limitations for ff (more enabled lights, 255 matrices for VertexBlend) In particular shaders can get more constants. This patch implements support for this (not using software rendering, but hardware rendering, as llvmpipe and dx10+ hw have the same limits...) This is considered a second class path. Even apps asking for "Mixed Vertex processing" (ie the ability to switch to swvp on demand) do not use the feature much. Some just initialize more constants than the normal limit at the start of the application, but never use more than the normal limit. When the apps do not need the software vertex processing features, they do not seem to turn it on. This means it is ok if that path is slow. Thus no care has been made to make the path optimized. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Rework vs int and bool constants bufferAxel Davy2016-10-104-24/+37
| | | | | | This will help to support swvp constants. Signed-off-by: Axel Davy <[email protected]>