aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_state.c
Commit message (Collapse)AuthorAgeFilesLines
* i915g: remove calls to pipe_sampler_view_release()Brian Paul2019-03-171-8/+2
| | | | | | | | | | As with previous patches for svga, llvmpipe, swr drivers. Compile tested only. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-By: Jose Fonseca <[email protected]>
* gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák2017-05-101-12/+0
| | | | | | | | | | | | | | pipe_draw_info::indexed is replaced with index_size. index_size == 0 means non-indexed. Instead of pipe_index_buffer::offset, pipe_draw_info::start is used. For indexed indirect draws, pipe_draw_info::start is added to the indirect start. This is the only case when "start" affects indirect draws. pipe_draw_info::index is a union. Use either index::resource or index::user depending on the value of pipe_draw_info::has_user_indices. v2: fixes for nine, svga
* gallium: s/uint/enum pipe_shader_type/ for set_constant_buffer()Brian Paul2017-03-081-1/+1
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium: Use enum pipe_shader_type in set_sampler_views()Kai Wasserbäch2016-08-291-1/+1
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)Kai Wasserbäch2016-08-291-1/+2
| | | | | | | | | | | 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]>
* gallium: make constant_buffer constRob Clark2016-06-201-1/+1
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* i915g: s/Elements/ARRAY_SIZE/Brian Paul2016-05-031-4/+4
| | | | Signed-off-by: Brian Paul <[email protected]>
* draw: nuke the interp parameter from vertex_infoRoland Scheidegger2016-01-071-1/+0
| | | | | | | | | | | | | draw emit couldn't care less what the interpolation mode is... This somehow looked like it would matter, all drivers more or less dutifully filled that in correctly. But this is only used for emit, if draw needs to know about interpolation mode (for clipping for instance) it will get that information from the vs anyway. softpipe actually used to depend on that interpolation parameter, as it abused that structure quite a bit but no longer. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium/drivers: Remove unnecessary semicolonsEdward O'Callaghan2016-01-061-1/+1
| | | | | | Found-by: Coccinelle Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2014-12-081-6/+4
| | | | | | | See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i915g: handle more formats in copyStéphane Marchesin2014-05-261-0/+21
| | | | | We can handle depth, luminance,... copies by simply replacing the format with a known format of the same bpp.
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul2013-10-231-2/+20
| | | | | | | | | | | | The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
* i915g: Fix assertStephane Marchesin2013-10-121-1/+1
| | | | | | Now that we support start, assert on start + num < max samplers Reported by xexaxo
* i915g: Rename sampler to fragment_samplerStéphane Marchesin2013-10-071-3/+3
| | | | Otherwise it is fairly confusing.
* i915g: Fix the sampler bind functionStéphane Marchesin2013-10-071-19/+30
| | | | | | | | The new sampler bind sends us NULL samplers, so we need to count the number of valid samplers ourselves. This fixes ~500 piglit regressions from the sampler rework. While we're at it, let's also support start.
* i915g: remove old bind_vertex/fragment_sampler_states() hooksBrian Paul2013-10-031-2/+0
|
* i915g: implement pipe_context::bind_sampler_states()Brian Paul2013-10-031-0/+22
|
* i915g: Implement writemask fixupStéphane Marchesin2013-09-041-8/+7
| | | | | | | | | The fixup code emulates non-BGRA render targets by adding an extra instruction at the end of fragment shaders to swizzle the output. To do this, we also swizzle the blend function. However an oversight until now was that the writemask wasn't getting swizzled. This patch fixes that which fixes a bunch of piglit tests.
* gallium: Add support for multiple viewportsZack Rusin2013-05-251-5/+10
| | | | | | | | | | | | Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca<[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* i915g: Release old fragment shader sampler views with current pipeStuart Abercrombie2013-04-171-3/+8
| | | | | | | We were trying to use a destroy method from a deleted context. This fix is based on what's in the svga driver. Reviewed-by: Stéphane Marchesin <[email protected]>
* gallivm,draw,llvmpipe: use base ptr + mip offsets instead of mip pointersRoland Scheidegger2012-11-121-6/+6
| | | | | | | | | This might have a slight overhead but handling mip offsets more like the width (and image) strides should make some things easier (mip level being just part of the offset calculation) later. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-311-6/+6
| | | | | | | | | | | | | | | | | | | | | This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <[email protected]>
* i915g: fix unused variable and type conversion warningsMarek Olšák2012-10-091-1/+0
|
* i915g: Don't clobber I915_NEW_FS on new framebuffer.Stéphane Marchesin2012-10-081-1/+1
| | | | This snuck in with a previous commit.
* i915g: Call draw_set_mapped_vertex_buffer from draw_vboStéphane Marchesin2012-10-061-14/+0
| | | | This regressed with the draw rework. Fixes glest and vdrift crash.
* i915g: Get rid of the fixup state functions.Stéphane Marchesin2012-10-051-37/+0
| | | | Now that the saved_* state is gone, we don't need those any longer.
* i915g: Remove the i915_context->saved_* stuff.Stéphane Marchesin2012-10-051-27/+8
| | | | | | | | | When using u_blitter, the state was being saved from saved_*, but we don't use that. So after u_blitter resumed we got some corrupted state in. So let's just remove the saved_* stuff. I thought it was weird but harmless, it's actually broken.
* Remove useless checks for NULL before freeingMatt Turner2012-09-051-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FREE (E); + E = NULL; - if (unlikely (E != NULL)) { - FREE(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + FREE ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - FREE((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + FREE (E); - if (unlikely (E != NULL)) { - FREE (E); - } @@ expression E; type T; @@ + FREE ((T) E); - if (unlikely (E != NULL)) { - FREE ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #defineBrian Paul2012-08-161-6/+6
| | | | | | | | | | | | PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS were all defined to the same value (16). In various places we're creating arrays such as sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming the same number of max samplers for all shader stages anyway. Of course, drivers are still free to advertise different numbers of max samplers for different shaders.
* gallium: add a shader stage/type param to some draw functionsBrian Paul2012-08-161-0/+3
| | | | | To prepare for geometry shader texture support in the draw module. Note: we still only handle the vertex shader case.
* i915g: silence a const pointer warningBrian Paul2012-08-041-1/+1
|
* draw: simplify index buffer specificationBrian Paul2012-05-311-3/+0
| | | | | Replace draw_set_index_buffer() and draw_set_mapped_index_buffer() with draw_set_indexes() which simply takes a pointer and an index size.
* i915g: Check for geometry shader earlier in i915_set_constant_buffer.Vinson Lee2012-05-241-4/+4
| | | | | | | Fix resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add void *user_buffer to pipe_constant_bufferMarek Olšák2012-04-301-0/+9
| | | | This reduces CPU overhead when updating constants.
* gallium: remove pipe_context::redefine_user_bufferMarek Olšák2012-04-301-1/+0
|
* gallium: add void *user_buffer in pipe_vertex_bufferMarek Olšák2012-04-301-1/+3
| | | | | | | | | | | | This reduces CPU overhead in st_draw_vbo and removes a lot of unnecessary code in that function which was required only to comply with the gallium interface, but wasn't any useful really. Adapted drivers: i915, llvmpipe, r300, softpipe. No changes required in: r600, radeonsi. User vertex buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
* gallium: change set_constant_buffer to be UBO-friendlyMarek Olšák2012-04-301-1/+2
|
* Revert "i915g: Implement stipple with draw."Stéphane Marchesin2012-04-121-1/+1
| | | | This reverts commit 3cff45fdb182a1327f6b89fdc4e0ddc5d680372a.
* i915g: Remove useless draw calls.Stéphane Marchesin2012-02-121-36/+0
|
* i915g: Don't emit state when it's already bound.Stéphane Marchesin2012-02-121-0/+32
|
* i915g: Implement stipple with draw.Stéphane Marchesin2012-02-121-1/+4
|
* i915g: Separate declarations and program in the fragment program struct.Stéphane Marchesin2012-02-121-0/+6
| | | | We need this later to fixup fragment programs properly.
* i915g: Make the pipe_sampler_state struct non const and get rid of useless ↵Stéphane Marchesin2011-12-191-1/+1
| | | | memcpy.
* i915g: Put the templates at the beggining of the structures.Stéphane Marchesin2011-12-191-2/+2
| | | | | Seriously. This fixes fragment-and-vertex-texturing in piglit and probably a boatload of other stuff.
* i915g: Cleanup the vertex sampler interface a bit.Stéphane Marchesin2011-10-251-3/+3
|
* i915g: fix warning about void pointer arithmeticBrian Paul2011-10-111-1/+1
|
* i915g: Fix comment.Stéphane Marchesin2011-10-081-1/+1
|
* i915g: Implement vertex textures.Stéphane Marchesin2011-10-081-2/+136
|
* gallium: move border color to be a color unionDave Airlie2011-09-271-4/+4
| | | | | | | | | | EXT_texture_integer also specifies border color should be a color union, the values are used according to the texture sampler format. (update docs) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>