diff options
author | 2015-12-31 16:59:23 +0100 | |
---|---|---|
committer | 2015-12-31 16:59:23 +0100 | |
commit | a2c7b61daa5d66e0e9d7b1d1f683cf2f6d9f5973 (patch) | |
tree | 253a2da2a557260a1910e844c5c6bcd2b79b0fa9 /src/osd/modules/render/drawd3d.cpp | |
parent | eea40fd0e47699261332904b5d930f0be68756e9 (diff) |
Refactoring
- replaced shader parameters OrientationSwapXY xor RotationSwapXY by
SwapXY
- made shader parameters SourceDims, SourceRect, TargetDims, ScreenDims,
QuadDims and SwapXY available for all shaders
- color convolution, defocus and phosphor pass will now be skipped if
all influencing parameters are 0
- removed unused bloom_texture and bloom_target arrays from cache_target
class
- fixed half texel offset in prescale.fx
Diffstat (limited to 'src/osd/modules/render/drawd3d.cpp')
-rw-r--r-- | src/osd/modules/render/drawd3d.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp index ee99588ebdf..4f3d9e2bf56 100644 --- a/src/osd/modules/render/drawd3d.cpp +++ b/src/osd/modules/render/drawd3d.cpp @@ -2734,20 +2734,6 @@ void texture_info::prescale() cache_target::~cache_target() { - for (int index = 0; index < 11; index++) - { - if (bloom_texture[index] != NULL) - { - (*d3dintf->texture.release)(bloom_texture[index]); - bloom_texture[index] = NULL; - } - if (bloom_target[index] != NULL) - { - (*d3dintf->surface.release)(bloom_target[index]); - bloom_target[index] = NULL; - } - } - if (last_texture != NULL) { (*d3dintf->texture.release)(last_texture); @@ -2767,25 +2753,6 @@ cache_target::~cache_target() bool cache_target::init(renderer *d3d, base *d3dintf, int width, int height, int prescale_x, int prescale_y) { - int bloom_index = 0; - int bloom_size = (width < height) ? width : height; - int bloom_width = width; - int bloom_height = height; - for (; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) - { - bloom_width >>= 1; - bloom_height >>= 1; - - HRESULT result = (*d3dintf->device.create_texture)(d3d->get_device(), bloom_width, bloom_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bloom_texture[bloom_index]); - if (result != D3D_OK) - { - return false; - } - (*d3dintf->texture.get_surface_level)(bloom_texture[bloom_index], 0, &bloom_target[bloom_index]); - - bloom_index++; - } - HRESULT result = (*d3dintf->device.create_texture)(d3d->get_device(), width * prescale_x, height * prescale_y, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &last_texture); if (result != D3D_OK) { |