summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSETMarek Olšák2017-11-061-0/+1
|
* svga: Use __asm__ instead of asmDylan Baker2017-11-012-8/+5
| | | | | | | | | | | | __asm__ is portable, and allows the svga driver to be compiled with the c99 standard instead of requiring the gnu99 standard. I have compile tested this with GCC and Clang on Linux. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* gallium: add cap for driver specified max combined shader resources.Dave Airlie2017-11-011-0/+1
| | | | | | | | Some hw (evergreen) has a limit on how many combined (images/buffers/mrts) a fragment shader can access. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* svga: format the version string like the rest of mesaEric Engestrom2017-10-161-5/+5
| | | | | | | | All 4 other version strings do it like this. ((Also, double parentheses just look confusing)) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: fix format_conversion_table breakageBrian Paul2017-10-161-2/+7
| | | | | | | | | | The new A1B5G5R5_UNORM, X1B5G5R5_UNORM formats were added in the wrong place in commit ef874ee450b18e. Fixes: ef874ee450b18e "gallium: Add support for 5551 with the 1-bit field in the low bit." Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: Create a new PIPE_CAP_TILE_RASTER_ORDER for vc4.Eric Anholt2017-10-101-0/+1
| | | | | | | | | | | | | | | | Because vc4 can control the order that tiles are rasterized in, we can use it to implement overlapping blits using normal drawing and GL_ARB_texture_barrier, as long as we can tell the kernel what order to render the tiles in. This commit introduces the core gallium support, vc4 changes will follow. v2: Fix on the simulator. v3: Add the cap (disabled) to other drivers, add rst docs for the cap. v4: Rebase on PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS v5: Drop vc4 changes from this commit, for clarity. Reviewed-by: Nicolai Hähnle <[email protected]> (v3)
* gallium: Add support for 5551 with the 1-bit field in the low bit.Eric Anholt2017-10-101-0/+2
| | | | | | | | | | | | This is how VC4 stores 5551 textures, which we need to support for GL_OES_required_internalformat. v2: Extend commit message, fix svga driver build, add BE ordering from Roland. v3: Rebase on PIPE_FORMAT_R10G10B10X2_UNORM addition. Reviewed-by: Marek Olšák <[email protected]> (v2) Reviewed-by: Nicolai Hähnle <[email protected]> (v2)
* gallium: add PIPE_CAP_TGSI_ANY_REG_AS_ADDRESSMarek Olšák2017-10-061-0/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* svga: wrap long comments in svga_tgsi_vgpu10.cBrian Paul2017-10-031-4/+6
| | | | Trivial.
* svga: tweak pre-VGPU10 rasterization offsetsBrian Paul2017-10-031-17/+7
| | | | | | | | | | | | | | | | | | | | It seems there's no perfect x/y biases for line drawing to satisfy all applications. Depending on the biases, either real apps produce results similar to VGPU10 while Piglit's gl-1.0-ortho-pos fails, or vice versa. Let's lean toward real applications (Solidworks, SolidEdge, Google Earth) over Piglit. Using (-0.5, -0.5) for points, lines and triangles, seems to generally work well. We don't seem to have these issues with VGPU10. Tested with Piglit and CAD-oriented apitraces. See VMware bugs 1775498 and 1905053. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: if we get nr_samples==1, store nr_samples=0Brian Paul2017-10-031-4/+7
| | | | | | | | | | We need to be more careful not to treat nr_samples=1 as an msaa surface. This patch prevents us from errantly declaring an MSAA shader resource with 1 sample. No Piglit regressions, fixes the above-described errors. Reviewed-by: Neha Bhende <[email protected]>
* svga: emit sampler constants only if sampler view existsCharmaine Lee2017-10-031-7/+12
| | | | | | | | | | | | | | It is possible to have holes in the shader emitter's sampler_target array. 0 sampler_target does not necessarily mean there is no sampler view specified since texture buffer target has the value 0. With this patch, a sampler_view array is added to the shader emitter structure to specify if there is a sampler view for each texture unit. Only if there is a sampler view, we will emit constant for texcoord scale factor or texture buffer size for that sampler view. Fixes a rendering issue with Turbine after commit 1020e960440. Reviewed-by: Brian Paul <[email protected]>
* svga: fix incorrect case in svga_typeless_format()Brian Paul2017-10-031-2/+1
| | | | | | | | | | | | For the case of SVGA3D_X32_G8X24_UINT we incorrectly returned SVGA3D_R32_FLOAT_X8X24. We should return SVGA3D_R32G8X24_TYPELESS. Note that we never actually use SVGA3D_X32_G8X24_UINT so this has no impact. No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
* svga: add typeless switch cases in svga_typeless_format()Brian Paul2017-10-031-0/+10
| | | | | | | | | | We sometimes pass typeless formats to this function. By adding switch cases we avoid the "Unexpected format XXX in svga_typeless_format" warning messages. No functional change. No Piglit regressions, no above-mentioned warning messages. Reviewed-by: Charmaine Lee <[email protected]>
* svga: Allow sRGB format with PIPE_BIND_DISPLAY_TARGET binding flag on vgpu10.Neha Bhende2017-10-031-2/+7
| | | | | | | This patch allows to use sRGB formats for DISPLAY_TARGET on vgpu10. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* gallium: add PIPE_FORMAT_R10G10B10X2_UNORMNicolai Hähnle2017-10-021-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add LDEXP TGSI instruction and corresponding capNicolai Hähnle2017-09-291-0/+3
| | | | | Reviewed-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* svga: add missing PIPE_SHADER_CAP_INT64_ATOMICS switch casesBrian Paul2017-09-281-0/+2
| | | | | | Silences a compiler warning. Reviewed-by: Roland Scheidegger <[email protected]>
* svga: trivial whitespace clean-ups in svga_screen.cBrian Paul2017-09-281-11/+13
|
* svga: start advertising PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONNeha Bhende2017-09-281-1/+3
| | | | | | | | | | | Since our driver support arb_provoking_vertex, we can start advertising PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION Fixes ./clipflat & ./arb-provoking-vertex-render piglit tests Tested piglit, glretrace on Hw 11 and Hw 13 Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: silence unused var warning in optimized build with MAYBE_UNUSEDBrian Paul2017-09-261-1/+1
| | | | Trivial
* scons: use python3-compatible print()Eric Engestrom2017-09-251-1/+1
| | | | | | | | | These changes were generated using python's `2to3` tool. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102852 Reported-by: Alex Granni <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Add PIPE_SHADER_CAP_INT64_ATOMICSJan Vesely2017-09-211-0/+1
| | | | | | | Denotes availability of 64bit int atomic instructions Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add PIPE_SHADER_CAP_FP16Jan Vesely2017-09-181-0/+6
| | | | | | | | | Denotes native half precision float operations capability v2: PIPE_CAP_HALFS -> PIPE_SHADER_CAP_FP16 fix indentation Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVENicolai Hähnle2017-09-181-1/+6
| | | | | | | | | | | | | | | | | To be able to properly distinguish between GL_ANY_SAMPLES_PASSED and GL_ANY_SAMPLES_PASSED_CONSERVATIVE. This patch goes through all drivers, having them treat the two query types identically, except: 1. radeon incorrectly enabled conservative mode on PIPE_QUERY_OCCLUSION_PREDICATE. We now do it correctly, only on PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE. 2. st/mesa uses the new query type. Fixes dEQP-GLES31.functional.fbo.no_attachments.* Reviewed-by: Marek Olšák <[email protected]>
* gallium: introduce PIPE_CAP_LOAD_CONSTBUFTimothy Arceri2017-09-151-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* svga: abort shader translation upon indirect indexing of temporariesCharmaine Lee2017-09-081-0/+6
| | | | | | | | | | This patch aborts shader translation upon indirect indexing of temporary register on non-vgpu10 device. This prevents non-supported feature sending to the device. Tested wth MTT-piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: move index buffer bind flag assertionCharmaine Lee2017-09-051-3/+3
| | | | | | | | | | | The buffer bind flags can be promoted in svga_buffer_handle(), so move the assertion after it. This has already been done for vertex buffer in commit 6b4bf7e8be, but it misses the one for index buffer. Fixes assertion running WarThunder. Reviewed-by: Neha Bhende <[email protected]>
* svga: avoid emitting redundant SetShaderResources and SetVertexBuffersCharmaine Lee2017-09-052-18/+116
| | | | | | | | | | | | | Minor performance improvement in avoiding binding the same shader resource or the same vertex buffer for the same slot. Tested with MTT glretrace. v2: Per Brian's suggestion, add a helper function to do vertex buffer comparision. v3: Change the helper function to vertex_buffers_equal(). Reviewed-by: Brian Paul <[email protected]>
* svga: include sample count in surface_size() computationBrian Paul2017-08-301-1/+1
| | | | | | | Use MAX2() because sampleCount will be zero for non-MSAA surfaces. No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
* gallium: remove TGSI opcode SCSMarek Olšák2017-08-222-64/+0
| | | | | | | use COS+SIN instead. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium: remove TGSI opcode BREAKCMarek Olšák2017-08-221-2/+0
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: remove TGSI opcode XPDMarek Olšák2017-08-222-174/+0
| | | | | | use MUL+MAD+MOV instead. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: remove TGSI opcode DPHMarek Olšák2017-08-222-72/+0
| | | | | | use DP4 or DP3 + ADD. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: remove TGSI opcode DP2AMarek Olšák2017-08-222-52/+0
| | | | | | use DP3 instead. Reviewed-by: Roland Scheidegger <[email protected]>
* svga: replace gotos with conditionals in array drawing codeBrian Paul2017-08-212-32/+32
| | | | | | No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
* svga: whitespace clean-up in svga_draw_private.hBrian Paul2017-08-211-29/+27
| | | | Trivial.
* gallium: introduce PIPE_CAP_MEMOBJTimothy Arceri2017-08-031-0/+1
| | | | | | | | | | | | | | This can be used to guard support for EXT_memory_object and related extensions. v2: update gallium docs v3 (Timothy Arceri): - add cap to nv50 Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium: add PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE and corresponding capNicolai Hähnle2017-08-021-0/+1
| | | | | | | | v2: rename cap to PIPE_CAP_QUERY_SO_OVERFLOW and be a bit more explicit in the documentation Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add PIPE_CAP_NIR_SAMPLERS_AS_DEREFNicolai Hähnle2017-07-311-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* svga: implement MSAA alpha_to_one featureBrian Paul2017-07-255-1/+57
| | | | | | | | | | | | | The device doesn't directly support this feature so we implement it with additional shader code which sets the color output(s) w component to 1.0 (or max_int or max_uint). Fixes 16 Piglit ext_framebuffer_multisample/*alpha-to-one* tests. v2: only support unorm/float buffers, not int/uint, per Roland. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: rework the FS white fragments codeBrian Paul2017-07-252-33/+21
| | | | | | | | | | When we forcibly write white to FS outputs (for XOR mode emulation) we were using a temp register. But that's not really necessary. This also fixes the case of writing white to multiple color buffers. Subsequent changes will build on this. Reviewed-by: Charmaine Lee <[email protected]>
* svga: Limit number of immediates in shaderNeha Bhende2017-07-221-3/+5
| | | | | | | | | | | | imm {128.0, -128.0, 2.0, 3.0} is used for lit instruction which is not used very frequently. So allocate it only if lit instruction is used. Tested with mtt piglit and mtt glretrace v2: As per Charmaine's comment Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix constant indices for texcoord scale factors and texture buffer sizeCharmaine Lee2017-07-221-9/+6
| | | | | | | | | | This patch fixes the ordering of the constant indices for texcoord scale factor and texture buffer size to match the order they were added to the constant buffer in svga_get_extra_constants_common(). Tested with MTT piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: fix unnormalized->normalized texture coordinate conversionNeha Bhende2017-07-223-3/+35
| | | | | | | | | | | | | Sometimes, converting unnormalized coordinates to normalized coordinates requires an epsilon value to produce the right texels with nearest filtering. Adding 0.0001 to the coordinates when the min/mag filter is nearest fixes the issue. Fixes piglit test fbo-blit-scaled-linear Tested with mtt-piglit, mtt-glretrace Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: only support 4x, 8x, 16x msaaBrian Paul2017-07-221-0/+5
| | | | | | | Skip 2x MSAA, for example, since it's seldom used and just bloats the list of pixel formats. Reviewed-by: Charmaine Lee <[email protected]>
* drivers/svga: Connect driver-side fence_* functionsSinclair Yeh2017-07-172-1/+56
| | | | | | | | | Connect fence_get_fd, fence_create_fd, and fence_server_sync. Return PIPE_CAP_NATIVE_FENCE_FD capability based on what the winsys reports Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga/drm: Create winsys interface for Fence FDSinclair Yeh2017-07-171-1/+33
| | | | | | | | The new interfaces will be used to enable EGL_ANDROID_native_fence_sync. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* drivers/svga, winsys/svga/drm: Thread through timeout for fence_finishSinclair Yeh2017-07-174-6/+12
| | | | | | | | | | | | The timeout parameter is required to implement EGL_ANDROID_native_fence_sync. v2 * Replaced default timeout from 0 to PIPE_TIMEOUT_INFINITE * Add more documentation to the new timeout parameter Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: whitespace clean-up in svga_winsys.hBrian Paul2017-07-171-67/+66
| | | | Trivial.