summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* nv50,nvc0: Mark PIPE_QUERY_TIMESTAMP_DISJOINT as ready immediatelyTiziano Bacocco2015-02-102-0/+6
| | | | | | | | | Without this when an application issues that query, it would try to wait the result from the gpu, and since no query has been actually issued, it will wait forever. Signed-off-by: Tiziano Bacocco <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Fold IMM into MADRoy Spliet2015-02-101-0/+53
| | | | | | | | | | | | | Add a specific optimisation pass for NV50 to check whether SRC0 or SRC1 is a MOV dst, IMM. If so: fold the IMM in and try to drop the MOV. Must be done post-RA because it requires that SDST == SSRC2. V2: improve readability and add comments to clarify decisions V3: Remove redundant code... compiler already attempts to put the IMM in SSRC1 Signed-off-by: Roy Spliet <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Add emit support for MAD IMM formatRoy Spliet2015-02-101-0/+8
| | | | | | | | | But don't enable generation of it in the opProperties, because we can't guarantee the SDST==SRC2 constraint until after register assignment. We'll add a post-RA folding pass to utilise this. Signed-off-by: Roy Spliet <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Add support for MAD 4-byte opcodeRoy Spliet2015-02-102-8/+6
| | | | | | | | | | | | Add emission rules for negative and saturate flags for MAD 4-byte opcodes, and get rid of some of the constraints. Obviously tested with a wide variety of shaders. V2: Document MAD as supported short form V3: Split up IMM from short-form modifiers Signed-off-by: Roy Spliet <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: change the way float face is returnedIlia Mirkin2015-02-102-4/+6
| | | | | | | | | | | | The old way made it impossible for the optimizer to reason about what was going on. The new way is the same number of instructions (the neg gets folded into the cvt) but enables the optimizer to be cleverer if comparing to a constant (most common case). [The optimizer is presently not sufficiently clever to work this out, but it could relatively easily be made to be. The old way would have required significant complexity to work out.] Signed-off-by: Ilia Mirkin <[email protected]>
* gallium/hud: also try R8_UNORM format for font texture10.5-branchpointBrian Paul2015-02-071-9/+15
| | | | | | | Convert the code to try formats from an array rather than a bunch of if/else cases. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: flush stdout in print_help(), for WindowsBrian Paul2015-02-071-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/dri: Make depth buffer optional for postprocessingPark, Jeongmin2015-02-072-2/+2
| | | | | | Since only pp_jimenezmlaa uses depth buffer, we can make it optional. Signed-off-by: Marek Olšák <[email protected]>
* postprocess: Check for depth buffer in pp_jimenezmlaaPark, Jeongmin2015-02-071-0/+3
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88962 Signed-off-by: Marek Olšák <[email protected]>
* tgsi/ureg: Add missing some missing opcodes opcode_tmp.hEric Anholt2015-02-061-0/+4
| | | | | | I wanted all of these for NIR-to-TGSI. Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi/ureg: Move ureg_dst_register() to the header.Eric Anholt2015-02-062-28/+25
| | | | | | | I wanted to use it for nir-to-tgsi. The equivalent ureg_src_register() is also located here. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/u_tests: test a NULL buffer sampler viewMarek Olšák2015-02-062-13/+42
| | | | Reviewed-by: Glenn Kennard <[email protected]>
* gallium/u_tests: test a NULL constant bufferMarek Olšák2015-02-061-0/+57
| | | | | | | | | This expects (0,0,0,0), though it can be changed to something else or allow more than one set of values to be considered correct. This is currently the radeonsi behavior. Reviewed-by: Glenn Kennard <[email protected]>
* gallium/u_tests: test a NULL texture sampler viewMarek Olšák2015-02-061-17/+85
| | | | v2: allow one of the two values
* gallium/u_tests: restructure the only test, refactor out reusable codeMarek Olšák2015-02-061-31/+79
| | | | Reviewed-by: Glenn Kennard <[email protected]>
* gallium: run gallium tests if GALLIUM_TESTS=1 is setMarek Olšák2015-02-063-3/+14
| | | | Reviewed-by: Glenn Kennard <[email protected]>
* gallium/postprocessing: fix crash at context destructionMarek Olšák2015-02-061-4/+3
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g/sb: fix a bug in constants folding optimisation passXavier Bouchoux2015-02-061-0/+2
| | | | | | | | | | | | | | | ADD R6.y.1, R5.w.1, ~1|3f800000 ADD R6.y.2, |R6.y.1|, -0.0001|b8d1b717 was wrongly being converted to ADD R6.y.1, R5.w.1, ~1|3f800000 ADD R6.y.2, R5.w.1, -1.0001|bf800347 because abs() modifier was ignored. Signed-off-by: Xavier Bouchoux <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* r600g: fix abs() support on ALU 3 source operands instructionsXavier Bouchoux2015-02-063-7/+63
| | | | | | | | Since alu does not support abs() modifier on source operands, spill and apply the modifiers to a temp register when needed. Signed-off-by: Xavier Bouchoux <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* r300g: small code cleanup (v2)David Heidelberg2015-02-064-26/+4
| | | | | | | v2: incorporated changes from Marek Olšák Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* st/nine: Implement dummy vbo behaviour when vs is missing inputsTiziano Bacocco2015-02-064-18/+119
| | | | | | | | | | | Use a dummy vertex buffer object when vs inputs have no corresponding entries in the vertex declaration. This dummy buffer will give to the shader float4(0,0,0,0). This fixes several artifacts on some games. Signed-off-by: Axel Davy <[email protected]> Signed-off-by: Tiziano Bacocco <[email protected]>
* gallium/targets/d3dadapter9: Free card deviceAxel Davy2015-02-061-8/+10
| | | | | | | | | The drm fd wasn't released, causing a crash for wine tests on nouveau, which seems to have a bug when a lot of device descriptors are open. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* gallium/targets/d3dadapter9: Release the pipe_screen at destruction.Axel Davy2015-02-061-6/+12
| | | | | | | We weren't releasing hal and ref, causing some issues (threads not released, etc) Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* gallium/targets/d3dadapter9: Fix device detection for render-nodesAxel Davy2015-02-061-45/+14
| | | | | | | | | | | | | | When on a render node the unique ioctl doesn't work. This patch drops the code to detect the device, which relied on an ioctl, and replaces it by the mesa loader function. The mesa loader function is more complete and won't fail for render-nodes. Alternatively we could also have used the pipe cap to determine the vendor and device id from the driver. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Dummy sampler should have a=1Axel Davy2015-02-065-43/+163
| | | | | Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix update_framebuffer binding cbufs the pixel shader wouldn't ↵Axel Davy2015-02-062-12/+12
| | | | | | | render to Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Clear: better behave if rt_mask is different to the one of the ↵Axel Davy2015-02-061-13/+27
| | | | | | | framebuffer bound Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix multisampling support detectionAxel Davy2015-02-062-28/+9
| | | | | Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix enabled lights in stateblocksTiziano Bacocco2015-02-062-3/+7
| | | | | Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Tiziano Bacocco <[email protected]>
* st/nine: Fix depth stencil formats bindings flags.Axel Davy2015-02-064-27/+74
| | | | | Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix gpu memory leak in swapchainAxel Davy2015-02-061-2/+1
| | | | | Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: SetResourceResize should track nr_samples tooAxel Davy2015-02-061-0/+1
| | | | | Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: D3DRS_FILLMODE set to 0 is D3DFILL_SOLIDTiziano Bacocco2015-02-061-0/+1
| | | | | | Reviewed-by: Axel Davy <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Signed-off-by: Tiziano Bacocco <[email protected]>
* st/nine: Setting D3DRS_ALPHAFUNC to 0 means D3DCMP_NEVERTiziano Bacocco2015-02-061-0/+1
| | | | | Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Tiziano Bacocco <[email protected]>
* st/nine: Implement fallback behaviour when rts and ds don't matchAxel Davy2015-02-061-18/+28
| | | | | | | | This seems to be the behaviour on Win. Previous behaviour led to different issues depending on the driver. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix present_buffers allocationAxel Davy2015-02-061-6/+9
| | | | | | | | | | | | If has_present_buffers was false at first, but after a device reset, it turns true (for example if we begin to render to a multisampled back buffer), there was a crash due to present_buffers being uninitialised. This patch fixes it. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Check for aligned offset in each vertex elementPatrick Rudolph2015-02-061-1/+3
| | | | | | | Fixes wine test test_vertex_declaration_alignment() Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Fix bufferoverflow in {Get|Set}PixelShaderConstantFPatrick Rudolph2015-02-061-5/+5
| | | | | | | | | | Previous code wasn't checking against the correct limit: 224 for sm3 hardware, but 256. Fixes wine test test_pixel_shader_constant() Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Set [out] argument to NULL for some functionsPatrick Rudolph2015-02-061-0/+6
| | | | | | | | | Wine tests, and probably some apps, check for errors by checking for NULL instead of error codes. Fixes wine test test_surface_blocks() Reviewed-by: Axel davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Remove duplicated debug messagePatrick Rudolph2015-02-061-3/+0
| | | | | | | Likely a rebase error Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Return E_FAIL for unused vertexdeclaration typePatrick Rudolph2015-02-061-3/+4
| | | | | | | | Add returncode E_FAIL. Return E_FAIL for any vertexdeclaration element with type unused. Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Missing sanity check for CALLOC return E_OUTOFMEMORY if allocation ↵Patrick Rudolph2015-02-061-1/+1
| | | | | | | of usage_map fails Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
* st/nine: Implement ATOC hackAxel Davy2015-02-062-0/+12
| | | | | | | | | | | ATOC is an hack for Alpha to coverage that is supported by NV and Intel. You need to check the support for it with CheckDeviceFormat. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Implement AMD alpha to coverageAxel Davy2015-02-064-5/+20
| | | | | | | | | This D3D hack is supposed to be supported by all AMD SM2+ cards. Apps use it without checking if they are on AMD. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add D3DFMT_DF16 supportAxel Davy2015-02-062-4/+14
| | | | | | | | | | | | | | | This depth buffer format, like D3DFMT_INTZ, can be used to read the depth buffer values when bound to a shader. Some apps may use this format to get better performance when they don't need the precision of INTZ (24 bits for depth, 8 for stencil, whereas DF16 is just 16 bits for depth) We don't add support for DF24 yet, because it implies support for FETCH4, which we don't support for now. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Change the value of some advertised capsAxel Davy2015-02-061-3/+3
| | | | | | | These values are taken from wine. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: NineDevice9_SetClipPlane: pPlane must be non-NULLAxel Davy2015-02-061-3/+5
| | | | | Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Implement fallback for D3DFMT_D24S8, D3DFMT_D24X8 and D3DFMT_INTZAxel Davy2015-02-061-1/+20
| | | | | | | | | | | Some drivers support PIPE_FORMAT_S8_UINT_Z24_UNORM, some others PIPE_FORMAT_Z24_UNORM_S8_UINT, some both. It doesn't matter which one we use, since the d3d formats they map to aren't lockable (app can read it directly). Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Refactor format d3d9 to pipe conversionAxel Davy2015-02-0611-77/+136
| | | | | | | | | | | Move the checks of whether the format is supported into a common place. The advantage is that allows to handle when a d3d9 format can be mapped to several formats, and that cards don't support all of them. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Refactor nine_d3d9_to_pipe_format_mapAxel Davy2015-02-061-79/+44
| | | | | | | | | | The order of the format is changed to have an increasing ordering of the d3d9 format values. Some missing formats are added and matched to PIPE_FORMAT_NONE Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>