diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/dlist.c | 21 | ||||
-rw-r--r-- | src/mesa/main/extensions_table.h | 5 | ||||
-rw-r--r-- | src/mesa/main/fbobject.c | 34 | ||||
-rw-r--r-- | src/mesa/main/fbobject.h | 5 | ||||
-rw-r--r-- | src/mesa/main/ffvertex_prog.c | 3 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 2 | ||||
-rw-r--r-- | src/mesa/main/shaderobj.c | 2 | ||||
-rw-r--r-- | src/mesa/main/texparam.c | 3 |
8 files changed, 40 insertions, 35 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index afd2d83cb59..6dfb84be9aa 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -304,8 +304,8 @@ typedef enum OPCODE_SAMPLE_COVERAGE, /* GL_ARB_window_pos */ OPCODE_WINDOW_POS_ARB, - /* GL_NV_fragment_program */ - OPCODE_BIND_PROGRAM_NV, + /* GL_ARB_vertex_program */ + OPCODE_BIND_PROGRAM_ARB, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, /* GL_EXT_stencil_two_side */ OPCODE_ACTIVE_STENCIL_FACE_EXT, @@ -4957,15 +4957,15 @@ save_SampleCoverageARB(GLclampf value, GLboolean invert) /* - * GL_NV_fragment_program + * GL_ARB_vertex_program */ static void GLAPIENTRY -save_BindProgramNV(GLenum target, GLuint id) +save_BindProgramARB(GLenum target, GLuint id) { GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BIND_PROGRAM_NV, 2); + n = alloc_instruction(ctx, OPCODE_BIND_PROGRAM_ARB, 2); if (n) { n[1].e = target; n[2].ui = id; @@ -8607,7 +8607,7 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */ CALL_WindowPos3f(ctx->Exec, (n[1].f, n[2].f, n[3].f)); break; - case OPCODE_BIND_PROGRAM_NV: /* GL_ARB_vertex_program */ + case OPCODE_BIND_PROGRAM_ARB: /* GL_ARB_vertex_program */ CALL_BindProgramARB(ctx->Exec, (n[1].e, n[2].ui)); break; case OPCODE_PROGRAM_LOCAL_PARAMETER_ARB: @@ -9787,13 +9787,6 @@ _mesa_initialize_save_table(const struct gl_context *ctx) SET_WindowPos4sMESA(table, save_WindowPos4sMESA); SET_WindowPos4svMESA(table, save_WindowPos4svMESA); - /* 233. GL_NV_vertex_program */ - /* The following commands DO NOT go into display lists: - * AreProgramsResidentNV, IsProgramNV, GenProgramsNV, DeleteProgramsNV, - * VertexAttribPointerNV, GetProgram*, GetVertexAttrib* - */ - SET_BindProgramARB(table, save_BindProgramNV); - /* 245. GL_ATI_fragment_shader */ SET_BindFragmentShaderATI(table, save_BindFragmentShaderATI); SET_SetFragmentShaderConstantATI(table, save_SetFragmentShaderConstantATI); @@ -9838,7 +9831,7 @@ _mesa_initialize_save_table(const struct gl_context *ctx) /* ARB 27. GL_ARB_fragment_program */ /* glVertexAttrib* functions alias the NV ones, handled elsewhere */ SET_ProgramStringARB(table, save_ProgramStringARB); - SET_BindProgramARB(table, save_BindProgramNV); + SET_BindProgramARB(table, save_BindProgramARB); SET_ProgramEnvParameter4dARB(table, save_ProgramEnvParameter4dARB); SET_ProgramEnvParameter4dvARB(table, save_ProgramEnvParameter4dvARB); SET_ProgramEnvParameter4fARB(table, save_ProgramEnvParameter4fARB); diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index 68f36178f32..50e050e9009 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -200,6 +200,7 @@ EXT(EXT_framebuffer_object , dummy_true EXT(EXT_framebuffer_sRGB , EXT_framebuffer_sRGB , GLL, GLC, x , x , 1998) EXT(EXT_gpu_program_parameters , EXT_gpu_program_parameters , GLL, x , x , x , 2006) EXT(EXT_gpu_shader4 , EXT_gpu_shader4 , GLL, GLC, x , x , 2006) +EXT(EXT_gpu_shader5 , ARB_gpu_shader5 , x , x , x , 31, 2014) EXT(EXT_map_buffer_range , ARB_map_buffer_range , x , x , ES1, ES2, 2012) EXT(EXT_multi_draw_arrays , dummy_true , GLL, x , ES1, ES2, 1999) EXT(EXT_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2005) @@ -243,7 +244,7 @@ EXT(EXT_texture_object , dummy_true EXT(EXT_texture_rectangle , NV_texture_rectangle , GLL, x , x , x , 2004) EXT(EXT_texture_rg , ARB_texture_rg , x , x , x , ES2, 2011) EXT(EXT_texture_sRGB , EXT_texture_sRGB , GLL, GLC, x , x , 2004) -EXT(EXT_texture_sRGB_decode , EXT_texture_sRGB_decode , GLL, GLC, x , x , 2006) +EXT(EXT_texture_sRGB_decode , EXT_texture_sRGB_decode , GLL, GLC, x , 30, 2006) EXT(EXT_texture_shared_exponent , EXT_texture_shared_exponent , GLL, GLC, x , x , 2004) EXT(EXT_texture_snorm , EXT_texture_snorm , GLL, GLC, x , x , 2009) EXT(EXT_texture_swizzle , EXT_texture_swizzle , GLL, GLC, x , x , 2008) @@ -282,7 +283,6 @@ EXT(NV_depth_clamp , ARB_depth_clamp EXT(NV_draw_buffers , dummy_true , x , x , x , ES2, 2011) EXT(NV_fbo_color_attachments , dummy_true , x , x , x , ES2, 2010) EXT(NV_fog_distance , NV_fog_distance , GLL, x , x , x , 2001) -EXT(NV_fragment_program_option , NV_fragment_program_option , GLL, x , x , x , 2005) EXT(NV_light_max_exponent , dummy_true , GLL, x , x , x , 1999) EXT(NV_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2000) EXT(NV_point_sprite , NV_point_sprite , GLL, GLC, x , x , 2001) @@ -319,6 +319,7 @@ EXT(OES_framebuffer_object , dummy_true EXT(OES_geometry_point_size , OES_geometry_shader , x , x , x , 31, 2015) EXT(OES_geometry_shader , OES_geometry_shader , x , x , x , 31, 2015) EXT(OES_get_program_binary , dummy_true , x , x , x , ES2, 2008) +EXT(OES_gpu_shader5 , ARB_gpu_shader5 , x , x , x , 31, 2014) EXT(OES_mapbuffer , dummy_true , x , x , ES1, ES2, 2005) EXT(OES_packed_depth_stencil , dummy_true , x , x , ES1, ES2, 2007) EXT(OES_point_size_array , dummy_true , x , x , ES1, x , 2004) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 1f10050c891..c9e1518ab23 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2471,7 +2471,6 @@ static void bind_framebuffer(GLenum target, GLuint framebuffer, bool allow_user_names) { struct gl_framebuffer *newDrawFb, *newReadFb; - struct gl_framebuffer *oldDrawFb, *oldReadFb; GLboolean bindReadBuf, bindDrawBuf; GET_CURRENT_CONTEXT(ctx); @@ -2525,18 +2524,23 @@ bind_framebuffer(GLenum target, GLuint framebuffer, bool allow_user_names) newReadFb = ctx->WinSysReadBuffer; } - assert(newDrawFb); - assert(newDrawFb != &DummyFramebuffer); + _mesa_bind_framebuffers(ctx, + bindDrawBuf ? newDrawFb : ctx->DrawBuffer, + bindReadBuf ? newReadFb : ctx->ReadBuffer); +} - /* save pointers to current/old framebuffers */ - oldDrawFb = ctx->DrawBuffer; - oldReadFb = ctx->ReadBuffer; +void +_mesa_bind_framebuffers(struct gl_context *ctx, + struct gl_framebuffer *newDrawFb, + struct gl_framebuffer *newReadFb) +{ + struct gl_framebuffer *const oldDrawFb = ctx->DrawBuffer; + struct gl_framebuffer *const oldReadFb = ctx->ReadBuffer; + const bool bindDrawBuf = oldDrawFb != newDrawFb; + const bool bindReadBuf = oldReadFb != newReadFb; - /* check if really changing bindings */ - if (oldDrawFb == newDrawFb) - bindDrawBuf = GL_FALSE; - if (oldReadFb == newReadFb) - bindReadBuf = GL_FALSE; + assert(newDrawFb); + assert(newDrawFb != &DummyFramebuffer); /* * OK, now bind the new Draw/Read framebuffers, if they're changing. @@ -2573,7 +2577,12 @@ bind_framebuffer(GLenum target, GLuint framebuffer, bool allow_user_names) } if ((bindDrawBuf || bindReadBuf) && ctx->Driver.BindFramebuffer) { - ctx->Driver.BindFramebuffer(ctx, target, newDrawFb, newReadFb); + /* The few classic drivers that actually hook this function really only + * want to know if the draw framebuffer changed. + */ + ctx->Driver.BindFramebuffer(ctx, + bindDrawBuf ? GL_FRAMEBUFFER : GL_READ_FRAMEBUFFER, + newDrawFb, newReadFb); } } @@ -2815,6 +2824,7 @@ reuse_framebuffer_texture_attachment(struct gl_framebuffer *fb, dst_att->Complete = src_att->Complete; dst_att->TextureLevel = src_att->TextureLevel; dst_att->Zoffset = src_att->Zoffset; + dst_att->Layered = src_att->Layered; } diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index f9a60605ea5..540bd9d40c3 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -137,6 +137,11 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx, GLint *params, const char *caller); +extern void +_mesa_bind_framebuffers(struct gl_context *ctx, + struct gl_framebuffer *newDrawFb, + struct gl_framebuffer *newReadFb); + extern GLboolean GLAPIENTRY _mesa_IsRenderbuffer(GLuint renderbuffer); diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 34cc9218add..d72bc71aa72 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -537,7 +537,6 @@ static void emit_arg( struct prog_src_register *src, src->File = reg.file; src->Index = reg.idx; src->Swizzle = reg.swz; - src->Abs = reg.abs; src->Negate = reg.negate ? NEGATE_XYZW : NEGATE_NONE; src->RelAddr = 0; /* Check that bitfield sizes aren't exceeded */ @@ -552,8 +551,6 @@ static void emit_dst( struct prog_dst_register *dst, dst->Index = reg.idx; /* allow zero as a shorthand for xyzw */ dst->WriteMask = mask ? mask : WRITEMASK_XYZW; - dst->CondMask = COND_TR; /* always pass cond test */ - dst->CondSwizzle = SWIZZLE_NOOP; /* Check that bitfield sizes aren't exceeded */ assert(dst->Index == reg.idx); } diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 2ca9cbf808a..a2e3c26c321 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2951,7 +2951,6 @@ struct gl_pipeline_shader_state struct gl_shader_compiler_options { /** Driver-selectable options: */ - GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitNoLoops; GLboolean EmitNoFunctions; GLboolean EmitNoCont; /**< Emit CONT opcode? */ @@ -3927,7 +3926,6 @@ struct gl_extensions GLboolean MESA_ycbcr_texture; GLboolean NV_conditional_render; GLboolean NV_fog_distance; - GLboolean NV_fragment_program_option; GLboolean NV_point_sprite; GLboolean NV_primitive_restart; GLboolean NV_texture_barrier; diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 203ccef7fc4..9a4eb6b56fd 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -240,6 +240,8 @@ init_shader_program(struct gl_shader_program *prog) prog->TransformFeedback.BufferMode = GL_INTERLEAVED_ATTRIBS; + exec_list_make_empty(&prog->EmptyUniformLocations); + prog->InfoLog = ralloc_strdup(prog, ""); } diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 20770a77e15..3b769f436b7 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -568,8 +568,7 @@ set_tex_parameteri(struct gl_context *ctx, goto invalid_pname; case GL_TEXTURE_SRGB_DECODE_EXT: - if (_mesa_is_desktop_gl(ctx) - && ctx->Extensions.EXT_texture_sRGB_decode) { + if (ctx->Extensions.EXT_texture_sRGB_decode) { GLenum decode = params[0]; if (!target_allows_setting_sampler_parameters(texObj->Target)) |