summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2013-01-21 15:21:25 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2013-01-21 15:21:25 +0000
commitab409258e57812db25aaac8cd56884e3e99bfeb7 (patch)
tree22c716344203fb1e7525f33c4c95e21433f4f29a
parent47dffb8317d59c978be85bf11ba014f10a798746 (diff)
Silence some debug spam and turn off bloom target allocation on cache targets, nw
-rw-r--r--src/osd/windows/d3dhlsl.c33
-rw-r--r--src/osd/windows/drawd3d.c1
2 files changed, 30 insertions, 4 deletions
diff --git a/src/osd/windows/d3dhlsl.c b/src/osd/windows/d3dhlsl.c
index 944358bb185..b1e67e013fe 100644
--- a/src/osd/windows/d3dhlsl.c
+++ b/src/osd/windows/d3dhlsl.c
@@ -2355,10 +2355,10 @@ void hlsl_info::render_quad(d3d_poly_info *poly, int vertnum)
(*d3dintf->effect.end)(curr_effect);
- curr_effect = effect;
+ //curr_effect = effect;
//blit(backbuffer, rt->bloom_texture[5], NULL, poly->type, vertnum, poly->count);
- blit(rt->target[2], rt->texture[0], NULL, poly->type, vertnum, poly->count);
+ //blit(rt->target[2], rt->texture[0], NULL, poly->type, vertnum, poly->count);
blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count);
//blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count);
@@ -2369,6 +2369,33 @@ void hlsl_info::render_quad(d3d_poly_info *poly, int vertnum)
result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer);
if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result);
+ /*curr_effect = post_effect;
+
+ (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]);
+
+ (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width);
+ (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height);
+ (*d3dintf->effect.set_float)(curr_effect, "RawWidth", (float)poly->texture->rawwidth);
+ (*d3dintf->effect.set_float)(curr_effect, "RawHeight", (float)poly->texture->rawheight);
+ (*d3dintf->effect.set_float)(curr_effect, "WidthRatio", 1.0f / (poly->texture->ustop - poly->texture->ustart));
+ (*d3dintf->effect.set_float)(curr_effect, "HeightRatio", 1.0f / (poly->texture->vstop - poly->texture->vstart));
+
+ result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]);
+ if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result);
+
+ (*d3dintf->effect.begin)(curr_effect, &num_passes, 0);
+
+ for (UINT pass = 0; pass < num_passes; pass++)
+ {
+ (*d3dintf->effect.begin_pass)(curr_effect, pass);
+ // add the primitives
+ result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count);
+ if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result);
+ (*d3dintf->effect.end_pass)(curr_effect);
+ }
+
+ (*d3dintf->effect.end)(curr_effect);*/
+
vecbuf_type = poly->type;
vecbuf_index = vertnum;
vecbuf_count = poly->count;
@@ -2432,7 +2459,7 @@ bool hlsl_info::add_cache_target(d3d_info* d3d, d3d_texture_info* info, int widt
{
d3d_cache_target* target = (d3d_cache_target*)global_alloc_clear(d3d_cache_target);
- if (!target->init(d3d, d3dintf, width, height, xprescale, yprescale, true))
+ if (!target->init(d3d, d3dintf, width, height, xprescale, yprescale, false))
{
global_free(target);
return false;
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index a8d4949cbd4..c103c67eca7 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -2759,7 +2759,6 @@ bool d3d_cache_target::init(d3d_info *d3d, d3d_base *d3dintf, int width, int hei
int bloom_height = height * prescale_y;
for (; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1)
{
- printf("%d: %d, %d\n", bloom_index, bloom_width, bloom_height);
bloom_width >>= 1;
bloom_height >>= 1;
HRESULT result = (*d3dintf->device.create_texture)(d3d->device, bloom_width, bloom_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bloom_texture[bloom_index]);