mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-11 06:40:39 +00:00
commit
97e31c8873
@ -892,7 +892,8 @@ void GLGSRender::ExecCMD()
|
|||||||
Enable(m_set_poly_offset_point, GL_POLYGON_OFFSET_POINT);
|
Enable(m_set_poly_offset_point, GL_POLYGON_OFFSET_POINT);
|
||||||
Enable(m_set_restart_index, GL_PRIMITIVE_RESTART);
|
Enable(m_set_restart_index, GL_PRIMITIVE_RESTART);
|
||||||
Enable(m_set_line_stipple, GL_LINE_STIPPLE);
|
Enable(m_set_line_stipple, GL_LINE_STIPPLE);
|
||||||
|
Enable(m_set_polygon_stipple, GL_POLYGON_STIPPLE);
|
||||||
|
|
||||||
if(m_set_clip_plane)
|
if(m_set_clip_plane)
|
||||||
{
|
{
|
||||||
Enable(m_clip_plane_0, GL_CLIP_PLANE0);
|
Enable(m_clip_plane_0, GL_CLIP_PLANE0);
|
||||||
@ -1041,6 +1042,12 @@ void GLGSRender::ExecCMD()
|
|||||||
checkForGlError("glLineStipple");
|
checkForGlError("glLineStipple");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_set_polygon_stipple)
|
||||||
|
{
|
||||||
|
glPolygonStipple((const GLubyte*)m_polygon_stipple_pattern);
|
||||||
|
checkForGlError("glPolygonStipple");
|
||||||
|
}
|
||||||
|
|
||||||
if(m_set_blend_equation)
|
if(m_set_blend_equation)
|
||||||
{
|
{
|
||||||
glBlendEquationSeparate(m_blend_equation_rgb, m_blend_equation_alpha);
|
glBlendEquationSeparate(m_blend_equation_rgb, m_blend_equation_alpha);
|
||||||
|
@ -1573,15 +1573,16 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
|||||||
|
|
||||||
case NV4097_SET_POLYGON_STIPPLE:
|
case NV4097_SET_POLYGON_STIPPLE:
|
||||||
{
|
{
|
||||||
if (ARGS(0))
|
m_set_polygon_stipple = ARGS(0) ? true : false;
|
||||||
LOG_WARNING(RSX, "NV4097_SET_POLYGON_STIPPLE: %x", ARGS(0));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NV4097_SET_POLYGON_STIPPLE_PATTERN:
|
case NV4097_SET_POLYGON_STIPPLE_PATTERN:
|
||||||
{
|
{
|
||||||
if (ARGS(0))
|
for (size_t i = 0; i < 32; i++)
|
||||||
LOG_WARNING(RSX, "NV4097_SET_POLYGON_STIPPLE_PATTERN: %x", ARGS(0));
|
{
|
||||||
|
m_polygon_stipple_pattern[i] = ARGS(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ public:
|
|||||||
u16 m_scissor_w;
|
u16 m_scissor_w;
|
||||||
u16 m_scissor_h;
|
u16 m_scissor_h;
|
||||||
|
|
||||||
// Polygon
|
// Polygon mode/offset
|
||||||
bool m_set_poly_smooth;
|
bool m_set_poly_smooth;
|
||||||
bool m_set_poly_offset_fill;
|
bool m_set_poly_offset_fill;
|
||||||
bool m_set_poly_offset_line;
|
bool m_set_poly_offset_line;
|
||||||
@ -222,9 +222,13 @@ public:
|
|||||||
bool m_set_poly_offset_mode;
|
bool m_set_poly_offset_mode;
|
||||||
float m_poly_offset_scale_factor;
|
float m_poly_offset_scale_factor;
|
||||||
float m_poly_offset_bias;
|
float m_poly_offset_bias;
|
||||||
|
|
||||||
|
// Line/Polygon stipple
|
||||||
bool m_set_line_stipple;
|
bool m_set_line_stipple;
|
||||||
u16 m_line_stipple_pattern;
|
u16 m_line_stipple_pattern;
|
||||||
u16 m_line_stipple_factor;
|
u16 m_line_stipple_factor;
|
||||||
|
bool m_set_polygon_stipple;
|
||||||
|
u32 m_polygon_stipple_pattern[32];
|
||||||
|
|
||||||
// Logic Ops
|
// Logic Ops
|
||||||
bool m_set_logic_op;
|
bool m_set_logic_op;
|
||||||
@ -450,6 +454,7 @@ protected:
|
|||||||
m_set_poly_offset_point = false;
|
m_set_poly_offset_point = false;
|
||||||
m_set_restart_index = false;
|
m_set_restart_index = false;
|
||||||
m_set_line_stipple = false;
|
m_set_line_stipple = false;
|
||||||
|
m_set_polygon_stipple = false;
|
||||||
|
|
||||||
m_clear_color_r = 0;
|
m_clear_color_r = 0;
|
||||||
m_clear_color_g = 0;
|
m_clear_color_g = 0;
|
||||||
@ -475,6 +480,11 @@ protected:
|
|||||||
m_line_width = 1.0;
|
m_line_width = 1.0;
|
||||||
m_line_stipple_pattern = 0xffff;
|
m_line_stipple_pattern = 0xffff;
|
||||||
m_line_stipple_factor = 1;
|
m_line_stipple_factor = 1;
|
||||||
|
for (size_t i = 0; i < 32; i++)
|
||||||
|
{
|
||||||
|
// TODO: Check if the polygon stipple pattern is really "all ones"
|
||||||
|
m_polygon_stipple_pattern[i] = 0xFFFFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
// Construct Textures
|
// Construct Textures
|
||||||
for(int i=0; i<16; i++)
|
for(int i=0; i<16; i++)
|
||||||
@ -552,6 +562,7 @@ protected:
|
|||||||
m_set_restart_index = false;
|
m_set_restart_index = false;
|
||||||
m_set_specular = false;
|
m_set_specular = false;
|
||||||
m_set_line_stipple = false;
|
m_set_line_stipple = false;
|
||||||
|
m_set_polygon_stipple = false;
|
||||||
m_set_logic_op = false;
|
m_set_logic_op = false;
|
||||||
m_set_surface_format = false;
|
m_set_surface_format = false;
|
||||||
m_set_surface_clip_horizontal = false;
|
m_set_surface_clip_horizontal = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user