Path: blob/21.2-virgl/src/gallium/frontends/clover/core/sampler.hpp
4572 views
//1// Copyright 2012 Francisco Jerez2//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// the rights to use, copy, modify, merge, publish, distribute, sublicense,7// and/or sell copies of the Software, and to permit persons to whom the8// Software is furnished to do so, subject to the following conditions:9//10// The above copyright notice and this permission notice shall be included in11// all copies or substantial portions of the Software.12//13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR17// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19// OTHER DEALINGS IN THE SOFTWARE.20//2122#ifndef CLOVER_CORE_SAMPLER_HPP23#define CLOVER_CORE_SAMPLER_HPP2425#include "core/object.hpp"26#include "core/queue.hpp"2728namespace clover {29class sampler : public ref_counter, public _cl_sampler {30public:31sampler(clover::context &ctx, bool norm_mode,32cl_addressing_mode addr_mode,33cl_filter_mode filter_mode);3435sampler(const sampler &s) = delete;36sampler &37operator=(const sampler &s) = delete;3839bool norm_mode();40cl_addressing_mode addr_mode();41cl_filter_mode filter_mode();4243const intrusive_ref<clover::context> context;4445friend class kernel;4647private:48void *bind(command_queue &q);49void unbind(command_queue &q, void *st);5051bool _norm_mode;52cl_addressing_mode _addr_mode;53cl_filter_mode _filter_mode;54};55}5657#endif585960