1*bbecb9d1SAndroid Build Coastguard Worker /************************************************************************** 2*bbecb9d1SAndroid Build Coastguard Worker * 3*bbecb9d1SAndroid Build Coastguard Worker * Copyright (C) 2018 Collabora Ltd 4*bbecb9d1SAndroid Build Coastguard Worker * 5*bbecb9d1SAndroid Build Coastguard Worker * Permission is hereby granted, free of charge, to any person obtaining a 6*bbecb9d1SAndroid Build Coastguard Worker * copy of this software and associated documentation files (the "Software"), 7*bbecb9d1SAndroid Build Coastguard Worker * to deal in the Software without restriction, including without limitation 8*bbecb9d1SAndroid Build Coastguard Worker * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9*bbecb9d1SAndroid Build Coastguard Worker * and/or sell copies of the Software, and to permit persons to whom the 10*bbecb9d1SAndroid Build Coastguard Worker * Software is furnished to do so, subject to the following conditions: 11*bbecb9d1SAndroid Build Coastguard Worker * 12*bbecb9d1SAndroid Build Coastguard Worker * The above copyright notice and this permission notice shall be included 13*bbecb9d1SAndroid Build Coastguard Worker * in all copies or substantial portions of the Software. 14*bbecb9d1SAndroid Build Coastguard Worker * 15*bbecb9d1SAndroid Build Coastguard Worker * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16*bbecb9d1SAndroid Build Coastguard Worker * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17*bbecb9d1SAndroid Build Coastguard Worker * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18*bbecb9d1SAndroid Build Coastguard Worker * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19*bbecb9d1SAndroid Build Coastguard Worker * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20*bbecb9d1SAndroid Build Coastguard Worker * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21*bbecb9d1SAndroid Build Coastguard Worker * OTHER DEALINGS IN THE SOFTWARE. 22*bbecb9d1SAndroid Build Coastguard Worker * 23*bbecb9d1SAndroid Build Coastguard Worker **************************************************************************/ 24*bbecb9d1SAndroid Build Coastguard Worker 25*bbecb9d1SAndroid Build Coastguard Worker #ifndef VREND_TWEAKS_H 26*bbecb9d1SAndroid Build Coastguard Worker #define VREND_TWEAKS_H 27*bbecb9d1SAndroid Build Coastguard Worker 28*bbecb9d1SAndroid Build Coastguard Worker #include "virgl_protocol.h" 29*bbecb9d1SAndroid Build Coastguard Worker 30*bbecb9d1SAndroid Build Coastguard Worker #include <stdint.h> 31*bbecb9d1SAndroid Build Coastguard Worker #include <stdbool.h> 32*bbecb9d1SAndroid Build Coastguard Worker 33*bbecb9d1SAndroid Build Coastguard Worker struct vrend_context_tweaks { 34*bbecb9d1SAndroid Build Coastguard Worker uint32_t active_tweaks; 35*bbecb9d1SAndroid Build Coastguard Worker int32_t tf3_samples_passed_factor; 36*bbecb9d1SAndroid Build Coastguard Worker }; 37*bbecb9d1SAndroid Build Coastguard Worker 38*bbecb9d1SAndroid Build Coastguard Worker bool vrend_get_tweak_is_active(struct vrend_context_tweaks *ctx, 39*bbecb9d1SAndroid Build Coastguard Worker enum vrend_tweak_type t); 40*bbecb9d1SAndroid Build Coastguard Worker 41*bbecb9d1SAndroid Build Coastguard Worker bool vrend_get_tweak_is_active_with_params(struct vrend_context_tweaks *ctx, 42*bbecb9d1SAndroid Build Coastguard Worker enum vrend_tweak_type t, void *params); 43*bbecb9d1SAndroid Build Coastguard Worker 44*bbecb9d1SAndroid Build Coastguard Worker void vrend_set_active_tweaks(struct vrend_context_tweaks *ctx, uint32_t tweak_id, uint32_t tweak_value); 45*bbecb9d1SAndroid Build Coastguard Worker 46*bbecb9d1SAndroid Build Coastguard Worker 47*bbecb9d1SAndroid Build Coastguard Worker void vrend_set_tweak_from_env(struct vrend_context_tweaks *ctx); 48*bbecb9d1SAndroid Build Coastguard Worker 49*bbecb9d1SAndroid Build Coastguard Worker #endif // VREND_TWEAKS_H 50