aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_state_sampler.c
Commit message (Collapse)AuthorAgeFilesLines
* svga: Fix imported surface view creationThomas Hellstrom2017-06-071-3/+3
| | | | | | | | | | When deciding to create a view with or without an alpha channel we need to look at the SVGA3D format and not the PIPE format. This fixes the glx-tfp piglit test for dri3/xa. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add const qualifiers on svga_check_sampler_view_resource_collision()Brian Paul2017-04-261-2/+2
| | | | | | We don't change any of the argument objects. Reviewed-by: Charmaine Lee <[email protected]>
* svga: minor code improvements in svga_validate_pipe_sampler_view()Brian Paul2016-10-181-8/+8
| | | | | | | Use the 'texture' local var in more places. Rename 'pFormat' to 'viewFormat'. Reviewed-by: Charmaine Lee <[email protected]>
* svga: s/unsigned/enum pipe_shader_type/Brian Paul2016-08-291-3/+3
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: add new svga_check_sampler_framebuffer_resource_collision()Brian Paul2016-08-261-1/+32
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: avoid emitting redundant SetShaderResource commandCharmaine Lee2016-08-261-33/+46
| | | | | | Tested with Lightsmark2008, Heaven, MTT piglit, glretrace, viewperf, conform. Reviewed-by: Brian Paul <[email protected]>
* svga: avoid emitting redundant DXSetSamplers commandCharmaine Lee2016-08-261-8/+23
| | | | | | | | This patch avoid emitting redundant DXSetSamplers command. Tested with Lightsmark2008, Heaven, MTT piglit, glretrace, viewperf. Reviewed-by: Brian Paul <[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: adjust sampler view format for RGBXBrian Paul2016-06-301-1/+5
| | | | | | | | We previously handled the case of a RGBX sampler view of a RGBA surface. Add the reverse case too. For GL_ARB_copy_image. Acked-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: s/Elements/ARRAY_SIZE/Brian Paul2016-04-251-1/+1
| | | | | | Standardize on the later macro rather than a mix of both. Reviewed-by: Charmaine Lee <[email protected]>
* svga: Force an RGBA view creation for an RGBA resourceSinclair Yeh2016-03-041-1/+10
| | | | | | | | | | | glXCreatePixmap() may specify a GLX_TEXTURE_FORMAT_RGB_EXT format for an RGBA resource, causing us to create an RGBX view for an RGBA resource, a combination vgpu10 does not support. When this is detected, change the request to create an RGBA view instead. Reviewed-by: Brian Paul <[email protected]>
* svga: add DXGenMips command supportCharmaine Lee2016-01-141-1/+1
| | | | | | | | | | | | | For those formats that support hw mipmap generation, use the DXGenMips command. Otherwise fallback to the mipmap generation utility. Tested with piglit, OpenGL apps (Heaven, Turbine, Cinebench) v2: make sure the texture surface was created with the render target bind flag set relocation flag to SVGA_RELOC_WRITE for the texture surface Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* svga: avoid emitting redundant SetSamplers() commandsBrian Paul2015-12-111-7/+15
| | | | | | | | This greatly reduces the number of SetSamplers() commands for some applications. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add/use new svga_sampler_format() functionBrian Paul2015-11-181-0/+3
| | | | | | | | | This is important for the case of sampling from a depth texture. In that case, we need to sample the texture as if it were a single-channel color texture. For other/color formats, we can use the format as-is. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* svga: fix backed surface view regressionCharmaine Lee2015-09-021-9/+8
| | | | | | | | | | | | | | | | | | Commit b9ba8492 removes an unneeded pipe_surface_release() from st_render_texture() and exposes a bug in the backed surface view creation. Currently a backed surface view for a conflicted surface view is created at framebuffer emit time. But if shader sampler views are changed but framebuffer surface views remain unchanged, emit_framebuffer() will not be called and conflicted surface views will not be detected. To fix this, also check for conflicted surface views when setting sampler views. If there is any conflicted surface views, enable the framebuffer dirty bit so that the framebuffer emit code has a chance to create a backed surface view for the conflicted surface view. Fix cinebench-r11-test regression. Reviewed-by: Brian Paul <[email protected]>
* svga: update driver for version 10 GPU interfaceBrian Paul2015-09-021-5/+5
| | | | | | | | | | | | | | | | | This is a squash commit of roughly two years of development work. Authors include: Brian Paul Charmaine Lee Thomas Hellstrom Jakob Bornecrantz Sinclair Yeh Mingcheng Chen Kai Ninomiya MengLin Wu The driver supports OpenGL 3.3. Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_state_sampler.c fileBrian Paul2015-09-021-0/+339
Signed-off-by: Brian Paul <[email protected]>