Compare commits
32 Commits
mesa-18.3.
...
mesa-18.3.
Author | SHA1 | Date | |
---|---|---|---|
|
4b3f884673 | ||
|
65926d5d94 | ||
|
f25fb52eae | ||
|
0b48c82ad9 | ||
|
087f1534ae | ||
|
a57a727617 | ||
|
971ce9f854 | ||
|
bfe7eda028 | ||
|
221a8e3366 | ||
|
c8fef27cd3 | ||
|
4505df1676 | ||
|
8b5ce5fa70 | ||
|
cfd333c768 | ||
|
3853b9c14d | ||
|
98c0d87acd | ||
|
fc99358bdc | ||
|
9650fc05a5 | ||
|
e1dc5715b2 | ||
|
fbe2a54991 | ||
|
940d3a4ef8 | ||
|
9d92b603f1 | ||
|
e2494a9387 | ||
|
8a79c536d5 | ||
|
cc572038bf | ||
|
ad99afdce6 | ||
|
7ea4e43c55 | ||
|
6a706763d0 | ||
|
9b8380a4f9 | ||
|
fff64af317 | ||
|
5f137e94b9 | ||
|
c64a78ec0a | ||
|
73f457f486 |
@@ -1,81 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script for generating a list of candidates [referenced by a Fixes tag] for
|
||||
# cherry-picking to a stable branch
|
||||
#
|
||||
# Usage examples:
|
||||
#
|
||||
# $ bin/get-fixes-pick-list.sh
|
||||
# $ bin/get-fixes-pick-list.sh > picklist
|
||||
# $ bin/get-fixes-pick-list.sh | tee picklist
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
latest_branchpoint=`git merge-base origin/master HEAD`
|
||||
|
||||
# List all the commits between day 1 and the branch point...
|
||||
git log --reverse --pretty=%H $latest_branchpoint > already_landed
|
||||
|
||||
# ... and the ones cherry-picked.
|
||||
git log --reverse --pretty=medium --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits with Fixes tag
|
||||
git log --reverse --pretty=%H -i --grep="fixes:" $latest_branchpoint..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list ...
|
||||
if [ -f bin/.cherry-ignore ] ; then
|
||||
if grep -q ^$sha bin/.cherry-ignore ; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# Skip if it has been already cherry-picked.
|
||||
if grep -q ^$sha already_picked ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Place every "fixes:" tag on its own line and join with the next word
|
||||
# on its line or a later one.
|
||||
fixes=`git show --pretty=medium -s $sha | tr -d "\n" | sed -e 's/fixes:[[:space:]]*/\nfixes:/Ig' | grep "fixes:" | sed -e 's/\(fixes:[a-zA-Z0-9]*\).*$/\1/'`
|
||||
|
||||
# For each one try to extract the tag
|
||||
fixes_count=`echo "$fixes" | wc -l`
|
||||
warn=`(test $fixes_count -gt 1 && echo $fixes_count) || echo 0`
|
||||
while [ $fixes_count -gt 0 ] ; do
|
||||
# Treat only the current line
|
||||
id=`echo "$fixes" | tail -n $fixes_count | head -n 1 | cut -d : -f 2`
|
||||
fixes_count=$(($fixes_count-1))
|
||||
|
||||
# Bail out if we cannot find suitable id.
|
||||
# Any specific validation the $id is valid and not some junk, is
|
||||
# implied with the follow up code
|
||||
if [ "x$id" = x ] ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check if the offending commit is in branch.
|
||||
|
||||
# Be that cherry-picked ...
|
||||
# ... or landed before the branchpoint.
|
||||
if grep -q ^$id already_picked ||
|
||||
grep -q ^$id already_landed ; then
|
||||
|
||||
printf "Commit \"%s\" fixes %s\n" \
|
||||
"`git log -n1 --pretty=oneline $sha`" \
|
||||
"$id"
|
||||
warn=$(($warn-1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if [ $warn -gt 0 ] ; then
|
||||
printf "WARNING: Commit \"%s\" has more than one Fixes tag\n" \
|
||||
"`git log -n1 --pretty=oneline $sha`"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
rm -f already_picked
|
||||
rm -f already_landed
|
@@ -7,21 +7,92 @@
|
||||
# $ bin/get-pick-list.sh
|
||||
# $ bin/get-pick-list.sh > picklist
|
||||
# $ bin/get-pick-list.sh | tee picklist
|
||||
#
|
||||
# The output is as follows:
|
||||
# [nomination_type] commit_sha commit summary
|
||||
|
||||
is_stable_nomination()
|
||||
{
|
||||
git show --summary "$1" | grep -q -i -o "CC:.*mesa-stable"
|
||||
}
|
||||
|
||||
is_typod_nomination()
|
||||
{
|
||||
git show --summary "$1" | grep -q -i -o "CC:.*mesa-dev"
|
||||
}
|
||||
|
||||
# Helper to handle various mistypos of the fixes tag.
|
||||
# The tag string itself is passed as argument and normalised within.
|
||||
is_sha_nomination()
|
||||
{
|
||||
fixes=`git show --pretty=medium -s $1 | tr -d "\n" | \
|
||||
sed -e 's/'"$2"'/\nfixes:/Ig' | \
|
||||
grep -Eo 'fixes:[a-f0-9]{8,40}'`
|
||||
|
||||
fixes_count=`echo "$fixes" | wc -l`
|
||||
if test $fixes_count -eq 0; then
|
||||
return 0
|
||||
fi
|
||||
while test $fixes_count -gt 0; do
|
||||
# Treat only the current line
|
||||
id=`echo "$fixes" | tail -n $fixes_count | head -n 1 | cut -d : -f 2`
|
||||
fixes_count=$(($fixes_count-1))
|
||||
|
||||
# Bail out if we cannot find suitable id.
|
||||
# Any specific validation the $id is valid and not some junk, is
|
||||
# implied with the follow up code
|
||||
if test "x$id" = x; then
|
||||
continue
|
||||
fi
|
||||
|
||||
#Check if the offending commit is in branch.
|
||||
|
||||
# Be that cherry-picked ...
|
||||
# ... or landed before the branchpoint.
|
||||
if grep -q ^$id already_picked ||
|
||||
grep -q ^$id already_landed ; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
is_fixes_nomination()
|
||||
{
|
||||
is_sha_nomination "$1" "fixes:[[:space:]]*"
|
||||
if test $? -eq 0; then
|
||||
return 0
|
||||
fi
|
||||
is_sha_nomination "$1" "fixes[[:space:]]\+"
|
||||
}
|
||||
|
||||
is_brokenby_nomination()
|
||||
{
|
||||
is_sha_nomination "$1" "broken by"
|
||||
}
|
||||
|
||||
is_revert_nomination()
|
||||
{
|
||||
is_sha_nomination "$1" "This reverts commit "
|
||||
}
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
latest_branchpoint=`git merge-base origin/master HEAD`
|
||||
|
||||
# Grep for commits with "cherry picked from commit" in the commit message.
|
||||
# List all the commits between day 1 and the branch point...
|
||||
git log --reverse --pretty=%H $latest_branchpoint > already_landed
|
||||
|
||||
# ... and the ones cherry-picked.
|
||||
git log --reverse --pretty=medium --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^CC:.*mesa-stable' $latest_branchpoint..origin/master |\
|
||||
# Grep for potential candidates
|
||||
git log --reverse --pretty=%H -i --grep='^CC:.*mesa-stable\|^CC:.*mesa-dev\|\<fixes\>\|\<broken by\>\|This reverts commit' $latest_branchpoint..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
if [ -f bin/.cherry-ignore ] ; then
|
||||
if test -f bin/.cherry-ignore; then
|
||||
if grep -q ^$sha bin/.cherry-ignore ; then
|
||||
continue
|
||||
fi
|
||||
@@ -32,7 +103,23 @@ do
|
||||
continue
|
||||
fi
|
||||
|
||||
git log -n1 --pretty=oneline $sha | cat
|
||||
if is_stable_nomination "$sha"; then
|
||||
tag=stable
|
||||
elif is_typod_nomination "$sha"; then
|
||||
tag=typod
|
||||
elif is_fixes_nomination "$sha"; then
|
||||
tag=fixes
|
||||
elif is_brokenby_nomination "$sha"; then
|
||||
tag=brokenby
|
||||
elif is_revert_nomination "$sha"; then
|
||||
tag=revert
|
||||
else
|
||||
continue
|
||||
fi
|
||||
|
||||
printf "[ %8s ] " "$tag"
|
||||
git --no-pager show --summary --oneline $sha
|
||||
done
|
||||
|
||||
rm -f already_picked
|
||||
rm -f already_landed
|
||||
|
@@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script for generating a list of candidates which have typos in the nomination line
|
||||
#
|
||||
# Usage examples:
|
||||
#
|
||||
# $ bin/get-typod-pick-list.sh
|
||||
# $ bin/get-typod-pick-list.sh > picklist
|
||||
# $ bin/get-typod-pick-list.sh | tee picklist
|
||||
|
||||
# NB:
|
||||
# This script intentionally _never_ checks for specific version tag
|
||||
# Should we consider folding it with the original get-pick-list.sh
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
latest_branchpoint=`git merge-base origin/master HEAD`
|
||||
|
||||
# Grep for commits with "cherry picked from commit" in the commit message.
|
||||
git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^CC:.*mesa-dev' $latest_branchpoint..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
if [ -f bin/.cherry-ignore ] ; then
|
||||
if grep -q ^$sha bin/.cherry-ignore ; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check to see if it has already been picked over.
|
||||
if grep -q ^$sha already_picked ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
git log -n1 --pretty=oneline $sha | cat
|
||||
done
|
||||
|
||||
rm -f already_picked
|
14
meson.build
14
meson.build
@@ -787,7 +787,7 @@ endif
|
||||
|
||||
# Check for generic C arguments
|
||||
c_args = []
|
||||
foreach a : ['-Wall', '-Werror=implicit-function-declaration',
|
||||
foreach a : ['-Werror=implicit-function-declaration',
|
||||
'-Werror=missing-prototypes', '-Werror=return-type',
|
||||
'-fno-math-errno',
|
||||
'-fno-trapping-math', '-Qunused-arguments']
|
||||
@@ -809,7 +809,7 @@ endif
|
||||
|
||||
# Check for generic C++ arguments
|
||||
cpp_args = []
|
||||
foreach a : ['-Wall', '-Werror=return-type',
|
||||
foreach a : ['-Werror=return-type',
|
||||
'-fno-math-errno', '-fno-trapping-math',
|
||||
'-Qunused-arguments']
|
||||
if cpp.has_argument(a)
|
||||
@@ -905,8 +905,9 @@ if not cc.links('''#include <stdint.h>
|
||||
int main() {
|
||||
return __sync_add_and_fetch(&v, (uint64_t)1);
|
||||
}''',
|
||||
dependencies : dep_atomic,
|
||||
name : 'GCC 64bit atomics')
|
||||
pre_args += '-DMISSING_64_BIT_ATOMICS'
|
||||
pre_args += '-DMISSING_64BIT_ATOMICS'
|
||||
endif
|
||||
|
||||
# TODO: shared/static? Is this even worth doing?
|
||||
@@ -1317,13 +1318,6 @@ if with_platform_wayland
|
||||
'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml'
|
||||
)
|
||||
pre_args += ['-DHAVE_WAYLAND_PLATFORM', '-DWL_HIDE_DEPRECATED']
|
||||
else
|
||||
prog_wl_scanner = []
|
||||
wl_scanner_arg = ''
|
||||
dep_wl_protocols = null_dep
|
||||
dep_wayland_client = null_dep
|
||||
dep_wayland_server = null_dep
|
||||
wayland_dmabuf_xml = ''
|
||||
endif
|
||||
|
||||
dep_x11 = null_dep
|
||||
|
@@ -3520,8 +3520,13 @@ static bool radv_need_late_scissor_emission(struct radv_cmd_buffer *cmd_buffer,
|
||||
|
||||
uint32_t used_states = cmd_buffer->state.pipeline->graphics.needed_dynamic_state | ~RADV_CMD_DIRTY_DYNAMIC_ALL;
|
||||
|
||||
/* Index & Vertex buffer don't change context regs, and pipeline is handled later. */
|
||||
used_states &= ~(RADV_CMD_DIRTY_INDEX_BUFFER | RADV_CMD_DIRTY_VERTEX_BUFFER | RADV_CMD_DIRTY_PIPELINE);
|
||||
/* Index, vertex and streamout buffers don't change context regs, and
|
||||
* pipeline is handled later.
|
||||
*/
|
||||
used_states &= ~(RADV_CMD_DIRTY_INDEX_BUFFER |
|
||||
RADV_CMD_DIRTY_VERTEX_BUFFER |
|
||||
RADV_CMD_DIRTY_STREAMOUT_BUFFER |
|
||||
RADV_CMD_DIRTY_PIPELINE);
|
||||
|
||||
/* Assume all state changes except these two can imply context rolls. */
|
||||
if (cmd_buffer->state.dirty & used_states)
|
||||
|
@@ -1054,16 +1054,14 @@ void radv_GetPhysicalDeviceProperties2(
|
||||
(VkPhysicalDeviceSubgroupProperties*)ext;
|
||||
properties->subgroupSize = 64;
|
||||
properties->supportedStages = VK_SHADER_STAGE_ALL;
|
||||
/* TODO: Enable VK_SUBGROUP_FEATURE_VOTE_BIT when wwm
|
||||
* is fixed in LLVM.
|
||||
*/
|
||||
properties->supportedOperations =
|
||||
VK_SUBGROUP_FEATURE_ARITHMETIC_BIT |
|
||||
VK_SUBGROUP_FEATURE_BASIC_BIT |
|
||||
VK_SUBGROUP_FEATURE_BALLOT_BIT |
|
||||
VK_SUBGROUP_FEATURE_QUAD_BIT;
|
||||
VK_SUBGROUP_FEATURE_QUAD_BIT |
|
||||
VK_SUBGROUP_FEATURE_VOTE_BIT;
|
||||
if (pdevice->rad_info.chip_class >= VI) {
|
||||
properties->supportedOperations |=
|
||||
VK_SUBGROUP_FEATURE_ARITHMETIC_BIT |
|
||||
VK_SUBGROUP_FEATURE_SHUFFLE_BIT |
|
||||
VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT;
|
||||
}
|
||||
|
@@ -195,9 +195,12 @@ nir_remove_unused_varyings(nir_shader *producer, nir_shader *consumer)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
get_interp_type(nir_variable *var, bool default_to_smooth_interp)
|
||||
get_interp_type(nir_variable *var, const struct glsl_type *type,
|
||||
bool default_to_smooth_interp)
|
||||
{
|
||||
if (var->data.interpolation != INTERP_MODE_NONE)
|
||||
if (glsl_type_is_integer(type))
|
||||
return INTERP_MODE_FLAT;
|
||||
else if (var->data.interpolation != INTERP_MODE_NONE)
|
||||
return var->data.interpolation;
|
||||
else if (default_to_smooth_interp)
|
||||
return INTERP_MODE_SMOOTH;
|
||||
@@ -252,7 +255,7 @@ get_slot_component_masks_and_interp_types(struct exec_list *var_list,
|
||||
unsigned comps_slot2 = 0;
|
||||
for (unsigned i = 0; i < slots; i++) {
|
||||
interp_type[location + i] =
|
||||
get_interp_type(var, default_to_smooth_interp);
|
||||
get_interp_type(var, type, default_to_smooth_interp);
|
||||
interp_loc[location + i] = get_interp_loc(var);
|
||||
|
||||
if (dual_slot) {
|
||||
@@ -424,7 +427,7 @@ compact_components(nir_shader *producer, nir_shader *consumer, uint8_t *comps,
|
||||
continue;
|
||||
|
||||
bool found_new_offset = false;
|
||||
uint8_t interp = get_interp_type(var, default_to_smooth_interp);
|
||||
uint8_t interp = get_interp_type(var, type, default_to_smooth_interp);
|
||||
for (; cursor[interp] < 32; cursor[interp]++) {
|
||||
uint8_t cursor_used_comps = comps[cursor[interp]];
|
||||
|
||||
|
@@ -194,6 +194,7 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b)
|
||||
}
|
||||
|
||||
case nir_op_unpack_64_2x32:
|
||||
case nir_op_unpack_32_2x16:
|
||||
return false;
|
||||
|
||||
LOWER_REDUCTION(nir_op_fdot, nir_op_fmul, nir_op_fadd);
|
||||
|
@@ -301,6 +301,11 @@ glsl_type_is_boolean(const struct glsl_type *type)
|
||||
{
|
||||
return type->is_boolean();
|
||||
}
|
||||
bool
|
||||
glsl_type_is_integer(const struct glsl_type *type)
|
||||
{
|
||||
return type->is_integer();
|
||||
}
|
||||
|
||||
const glsl_type *
|
||||
glsl_void_type(void)
|
||||
|
@@ -142,6 +142,7 @@ bool glsl_type_is_image(const struct glsl_type *type);
|
||||
bool glsl_type_is_dual_slot(const struct glsl_type *type);
|
||||
bool glsl_type_is_numeric(const struct glsl_type *type);
|
||||
bool glsl_type_is_boolean(const struct glsl_type *type);
|
||||
bool glsl_type_is_integer(const struct glsl_type *type);
|
||||
bool glsl_sampler_type_is_shadow(const struct glsl_type *type);
|
||||
bool glsl_sampler_type_is_array(const struct glsl_type *type);
|
||||
bool glsl_contains_atomic(const struct glsl_type *type);
|
||||
|
@@ -1811,6 +1811,26 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
|
||||
src[j] = src_val->constant->values[0];
|
||||
}
|
||||
|
||||
/* fix up fixed size sources */
|
||||
switch (op) {
|
||||
case nir_op_ishl:
|
||||
case nir_op_ishr:
|
||||
case nir_op_ushr: {
|
||||
if (bit_size == 32)
|
||||
break;
|
||||
for (unsigned i = 0; i < num_components; ++i) {
|
||||
switch (bit_size) {
|
||||
case 64: src[1].u32[i] = src[1].u64[i]; break;
|
||||
case 16: src[1].u32[i] = src[1].u16[i]; break;
|
||||
case 8: src[1].u32[i] = src[1].u8[i]; break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
val->constant->values[0] =
|
||||
nir_eval_const_opcode(op, num_components, bit_size, src);
|
||||
break;
|
||||
|
@@ -696,6 +696,17 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
|
||||
src[1] = tmp;
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
case nir_op_ishl:
|
||||
case nir_op_ishr:
|
||||
case nir_op_ushr:
|
||||
if (src[1]->bit_size != 32)
|
||||
src[1] = nir_u2u32(&b->nb, src[1]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
val->ssa->def = nir_build_alu(&b->nb, op, src[0], src[1], src[2], src[3]);
|
||||
break;
|
||||
} /* default */
|
||||
|
@@ -196,6 +196,9 @@ EGL_FUNCTIONS = (
|
||||
# EGL_ANDROID_native_fence_sync
|
||||
_eglFunc("eglDupNativeFenceFDANDROID", "display"),
|
||||
|
||||
# EGL_ANDROID_blob_cache
|
||||
_eglFunc("eglSetBlobCacheFuncsANDROID", "display"),
|
||||
|
||||
# EGL_EXT_image_dma_buf_import_modifiers
|
||||
_eglFunc("eglQueryDmaBufFormatsEXT", "display"),
|
||||
_eglFunc("eglQueryDmaBufModifiersEXT", "display"),
|
||||
|
@@ -580,10 +580,12 @@ static int si_get_video_param(struct pipe_screen *screen,
|
||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||
return (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
|
||||
(si_vce_is_fw_version_supported(sscreen) ||
|
||||
sscreen->info.family == CHIP_RAVEN)) ||
|
||||
sscreen->info.family == CHIP_RAVEN ||
|
||||
sscreen->info.family == CHIP_RAVEN2)) ||
|
||||
(profile == PIPE_VIDEO_PROFILE_HEVC_MAIN &&
|
||||
(sscreen->info.family == CHIP_RAVEN ||
|
||||
si_radeon_uvd_enc_supported(sscreen)));
|
||||
sscreen->info.family == CHIP_RAVEN2 ||
|
||||
si_radeon_uvd_enc_supported(sscreen)));
|
||||
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
||||
return 1;
|
||||
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
||||
@@ -631,7 +633,8 @@ static int si_get_video_param(struct pipe_screen *screen,
|
||||
return profile == PIPE_VIDEO_PROFILE_HEVC_MAIN;
|
||||
return false;
|
||||
case PIPE_VIDEO_FORMAT_JPEG:
|
||||
if (sscreen->info.family == CHIP_RAVEN)
|
||||
if (sscreen->info.family == CHIP_RAVEN ||
|
||||
sscreen->info.family == CHIP_RAVEN2)
|
||||
return true;
|
||||
if (sscreen->info.family < CHIP_CARRIZO || sscreen->info.family >= CHIP_VEGA10)
|
||||
return false;
|
||||
|
@@ -146,7 +146,8 @@ struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
|
||||
const struct pipe_video_codec *templ)
|
||||
{
|
||||
struct si_context *ctx = (struct si_context *)context;
|
||||
bool vcn = (ctx->family == CHIP_RAVEN) ? true : false;
|
||||
bool vcn = ctx->family == CHIP_RAVEN ||
|
||||
ctx->family == CHIP_RAVEN2;
|
||||
|
||||
if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
|
||||
if (vcn) {
|
||||
|
@@ -572,7 +572,15 @@ vc4_resource_create_with_modifiers(struct pipe_screen *pscreen,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (screen->ro && tmpl->bind & PIPE_BIND_SCANOUT) {
|
||||
/* Set up the "scanout resource" (the dmabuf export of our buffer to
|
||||
* the KMS handle) if the buffer might ever have
|
||||
* resource_get_handle(WINSYS_HANDLE_TYPE_KMS) called on it.
|
||||
* create_with_modifiers() doesn't give us usage flags, so we have to
|
||||
* assume that all calls with modifiers are scanout-possible.
|
||||
*/
|
||||
if (screen->ro &&
|
||||
((tmpl->bind & PIPE_BIND_SCANOUT) ||
|
||||
!(count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID))) {
|
||||
rsc->scanout =
|
||||
renderonly_scanout_for_resource(prsc, screen->ro, NULL);
|
||||
if (!rsc->scanout)
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include "os/os_thread.h"
|
||||
#include "threadpool.h"
|
||||
|
||||
/* POSIX thread function */
|
||||
static void *
|
||||
threadpool_worker(void *data)
|
||||
{
|
||||
@@ -76,6 +77,15 @@ threadpool_worker(void *data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Windows thread function */
|
||||
static DWORD NINE_WINAPI
|
||||
wthreadpool_worker(void *data)
|
||||
{
|
||||
threadpool_worker(data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct threadpool *
|
||||
_mesa_threadpool_create(struct NineSwapChain9 *swapchain)
|
||||
{
|
||||
@@ -87,7 +97,9 @@ _mesa_threadpool_create(struct NineSwapChain9 *swapchain)
|
||||
pthread_mutex_init(&pool->m, NULL);
|
||||
pthread_cond_init(&pool->new_work, NULL);
|
||||
|
||||
pool->wthread = NineSwapChain9_CreateThread(swapchain, threadpool_worker, pool);
|
||||
/* This uses WINE's CreateThread, so the thread function needs to use
|
||||
* the Windows ABI */
|
||||
pool->wthread = NineSwapChain9_CreateThread(swapchain, wthreadpool_worker, pool);
|
||||
if (!pool->wthread) {
|
||||
/* using pthread as fallback */
|
||||
pthread_create(&pool->pthread, NULL, threadpool_worker, pool);
|
||||
|
@@ -32,7 +32,6 @@ args_gbm = []
|
||||
deps_gbm = []
|
||||
incs_gbm = [
|
||||
include_directories('main'), inc_include, inc_src, inc_loader,
|
||||
inc_wayland_drm,
|
||||
]
|
||||
|
||||
if with_dri2
|
||||
|
@@ -167,7 +167,7 @@ static void
|
||||
brw_dispatch_compute_common(struct gl_context *ctx)
|
||||
{
|
||||
struct brw_context *brw = brw_context(ctx);
|
||||
bool fail_next;
|
||||
bool fail_next = false;
|
||||
|
||||
if (!_mesa_check_conditional_render(ctx))
|
||||
return;
|
||||
@@ -185,7 +185,6 @@ brw_dispatch_compute_common(struct gl_context *ctx)
|
||||
intel_batchbuffer_require_space(brw, 600);
|
||||
brw_require_statebuffer_space(brw, 2500);
|
||||
intel_batchbuffer_save_state(brw);
|
||||
fail_next = intel_batchbuffer_saved_state_is_empty(brw);
|
||||
|
||||
retry:
|
||||
brw->batch.no_wrap = true;
|
||||
|
@@ -885,7 +885,7 @@ brw_draw_single_prim(struct gl_context *ctx,
|
||||
{
|
||||
struct brw_context *brw = brw_context(ctx);
|
||||
const struct gen_device_info *devinfo = &brw->screen->devinfo;
|
||||
bool fail_next;
|
||||
bool fail_next = false;
|
||||
|
||||
/* Flag BRW_NEW_DRAW_CALL on every draw. This allows us to have
|
||||
* atoms that happen on every draw call.
|
||||
@@ -898,7 +898,6 @@ brw_draw_single_prim(struct gl_context *ctx,
|
||||
intel_batchbuffer_require_space(brw, 1500);
|
||||
brw_require_statebuffer_space(brw, 2400);
|
||||
intel_batchbuffer_save_state(brw);
|
||||
fail_next = intel_batchbuffer_saved_state_is_empty(brw);
|
||||
|
||||
if (brw->num_instances != prim->num_instances ||
|
||||
brw->basevertex != prim->basevertex ||
|
||||
|
@@ -1499,18 +1499,6 @@ update_buffer_image_param(struct brw_context *brw,
|
||||
param->stride[0] = _mesa_get_format_bytes(u->_ActualFormat);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
get_image_num_layers(const struct intel_mipmap_tree *mt, GLenum target,
|
||||
unsigned level)
|
||||
{
|
||||
if (target == GL_TEXTURE_CUBE_MAP)
|
||||
return 6;
|
||||
|
||||
return target == GL_TEXTURE_3D ?
|
||||
minify(mt->surf.logical_level0_px.depth, level) :
|
||||
mt->surf.logical_level0_px.array_len;
|
||||
}
|
||||
|
||||
static void
|
||||
update_image_surface(struct brw_context *brw,
|
||||
struct gl_image_unit *u,
|
||||
@@ -1541,14 +1529,29 @@ update_image_surface(struct brw_context *brw,
|
||||
} else {
|
||||
struct intel_texture_object *intel_obj = intel_texture_object(obj);
|
||||
struct intel_mipmap_tree *mt = intel_obj->mt;
|
||||
const unsigned num_layers = u->Layered ?
|
||||
get_image_num_layers(mt, obj->Target, u->Level) : 1;
|
||||
|
||||
unsigned base_layer, num_layers;
|
||||
if (u->Layered) {
|
||||
if (obj->Target == GL_TEXTURE_3D) {
|
||||
base_layer = 0;
|
||||
num_layers = minify(mt->surf.logical_level0_px.depth, u->Level);
|
||||
} else {
|
||||
assert(obj->Immutable || obj->MinLayer == 0);
|
||||
base_layer = obj->MinLayer;
|
||||
num_layers = obj->Immutable ?
|
||||
obj->NumLayers :
|
||||
mt->surf.logical_level0_px.array_len;
|
||||
}
|
||||
} else {
|
||||
base_layer = obj->MinLayer + u->_Layer;
|
||||
num_layers = 1;
|
||||
}
|
||||
|
||||
struct isl_view view = {
|
||||
.format = format,
|
||||
.base_level = obj->MinLevel + u->Level,
|
||||
.levels = 1,
|
||||
.base_array_layer = obj->MinLayer + u->_Layer,
|
||||
.base_array_layer = base_layer,
|
||||
.array_len = num_layers,
|
||||
.swizzle = ISL_SWIZZLE_IDENTITY,
|
||||
.usage = ISL_SURF_USAGE_STORAGE_BIT,
|
||||
|
@@ -268,7 +268,7 @@ genX(blorp_exec)(struct blorp_batch *batch,
|
||||
assert(batch->blorp->driver_ctx == batch->driver_batch);
|
||||
struct brw_context *brw = batch->driver_batch;
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
bool check_aperture_failed_once;
|
||||
bool check_aperture_failed_once = false;
|
||||
|
||||
#if GEN_GEN >= 11
|
||||
/* The PIPE_CONTROL command description says:
|
||||
@@ -309,7 +309,6 @@ retry:
|
||||
intel_batchbuffer_require_space(brw, 1400);
|
||||
brw_require_statebuffer_space(brw, 600);
|
||||
intel_batchbuffer_save_state(brw);
|
||||
check_aperture_failed_once = intel_batchbuffer_saved_state_is_empty(brw);
|
||||
brw->batch.no_wrap = true;
|
||||
|
||||
#if GEN_GEN == 6
|
||||
|
@@ -301,13 +301,6 @@ intel_batchbuffer_save_state(struct brw_context *brw)
|
||||
brw->batch.saved.exec_count = brw->batch.exec_count;
|
||||
}
|
||||
|
||||
bool
|
||||
intel_batchbuffer_saved_state_is_empty(struct brw_context *brw)
|
||||
{
|
||||
struct intel_batchbuffer *batch = &brw->batch;
|
||||
return (batch->saved.map_next == batch->batch.map);
|
||||
}
|
||||
|
||||
void
|
||||
intel_batchbuffer_reset_to_saved(struct brw_context *brw)
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@ struct intel_batchbuffer;
|
||||
void intel_batchbuffer_init(struct brw_context *brw);
|
||||
void intel_batchbuffer_free(struct intel_batchbuffer *batch);
|
||||
void intel_batchbuffer_save_state(struct brw_context *brw);
|
||||
bool intel_batchbuffer_saved_state_is_empty(struct brw_context *brw);
|
||||
void intel_batchbuffer_reset_to_saved(struct brw_context *brw);
|
||||
void intel_batchbuffer_require_space(struct brw_context *brw, GLuint sz);
|
||||
int _intel_batchbuffer_flush_fence(struct brw_context *brw,
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include "shaderapi.h"
|
||||
#include "shaderobj.h"
|
||||
|
||||
#include "program/program.h"
|
||||
#include "program/prog_parameter.h"
|
||||
|
||||
struct using_program_tuple
|
||||
@@ -470,6 +471,7 @@ begin_transform_feedback(struct gl_context *ctx, GLenum mode, bool no_error)
|
||||
|
||||
if (obj->program != source) {
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedbackProg;
|
||||
_mesa_reference_program_(ctx, &obj->program, source);
|
||||
obj->program = source;
|
||||
}
|
||||
|
||||
@@ -504,6 +506,7 @@ end_transform_feedback(struct gl_context *ctx,
|
||||
assert(ctx->Driver.EndTransformFeedback);
|
||||
ctx->Driver.EndTransformFeedback(ctx, obj);
|
||||
|
||||
_mesa_reference_program_(ctx, &obj->program, NULL);
|
||||
ctx->TransformFeedback.CurrentObject->Active = GL_FALSE;
|
||||
ctx->TransformFeedback.CurrentObject->Paused = GL_FALSE;
|
||||
ctx->TransformFeedback.CurrentObject->EndedAnytime = GL_TRUE;
|
||||
|
@@ -1069,15 +1069,6 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
|
||||
* of the referenced drawables no longer exist.
|
||||
*/
|
||||
st_framebuffers_purge(st);
|
||||
|
||||
/* Notify the driver that the context thread may have been changed.
|
||||
* This should pin all driver threads to a specific L3 cache for optimal
|
||||
* performance on AMD Zen CPUs.
|
||||
*/
|
||||
struct glthread_state *glthread = st->ctx->GLThread;
|
||||
thrd_t *upper_thread = glthread ? &glthread->queue.threads[0] : NULL;
|
||||
|
||||
util_context_thread_changed(st->pipe, upper_thread);
|
||||
}
|
||||
else {
|
||||
ret = _mesa_make_current(NULL, NULL, NULL);
|
||||
|
@@ -51,8 +51,12 @@ subdir('util')
|
||||
subdir('mapi')
|
||||
# TODO: opengl
|
||||
subdir('compiler')
|
||||
subdir('egl/wayland/wayland-drm')
|
||||
subdir('vulkan')
|
||||
if with_platform_wayland
|
||||
subdir('egl/wayland/wayland-drm')
|
||||
endif
|
||||
if with_any_vk
|
||||
subdir('vulkan')
|
||||
endif
|
||||
if with_gallium_radeonsi or with_amd_vk
|
||||
subdir('amd')
|
||||
endif
|
||||
|
@@ -554,10 +554,18 @@ ralloc_vasprintf_rewrite_tail(char **str, size_t *start, const char *fmt,
|
||||
*/
|
||||
|
||||
#define MIN_LINEAR_BUFSIZE 2048
|
||||
#define SUBALLOC_ALIGNMENT sizeof(uintptr_t)
|
||||
#define SUBALLOC_ALIGNMENT 8
|
||||
#define LMAGIC 0x87b9c7d3
|
||||
|
||||
struct linear_header {
|
||||
struct
|
||||
#ifdef _MSC_VER
|
||||
__declspec(align(8))
|
||||
#elif defined(__LP64__)
|
||||
__attribute__((aligned(16)))
|
||||
#else
|
||||
__attribute__((aligned(8)))
|
||||
#endif
|
||||
linear_header {
|
||||
#ifdef DEBUG
|
||||
unsigned magic; /* for debugging */
|
||||
#endif
|
||||
@@ -651,6 +659,8 @@ linear_alloc_child(void *parent, unsigned size)
|
||||
ptr = (linear_size_chunk *)((char*)&latest[1] + latest->offset);
|
||||
ptr->size = size;
|
||||
latest->offset += full_size;
|
||||
|
||||
assert((uintptr_t)&ptr[1] % SUBALLOC_ALIGNMENT == 0);
|
||||
return &ptr[1];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user