Path: blob/21.2-virgl/src/gallium/drivers/radeonsi/si_compute.h
4570 views
/*1* Copyright 2017 Advanced Micro Devices, Inc.2* All Rights Reserved.3*4* Permission is hereby granted, free of charge, to any person obtaining a5* copy of this software and associated documentation files (the "Software"),6* to deal in the Software without restriction, including without limitation7* on the rights to use, copy, modify, merge, publish, distribute, sub8* license, and/or sell copies of the Software, and to permit persons to whom9* the Software is furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice (including the next12* paragraph) shall be included in all copies or substantial portions of the13* Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL18* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,19* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR20* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE21* USE OR OTHER DEALINGS IN THE SOFTWARE.22*/2324#ifndef SI_COMPUTE_H25#define SI_COMPUTE_H2627#include "si_shader.h"28#include "util/u_inlines.h"2930struct si_compute {31struct si_shader_selector sel;32struct si_shader shader;3334unsigned ir_type;35unsigned private_size;36unsigned input_size;3738int max_global_buffers;39struct pipe_resource **global_buffers;40};4142void si_destroy_compute(struct si_compute *program);4344static inline void si_compute_reference(struct si_compute **dst, struct si_compute *src)45{46if (pipe_reference(&(*dst)->sel.base.reference, &src->sel.base.reference))47si_destroy_compute(*dst);4849*dst = src;50}5152#endif /* SI_COMPUTE_H */535455