summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add condition parameter to render_conditionRoland Scheidegger2013-06-182-1/+4
| | | | | | | | | | | | | For conditional rendering this makes it possible to skip rendering if either the predicate is true or false, as supported by d3d10 (in fact previously it was sort of implied skip rendering if predicate is false for occlusion predicate, and true for so_overflow predicate). There's no cap bit for this as presumably all drivers could do it trivially (but this patch does not implement it for the drivers using true hw predicates, nvxx, r600, radeonsi, no change is expected for OpenGL functionality). Reviewed-by: Jose Fonseca <[email protected]>
* ilo: construct depth/stencil command in create_surface()Chia-I Wu2013-06-186-271/+368
| | | | | | | | | | Add ilo_gpe_init_zs_surface() to construct 3DSTATE_DEPTH_BUFFER 3DSTATE_STENCIL_BUFFER 3DSTATE_HIER_DEPTH_BUFFER at surface creation time. This allows fast state emission in draw_vbo().
* ilo: add pipe-based copy method to ilo_blitterChia-I Wu2013-06-172-5/+25
| | | | It enables accelerated resource_copy_region() when blt-based method fails.
* ilo: add BLT-based blitting methods to ilo_blitterChia-I Wu2013-06-174-495/+847
| | | | | | Port BLT code in ilo_blit.c to BLT-based blitting methods of ilo_blitter. Add BLT-based clears. The latter is verifed with util_clear(), but it is not in use yet.
* ilo: replace util_blitter by ilo_blitterChia-I Wu2013-06-177-103/+363
| | | | | ilo_blitter is just a wrapper for util_blitter for now. We will port BLT code to ilo_blitter shortly.
* ilo: fix for half-float vertex arraysChia-I Wu2013-06-151-1/+14
| | | | | Commit 6fe0453c339b6e894e0ee8d2200e7638a43ed21e broke half-float vertex arrays. This reverts a part of that commit, and explains why.
* ilo: add some assertions to help debuggingChia-I Wu2013-06-141-1/+23
| | | | | | Assert that we do not support user vertex/index/constant buffers. Issue a warning when a sampler view is created for a resource without PIPE_BIND_SAMPLER_VIEW.
* ilo: silence a compiler warningChia-I Wu2013-06-141-0/+2
| | | | The path should never be hit.
* ilo: mapping a resource may make some states dirtyChia-I Wu2013-06-134-9/+112
| | | | | | | | | When a resource is busy and is mapped with PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE, the underlying bo is replaced. We need to mark states affected by the resource dirty. With this change, we no longer have to emit vertex buffers and index buffer unconditionally.
* ilo: bump up PIPE_CAP_GLSL_FEATURE_LEVEL to 140Chia-I Wu2013-06-131-1/+1
| | | | With UBO and TBO support, we are supposedly good to claim GLSL 1.40.
* ilo: initialize dirty flags in ilo_init_states()Chia-I Wu2013-06-132-2/+2
| | | | | Now that we have a function to initialize states, initialize dirty flags there too.
* ilo: re-emit states that involve resourcesChia-I Wu2013-06-134-21/+23
| | | | | | | Even with hardware contexts, since we do not pin resources, we have to re-emit the states so that the resources are referenced (by cp->bo) and their offsets are updated in case they are moved. This also allows us to elimiate cp flush in is_bo_busy().
* ilo: fix for util_blitter_clear() changesChia-I Wu2013-06-131-4/+1
| | | | It has been broken since 17350ea979b883662573dac136cd9efb49938210.
* ilo: update winsys interfaceChia-I Wu2013-06-121-7/+14
| | | | | | The motivation is to kill tiling and pitch in struct intel_bo. That requires us to make tiling and pitch not queryable, and be passed around as function parameters.
* ilo: get rid of function tables in winsysChia-I Wu2013-06-1214-90/+88
| | | | | We are moving toward making struct intel_bo alias drm_intel_bo. As a first step, we cannot have function tables.
* ilo: access bo size directlyChia-I Wu2013-06-121-2/+2
| | | | buf->bo_size is readily avaiable, no need to go via buf->bo->get_size().
* ilo: remove unnecessary tex_set_bo/buf_set_boChia-I Wu2013-06-121-42/+18
| | | | Merge the bodies to tex_create_bo/buf_create_bo respectively.
* ilo: fix textureSize() for single-layered array texturesChia-I Wu2013-06-081-2/+18
| | | | | We returned 0 instead of 1 for the number of layers when the array texutre is single-layered. This fixed it on GEN7+.
* tgsi: replace tgsi_file_names tgsi_file_names[] with tgsi_file_name() functionBrian Paul2013-06-071-2/+2
| | | | | | | | | This change came from the discovery that the STATIC_ASSERT to check that the number of register file strings didn't actually work. Similar changes could be made for the other string arrays in tgsi_string.c Reviewed-by: Jose Fonseca <[email protected]>
* ilo: advertise PIPE_CAP_CUBE_MAP_ARRAYChia-I Wu2013-06-071-2/+1
| | | | | It was supported but not advertised. Also remove TODO tag for PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT, as it is not a TODO.
* ilo: add support for TEX2/TXB2/TXL2 in fsChia-I Wu2013-06-071-3/+3
| | | | They were already supported, just being rejected in the TGSI translator.
* ilo: use slab allocator for transfersChia-I Wu2013-06-074-28/+39
| | | | | Slab allocator is perfect for transfer. Improved OpenArena performance by 1% with several casual runs.
* ilo: clean up states upon context destroyChia-I Wu2013-06-071-0/+38
| | | | We need to unreference resources that we referenced.
* ilo: unmap cp bo before destroying itChia-I Wu2013-06-071-1/+6
| | | | | The BOs are mapped in their entire life times for the chipsets we support so do not forget to unmap it.
* ilo: enable bo reuseChia-I Wu2013-06-071-0/+2
| | | | This magical line of code must have got lost at some point in the history...
* ilo: construct 3DSTATE_SF in create_rasterizer_state()Chia-I Wu2013-06-077-164/+194
| | | | Add ilo_rasterizer_sf and initialize it in create_rasterizer_state().
* ilo: construct 3DSTATE_CLIP in create_rasterizer_state()Chia-I Wu2013-06-075-50/+86
| | | | Add ilo_rasterizer_clip and initialize it in create_rasterizer_state().
* ilo: use emit_SURFACE_STATE() for render targetsChia-I Wu2013-06-079-127/+52
| | | | | | Introduce ilo_surface_cso and initialize it in create_surface(). With the change, we can emit SURFACE_STATE directly from the CSO and remove emit_surf_SURFACE_STATE(). We do not deal with depth/stencil surfaces yet.
* ilo: use emit_SURFACE_STATE() for constant buffersChia-I Wu2013-06-079-70/+26
| | | | | | Introduce ilo_cbuf_cso and initialize it in set_constant_buffer(). As ilo_view_surface is embedded in ilo_cbuf_cso, switch to emit_SURFACE_STATE() for constant buffers and remove emit_cbuf_SURFACE_STATE().
* ilo: add emit_SURFACE_STATE() for sampler viewsChia-I Wu2013-06-0710-99/+69
| | | | | | Introduce ilo_view_cso and initialize it in create_sampler_view(). Add emit_SURFACE_STATE() to GPE, which can emit SURFACE_STATE from ilo_view_surface.
* ilo: add ilo_view_surface for SURFACE_STATEChia-I Wu2013-06-073-125/+268
| | | | Define struct ilo_view_surface for SURFACE_STATE construction and emission.
* ilo: convert generic depth-stencil-alpha pipe state to ilo pipe stateCourtney Goeltzenleuchter2013-06-076-21/+51
| | | | | | | | | Moving the work to create time reduces the work at emit time. Saves time overall as create work is only done once. Fix compiler warning in gen7_pipeline_sol. [olv: remember pipe_alpha_state instead of pipe_depth_stencil_alpha_state in ilo_dsa_state]
* ilo: introduce vertex element CSOChia-I Wu2013-06-076-119/+227
| | | | | | | Introduce ilo_ve_cso and initialize it in create_vertex_elements_state(). This commit goes a step further by setting up mappings from HW VB to PIPE VB, which we failed to do previously. That allows us to support instanced rendering.
* ilo: simplify emit_3DSTATE_DEPTH_BUFFER()Chia-I Wu2013-06-076-63/+19
| | | | | | Remove hiz and dsa from the parameters. We would know whether HiZ buffer exists from ilo_texture once it is supported. DSA state should not affect 3DSTATE_DEPTH_BUFFER.
* ilo: introduce blend CSOChia-I Wu2013-06-076-97/+183
| | | | | Introduce ilo_blend_cso and initialize it in create_blend_state(). This saves us from having to construct hardware blend states in draw_vbo().
* ilo: introduce sampler CSOChia-I Wu2013-06-078-371/+447
| | | | | | Introduce ilo_sampler_cso and initialize it in create_sampler_state(). This saves us from having to perform CPU-intensive calculations to construct hardware sampler states in draw_vbo().
* ilo: construct SCISSOR_RECT in set_scissor_states()Chia-I Wu2013-06-077-26/+92
| | | | | | This allows us to memcpy() the state in draw_vbo(). Add ilo_init_states() and ilo_cleanup_states() that are called when contexts are created and destroyed respectively, and properly set the initial scissor state in ilo_init_states().
* ilo: introduce viewport CSOChia-I Wu2013-06-078-197/+197
| | | | | | Introduce ilo_viewport_cso and initialize it in set_viewport_states(). This saves us from having to perform CPU-intensive calculations to construct hardware viewport states in draw_vbo().
* ilo: switch to ilo states for shaders and resourcesChia-I Wu2013-06-077-114/+114
| | | | | | | | | | | | Define and use struct ilo_sampler_state; struct ilo_view_state; struct ilo_cbuf_state; struct ilo_resource_state; struct ilo_global_binding; in ilo_context.
* ilo: switch to ilo states for CC stageChia-I Wu2013-06-079-107/+119
| | | | | | | | | | Define and use struct ilo_dsa_state; struct ilo_blend_state; struct ilo_fb_state; in ilo_context.
* ilo: switch to ilo states for WM stageChia-I Wu2013-06-077-26/+33
| | | | | | | | Define and use struct ilo_rasterizer_state; in ilo_context.
* ilo: switch to ilo states for CLIP and SF stagesChia-I Wu2013-06-076-19/+49
| | | | | | | | | Define and use struct ilo_viewport_state; struct ilo_scissor_state; in ilo_context.
* ilo: switch to ilo states for SOL stageChia-I Wu2013-06-077-30/+29
| | | | | | | | Define and use struct ilo_so_state; in ilo_context.
* ilo: switch to ilo states for VF stageChia-I Wu2013-06-077-53/+55
| | | | | | | | | | Define and use struct ilo_vb_state; struct ilo_ve_state; struct ilo_ib_state; in ilo_context.
* ilo: move hardware limits to ilo_gpe.hChia-I Wu2013-06-072-22/+56
|
* ilo: simplify shader variant handlingCourtney Goeltzenleuchter2013-05-302-25/+2
| | | | | | Remove hash function on shader variants. Nature of variants limits them to a small number and thus its more efficient to just do a memory compare of the actual shader structures rather than compute and compare hashes.
* gallium: Add support for multiple viewportsZack Rusin2013-05-251-6/+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]>
* ilo: enable multiple constant buffersChia-I Wu2013-05-271-1/+1
| | | | This effectively enables uniform buffer object support.
* ilo: add support for indirect access of CONST in FSChia-I Wu2013-05-272-2/+99
| | | | | Unlike other register files, CONST is read with a message and indirect access is easier to implement.
* ilo: add support for TBOs on GEN6Chia-I Wu2013-05-271-8/+26
| | | | This hunk was missing in the last commit.