summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)Kai Wasserbäch2016-08-291-1/+1
| | | | | | | | | | | v1 → v2: - Fixed indentation (noted by Brian Paul) - Removed second assert from nouveau's switch statements (suggested by Brian Paul) Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: minor whitespace, etc clean-ups in svga_pipe_misc.cBrian Paul2016-08-261-26/+23
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: move some code in svga_propagate_surface()Brian Paul2016-08-261-18/+19
| | | | | | | Move computation of zslice, layer inside the conditional where they're used. Reviewed-by: Neha Bhende <[email protected]>
* svga: simplify surface propagation code in svga_set_framebuffer_state()Brian Paul2016-08-261-12/+4
| | | | | | Rewrite the comment too. Reviewed-by: Neha Bhende <[email protected]>
* svga: add some comments in the svga_surface structBrian Paul2016-08-261-0/+16
| | | | | | Give more info about backing resources/surfaces. Reviewed-by: Neha Bhende <[email protected]>
* svga: use new svga_check_sampler_framebuffer_resource_collision()Brian Paul2016-08-261-18/+3
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: add new svga_check_sampler_framebuffer_resource_collision()Brian Paul2016-08-262-1/+36
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: remove assertions in svga_surface cast wrappersBrian Paul2016-08-261-2/+0
| | | | | | | We don't do this for other cast wrappers. And this will simplify some code at call sites. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor code simplification in svga_texture_transfer_unmap()Brian Paul2016-08-261-2/+1
| | | | | | Use the tex variable instead of using svga_texture() again. Reviewed-by: Neha Bhende <[email protected]>
* svga: reformat some expressions in svga_texture_transfer_map()Brian Paul2016-08-261-3/+3
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: remove duplicated variable in svga_texture_transfer_map()Brian Paul2016-08-261-1/+0
| | | | | | tex was already declared at the function body scope. Reviewed-by: Neha Bhende <[email protected]>
* svga: move some assignments in svga_texture_transfer_map()Brian Paul2016-08-261-4/+4
| | | | | | Put near other assignments to the svga_transfer variable. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor simplifications in svga_texture_transfer_map()Brian Paul2016-08-261-9/+9
| | | | | | Use local vars instead of jumping through a pointer. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor reformatting of svga_texture() cast wrapperBrian Paul2016-08-261-1/+2
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: rewrite svga_buffer() cast wrapperBrian Paul2016-08-261-6/+4
| | | | | | To make it symmetric with the svga_texture() cast wrapper. Reviewed-by: Neha Bhende <[email protected]>
* svga: remove local variable in create_backed_surface_view()Brian Paul2016-08-261-7/+4
| | | | | | To simplify the code a bit. Reviewed-by: Neha Bhende <[email protected]>
* svga: add guest statistic gathering interfaceCharmaine Lee2016-08-261-0/+49
| | | | | | | This file was supposed to be added with the previous "svga: add guest statistic gathering interface" patch but went MIA for some reason. Reviewed-by: Brian Paul <[email protected]>
* svga: fix regression related to srgbNeha Bhende2016-08-261-0/+12
| | | | | | | | | This regression is caused because of commit 3190c7ee9727161d627f107c2e7f8ec3a11941c1 Regression caused by following OpenGL 4.4 spec rules relates to GL_FRAMEBUFFER_SRGB in Mesa. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: use local variable blit instead of pointerNeha Bhende2016-08-261-29/+30
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: s/INDEX_0D/INDEX_IMMEDIATE32/Brian Paul2016-08-261-1/+1
| | | | Both are zero, but the later is the right token.
* svga: add comment about unsupported blend modesBrian Paul2016-08-261-0/+3
|
* svga: fix ordering of mksstats counter stringsCharmaine Lee2016-08-261-1/+1
| | | | | | | String for SVGA_STATS_COUNT_TEXREADBACK was swapped with the string for SVGA_STATS_COUNT_SURFACEWRITEFLUSH. Trivial fix.
* svga: avoid emitting redundant SetShaderResource commandCharmaine Lee2016-08-264-34/+63
| | | | | | Tested with Lightsmark2008, Heaven, MTT piglit, glretrace, viewperf, conform. Reviewed-by: Brian Paul <[email protected]>
* svga: add a cleanup function to clean up sampler stateCharmaine Lee2016-08-263-11/+22
| | | | | | | This patch adds a cleanup function to clean up sampler state at context destruction time. Reviewed-by: Brian Paul <[email protected]>
* svga: loosen the condition to flush in get_query_result_vgpu10()Brian Paul2016-08-261-1/+1
| | | | | | | | | Fixes piglit spec/ext_transform_feedback/overflow-edge-cases segfaults because the query's fence pointer was null. Tested with Piglit, Sauerbraten, ETQW. Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix vgpu10 query fencingBrian Paul2016-08-261-11/+11
| | | | | | | | | | | We don't want to flush the command buffer or sync on the fence when ending a query (that kind of defeats the whole purpose of async queries). Do that instead in get_query_result(). Tested with Piglit, arbocclude, Sauerbraten game, Nobel Clinician Viewer, ETQW. Reviewed-by: Charmaine Lee <[email protected]>
* svga: avoid emitting redundant DXSetSamplers commandCharmaine Lee2016-08-262-8/+25
| | | | | | | | This patch avoid emitting redundant DXSetSamplers command. Tested with Lightsmark2008, Heaven, MTT piglit, glretrace, viewperf. Reviewed-by: Brian Paul <[email protected]>
* svga: enable ARB_clear_texture extension in the driver.Neha Bhende2016-08-261-1/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: define svga_clear() in svga_init_clear_functions()Neha Bhende2016-08-263-11/+2
| | | | | | | Put all the clearing related functions in svga_init_clear_functions() Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add svga_init_clear_functions()Neha Bhende2016-08-263-0/+6
| | | | | | | | | define svga_init_clear_functions() and svga_clear_texture as svga->pipe.clear_texture. This is part of ARB_clear_texture extension Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add new function svga_clear_texture()Neha Bhende2016-08-261-0/+188
| | | | | | | | | To clear texture this function can be used. This is part of ARB_clear_texture extension. Basically this extension allows you to clear texture with given color values. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add new begin_blit()Neha Bhende2016-08-261-9/+18
| | | | | | | | Saving all blitter states will be done in begin_blit() so that begin_blit() can be used before performing any blit operation. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add opt to the list of valid build typesCharmaine Lee2016-08-261-0/+2
| | | | | | For opt build, add VMX86_STATS to the list of cpp defines. Reviewed-by: Brian Paul <[email protected]>
* svga: add guest statistic gathering interfaceCharmaine Lee2016-08-2630-85/+448
| | | | | | | | | | | | With this patch, guest statistic gathering interface is added to svga winsys interface that can be used to gather svga driver statistic. The winsys module can then share the statistic info with the VMX host via the mksstats interface. The statistic enums used in the svga driver are defined in svga_stats_count and svga_stats_time in svga_winsys.h Reviewed-by: Brian Paul <[email protected]>
* svga: fix indirect non-indexable temp accessCharmaine Lee2016-08-261-2/+25
| | | | | | | | | | | If the shader has indirect access to non-indexable temporaries, convert these non-indexable temporaries to indexable temporary array. This works around a bug in the GLSL->TGSI translator. Fixes glsl-1.20/execution/fs-const-array-of-struct-of-array.shader_test on DX11Renderer. Reviewed-by: Brian Paul <[email protected]>
* gallium: add a cap to expose whether driver supports mixed color/zs bitsIlia Mirkin2016-08-231-0/+1
| | | | | | | | | | Some hardware can't render to color/depth buffers of mixed bitness. When that happens a fallback has to happen, but this allows the driver to express that this isn't an optimal scenario. The purpose of this is to remove such fbconfigs from the GLX/EGL config list. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* svga: fix src/dst typo in can_blit_via_copy_region_vgpu10()Brian Paul2016-08-171-1/+1
| | | | | | | | | | The function was always returning false because of this typo. Retested with piglit. There's some sRGB-related blit failures, but that seems unrelated. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: initialize a variable to silence a gcc warningBrian Paul2016-08-171-1/+1
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* gallium: change pipe_sampler_view::first_element/last_element -> offset/sizeMarek Olšák2016-08-171-3/+5
| | | | | | | | | | | This is required by OpenGL. Our hardware supports this. Example: Bind RGBA32F with offset = 4 bytes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97305 Acked-by: Ilia Mirkin <[email protected]> Acked-by: Nicolai Hähnle <[email protected]>
* svga: remove unused var in svga_mark_surfaces_dirty()Brian Paul2016-08-161-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: avoid a calloc in svga_buffer_transfer_map()Brian Paul2016-08-161-1/+3
| | | | | | Just initialize the two other pipe_transfer fields explicitly. Reviewed-by: Charmaine Lee <[email protected]>
* svga: don't call os_get_time() when not needed by Gallium HUDBrian Paul2016-08-165-11/+26
| | | | | | | The calls to os_get_time() were showing up higher than expected in profiles. Reviewed-by: Charmaine Lee <[email protected]>
* svga: remove unneeded memset() call in draw_vgpu10()Brian Paul2016-08-161-2/+1
| | | | | | | | | All three fields of the vbuffer_attrs[] array are assigned in the following loop. The remaining elements of the array are not used. Tested with full Piglit run, Heaven 4.0, etc. Reviewed-by: Charmaine Lee <[email protected]>
* svga: reduce looping in svga_mark_surfaces_dirty()Brian Paul2016-08-161-1/+1
| | | | | | | | | We don't need to loop over the max number of color buffers, just the current number (which is usually one). Tested with full Piglit run, Heaven 4.0, etc. Reviewed-by: Charmaine Lee <[email protected]>
* svga: minor clean-ups in define_rasterizer_object()Brian Paul2016-08-161-5/+6
| | | | | | Add const qualifiers, new comment. Reviewed-by: Charmaine Lee <[email protected]>
* svga: remove incorrect buffer invalidation codeBrian Paul2016-08-161-5/+0
| | | | | | | Fixes regression with team_fortress_2 trace. This change has been in our in-house tree for some time. Reviewed-by: Charmaine Lee <[email protected]>
* svga: additional comments for svga_hw_draw_state membersBrian Paul2016-08-161-4/+11
| | | | | | And re-order a few fields. Signed-off-by: Brian Paul <[email protected]>
* svga: use the sws local var to simplify some codeBrian Paul2016-08-161-3/+2
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: minor whitespace and code clean-upsBrian Paul2016-08-161-32/+25
| | | | Signed-off-by: Brian Paul <[email protected]>
* gallium: add a pipe_context parameter to fence_finishMarek Olšák2016-08-102-2/+3
| | | | | | | | required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>