Path: blob/21.2-virgl/src/gallium/drivers/r600/evergreen_compute.h
4570 views
/*1* Copyright 2011 Adam Rak <[email protected]>2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* on the rights to use, copy, modify, merge, publish, distribute, sub7* license, and/or sell copies of the Software, and to permit persons to whom8* the Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL17* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,18* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR19* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE20* USE OR OTHER DEALINGS IN THE SOFTWARE.21*22* Authors:23* Adam Rak <[email protected]>24*/2526#ifndef EVERGREEN_COMPUTE_H27#define EVERGREEN_COMPUTE_H2829#include "r600_pipe.h"3031struct r600_atom;32struct evergreen_compute_resource;33struct compute_memory_item;3435struct r600_resource_global {36struct r600_resource base;37struct compute_memory_item *chunk;38};3940void evergreen_init_atom_start_compute_cs(struct r600_context *rctx);41void evergreen_init_compute_state_functions(struct r600_context *rctx);42void evergreen_emit_cs_shader(struct r600_context *rctx, struct r600_atom * atom);4344struct r600_resource* r600_compute_buffer_alloc_vram(struct r600_screen *screen, unsigned size);45struct pipe_resource *r600_compute_global_buffer_create(struct pipe_screen *screen, const struct pipe_resource *templ);46void r600_compute_global_buffer_destroy(struct pipe_screen *screen,47struct pipe_resource *res);48void *r600_compute_global_transfer_map(struct pipe_context *ctx,49struct pipe_resource *resource,50unsigned level,51unsigned usage,52const struct pipe_box *box,53struct pipe_transfer **ptransfer);54void r600_compute_global_transfer_unmap(struct pipe_context *ctx,55struct pipe_transfer *transfer);5657#endif585960