Compare commits
19 Commits
mesa-17.2.
...
17.2
Author | SHA1 | Date | |
---|---|---|---|
|
3281775ab9 | ||
|
3482790712 | ||
|
fb618171b6 | ||
|
d9dd945d5c | ||
|
03538c210f | ||
|
dd0b6dfd91 | ||
|
fb342ac0c8 | ||
|
aa8742864a | ||
|
5226e37717 | ||
|
a8ee722262 | ||
|
334ae3b0d2 | ||
|
3730b04e81 | ||
|
5ffdc3a2b2 | ||
|
9f94d6aa65 | ||
|
8f8b5c0ad3 | ||
|
2e6593806c | ||
|
e0160dd368 | ||
|
2186a9ee6b | ||
|
9ca5f55786 |
@@ -139,3 +139,23 @@ a31d0382084c8aa860ffcef9b12592c5c44e192f Revert "intel/fs: Use a pure vertical s
|
||||
# stable: The commit depends on at least one other that did not land in
|
||||
# branch - 8b3a2578519.
|
||||
010214b403de1b5e25a549372ba6192b89e05d06 radeonsi: allow DMABUF exports for local buffers
|
||||
|
||||
# stable: This commit addressed earlier commit ead0dfe31ec7 which did
|
||||
# not land in branch.
|
||||
709f5bdc4a2bf31f422f5cf60797224c0463c10a swr: Fix KNOB_MAX_WORKER_THREADS thread creation override.
|
||||
|
||||
# stable: 17.3 nomination only.
|
||||
bf0904e31fb7d9cd8932d582076c8d7beb02ba89 winsys/amdgpu: disable local BOs again due to worse performance
|
||||
35c3cbad3c30ad3d40a6811dd6ca2286e013bfc5 radeonsi: don't call force_dcc_off for buffers
|
||||
|
||||
# fixes: This commit addressed earlier commit d1c9f30d7ff7 which did
|
||||
# not land in branch.
|
||||
1bdeac545f4ea9f7ca6947f5da7fcf4f5b3010dc radv: port merge tess info from anv
|
||||
|
||||
# extra: The commit just references a fix for an additional change in its v2.
|
||||
c1ff99fd70cd2ceb2cac4723e4fd5efc93834746 main: Clear shader program data whenever ProgramBinary is called
|
||||
|
||||
# extra: The commit references a previous commit in which the changes
|
||||
# should have been included but, as clarified by the
|
||||
# developer, it is not needed for stable.
|
||||
71e630753ebbee82e8f8709da5488296b2c070c8 r600: set DX10_CLAMP for compute shader too
|
||||
|
@@ -31,7 +31,8 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
e8d837a1cd55014e636e9caf6c75cfbe1b3e4be9ab3fa125f5ef38398aa12e97 mesa-17.2.7.tar.gz
|
||||
50cfdea8df55045797b4d0409591c04c784d9551c4da09b8178874dbe5a37a68 mesa-17.2.7.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
|
112
docs/relnotes/17.2.8.html
Normal file
112
docs/relnotes/17.2.8.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 17.2.8 Release Notes / December 22, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 17.2.8 is a bug fix release which fixes bugs found since the 17.2.7 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 17.2.8 implements the OpenGL 4.5 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.5. OpenGL
|
||||
4.5 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
c715c3a3d6fe26a69c096f573ec416e038a548f0405e3befedd5136517527a84 mesa-17.2.8.tar.gz
|
||||
6e940345cceaadfd805d701ed2b956589fa77fe8c39991da30ed51ea6b9d095f mesa-17.2.8.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=102710">Bug 102710</a> - vkCmdBlitImage with arrayLayers > 1 fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=103007">Bug 103007</a> - [OpenGL CTS] [HSW] KHR-GL45.gpu_shader_fp64.fp64.max_uniform_components fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=103544">Bug 103544</a> - Graphical glitches r600 in game this war of mine linux native</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=103579">Bug 103579</a> - Vertex shader causes compiler to crash in SPIRV-to-NIR</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Andres Gomez (6):</p>
|
||||
<ul>
|
||||
<li>cherry-ignore: swr: Fix KNOB_MAX_WORKER_THREADS thread creation override.</li>
|
||||
<li>cherry-ignore: added 17.3 nominations.</li>
|
||||
<li>cherry-ignore: radv: port merge tess info from anv</li>
|
||||
<li>cherry-ignore: main: Clear shader program data whenever ProgramBinary is called</li>
|
||||
<li>cherry-ignore: r600: set DX10_CLAMP for compute shader too</li>
|
||||
<li>Update version to 17.2.8</li>
|
||||
</ul>
|
||||
|
||||
<p>Bas Nieuwenhuizen (2):</p>
|
||||
<ul>
|
||||
<li>spirv: Fix loading an entire block at once.</li>
|
||||
<li>radv: Fix multi-layer blits.</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (2):</p>
|
||||
<ul>
|
||||
<li>xlib: call _mesa_warning() instead of fprintf()</li>
|
||||
<li>gallium/aux: include nr_samples in util_resource_size() computation</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 17.2.7</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: use a temp register to compute offsets for pull loads</li>
|
||||
</ul>
|
||||
|
||||
<p>Leo Liu (1):</p>
|
||||
<ul>
|
||||
<li>radeon/vce: move destroy command before feedback command</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (2):</p>
|
||||
<ul>
|
||||
<li>util: Assume little endian in the absence of platform-specific handling</li>
|
||||
<li>util: Add a SHA1 unit test program</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (2):</p>
|
||||
<ul>
|
||||
<li>r600: use min_dx10/max_dx10 instead of min/max</li>
|
||||
<li>r600: use DX10_CLAMP bit in shader setup</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -269,8 +269,8 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer,
|
||||
VkOffset3D src_offset_1,
|
||||
struct radv_image *dest_image,
|
||||
struct radv_image_view *dest_iview,
|
||||
VkOffset3D dest_offset_0,
|
||||
VkOffset3D dest_offset_1,
|
||||
VkOffset2D dest_offset_0,
|
||||
VkOffset2D dest_offset_1,
|
||||
VkRect2D dest_box,
|
||||
VkFilter blit_filter)
|
||||
{
|
||||
@@ -517,21 +517,6 @@ void radv_CmdBlitImage(
|
||||
for (unsigned r = 0; r < regionCount; r++) {
|
||||
const VkImageSubresourceLayers *src_res = &pRegions[r].srcSubresource;
|
||||
const VkImageSubresourceLayers *dst_res = &pRegions[r].dstSubresource;
|
||||
struct radv_image_view src_iview;
|
||||
radv_image_view_init(&src_iview, cmd_buffer->device,
|
||||
&(VkImageViewCreateInfo) {
|
||||
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
||||
.image = srcImage,
|
||||
.viewType = radv_meta_get_view_type(src_image),
|
||||
.format = src_image->vk_format,
|
||||
.subresourceRange = {
|
||||
.aspectMask = src_res->aspectMask,
|
||||
.baseMipLevel = src_res->mipLevel,
|
||||
.levelCount = 1,
|
||||
.baseArrayLayer = src_res->baseArrayLayer,
|
||||
.layerCount = 1
|
||||
},
|
||||
});
|
||||
|
||||
unsigned dst_start, dst_end;
|
||||
if (dest_image->type == VK_IMAGE_TYPE_3D) {
|
||||
@@ -578,18 +563,17 @@ void radv_CmdBlitImage(
|
||||
dest_box.extent.width = abs(dst_x1 - dst_x0);
|
||||
dest_box.extent.height = abs(dst_y1 - dst_y0);
|
||||
|
||||
struct radv_image_view dest_iview;
|
||||
const unsigned num_layers = dst_end - dst_start;
|
||||
for (unsigned i = 0; i < num_layers; i++) {
|
||||
const VkOffset3D dest_offset_0 = {
|
||||
struct radv_image_view dest_iview, src_iview;
|
||||
|
||||
const VkOffset2D dest_offset_0 = {
|
||||
.x = dst_x0,
|
||||
.y = dst_y0,
|
||||
.z = dst_start + i ,
|
||||
};
|
||||
const VkOffset3D dest_offset_1 = {
|
||||
const VkOffset2D dest_offset_1 = {
|
||||
.x = dst_x1,
|
||||
.y = dst_y1,
|
||||
.z = dst_start + i ,
|
||||
};
|
||||
VkOffset3D src_offset_0 = {
|
||||
.x = src_x0,
|
||||
@@ -601,9 +585,10 @@ void radv_CmdBlitImage(
|
||||
.y = src_y1,
|
||||
.z = src_start + i * src_z_step,
|
||||
};
|
||||
const uint32_t dest_array_slice =
|
||||
radv_meta_get_iview_layer(dest_image, dst_res,
|
||||
&dest_offset_0);
|
||||
const uint32_t dest_array_slice = dst_start + i;
|
||||
|
||||
/* 3D images have just 1 layer */
|
||||
const uint32_t src_array_slice = src_image->type == VK_IMAGE_TYPE_3D ? 0 : src_start + i;
|
||||
|
||||
radv_image_view_init(&dest_iview, cmd_buffer->device,
|
||||
&(VkImageViewCreateInfo) {
|
||||
@@ -619,6 +604,20 @@ void radv_CmdBlitImage(
|
||||
.layerCount = 1
|
||||
},
|
||||
});
|
||||
radv_image_view_init(&src_iview, cmd_buffer->device,
|
||||
&(VkImageViewCreateInfo) {
|
||||
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
||||
.image = srcImage,
|
||||
.viewType = radv_meta_get_view_type(src_image),
|
||||
.format = src_image->vk_format,
|
||||
.subresourceRange = {
|
||||
.aspectMask = src_res->aspectMask,
|
||||
.baseMipLevel = src_res->mipLevel,
|
||||
.levelCount = 1,
|
||||
.baseArrayLayer = src_array_slice,
|
||||
.layerCount = 1
|
||||
},
|
||||
});
|
||||
meta_emit_blit(cmd_buffer,
|
||||
src_image, &src_iview,
|
||||
src_offset_0, src_offset_1,
|
||||
|
@@ -513,35 +513,38 @@ vtn_pointer_to_offset(struct vtn_builder *b, struct vtn_pointer *ptr,
|
||||
*index_out = get_vulkan_resource_index(b, ptr, &type, &idx);
|
||||
|
||||
nir_ssa_def *offset = nir_imm_int(&b->nb, 0);
|
||||
for (; idx < ptr->chain->length; idx++) {
|
||||
enum glsl_base_type base_type = glsl_get_base_type(type->type);
|
||||
switch (base_type) {
|
||||
case GLSL_TYPE_UINT:
|
||||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
case GLSL_TYPE_FLOAT:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_BOOL:
|
||||
case GLSL_TYPE_ARRAY:
|
||||
offset = nir_iadd(&b->nb, offset,
|
||||
vtn_access_link_as_ssa(b, ptr->chain->link[idx],
|
||||
type->stride));
|
||||
|
||||
type = type->array_element;
|
||||
break;
|
||||
if (ptr->chain) {
|
||||
for (; idx < ptr->chain->length; idx++) {
|
||||
enum glsl_base_type base_type = glsl_get_base_type(type->type);
|
||||
switch (base_type) {
|
||||
case GLSL_TYPE_UINT:
|
||||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
case GLSL_TYPE_FLOAT:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_BOOL:
|
||||
case GLSL_TYPE_ARRAY:
|
||||
offset = nir_iadd(&b->nb, offset,
|
||||
vtn_access_link_as_ssa(b, ptr->chain->link[idx],
|
||||
type->stride));
|
||||
|
||||
case GLSL_TYPE_STRUCT: {
|
||||
assert(ptr->chain->link[idx].mode == vtn_access_mode_literal);
|
||||
unsigned member = ptr->chain->link[idx].id;
|
||||
offset = nir_iadd(&b->nb, offset,
|
||||
nir_imm_int(&b->nb, type->offsets[member]));
|
||||
type = type->members[member];
|
||||
break;
|
||||
}
|
||||
type = type->array_element;
|
||||
break;
|
||||
|
||||
default:
|
||||
unreachable("Invalid type for deref");
|
||||
case GLSL_TYPE_STRUCT: {
|
||||
assert(ptr->chain->link[idx].mode == vtn_access_mode_literal);
|
||||
unsigned member = ptr->chain->link[idx].id;
|
||||
offset = nir_iadd(&b->nb, offset,
|
||||
nir_imm_int(&b->nb, type->offsets[member]));
|
||||
type = type->members[member];
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
unreachable("Invalid type for deref");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -42,6 +42,7 @@ util_resource_size(const struct pipe_resource *res)
|
||||
unsigned depth = res->depth0;
|
||||
unsigned size = 0;
|
||||
unsigned level;
|
||||
unsigned samples = MAX2(1, res->nr_samples);
|
||||
|
||||
for (level = 0; level <= res->last_level; level++) {
|
||||
unsigned slices;
|
||||
@@ -54,7 +55,7 @@ util_resource_size(const struct pipe_resource *res)
|
||||
slices = res->array_size;
|
||||
|
||||
size += (util_format_get_nblocksy(res->format, height) *
|
||||
util_format_get_stride(res->format, width) * slices);
|
||||
util_format_get_stride(res->format, width) * slices * samples);
|
||||
|
||||
width = u_minify(width, 1);
|
||||
height = u_minify(height, 1);
|
||||
|
@@ -3230,6 +3230,7 @@ void evergreen_update_ps_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
r600_store_value(cb, /* R_028844_SQ_PGM_RESOURCES_PS */
|
||||
S_028844_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_028844_PRIME_CACHE_ON_DRAW(1) |
|
||||
S_028844_DX10_CLAMP(1) |
|
||||
S_028844_STACK_SIZE(rshader->bc.nstack));
|
||||
/* After that, the NOP relocation packet must be emitted (shader->bo, RADEON_USAGE_READ). */
|
||||
|
||||
@@ -3250,6 +3251,7 @@ void evergreen_update_es_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
|
||||
r600_store_context_reg(cb, R_028890_SQ_PGM_RESOURCES_ES,
|
||||
S_028890_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_028890_DX10_CLAMP(1) |
|
||||
S_028890_STACK_SIZE(rshader->bc.nstack));
|
||||
r600_store_context_reg(cb, R_02888C_SQ_PGM_START_ES,
|
||||
shader->bo->gpu_address >> 8);
|
||||
@@ -3312,6 +3314,7 @@ void evergreen_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
|
||||
r600_store_context_reg(cb, R_028878_SQ_PGM_RESOURCES_GS,
|
||||
S_028878_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_028878_DX10_CLAMP(1) |
|
||||
S_028878_STACK_SIZE(rshader->bc.nstack));
|
||||
r600_store_context_reg(cb, R_028874_SQ_PGM_START_GS,
|
||||
shader->bo->gpu_address >> 8);
|
||||
@@ -3352,6 +3355,7 @@ void evergreen_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
S_0286C4_VS_EXPORT_COUNT(nparams - 1));
|
||||
r600_store_context_reg(cb, R_028860_SQ_PGM_RESOURCES_VS,
|
||||
S_028860_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_028860_DX10_CLAMP(1) |
|
||||
S_028860_STACK_SIZE(rshader->bc.nstack));
|
||||
if (rshader->vs_position_window_space) {
|
||||
r600_store_context_reg(cb, R_028818_PA_CL_VTE_CNTL,
|
||||
@@ -3386,6 +3390,7 @@ void evergreen_update_hs_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
r600_init_command_buffer(cb, 32);
|
||||
r600_store_context_reg(cb, R_0288BC_SQ_PGM_RESOURCES_HS,
|
||||
S_0288BC_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_0288BC_DX10_CLAMP(1) |
|
||||
S_0288BC_STACK_SIZE(rshader->bc.nstack));
|
||||
r600_store_context_reg(cb, R_0288B8_SQ_PGM_START_HS,
|
||||
shader->bo->gpu_address >> 8);
|
||||
@@ -3399,6 +3404,7 @@ void evergreen_update_ls_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
r600_init_command_buffer(cb, 32);
|
||||
r600_store_context_reg(cb, R_0288D4_SQ_PGM_RESOURCES_LS,
|
||||
S_0288D4_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_0288D4_DX10_CLAMP(1) |
|
||||
S_0288D4_STACK_SIZE(rshader->bc.nstack));
|
||||
r600_store_context_reg(cb, R_0288D0_SQ_PGM_START_LS,
|
||||
shader->bo->gpu_address >> 8);
|
||||
|
@@ -9091,8 +9091,9 @@ static const struct r600_shader_tgsi_instruction r600_shader_tgsi_instruction[]
|
||||
[TGSI_OPCODE_DP3] = { ALU_OP2_DOT4_IEEE, tgsi_dp},
|
||||
[TGSI_OPCODE_DP4] = { ALU_OP2_DOT4_IEEE, tgsi_dp},
|
||||
[TGSI_OPCODE_DST] = { ALU_OP0_NOP, tgsi_opdst},
|
||||
[TGSI_OPCODE_MIN] = { ALU_OP2_MIN, tgsi_op2},
|
||||
[TGSI_OPCODE_MAX] = { ALU_OP2_MAX, tgsi_op2},
|
||||
/* MIN_DX10 returns non-nan result if one src is NaN, MIN returns NaN */
|
||||
[TGSI_OPCODE_MIN] = { ALU_OP2_MIN_DX10, tgsi_op2},
|
||||
[TGSI_OPCODE_MAX] = { ALU_OP2_MAX_DX10, tgsi_op2},
|
||||
[TGSI_OPCODE_SLT] = { ALU_OP2_SETGT, tgsi_op2_swap},
|
||||
[TGSI_OPCODE_SGE] = { ALU_OP2_SETGE, tgsi_op2},
|
||||
[TGSI_OPCODE_MAD] = { ALU_OP3_MULADD_IEEE, tgsi_op3},
|
||||
@@ -9289,8 +9290,8 @@ static const struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] =
|
||||
[TGSI_OPCODE_DP3] = { ALU_OP2_DOT4_IEEE, tgsi_dp},
|
||||
[TGSI_OPCODE_DP4] = { ALU_OP2_DOT4_IEEE, tgsi_dp},
|
||||
[TGSI_OPCODE_DST] = { ALU_OP0_NOP, tgsi_opdst},
|
||||
[TGSI_OPCODE_MIN] = { ALU_OP2_MIN, tgsi_op2},
|
||||
[TGSI_OPCODE_MAX] = { ALU_OP2_MAX, tgsi_op2},
|
||||
[TGSI_OPCODE_MIN] = { ALU_OP2_MIN_DX10, tgsi_op2},
|
||||
[TGSI_OPCODE_MAX] = { ALU_OP2_MAX_DX10, tgsi_op2},
|
||||
[TGSI_OPCODE_SLT] = { ALU_OP2_SETGT, tgsi_op2_swap},
|
||||
[TGSI_OPCODE_SGE] = { ALU_OP2_SETGE, tgsi_op2},
|
||||
[TGSI_OPCODE_MAD] = { ALU_OP3_MULADD_IEEE, tgsi_op3},
|
||||
@@ -9512,8 +9513,8 @@ static const struct r600_shader_tgsi_instruction cm_shader_tgsi_instruction[] =
|
||||
[TGSI_OPCODE_DP3] = { ALU_OP2_DOT4_IEEE, tgsi_dp},
|
||||
[TGSI_OPCODE_DP4] = { ALU_OP2_DOT4_IEEE, tgsi_dp},
|
||||
[TGSI_OPCODE_DST] = { ALU_OP0_NOP, tgsi_opdst},
|
||||
[TGSI_OPCODE_MIN] = { ALU_OP2_MIN, tgsi_op2},
|
||||
[TGSI_OPCODE_MAX] = { ALU_OP2_MAX, tgsi_op2},
|
||||
[TGSI_OPCODE_MIN] = { ALU_OP2_MIN_DX10, tgsi_op2},
|
||||
[TGSI_OPCODE_MAX] = { ALU_OP2_MAX_DX10, tgsi_op2},
|
||||
[TGSI_OPCODE_SLT] = { ALU_OP2_SETGT, tgsi_op2_swap},
|
||||
[TGSI_OPCODE_SGE] = { ALU_OP2_SETGE, tgsi_op2},
|
||||
[TGSI_OPCODE_MAD] = { ALU_OP3_MULADD_IEEE, tgsi_op3},
|
||||
|
@@ -2546,6 +2546,12 @@ void r600_update_ps_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
|
||||
r600_store_context_reg_seq(cb, R_028850_SQ_PGM_RESOURCES_PS, 2);
|
||||
r600_store_value(cb, /* R_028850_SQ_PGM_RESOURCES_PS*/
|
||||
S_028850_NUM_GPRS(rshader->bc.ngpr) |
|
||||
/*
|
||||
* docs are misleading about the dx10_clamp bit. This only affects
|
||||
* instructions using CLAMP dst modifier, in which case they will
|
||||
* return 0 with this set for a NaN (otherwise NaN).
|
||||
*/
|
||||
S_028850_DX10_CLAMP(1) |
|
||||
S_028850_STACK_SIZE(rshader->bc.nstack) |
|
||||
S_028850_UNCACHED_FIRST_INST(ufi));
|
||||
r600_store_value(cb, exports_ps); /* R_028854_SQ_PGM_EXPORTS_PS */
|
||||
@@ -2595,6 +2601,7 @@ void r600_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
|
||||
S_0286C4_VS_EXPORT_COUNT(nparams - 1));
|
||||
r600_store_context_reg(cb, R_028868_SQ_PGM_RESOURCES_VS,
|
||||
S_028868_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_028868_DX10_CLAMP(1) |
|
||||
S_028868_STACK_SIZE(rshader->bc.nstack));
|
||||
if (rshader->vs_position_window_space) {
|
||||
r600_store_context_reg(cb, R_028818_PA_CL_VTE_CNTL,
|
||||
@@ -2679,6 +2686,7 @@ void r600_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
|
||||
|
||||
r600_store_context_reg(cb, R_02887C_SQ_PGM_RESOURCES_GS,
|
||||
S_02887C_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_02887C_DX10_CLAMP(1) |
|
||||
S_02887C_STACK_SIZE(rshader->bc.nstack));
|
||||
r600_store_context_reg(cb, R_02886C_SQ_PGM_START_GS, 0);
|
||||
/* After that, the NOP relocation packet must be emitted (shader->bo, RADEON_USAGE_READ). */
|
||||
@@ -2693,6 +2701,7 @@ void r600_update_es_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
|
||||
|
||||
r600_store_context_reg(cb, R_028890_SQ_PGM_RESOURCES_ES,
|
||||
S_028890_NUM_GPRS(rshader->bc.ngpr) |
|
||||
S_028890_DX10_CLAMP(1) |
|
||||
S_028890_STACK_SIZE(rshader->bc.nstack));
|
||||
r600_store_context_reg(cb, R_028880_SQ_PGM_START_ES, 0);
|
||||
/* After that, the NOP relocation packet must be emitted (shader->bo, RADEON_USAGE_READ). */
|
||||
|
@@ -753,7 +753,9 @@ bool expr_handler::fold_alu_op2(alu_node& n) {
|
||||
n.bc.src[0].abs == n.bc.src[1].abs) {
|
||||
switch (n.bc.op) {
|
||||
case ALU_OP2_MIN: // (MIN x, x) => (MOV x)
|
||||
case ALU_OP2_MIN_DX10:
|
||||
case ALU_OP2_MAX:
|
||||
case ALU_OP2_MAX_DX10:
|
||||
convert_to_mov(n, v0, n.bc.src[0].neg, n.bc.src[0].abs);
|
||||
return fold_alu_op1(n);
|
||||
case ALU_OP2_ADD: // (ADD x, x) => (MUL x, 2)
|
||||
|
@@ -252,8 +252,8 @@ static void rvce_destroy(struct pipe_video_codec *encoder)
|
||||
rvid_create_buffer(enc->screen, &fb, 512, PIPE_USAGE_STAGING);
|
||||
enc->fb = &fb;
|
||||
enc->session(enc);
|
||||
enc->feedback(enc);
|
||||
enc->destroy(enc);
|
||||
enc->feedback(enc);
|
||||
flush(enc);
|
||||
rvid_destroy_buffer(&fb);
|
||||
}
|
||||
|
@@ -888,7 +888,9 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
|
||||
if (const_offset) {
|
||||
offset_reg = brw_imm_ud(const_offset->u32[0] & ~15);
|
||||
} else {
|
||||
offset_reg = get_nir_src(instr->src[1], nir_type_uint32, 1);
|
||||
offset_reg = src_reg(this, glsl_type::uint_type);
|
||||
emit(MOV(dst_reg(offset_reg),
|
||||
get_nir_src(instr->src[1], nir_type_uint32, 1)));
|
||||
}
|
||||
|
||||
src_reg packed_consts;
|
||||
|
@@ -2836,7 +2836,8 @@ Fake_glXCreateContextAttribs(Display *dpy, GLXFBConfig config,
|
||||
profileFlags = attrib_list[i + 1];
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Bad attribute in glXCreateContextAttribs()\n");
|
||||
_mesa_warning(NULL, "Unexpected attribute 0x%x in "
|
||||
"glXCreateContextAttribs()\n", attrib_list[i]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@@ -51,8 +51,9 @@ libmesautil_la_LIBADD = \
|
||||
|
||||
u_atomic_test_LDADD = libmesautil.la
|
||||
roundeven_test_LDADD = -lm
|
||||
mesa_sha1_test_LDADD = libmesautil.la
|
||||
|
||||
check_PROGRAMS = u_atomic_test roundeven_test
|
||||
check_PROGRAMS = u_atomic_test roundeven_test mesa-sha1_test
|
||||
TESTS = $(check_PROGRAMS)
|
||||
|
||||
BUILT_SOURCES = $(MESA_UTIL_GENERATED_FILES)
|
||||
|
@@ -53,3 +53,10 @@ roundeven_test = env.Program(
|
||||
source = ['roundeven_test.c'],
|
||||
)
|
||||
env.UnitTest("roundeven_test", roundeven_test)
|
||||
|
||||
env.Prepend(LIBS = [mesautil])
|
||||
mesa_sha1_test = env.Program(
|
||||
target = 'mesa-sha1_test',
|
||||
source = ['mesa-sha1_test.c'],
|
||||
)
|
||||
env.UnitTest("mesa-sha1_test", mesa_sha1_test)
|
||||
|
65
src/util/mesa-sha1_test.c
Normal file
65
src/util/mesa-sha1_test.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright © 2017 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "mesa-sha1.h"
|
||||
|
||||
#define SHA1_LENGTH 40
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
static const struct {
|
||||
const char *string;
|
||||
const char *sha1;
|
||||
} test_data[] = {
|
||||
{"Mesa Rocks! 273", "7fb99737373d65a73f049cdabc01e73aa6bc60f3"},
|
||||
{"Mesa Rocks! 300", "b2180263e37d3bed6a4be0afe41b1a82ebbcf4c3"},
|
||||
{"Mesa Rocks! 583", "7fb9734108a62503e8a149c1051facd7fb112d05"},
|
||||
};
|
||||
|
||||
bool failed = false;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(test_data); i++) {
|
||||
unsigned char sha1[20];
|
||||
_mesa_sha1_compute(test_data[i].string, strlen(test_data[i].string),
|
||||
sha1);
|
||||
|
||||
char buf[41];
|
||||
_mesa_sha1_format(buf, sha1);
|
||||
|
||||
if (memcmp(test_data[i].sha1, buf, SHA1_LENGTH) != 0) {
|
||||
printf("For string \"%s\", length %zu:\n"
|
||||
"\tExpected: %s\n\t Got: %s\n",
|
||||
test_data[i].string, strlen(test_data[i].string),
|
||||
test_data[i].sha1, buf);
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
|
||||
return failed;
|
||||
}
|
@@ -27,7 +27,7 @@
|
||||
#ifndef U_ENDIAN_H
|
||||
#define U_ENDIAN_H
|
||||
|
||||
#if defined(__GLIBC__) || defined(ANDROID)
|
||||
#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__)
|
||||
#include <endian.h>
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
@@ -64,6 +64,10 @@
|
||||
# define PIPE_ARCH_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
#define PIPE_ARCH_LITTLE_ENDIAN
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user