search for: gl_context

Displaying 20 results from an estimated 23 matches for "gl_context".

2012 Apr 06
1
[WIP PATCH] dri/nouveau: Add S3TC support for nv20.
...52114..349000a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_surface.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_surface.c @@ -28,6 +28,8 @@ #include "nouveau_context.h" #include "nouveau_util.h" +#include "main/formats.h" + void nouveau_surface_alloc(struct gl_context *ctx, struct nouveau_surface *s, enum nouveau_surface_layout layout, @@ -36,6 +38,8 @@ nouveau_surface_alloc(struct gl_context *ctx, struct nouveau_surface *s, { union nouveau_bo_config config = {}; int ret, cpp = _mesa_get_format_bytes(format); + int pitch = _mesa_format_row_stride(f...
2014 Feb 13
2
[PATCH] nouveau: fix chipset checks for nv1a by using the oclass instead
...7 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c index 8582cb2..4773014 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_context.c +++ b/src/mesa/drivers/dri/nouveau/nv10_context.c @@ -63,7 +63,7 @@ nv10_use_viewport_zclear(struct gl_context *ctx) struct gl_framebuffer *fb = ctx->DrawBuffer; struct gl_renderbuffer *depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; - return context_chipset(ctx) < 0x17 && + return context_eng3d(ctx)->oclass < NV17_3D_CLASS && !nctx->hierz.clear_blocked &&...
2012 Jun 11
1
[PATCH 10/21] nouveau: Add support for ARB_sampler_object
...nouveau/nv04_state_tex.c @@ -32,6 +32,7 @@ #include "nv_object.xml.h" #include "nv04_3d.xml.h" #include "nv04_driver.h" +#include "main/samplerobj.h" static uint32_t get_tex_format(struct gl_texture_image *ti) @@ -67,6 +68,7 @@ nv04_emit_tex_obj(struct gl_context *ctx, int emit) if (ctx->Texture.Unit[i]._ReallyEnabled) { struct gl_texture_object *t = ctx->Texture.Unit[i]._Current; struct gl_texture_image *ti = t->Image[0][t->BaseLevel]; + const struct gl_sampler_object *sa = _mesa_get_samplerobj(ctx, i); int lod_max = 1, lod_bias = 0...
2014 Sep 13
2
[PATCH] nouveau: fix glCompressedTexImage
...sa/drivers/dri/nouveau/nouveau_texture.c index 4626cc3..dc5699c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -413,6 +413,31 @@ get_teximage_placement(struct gl_texture_image *ti) } static void +nouveau_compressed_copy(struct gl_context *ctx, GLint dims, + struct gl_texture_image *ti, + GLsizei width, GLsizei height, GLsizei depth, + const GLvoid *src, GLvoid *dst, int row_stride) +{ + struct compressed_pixelstore store; + int i; + + _mesa_compute_compressed_pixelstore(dims, ti->TexFormat, + width, height, depth,...
2014 Sep 14
1
[PATCH] nouveau: fix glCompressedTexImage
...9c 100644 >> --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c >> +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c >> @@ -413,6 +413,31 @@ get_teximage_placement(struct gl_texture_image *ti) >> } >> >> static void >> +nouveau_compressed_copy(struct gl_context *ctx, GLint dims, >> + struct gl_texture_image *ti, >> + GLsizei width, GLsizei height, GLsizei depth, >> + const GLvoid *src, GLvoid *dst, int row_stride) >> +{ >> + struct compressed_pixelstore store; &g...
2012 Jul 06
0
[PATCH] dri/nouveau: Add AllocTextureImageBuffer() implementation
...c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -40,6 +40,7 @@ #include "main/teximage.h" #include "drivers/common/meta.h" #include "swrast/s_texfetch.h" +#include "swrast/swrast.h" static struct gl_texture_object * nouveau_texture_new(struct gl_context *ctx, GLuint name, GLenum target) @@ -71,12 +72,64 @@ nouveau_teximage_new(struct gl_context *ctx) return &nti->base.Base; } +static unsigned +get_teximage_placement(struct gl_texture_image *ti) +{ + if (ti->TexFormat == MESA_FORMAT_A8 || + ti->TexFormat == MESA_FORMAT_L8 || +...
2013 Oct 04
1
[PATCH] nouveau_vieux: add AllocTextureImageBuffer implementation
...iff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index da74e8f..8904389 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -494,6 +494,14 @@ nouveau_compressed_teximage(struct gl_context *ctx, GLuint dims, &ctx->Unpack, GL_TRUE); } +static GLboolean +nouveau_teximage_alloc(struct gl_context *ctx, struct gl_texture_image *ti) +{ + nouveau_teximage(ctx, 3, ti, 0, 0, 0, NULL, + &ctx->DefaultPacking, GL_FALSE); + return GL_TRUE; +} + static void nouveau_texsu...
2015 May 24
2
[Mesa-dev] [PATCH 07/11] glsl: Add arb_cull_distance support
...ntrol_warn; > bool ARB_draw_buffers_enable; > diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp > index 46f84c6..81c0dac 100644 > --- a/src/glsl/link_varyings.cpp > +++ b/src/glsl/link_varyings.cpp > @@ -404,7 +404,7 @@ tfeedback_decl::assign_location(struct gl_context *ctx, > this->matched_candidate->type->fields.array->vector_elements; > unsigned actual_array_size = > (this->is_clip_distance_mesa || this->is_cull_distance_mesa) ? > - prog->LastClipDistanceArraySize : > + prog->Las...
2014 Sep 14
0
[PATCH] nouveau: fix glCompressedTexImage
...> index 4626cc3..dc5699c 100644 > --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c > +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c > @@ -413,6 +413,31 @@ get_teximage_placement(struct gl_texture_image *ti) > } > > static void > +nouveau_compressed_copy(struct gl_context *ctx, GLint dims, > + struct gl_texture_image *ti, > + GLsizei width, GLsizei height, GLsizei depth, > + const GLvoid *src, GLvoid *dst, int row_stride) > +{ > + struct compressed_pixelstore store; > + int i; > + > + _mesa_compute_compressed_pixelstore(dims, ti->Tex...
2014 Jan 15
1
[PATCH v2] nouveau: add framebuffer validation callback
...ns(+) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 181c9d0..ec474d4 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -187,6 +187,7 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen, ctx->Extensions.EXT_framebuffer_blit = true; ctx->Extensions.EXT_texture_filter_anisotropic = true; ctx->Extensions.NV_texture_env_combine4 = true; + ctx->Const.MaxColorAttachments = 1; return GL_TRUE; } diff --git a/src/mesa/drivers/dri/n...
2014 Jan 10
2
[PATCH] nouveau: add framebuffer validation callback
...nt num_emit; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c index 25543e4..fba0d52 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c @@ -268,6 +268,43 @@ nouveau_finish_render_texture(struct gl_context *ctx, texture_dirty(rb->TexImage->TexObject); } +static void +nouveau_framebuffer_validate(struct gl_context *ctx, + struct gl_framebuffer *fb) +{ + const struct nouveau_driver *drv = context_drv(ctx); + int i, count = 0; + + for (i = 0; i < ctx->Const.MaxColorAttachments; i...
2012 Apr 30
5
[PATCH] nouveau/vieux: only advertise supported texture formats
...s(+) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 4845767..46c0d70 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -117,6 +117,15 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen, nouveau_span_functions_init(ctx); _mesa_allow_light_in_model(ctx, GL_FALSE); + /* only advertise supported texture formats */ + memset(&ctx->TextureFormatSupported, 0, + sizeof(ctx->TextureFormatSupported)); + ctx->TextureFormatSupporte...
2015 Jan 07
3
[RFC] mesa/st: Avoid passing a NULL buffer to the drivers
...file changed, 5 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c index 8f75eda..5a12da4 100644 --- a/src/mesa/state_tracker/st_cb_xformfb.c +++ b/src/mesa/state_tracker/st_cb_xformfb.c @@ -123,6 +123,11 @@ st_begin_transform_feedback(struct gl_context *ctx, GLenum mode, struct st_buffer_object *bo = st_buffer_object(sobj->base.Buffers[i]); if (bo) { + if (!bo->buffer) + /* If we capture transform feedback from n streams into (n-1) + * buffers we have to write to buffer (n-1) for stream n. +...
2015 May 24
19
[RFC PATCH 00/11] Implement ARB_cull_distance
This patch series adds the needed support for this extension to the various parts of mesa to finally enable it for nvc0. Dave Airlie (1): glsl: lower cull_distance into cull_distance_mesa Tobias Klausmann (10): glapi: add GL_ARB_cull_distance mesa/main: add support for GL_ARB_cull_distance mesa/prog: Add varyings for arb_cull_distance mesa/st: add support for GL_ARB_cull_distance
2015 Feb 14
2
[PATCH 1/2] st/mesa: treat resource-less xfb buffers as if they weren't there
...1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c index 8f75eda..a2bd86a 100644 --- a/src/mesa/state_tracker/st_cb_xformfb.c +++ b/src/mesa/state_tracker/st_cb_xformfb.c @@ -122,7 +122,7 @@ st_begin_transform_feedback(struct gl_context *ctx, GLenum mode, for (i = 0; i < max_num_targets; i++) { struct st_buffer_object *bo = st_buffer_object(sobj->base.Buffers[i]); - if (bo) { + if (bo && bo->buffer) { /* Check whether we need to recreate the target. */ if (!sobj->targe...
2014 Jan 14
0
[PATCH] nouveau: add framebuffer validation callback
...git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c > index 25543e4..fba0d52 100644 > --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c > +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c > @@ -268,6 +268,43 @@ nouveau_finish_render_texture(struct gl_context *ctx, > texture_dirty(rb->TexImage->TexObject); > } > > +static void > +nouveau_framebuffer_validate(struct gl_context *ctx, > + struct gl_framebuffer *fb) > +{ > + const struct nouveau_driver *drv = context_drv(ctx); > + int i, count = 0; > + > +...
2015 Jan 12
2
Re: [RFC] mesa/st: Avoid passing a NULL buffer to the drivers
...--git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c >> index 8f75eda..5a12da4 100644 >> --- a/src/mesa/state_tracker/st_cb_xformfb.c >> +++ b/src/mesa/state_tracker/st_cb_xformfb.c >> @@ -123,6 +123,11 @@ st_begin_transform_feedback(struct gl_context *ctx, GLenum mode, >> struct st_buffer_object *bo = st_buffer_object(sobj->base.Buffers[i]); >> >> if (bo) { >> + if (!bo->buffer) >> + /* If we capture transform feedback from n streams into (n-1) >> + * buffe...
2015 Jan 12
1
Re: [RFC] mesa/st: Avoid passing a NULL buffer to the drivers
...t;>>> b/src/mesa/state_tracker/st_cb_xformfb.c >>>> index 8f75eda..5a12da4 100644 >>>> --- a/src/mesa/state_tracker/st_cb_xformfb.c >>>> +++ b/src/mesa/state_tracker/st_cb_xformfb.c >>>> @@ -123,6 +123,11 @@ st_begin_transform_feedback(struct gl_context *ctx, >>>> GLenum mode, >>>> struct st_buffer_object *bo = >>>> st_buffer_object(sobj->base.Buffers[i]); >>>> >>>> if (bo) { >>>> + if (!bo->buffer) >>>> + /* If we capture...
2015 Jan 11
0
[RFC] mesa/st: Avoid passing a NULL buffer to the drivers
...> > diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c > index 8f75eda..5a12da4 100644 > --- a/src/mesa/state_tracker/st_cb_xformfb.c > +++ b/src/mesa/state_tracker/st_cb_xformfb.c > @@ -123,6 +123,11 @@ st_begin_transform_feedback(struct gl_context *ctx, GLenum mode, > struct st_buffer_object *bo = st_buffer_object(sobj->base.Buffers[i]); > > if (bo) { > + if (!bo->buffer) > + /* If we capture transform feedback from n streams into (n-1) > + * buffers we have to write to buf...
2012 Aug 15
3
[Bug 53519] New: Missing bits of geometry in Unigine tropics
https://bugs.freedesktop.org/show_bug.cgi?id=53519 Bug #: 53519 Summary: Missing bits of geometry in Unigine tropics Classification: Unclassified Product: Mesa Version: git Platform: Other OS/Version: All Status: NEW Severity: minor Priority: medium Component: Drivers/DRI/nouveau