summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/nine: Simplify ARG_BIND_REFAxel Davy2016-12-201-7/+3
| | | | | | Remove some noop operations. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Avoid flushing the queue for queries GetDataAxel Davy2016-12-204-19/+33
| | | | | | | Use the newly introduced counter to know when we don't need synchronization. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add CSMT_NO_WAIT_WITH_COUNTERPatrick Rudolph2016-12-201-0/+54
| | | | | | | | Similar to the other macros, but introduces a counter, which enables to know when the instructions has been executed. Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Use nine_context_clear_render_targetAxel Davy2016-12-204-15/+29
| | | | | | Enables to not wait for the worker thread for ColorFill. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Optimize ColorFillAxel Davy2016-12-201-1/+1
| | | | | | When we lock the whole surface to overwrite it, we can use DISCARD. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Simplify ColorFillAxel Davy2016-12-201-9/+1
| | | | | | | For render targets, NineSurface9_GetSurface is not expected to fail. Signed-off-by: Axel Davy <[email protected]>
* st/nine: use get_pipe_acquire/release when possibleAxel Davy2016-12-208-16/+34
| | | | | | | Use the acquire/release semantic when we don't need to wait for any pending command. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Implement Fast path for dynamic buffers and csmtAxel Davy2016-12-203-10/+64
| | | | | | | | | | | | Use the secondary pipe for DISCARD/NOOVERWRITE, which avoids stalling to get the pipe from the worker thread. v2: flush at unmap. This is required for example if the driver does hidden draw calls or copies. In the case of unsynchronized it is probably not required, but it is more safe. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add secondary pipe for deviceAxel Davy2016-12-202-1/+5
| | | | | | | The secondary pipe will be used for operations that don't need synchronization. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add nine_context_get_pipe_acquire/releaseAxel Davy2016-12-204-0/+91
| | | | | | See commit for description. Signed-off-by: Axel Davy <[email protected]>
* st/nine: SYSTEMMEM ignores DISCARD.Axel Davy2016-12-201-1/+5
| | | | | | | | | Tests show SYSTEMMEM should ignore DISCARD. Prevents game bugs with following patches reimplementing DISCARD. Halo is affected. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Upload Managed buffers just before draw call using themAxel Davy2016-12-202-17/+14
| | | | | | | | | Previously we were uploading Managed buffers at the next draw call after they were set dirty. This is not the expected behaviour. Instead upload just before draw call needing the content. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Track bindings for buffersAxel Davy2016-12-203-6/+55
| | | | | | Similar code than for textures. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix BASETEX_REGISTER_UPDATEAxel Davy2016-12-201-1/+1
| | | | | | | | | | BASETEX_REGISTER_UPDATE was adding the texture to the list of textures to upload in too many cases. tex->base.base.bind will be set to true if the texture is in a stateblock, whereas we want to upload only if bound to the device, which is what bind_count is for. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Simplify the logic to bind texturesAxel Davy2016-12-203-39/+47
| | | | | | This makes the code more readable. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use nine_context for resource_copy_regionPatrick Rudolph2016-12-203-4/+28
| | | | | | | Use nine_context wrapper for resource_copy_region. Enables to offload it with CSMT. Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Use nine_context for blitPatrick Rudolph2016-12-203-2/+15
| | | | | | Enables to offload it with CSMT. Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Add NINE_DEBUG=tid to turn threadid on or offPatrick Rudolph2016-12-202-5/+10
| | | | | | To ease debugging. Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Print threadid in debug logPatrick Rudolph2016-12-201-6/+18
| | | | | | To ease debugging. Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Implement gallium nine CSMTPatrick Rudolph2016-12-2016-179/+899
| | | | | | | | Use an offloading thread for all nine_context functions. Macros are used to ease the reading of the code. Signed-off-by: Patrick Rudolph <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Call GetPipe for implicit pipe usagesAxel Davy2016-12-202-0/+8
| | | | | | | With csmt, every usage of the pipe in the main thread has to be protected by calling GetPipe. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add struct nine_clipplanePatrick Rudolph2016-12-203-4/+7
| | | | | | Required to know the size exact size of the plane. Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Add nine_queuePatrick Rudolph2016-12-203-0/+301
| | | | | | This queue mechanism will be used for CSMT. Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Create pipe_surfaces on resource creation.Axel Davy2016-12-202-3/+11
| | | | | | | | Create the pipe_surfaces on renderable resources creation. This enables to avoid creating them on the fly. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Back swvp in nine_contextAxel Davy2016-12-205-5/+23
| | | | | | | | 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: Change the way nine_shader gets the pipeAxel Davy2016-12-204-9/+20
| | | | | | | The change is required with csmt, where depending on the thread you don't access the pipe the same way. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Reimplement nine_context_apply_stateblockAxel Davy2016-12-201-0/+206
| | | | | | | | | | | | The new version uses nine_context functions instead of applying the changes directly to nine_context. This will enable it to work with CSMT. v2: Fix nine_context_light_enable_stateblock The memcpy arguments were wrong, and the state wasn't set dirty. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Decompose nine_context_set_textureAxel Davy2016-12-201-25/+48
| | | | | | | | 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: Decompose nine_context_set_indicesAxel Davy2016-12-201-8/+24
| | | | | | | | 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: Decompose nine_context_set_stream_sourceAxel Davy2016-12-201-9/+25
| | | | | | | | 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: Do not use NineBaseTexture9 in nine_contextAxel Davy2016-12-205-41/+71
| | | | | | | Some fields are subject to modification outside of nine_context (SetLod, etc). Signed-off-by: Axel Davy <[email protected]>
* st/nine: Move Managed Pool handling out of nine_contextAxel Davy2016-12-202-32/+57
| | | | | | | | 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: Integrate nine_pipe_context_clear to nine_context_clearAxel Davy2016-12-206-33/+28
| | | | | | | | 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 pipe and cso to nine_contextAxel Davy2016-12-206-75/+101
| | | | | | | | 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-203-56/+56
| | | | | | | 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: Rename cso in nine_context to cso_shaderAxel Davy2016-12-204-11/+11
| | | | | | | This patch it to avoid name conflict when device->cso is moved to nine_context. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Access pipe_context via NineDevice9_GetPipeAxel Davy2016-12-2015-63/+84
| | | | | | Except for nine_ff and nine_state. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove NineDevice9_GetCSOAxel Davy2016-12-204-11/+0
| | | | | | | Was useless. Remove useless usage in swapchain9. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Move query9 pipe calls to nine_contextAxel Davy2016-12-203-15/+67
| | | | | | This will enable to use threading for them. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use atomics for nine_bindAxel Davy2016-12-201-2/+3
| | | | | | | | | nine_bind didn't need atomics up to now, because it's use what always within a protected mutex. We need to use atomics because with the next patches several threads may use nine_bind. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Track dirty state groups in nine_contextAxel Davy2016-12-206-106/+81
| | | | | | | | 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 User Clip Planes to nine_contextAxel Davy2016-12-203-7/+38
| | | | | | | | 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-204-30/+59
| | | | | | | | 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 ds to nine_contextAxel Davy2016-12-203-14/+31
| | | | | | | | 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-206-107/+267
| | | | | | | | 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: Refactor LightEnableAxel Davy2016-12-203-24/+40
| | | | | | Call a helper function. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Refactor SetLightAxel Davy2016-12-203-20/+35
| | | | | | Call a helper function to set the light. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Put ff data in a separate structureAxel Davy2016-12-205-36/+38
| | | | | | | | | | 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-204-10/+39
| | | | | | | | 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 scissor to nine_contextAxel Davy2016-12-203-7/+38
| | | | | | | | 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]>