Ported the latest changes from PCem.
This commit is contained in:
@@ -908,6 +908,7 @@ void *voodoo_card_init()
|
||||
memset(voodoo, 0, sizeof(voodoo_t));
|
||||
|
||||
voodoo->bilinear_enabled = device_get_config_int("bilinear");
|
||||
voodoo->dithersub_enabled = device_get_config_int("dithersub");
|
||||
voodoo->scrfilter = device_get_config_int("dacfilter");
|
||||
voodoo->texture_size = device_get_config_int("texture_memory");
|
||||
voodoo->texture_mask = (voodoo->texture_size << 20) - 1;
|
||||
@@ -1053,6 +1054,7 @@ void *voodoo_2d3d_card_init(int type)
|
||||
memset(voodoo, 0, sizeof(voodoo_t));
|
||||
|
||||
voodoo->bilinear_enabled = device_get_config_int("bilinear");
|
||||
voodoo->dithersub_enabled = device_get_config_int("dithersub");
|
||||
voodoo->scrfilter = device_get_config_int("dacfilter");
|
||||
voodoo->render_threads = device_get_config_int("render_threads");
|
||||
voodoo->odd_even_mask = voodoo->render_threads - 1;
|
||||
@@ -1362,6 +1364,12 @@ static const device_config_t voodoo_config[] =
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 1
|
||||
},
|
||||
{
|
||||
.name = "dithersub",
|
||||
.description = "Dither subtraction",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 1
|
||||
},
|
||||
{
|
||||
.name = "dacfilter",
|
||||
.description = "Screen Filter",
|
||||
|
||||
@@ -2622,6 +2622,12 @@ static const device_config_t banshee_sgram_config[] =
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 1
|
||||
},
|
||||
{
|
||||
.name = "dithersub",
|
||||
.description = "Dither subtraction",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 1
|
||||
},
|
||||
{
|
||||
.name = "dacfilter",
|
||||
.description = "Screen Filter",
|
||||
@@ -2673,6 +2679,12 @@ static const device_config_t banshee_sdram_config[] =
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 1
|
||||
},
|
||||
{
|
||||
.name = "dithersub",
|
||||
.description = "Dither subtraction",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 1
|
||||
},
|
||||
{
|
||||
.name = "dacfilter",
|
||||
.description = "Screen Filter",
|
||||
|
||||
@@ -1316,8 +1316,21 @@ static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, vood
|
||||
if (params->alphaMode & 1)
|
||||
ALPHA_TEST(src_a);
|
||||
|
||||
if (params->alphaMode & (1 << 4))
|
||||
if (params->alphaMode & (1 << 4)) {
|
||||
if (dithersub && !dither2x2 && voodoo->dithersub_enabled)
|
||||
{
|
||||
dest_r = dithersub_rb[dest_r][real_y & 3][x & 3];
|
||||
dest_g = dithersub_g [dest_g][real_y & 3][x & 3];
|
||||
dest_b = dithersub_rb[dest_b][real_y & 3][x & 3];
|
||||
}
|
||||
if (dithersub && dither2x2 && voodoo->dithersub_enabled)
|
||||
{
|
||||
dest_r = dithersub_rb2x2[dest_r][real_y & 1][x & 1];
|
||||
dest_g = dithersub_g2x2 [dest_g][real_y & 1][x & 1];
|
||||
dest_b = dithersub_rb2x2[dest_b][real_y & 1][x & 1];
|
||||
}
|
||||
ALPHA_BLEND(src_r, src_g, src_b, src_a);
|
||||
}
|
||||
|
||||
if (update)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user