Expose copy_effects copy compute shader in Mobile backend
(cherry picked from commit 608d41a969
)
This commit is contained in:
parent
9609df181d
commit
8e3740d425
|
@ -71,7 +71,9 @@ CopyEffects::CopyEffects(bool p_prefer_raster_effects) {
|
|||
for (int i = 0; i < BLUR_MODE_MAX; i++) {
|
||||
blur_raster.pipelines[i].clear();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
Vector<String> copy_modes;
|
||||
copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n");
|
||||
copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n#define DST_IMAGE_8BIT\n");
|
||||
|
@ -310,12 +312,12 @@ CopyEffects::~CopyEffects() {
|
|||
filter.raster_shader.version_free(filter.shader_version);
|
||||
roughness.raster_shader.version_free(roughness.shader_version);
|
||||
} else {
|
||||
copy.shader.version_free(copy.shader_version);
|
||||
cubemap_downsampler.compute_shader.version_free(cubemap_downsampler.shader_version);
|
||||
filter.compute_shader.version_free(filter.shader_version);
|
||||
roughness.compute_shader.version_free(roughness.shader_version);
|
||||
}
|
||||
|
||||
copy.shader.version_free(copy.shader_version);
|
||||
specular_merge.shader.version_free(specular_merge.shader_version);
|
||||
|
||||
RD::get_singleton()->free(filter.coefficient_buffer);
|
||||
|
@ -335,8 +337,6 @@ CopyEffects::~CopyEffects() {
|
|||
}
|
||||
|
||||
void CopyEffects::copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, bool p_force_luminance, bool p_all_source, bool p_8_bit_dst, bool p_alpha_to_one) {
|
||||
ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_to_rect shader with the mobile renderer.");
|
||||
|
||||
UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton();
|
||||
ERR_FAIL_NULL(uniform_set_cache);
|
||||
MaterialStorage *material_storage = MaterialStorage::get_singleton();
|
||||
|
@ -386,8 +386,6 @@ void CopyEffects::copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, cons
|
|||
}
|
||||
|
||||
void CopyEffects::copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama, const Size2i &p_panorama_size, float p_lod, bool p_is_array) {
|
||||
ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_cubemap_to_panorama shader with the mobile renderer.");
|
||||
|
||||
UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton();
|
||||
ERR_FAIL_NULL(uniform_set_cache);
|
||||
MaterialStorage *material_storage = MaterialStorage::get_singleton();
|
||||
|
@ -423,8 +421,6 @@ void CopyEffects::copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panoram
|
|||
}
|
||||
|
||||
void CopyEffects::copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y) {
|
||||
ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_depth_to_rect shader with the mobile renderer.");
|
||||
|
||||
UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton();
|
||||
ERR_FAIL_NULL(uniform_set_cache);
|
||||
MaterialStorage *material_storage = MaterialStorage::get_singleton();
|
||||
|
@ -462,8 +458,6 @@ void CopyEffects::copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_texture
|
|||
}
|
||||
|
||||
void CopyEffects::copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, float p_z_near, float p_z_far) {
|
||||
ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_depth_to_rect_and_linearize shader with the mobile renderer.");
|
||||
|
||||
UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton();
|
||||
ERR_FAIL_NULL(uniform_set_cache);
|
||||
MaterialStorage *material_storage = MaterialStorage::get_singleton();
|
||||
|
|
Loading…
Reference in New Issue