aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-03-22 13:30:59 +0100
committermarha <marha@users.sourceforge.net>2015-03-22 13:30:59 +0100
commit82c8df11062f72a7d467e26cedbbd8b322ff7a70 (patch)
tree7e7a3e408d09d3e50ff0d2f9befeb5b7ab5617a5 /mesalib/src/mesa/state_tracker
parent8574eba804031f6b19713f0b02952280730bf62e (diff)
downloadvcxsrv-82c8df11062f72a7d467e26cedbbd8b322ff7a70.tar.gz
vcxsrv-82c8df11062f72a7d467e26cedbbd8b322ff7a70.tar.bz2
vcxsrv-82c8df11062f72a7d467e26cedbbd8b322ff7a70.zip
randrproto fontconfig libX11 libXdmcp libxcb mesa xkbcomp xserver git update 22 Mar 2015
xserver commit 0a78b599b34cc8b5fe6fe82f90e90234e8ab7a56 libxcb commit a90be9955d2c5a635f791d44db1154633b9d3322 libX11 commit 5a499ca7b064bf7e6a4fcc169f22862dce0c60c5 libXdmcp commit 0c09444d276fbf46a0e8b427a4f6a325d0625742 xkbcomp commit fc3e6ddb2c8e922ea80f2dc5cbc1df2102e30d99 randrproto commit b1ba68df8a5fc113a387123ec2f312195e28e47f fontconfig commit 69ff6b6e260584e383c38b1b7034ddcbb23d214f mesa commit 397b491173f0d2df4deb44d21c170bf16840d507
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c4
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c21
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp13
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.c40
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.h16
-rw-r--r--mesalib/src/mesa/state_tracker/st_vdpau.c2
6 files changed, 12 insertions, 84 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c
index 1dbc4b905..db254c214 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -485,8 +485,8 @@ st_clear_buffer_subdata(struct gl_context *ctx,
static const char zeros[16] = {0};
if (!pipe->clear_buffer) {
- _mesa_buffer_clear_subdata(ctx, offset, size,
- clearValue, clearValueSize, bufObj);
+ _mesa_ClearBufferSubData_sw(ctx, offset, size,
+ clearValue, clearValueSize, bufObj);
return;
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index a8b19a1f3..5c520b44f 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -178,9 +178,6 @@ st_FreeTextureImageBuffer(struct gl_context *ctx,
pipe_resource_reference(&stImage->pt, NULL);
}
- _mesa_align_free(stImage->TexData);
- stImage->TexData = NULL;
-
free(stImage->transfer);
stImage->transfer = NULL;
stImage->num_transfers = 0;
@@ -501,7 +498,6 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
DBG("%s\n", __FUNCTION__);
- assert(!stImage->TexData);
assert(!stImage->pt); /* xxx this might be wrong */
/* Look if the parent texture object has space for this image */
@@ -1521,23 +1517,6 @@ copy_image_data_to_texture(struct st_context *st,
pipe_resource_reference(&stImage->pt, NULL);
}
- else if (stImage->TexData) {
- /* Copy from malloc'd memory */
- /* XXX this should be re-examined/tested with a compressed format */
- GLuint blockSize = util_format_get_blocksize(stObj->pt->format);
- GLuint srcRowStride = stImage->base.Width * blockSize;
- GLuint srcSliceStride = stImage->base.Height * srcRowStride;
- st_texture_image_data(st,
- stObj->pt,
- stImage->base.Face,
- dstLevel,
- stImage->TexData,
- srcRowStride,
- srcSliceStride);
- _mesa_align_free(stImage->TexData);
- stImage->TexData = NULL;
- }
-
pipe_resource_reference(&stImage->pt, stObj->pt);
}
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index bd191d864..efee4b258 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -332,6 +332,7 @@ public:
int glsl_version;
bool native_integers;
bool have_sqrt;
+ bool have_fma;
variable_storage *find_variable_storage(ir_variable *var);
@@ -836,6 +837,7 @@ glsl_to_tgsi_visitor::get_opcode(ir_instruction *ir, unsigned op,
case3fid(ADD, UADD, DADD);
case3fid(MUL, UMUL, DMUL);
case3fid(MAD, UMAD, DMAD);
+ case3fid(FMA, UMAD, DFMA);
case3(DIV, IDIV, UDIV);
case4d(MAX, IMAX, UMAX, DMAX);
case4d(MIN, IMIN, UMIN, DMIN);
@@ -2222,10 +2224,11 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
emit(ir, TGSI_OPCODE_IMUL_HI, result_dst, op[0], op[1]);
break;
case ir_triop_fma:
- /* NOTE: Perhaps there should be a special opcode that enforces fused
- * mul-add. Just use MAD for now.
- */
- emit(ir, TGSI_OPCODE_MAD, result_dst, op[0], op[1], op[2]);
+ /* In theory, MAD is incorrect here. */
+ if (have_fma)
+ emit(ir, TGSI_OPCODE_FMA, result_dst, op[0], op[1], op[2]);
+ else
+ emit(ir, TGSI_OPCODE_MAD, result_dst, op[0], op[1], op[2]);
break;
case ir_unop_interpolate_at_centroid:
emit(ir, TGSI_OPCODE_INTERP_CENTROID, result_dst, op[0]);
@@ -5564,6 +5567,8 @@ get_mesa_program(struct gl_context *ctx,
v->have_sqrt = pscreen->get_shader_param(pscreen, ptarget,
PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED);
+ v->have_fma = pscreen->get_shader_param(pscreen, ptarget,
+ PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED);
_mesa_copy_linked_program_data(shader->Stage, shader_program, prog);
_mesa_generate_parameters_list_for_uniforms(shader_program, shader,
diff --git a/mesalib/src/mesa/state_tracker/st_texture.c b/mesalib/src/mesa/state_tracker/st_texture.c
index ada984189..ca7c83c21 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_texture.c
@@ -310,46 +310,6 @@ st_texture_image_unmap(struct st_context *st,
*transfer = NULL;
}
-
-/* Upload data for a particular image.
- */
-void
-st_texture_image_data(struct st_context *st,
- struct pipe_resource *dst,
- GLuint face,
- GLuint level,
- void *src,
- GLuint src_row_stride, GLuint src_image_stride)
-{
- struct pipe_context *pipe = st->pipe;
- GLuint i;
- const GLubyte *srcUB = src;
- GLuint layers;
-
- if (dst->target == PIPE_TEXTURE_1D_ARRAY ||
- dst->target == PIPE_TEXTURE_2D_ARRAY ||
- dst->target == PIPE_TEXTURE_CUBE_ARRAY)
- layers = dst->array_size;
- else
- layers = u_minify(dst->depth0, level);
-
- DBG("%s\n", __FUNCTION__);
-
- for (i = 0; i < layers; i++) {
- struct pipe_box box;
- u_box_2d_zslice(0, 0, face + i,
- u_minify(dst->width0, level),
- u_minify(dst->height0, level),
- &box);
-
- pipe->transfer_inline_write(pipe, dst, level, PIPE_TRANSFER_WRITE,
- &box, srcUB, src_row_stride, 0);
-
- srcUB += src_image_stride;
- }
-}
-
-
/**
* For debug only: get/print center pixel in the src resource.
*/
diff --git a/mesalib/src/mesa/state_tracker/st_texture.h b/mesalib/src/mesa/state_tracker/st_texture.h
index 6b7f8c750..d8cd7c7b5 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.h
+++ b/mesalib/src/mesa/state_tracker/st_texture.h
@@ -55,13 +55,7 @@ struct st_texture_image
{
struct gl_texture_image base;
- /** Used to store texture data that doesn't fit in the parent
- * object's mipmap buffer.
- */
- GLubyte *TexData;
-
/* If stImage->pt != NULL, image data is stored here.
- * Else if stImage->TexData != NULL, image is stored there.
* Else there is no image data.
*/
struct pipe_resource *pt;
@@ -230,16 +224,6 @@ st_texture_image_unmap(struct st_context *st,
extern const GLuint *
st_texture_depth_offsets(struct pipe_resource *pt, GLuint level);
-
-/* Upload an image into a texture
- */
-extern void
-st_texture_image_data(struct st_context *st,
- struct pipe_resource *dst,
- GLuint face, GLuint level, void *src,
- GLuint src_row_pitch, GLuint src_image_pitch);
-
-
/* Copy an image between two textures
*/
extern void
diff --git a/mesalib/src/mesa/state_tracker/st_vdpau.c b/mesalib/src/mesa/state_tracker/st_vdpau.c
index 6ccaf3e3f..63af1196a 100644
--- a/mesalib/src/mesa/state_tracker/st_vdpau.c
+++ b/mesalib/src/mesa/state_tracker/st_vdpau.c
@@ -66,7 +66,7 @@ st_vdpau_map_surface(struct gl_context *ctx, GLenum target, GLenum access,
struct pipe_sampler_view templ, **sampler_view;
mesa_format texFormat;
- getProcAddr = ctx->vdpGetProcAddress;
+ getProcAddr = (void *)ctx->vdpGetProcAddress;
if (output) {
VdpOutputSurfaceGallium *f;