aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/vertexshader9.h
Commit message (Collapse)AuthorAgeFilesLines
* gallium: rename 'state tracker' to 'frontend'Marek Olšák2020-05-131-155/+0
| | | | | | | Acked-by: Eric Anholt <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
* st/nine: Cache constant buffer sizeAxel Davy2019-04-301-3/+4
| | | | | | | | | | | | The shader constant buffer size with the constant compaction code can vary depending on the shader variant compiled (for example if fog constants are required, etc). Thus instead of using fixed size for the shader, add in the variant cache the size required, pass it to the context, and use this value. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Propagate const_range to contextAxel Davy2019-04-301-1/+2
| | | | | | | | | As with the constant compaction we map the constant slots to new slots, we need to pass that information to the context which is in charge of uploading the constants. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Recompile optimized shaders based on b/i constsAxel Davy2019-04-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Boolean and Integer constants are used in d3d9 for flow control. Boolean are used for if/then/else and Integer constants for loops. The compilers can generate better code if these values are known at compilation. I haven't met so far a game that would change the values of these constants frequently (and when they do, they set to the values used for the previous draw call, and thus the changes get filtered out). Thus it makes sense to inline these constants and recompile the shaders. The commit sets a bound to the number of variants for a given shader to avoid too many shaders to be generated. One drawback is it means more shader compilations. It would probably make sense to compile these shaders asynchronously or let the user control the behaviour with an env var, but this is not done here. The games I tested hit very few shader variants, and the performance impact was negligible, but it could help for games with uber shaders. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back swvp in 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: Move texture setting to nine_context_*Axel Davy2016-12-201-2/+1
| | | | | | | | | And move samplers_shadow to nine_context. 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-3/+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. 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: Initial ProcessVertices supportAxel Davy2016-10-101-2/+10
| | | | | | | | 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-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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: Fix Pointsize in programmable shaderAxel Davy2016-05-181-4/+15
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Align stack for entry pointsAxel Davy2016-02-121-1/+1
| | | | | | | | | | For 32 bits, incoming stack is 4-byte aligned. We need to realign the stack to 16-byte at some point, or there are issues later (crash with SSE, llvm, etc). This patch chooses to align the stack at API entry points. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Complete ff texture transform implementationAxel Davy2015-08-211-1/+1
| | | | | | Wine tests were used to get it right. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Finish Fog implementationAxel Davy2015-08-211-0/+3
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Rework shader statesAxel Davy2015-08-211-2/+26
| | | | | | | Separate state setting and commit Changes how the shader key is computed Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove some useless variablesAxel Davy2015-08-211-1/+0
| | | | | Signed-off-by: Axel Davy <[email protected]> Reviewed-by: David Heidelberg <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-1/+1
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* st/nine: Fix vertex declarations for non-standard (usage/index)Axel Davy2014-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | Nine code to match vertex declaration to vs inputs was limiting the number of possible combinations. Some sm3 games have issues with that, because arbitrary (usage/index) can be used. This patch does the following changes to fix the problem: . Change the numbers given to (usage/index) combinations to uint16 . Do not put limits on the indices when it doesn't make sense . change the conversion rule (usage/index) -> number to fit all combinations . Instead of having a table usage_map mapping a (usage/index) number to an input index, usage_map maps input indices to their (usage/index) Cc: "10.4" <[email protected]> Tested-by: Yaroslav Andrusyak <[email protected]> Acked-by: Ilia Mirkin <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* nine: Add state tracker nine for Direct3D9 (v3)Joakim Sindholt2014-11-181-0/+89
Work of Joakim Sindholt (zhasha) and Christoph Bumiller (chrisbmr). DRI3 port done by Axel Davy (mannerov). v2: - nine_debug.c: klass extended from 32 chars to 96 (for sure) by glennk - Nine improvements by Axel Davy (which also fixed some wine tests) - by Emil Velikov: - convert to static/shared drivers - Sort and cleanup the includes - Use AM_CPPFLAGS for the defines - Add the linker garbage collector - Restrict the exported symbols (think llvm) v3: - small nine fixes - build system improvements by Emil Velikov v4: [Emil Velikov] - Do no link against libudev. No longer needed. Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Axel Davy <[email protected]> Signed-off-by: David Heidelberg <[email protected]>