summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add interface for querying memory usage and sizes (v2)Marek Olšák2016-02-0516-0/+33
| | | | | | | | | | If you're worried about the duplication of some CAPs, we can remove them later. v2: add fields for memory eviction stats Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: remove radeon_info::r600_tiling_configMarek Olšák2016-02-054-24/+9
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: get pipe_interleave_bytes AKA group_bytes from the winsysMarek Olšák2016-02-057-65/+16
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: set num_banks in the winsysMarek Olšák2016-02-057-32/+13
| | | | | | | amdgpu doesn't have to set this, because radeonsi gets it from tile mode arrays by default. Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: just get num_tile_pipes from the winsysMarek Olšák2016-02-056-91/+9
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* winsys/amdgpu: add an assertion to cik_get_num_tile_pipes (v2)Marek Olšák2016-02-051-1/+4
| | | | | | | v2: print an error to stderr Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* winsys/amdgpu: remove an r600-only settingMarek Olšák2016-02-051-1/+0
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: rename & reorder members of radeon_infoMarek Olšák2016-02-0514-95/+103
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add placeholder MC and SRBM performance counter groupsNicolai Hähnle2016-02-051-16/+54
| | | | | | | | | | Yet another change motivated by AMD GPUPerfStudio compatibility. These groups are not directly accessible from userspace, and AMD GPUPerfStudio does not actually query them - it just requires them to be there. Hence, adding a placeholder for now. Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Marek Olšák <[email protected]>
* radeonsi: re-order the SQ_xx performance counter blocksNicolai Hähnle2016-02-053-39/+42
| | | | | | | | This is yet another change motivated by appeasing AMD GPUPerfStudio's hardcoding of performance counter group numbers. Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Marek Olšák <[email protected]>
* radeonsi: re-order the perfcounter hardware blocksNicolai Hähnle2016-02-051-12/+18
| | | | | | | | | As documented in the comment, AMD GPUPerfStudio unfortunately hardcodes the order of performance counter groups. Let's do the pragmatic thing and present the same order as Catalyst/Crimson. Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Marek Olšák <[email protected]>
* gallium/radeon: add GPIN driver query groupNicolai Hähnle2016-02-052-3/+87
| | | | | | | | | This group was used by older versions of AMD GPUPerfStudio (via AMD_performance_monitor) to identify the GPU family, and GPUPerfStudio still complains when it isn't available. Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Marek Olšák <[email protected]>
* radeonsi: Allow dumping LLVM IR before optimization passesNicolai Hähnle2016-02-053-2/+16
| | | | | | | | | | | | | | Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes, to allow diagnosing problems caused by optimization passes. Note that in order to compile the resulting IR with llc, you will first have to run at least the mem2reg pass, e.g. opt -mem2reg -S < shader.ll | llc -march=amdgcn -mcpu=bonaire Signed-off-by: Michel Dänzer <[email protected]> (original patch) Signed-off-by: Nicolai Hähnle <[email protected]> (w/ debug flag) Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: emit LLVM `ret void` before radeon_llvm_finalize_moduleNicolai Hähnle2016-02-053-3/+4
| | | | | | | This allows dumping a consumable LLVM module before the initial optimization passes are run. Reviewed-by: Marek Olšák <[email protected]>
* nvc0: avoid negatives in PUSH_SPACE argumentIlia Mirkin2016-02-051-2/+1
| | | | | | | | | | Fixup to commit 03b3eb90d - the number of buffers could be larger than the number of elements, in which case we'd pass a negative argument to PUSH_SPACE, which would be bad. While we're at it, merge it with the other PUSH_SPACE at the top of the function. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0: add some missing PUSH_SPACE'sIlia Mirkin2016-02-051-1/+9
| | | | | | | | nvc0_vbo has explicit push space checking enabled, so we must run PUSH_SPACE by hand. A few spots missed that. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0/ir: fix converting between predicate and gprIlia Mirkin2016-02-053-11/+41
| | | | | | | | | | The spill logic will insert convert ops when moving between files. It seems like the emission logic wasn't quite ready for these converts. Tested on fermi, and visually looked at nvdisasm output for maxwell. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0: add support for ARB_query_buffer_objectIlia Mirkin2016-02-0411-20/+239
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add PIPE_CAP_QUERY_BUFFER_OBJECTIlia Mirkin2016-02-0415-0/+16
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add a way to store query result into bufferIlia Mirkin2016-02-043-0/+37
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/nine: Use align_free when neededAxel Davy2016-02-044-4/+4
| | | | | | | | Use align_free to free memory allocated with align_malloc. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Disallow non-argb8888 cursorsAxel Davy2016-02-041-0/+1
| | | | | | | Only argb8888 cursors are allowed. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Enforce centroid for color input when multisampling is onAxel Davy2016-02-044-4/+15
| | | | | | | | The color inputs must automatically use centroid whether multisampling is used or not. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Fix centroid flagAxel Davy2016-02-041-1/+4
| | | | | | | | sem.reg.mod & NINED3DSPDM_CENTROID is worth 4 when centroid is requested, whereas TGSI_INTERPOLATE_LOC_CENTROID is worth 1. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use fast clears more often for MRTsAxel Davy2016-02-044-12/+11
| | | | | | | | | | | | | | | | | | This enables to use fast clears in the following case: pixel shader renders to 1 RT 4 RT bound clear new pixel shader bound that renders to 4 RTs Previously the fast clear path wouldn't be hit, because when trying the fast clear path, the framebuffer state would be configured for 1 RT, instead of 4. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Use linear filtering for shadow mappingAxel Davy2016-02-041-2/+3
| | | | | | | | Some docs say linear filtering is always used when app does shadow mapping. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Respect block alignment on surface lockPatrick Rudolph2016-02-041-1/+1
| | | | | | | | | Respect block alignment for ATI1/ATI2 format when trying to lock a surface using LockRect(). Fixes failing WINE tests device.c test_surface_blocks() tests. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Add Render state validation layerAxel Davy2016-02-045-13/+236
| | | | | | | | | | | | | | | | | | Testing Win behaviour seems to show wrong states are accepted, but then depending on the states some specific 'good' behaviours happen. This adds some validation to catch invalid states and have these 'good' behaviours when it happens. Also reorders SetRenderState to match the expected optimisation: (Value == previous Value) => return immediately, which affects D3D9 hacks too. Signed-off-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
* DRI_CONFIG: Add option to override vendor idPatrick Rudolph2016-02-041-13/+48
| | | | | | | Add config option override_vendorid to report a fake card in d3dadapter9 drm. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Implement NineDevice9_GetAvailableTextureMemPatrick Rudolph2016-02-044-5/+50
| | | | | | | | | | | | | | | Implement a device private memory counter similar to Win 7. Only textures and surfaces increment vidmem and may return ERR_OUTOFVIDEOMEMORY. Vertexbuffers and indexbuffers creation always succeedes, even when out of video memory. Fixes "Vampire: The Masquerade - Bloodlines" allocating resources until crash. Fixes "Age of Conan" allocating resources until crash. Fixes failing WINE test device.c test_vidmem_accounting(). Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Handle Window OcclusionPatrick Rudolph2016-02-046-6/+104
| | | | | | | | | | | | | | Apps can know if the window is occluded by checking for specific error messages. The behaviour is different for Device9 and Device9Ex. This allow games to release the mouse and stop rendering until the focus is restored. In case of multiple swapchain we do care only of the device one. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Store minor version numPatrick Rudolph2016-02-045-12/+24
| | | | | | | | | To keep compatible with older ID3DPresent interfaces (used to talk with Wine), store the minor version num accessible to all statetracker functions (in the NineDevice9 structure). Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Call flush_resource before flushAxel Davy2016-02-041-6/+4
| | | | | | | | | | | flush_resource needs to be called before flush (for fast clear resolve, etc). Removes useless computation of resource (it is already set correctly). Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Fix remaining swapchain testsPatrick Rudolph2016-02-042-1/+5
| | | | | | | | | | | | | | | | Return D3DERR_INVALIDCALL instead of E_POINTER. On error set ppBackBuffer to NULL. Multiple swapchains can only be created in windowed mode as windowed swapchain. Set backbuffer to NULL in NineDevice9_GetBackBuffer, but not in NineSwapChain9_GetBackBuffer. This fixes all WINE's device.c test_swapchain() tests. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix crash NineDevice9_CreateAdditionalSwapChainAxel Davy2016-02-041-0/+4
| | | | | | | | | | | | When no window is specified, we should revert to the focus window. This deserves more tests however (what if the device swapchain is already using the focus window ?) Fixes crash for FFXIV Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Fix possible crash on errorPatrick Rudolph2016-02-041-1/+2
| | | | | | | | In case swapchain creation fails This->swapchains[i] might be NULL and causes a crash. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Test more presentation paramsPatrick Rudolph2016-02-041-5/+8
| | | | | | | | Return errors in case of invalid presentation parameters. Fixes failing WINE tests device.c test_swapchain_parameters(). Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix resource9 private dataPatrick Rudolph2016-02-042-1/+3
| | | | | | | | | | | Store a copy of GUID in the header that is under our control and use it as key for the hashtable instead of using the application provided pointer. The application might change the memory after leaving the function. Fixes a crash for issue https://github.com/iXit/Mesa-3D/issues/130 Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Print GUID instead of pointerPatrick Rudolph2016-02-043-6/+30
| | | | | | | To ease debugging print the GUID instead of the pointer to it. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix use of uninitialized memoryPatrick Rudolph2016-02-042-1/+13
| | | | | | | The values of box.z and box.depth weren't set and lead to a crash. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix clear for multisample mismatch depth-stencilPatrick Rudolph2016-02-041-5/+7
| | | | | | | | | | Tests show in case of multisample mismatch between the depth-stencil buffer and the render target, then it is not cleared. Fixes failing WINE test visual.c test_multisample_mismatch(). Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix Volumetexture9_LockBoxPatrick Rudolph2016-02-041-0/+7
| | | | | | | | | Check for valid locked box dimensions. Fixes failing wine tests device.c test_lockbox_invalid. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix ATI2 pitch for non-squareAxel Davy2016-02-041-2/+2
| | | | | | | | | Fixes crash for non-square textures. We were using the height instead of the width for some calculations. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Support D3DFMT_R8G8B8Patrick Rudolph2016-02-041-3/+3
| | | | | | | | | | | | | | | | Add support for D3DFMT_R8G8B8. It allows format conversion for surfaces of pool scratch. Usually gallium formats equivalents for d3d9 formats have their names reversed. The gallium format PIPE_FORMAT_R8G8B8_UNORM is the right equivalent here, and its name is likely wrong (reversed). Fixes a crash in TmNationsForever. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Use cso for viewportPatrick Rudolph2016-02-041-2/+1
| | | | | | | Use CSO to catch redundant viewport changes. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix shade mode flatPatrick Rudolph2016-02-042-7/+8
| | | | | | | | | | Shade mode flat is only working if pixelshaders have interpolate set to TGSI_INTERPOLATE_COLOR on color inputs. Fixes failing WINE tests visual.c test_shademode(). Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Clear rendertarget on creationPatrick Rudolph2016-02-041-0/+9
| | | | | | | | Clear every rendertarget on creation. Fixes https://github.com/iXit/Mesa-3D/issues/139 Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Allow ColorFill on D3DFMT_NULL surfacesPatrick Rudolph2016-02-041-0/+2
| | | | | | | | Report success instead of failing as there's no resource for those surfaces. Fixes a crash in Crysis: Warhead. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Introduce STREAMFREQ stateAxel Davy2016-02-043-21/+24
| | | | | | | | | | | | | | | | | | | | Previous vertex elements code update was protected by 'if ((group & (NINE_STATE_VDECL | NINE_STATE_VS)) || state->changed.stream_freq & ~1)' itself protected by 'if (group & (NINE_STATE_COMMON | NINE_STATE_VS))' If no state is changed except the stream frequency, no update would happen. This patch solves the problem by adding a new NINE_STATE_STREAMFREQ state. Another way would be to add state->changed.stream_freq & ~1 check to the main test. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Catch redundant SetStreamSourceFreq callsAxel Davy2016-02-041-0/+3
| | | | | | | | Some apps do redundant SetStreamSourceFreq calls. Catch them to improve performance. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>