mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
wined3d: GL_NV_vertex_program2_option supports relative offsets > 63.
The ARR codepath used if ctx->target_version >= NV2 does not account for the correction offset, but the indirect addressing reads do, which ultimately results in incorrect offsets. Since the limitation goes away as soon as we enable GL_NV_vertex_program_2_option ignoring the offset is the best thing to do. I don't set shader_data->rel_offset to zero in the pre-compilation analysis because enablding NV_vertex_program2 is in theory a decision that is taken later during code generation.
This commit is contained in:
parent
441d8ffeb2
commit
bffd536213
1 changed files with 2 additions and 2 deletions
|
@ -1119,7 +1119,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction
|
|||
if (!pshader && reg->idx[0].rel_addr)
|
||||
{
|
||||
const struct arb_vshader_private *shader_data = shader->backend_data;
|
||||
UINT rel_offset = shader_data->rel_offset;
|
||||
UINT rel_offset = ctx->target_version == ARB ? shader_data->rel_offset : 0;
|
||||
BOOL aL = FALSE;
|
||||
char rel_reg[50];
|
||||
if (reg_maps->shader_version.major < 2)
|
||||
|
@ -1849,7 +1849,7 @@ static void shader_hw_mov(const struct wined3d_shader_instruction *ins)
|
|||
const struct arb_vshader_private *shader_data = shader->backend_data;
|
||||
src0_param[0] = '\0';
|
||||
|
||||
if (shader_data->rel_offset)
|
||||
if (shader_data->rel_offset && ctx->target_version == ARB)
|
||||
{
|
||||
const char *offset = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_VS_REL_OFFSET);
|
||||
shader_arb_get_src_param(ins, &ins->src[0], 0, src0_param);
|
||||
|
|
Loading…
Reference in a new issue