GPU: Remove Mesa + Vega hack.
This is not needed anymore with linux 4.15 + Mesa 17.3.3.
This commit is contained in:
parent
17577c53c6
commit
708ef19d88
|
@ -145,14 +145,8 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
|
|||
for (int i = 0; i < effects->bloom_iteration_ct; ++i) {
|
||||
texsize[0] /= 2; texsize[1] /= 2;
|
||||
|
||||
if (GPU_type_matches(GPU_DEVICE_AMD_VEGA, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) {
|
||||
texsize[0] = MAX2(texsize[0], 17);
|
||||
texsize[1] = MAX2(texsize[1], 17);
|
||||
}
|
||||
else {
|
||||
texsize[0] = MAX2(texsize[0], 2);
|
||||
texsize[1] = MAX2(texsize[1], 2);
|
||||
}
|
||||
texsize[0] = MAX2(texsize[0], 2);
|
||||
texsize[1] = MAX2(texsize[1], 2);
|
||||
|
||||
effects->downsamp_texel_size[i][0] = 1.0f / (float)texsize[0];
|
||||
effects->downsamp_texel_size[i][1] = 1.0f / (float)texsize[1];
|
||||
|
@ -168,14 +162,8 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
|
|||
for (int i = 0; i < effects->bloom_iteration_ct - 1; ++i) {
|
||||
texsize[0] /= 2; texsize[1] /= 2;
|
||||
|
||||
if (GPU_type_matches(GPU_DEVICE_AMD_VEGA, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) {
|
||||
texsize[0] = MAX2(texsize[0], 17);
|
||||
texsize[1] = MAX2(texsize[1], 17);
|
||||
}
|
||||
else {
|
||||
texsize[0] = MAX2(texsize[0], 2);
|
||||
texsize[1] = MAX2(texsize[1], 2);
|
||||
}
|
||||
texsize[0] = MAX2(texsize[0], 2);
|
||||
texsize[1] = MAX2(texsize[1], 2);
|
||||
|
||||
DRWFboTexture tex_bloom = {&txl->bloom_upsample[i], DRW_TEX_RGB_11_11_10, DRW_TEX_FILTER};
|
||||
DRW_framebuffer_init(&fbl->bloom_accum_fb[i], &draw_engine_eevee_type,
|
||||
|
|
|
@ -64,7 +64,6 @@ typedef enum GPUDeviceType {
|
|||
GPU_DEVICE_INTEL = (1 << 2),
|
||||
GPU_DEVICE_SOFTWARE = (1 << 3),
|
||||
GPU_DEVICE_UNKNOWN = (1 << 4),
|
||||
GPU_DEVICE_AMD_VEGA = (1 << 5),
|
||||
GPU_DEVICE_ANY = (0xff)
|
||||
} GPUDeviceType;
|
||||
|
||||
|
|
|
@ -178,14 +178,6 @@ void gpu_extensions_init(void)
|
|||
GG.device = GPU_DEVICE_ATI;
|
||||
GG.driver = GPU_DRIVER_OFFICIAL;
|
||||
}
|
||||
/* XXX : TODO : Remove this once this sampling mipmap problem is gone.
|
||||
* https://github.com/dfelinto/opengl-sandbox/blob/downsample/README.md */
|
||||
else if (strstr(renderer, "AMD VEGA") &&
|
||||
strstr(vendor, "X.Org"))
|
||||
{
|
||||
GG.device = GPU_DEVICE_AMD_VEGA;
|
||||
GG.driver = GPU_DRIVER_OPENSOURCE;
|
||||
}
|
||||
else if (strstr(vendor, "NVIDIA")) {
|
||||
GG.device = GPU_DEVICE_NVIDIA;
|
||||
GG.driver = GPU_DRIVER_OFFICIAL;
|
||||
|
|
|
@ -602,18 +602,9 @@ void GPU_framebuffer_recursive_downsample(
|
|||
current_dim[0] /= 2;
|
||||
current_dim[1] /= 2;
|
||||
|
||||
if (GPU_type_matches(GPU_DEVICE_AMD_VEGA, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) {
|
||||
/* NOTE : here 16 is because of a bug on AMD Vega GPU + non-pro drivers, that prevents us
|
||||
* from sampling mipmaps that are smaller or equal to 16px. (9) */
|
||||
if (current_dim[0] <= 16 && current_dim[1] <= 16) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (current_dim[0] <= 2 && current_dim[1] <= 2) {
|
||||
/* Cannot reduce further. */
|
||||
break;
|
||||
}
|
||||
if (current_dim[0] <= 2 && current_dim[1] <= 2) {
|
||||
/* Cannot reduce further. */
|
||||
break;
|
||||
}
|
||||
|
||||
/* ensure that the viewport size is always at least 1x1 */
|
||||
|
|
Loading…
Reference in New Issue